.locations-page {
  background: var(--paper-deep);
}

.locations-hero {
  min-height: 740px;
  height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 15, 17, 0.94) 0%, rgba(7, 15, 17, 0.84) 38%, rgba(7, 15, 17, 0.64) 68%, rgba(7, 15, 17, 0.54) 100%),
    linear-gradient(0deg, rgba(7, 15, 17, 0.68) 0%, transparent 52%),
    url("assets/bstl-locations-hero-community.webp") center 47% / cover no-repeat;
  color: var(--white);
}

.locations-hero-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 16.666% 100%,
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 25%;
  mask-image: linear-gradient(to bottom, black, transparent 96%);
}

.locations-route {
  width: min(48vw, 720px);
  height: min(48vw, 720px);
  position: absolute;
  right: -7vw;
  bottom: -20vw;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.018),
    0 0 0 140px rgba(255, 255, 255, 0.012);
}

.locations-route span {
  width: 13px;
  height: 13px;
  position: absolute;
  border: 3px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.11);
}

.locations-route span:nth-child(1) { left: 7%; top: 37%; }
.locations-route span:nth-child(2) { left: 27%; top: 11%; }
.locations-route span:nth-child(3) { right: 23%; top: 8%; }
.locations-route span:nth-child(4) { right: 2%; top: 34%; }

.locations-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 80px;
  padding-top: 125px;
}

.locations-hero-copy {
  max-width: 960px;
}

.locations-hero h1 {
  margin-top: 27px;
  font-size: clamp(5.4rem, 9.4vw, 10.2rem);
  line-height: 0.79;
}

.locations-hero h1 em {
  color: var(--gold-light);
}

.locations-hero-copy > p:last-child {
  max-width: 590px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  line-height: 1.75;
}

.locations-hero-count {
  display: flex;
  align-items: end;
  gap: 17px;
  padding-bottom: 16px;
  flex: 0 0 auto;
}

.locations-hero-count strong {
  color: var(--coral);
  font: 400 clamp(5.7rem, 8vw, 9rem) / 0.72 var(--serif);
  letter-spacing: -0.08em;
}

.locations-hero-count span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.branch-index {
  position: sticky;
  z-index: 20;
  top: 82px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
}

.branch-index-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.branch-index a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 0 28px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.branch-index a:last-child {
  border-right: 1px solid var(--line);
}

.branch-index a:hover {
  background: var(--ink-soft);
  color: var(--white);
}

.branch-index a span {
  color: #a98655;
  font-size: 0.59rem;
}

.locations-directory {
  background: var(--paper-deep);
}

.directory-heading {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 76px;
}

.directory-heading h2 {
  margin-top: 24px;
  font-size: clamp(4.4rem, 7vw, 7.6rem);
  line-height: 0.88;
}

.directory-heading h2 em {
  color: #9b7950;
}

.directory-heading > p {
  max-width: 420px;
  justify-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.branch-featured,
.branch-card {
  scroll-margin-top: 190px;
}

.branch-featured {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  min-height: 720px;
  margin-bottom: 32px;
  background: var(--ink-soft);
  color: var(--white);
  box-shadow: 0 26px 80px rgba(38, 58, 63, 0.13);
}

.branch-featured-photo {
  position: relative;
  min-height: 580px;
  background:
    linear-gradient(0deg, rgba(10, 18, 20, 0.5), transparent 48%),
    url("assets/bstl-kingsbury-aerial-v3.webp") center 52% / cover no-repeat;
}

.branch-photo-label {
  position: absolute;
  left: 34px;
  bottom: 32px;
  padding: 10px 14px;
  background: rgba(12, 21, 24, 0.77);
  color: var(--gold-light);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.branch-featured-content,
.branch-card {
  display: flex;
  flex-direction: column;
}

.branch-featured-content {
  padding: clamp(34px, 4vw, 62px);
}

.branch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.branch-number {
  font: 400 3.5rem/1 var(--serif);
  letter-spacing: -0.06em;
  opacity: 0.55;
}

.branch-pin {
  width: 34px;
  height: 34px;
  position: relative;
  border: 1px solid currentColor;
  border-radius: 50% 50% 50% 0;
  opacity: 0.55;
  transform: rotate(-45deg);
}

.branch-pin::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 50%;
  background: currentColor;
}

.branch-kicker {
  margin-top: auto;
  color: var(--gold-light);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.branch-featured h3 {
  margin-top: 19px;
  font-size: clamp(3.15rem, 4.4vw, 5rem);
  line-height: 0.91;
}

.branch-featured address,
.branch-card address {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.77rem;
  font-style: normal;
  line-height: 1.7;
}

.branch-program {
  margin-top: 38px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  border-color: rgba(255, 255, 255, 0.16);
}

.branch-program div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.branch-program div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.branch-program dt,
.branch-program dd {
  font-size: 0.63rem;
  line-height: 1.5;
}

.branch-program dt {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.branch-program dd {
  color: rgba(255, 255, 255, 0.63);
  text-align: right;
}

.branch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.branch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.branch-action-primary,
.branch-action:hover {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink-soft);
}

.branch-action:hover {
  transform: translateY(-2px);
}

.branch-social {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.branch-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.branch-card {
  min-height: 650px;
  padding: clamp(28px, 3.4vw, 48px);
  background: var(--ink-soft);
  color: var(--white);
}

.branch-card-gold {
  background: #c9a76e;
  color: #182429;
}

.branch-card-coral {
  background: var(--coral);
  color: #182429;
}

.branch-card .branch-card-main {
  margin-top: auto;
}

.branch-card h3 {
  margin-top: 18px;
  font-size: clamp(2.45rem, 3.2vw, 3.7rem);
  line-height: 0.94;
}

.branch-card-gold .branch-kicker,
.branch-card-coral .branch-kicker {
  color: rgba(24, 36, 41, 0.7);
}

.branch-card-gold address,
.branch-card-coral address,
.branch-card-gold .branch-program dd,
.branch-card-coral .branch-program dd {
  color: rgba(24, 36, 41, 0.72);
}

.branch-card-gold .branch-program,
.branch-card-coral .branch-program {
  border-color: rgba(24, 36, 41, 0.22);
}

.branch-card-gold .branch-action-primary,
.branch-card-coral .branch-action-primary,
.branch-card-gold .branch-action:hover,
.branch-card-coral .branch-action:hover {
  border-color: var(--ink-soft);
  background: var(--ink-soft);
  color: var(--white);
}

.locations-cta {
  overflow: hidden;
  background:
    radial-gradient(circle at 79% 22%, rgba(252, 130, 108, 0.17), transparent 27%),
    var(--ink-soft);
  color: var(--white);
}

.locations-cta-inner {
  max-width: 980px;
  text-align: center;
}

.locations-cta h2 {
  margin-top: 25px;
  font-size: clamp(4.3rem, 7.5vw, 8rem);
  line-height: 0.85;
}

.locations-cta h2 em {
  color: var(--gold-light);
}

.locations-cta-inner > p:not(.eyebrow) {
  max-width: 610px;
  margin: 32px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  line-height: 1.7;
}

.locations-cta .button {
  margin-top: 32px;
}

@media (max-width: 1100px) {
  .locations-hero-inner,
  .directory-heading {
    grid-template-columns: 1fr;
  }

  .locations-hero-count {
    display: none;
  }

  .directory-heading > p {
    justify-self: start;
  }

  .branch-featured {
    grid-template-columns: 1fr;
  }

  .branch-featured-photo {
    min-height: 520px;
  }

  .branch-featured-content {
    min-height: 640px;
  }

  .branch-cards {
    grid-template-columns: 1fr 1fr;
  }

  .branch-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .locations-hero {
    min-height: 690px;
    height: 100svh;
    background-position: center, center, 56% 48%;
  }

  .locations-hero-inner {
    padding-top: 120px;
  }

  .locations-hero h1 {
    font-size: clamp(4.35rem, 20vw, 6.4rem);
    line-height: 0.82;
  }

  .locations-hero-copy > p:last-child {
    margin-top: 29px;
    font-size: 0.8rem;
  }

  .locations-route {
    width: 560px;
    height: 560px;
    right: -340px;
    bottom: -135px;
  }

  .branch-index {
    top: 74px;
    overflow-x: auto;
  }

  .branch-index-inner {
    width: max-content;
    min-width: 100%;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .branch-index a {
    min-height: 70px;
    padding-inline: 20px;
  }

  .directory-heading {
    gap: 28px;
    margin-bottom: 48px;
  }

  .directory-heading h2 {
    font-size: clamp(3.6rem, 16vw, 5.4rem);
  }

  .branch-featured-photo {
    min-height: 400px;
  }

  .branch-featured-content {
    min-height: 590px;
    padding: 30px 24px;
  }

  .branch-featured h3 {
    font-size: clamp(2.9rem, 13vw, 4.15rem);
  }

  .branch-cards {
    grid-template-columns: 1fr;
  }

  .branch-card,
  .branch-card:last-child {
    min-height: 610px;
    grid-column: auto;
  }

  .branch-card h3 {
    font-size: clamp(2.65rem, 12vw, 3.65rem);
  }

  .locations-cta h2 {
    font-size: clamp(3.8rem, 17vw, 5.7rem);
  }
}

@media (max-width: 480px) {
  .locations-hero h1 {
    font-size: clamp(3.75rem, 18vw, 5rem);
  }

  .branch-featured-photo {
    min-height: 330px;
  }

  .branch-actions {
    grid-template-columns: 1fr;
  }

  .branch-social {
    grid-column: auto;
  }

  .branch-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .branch-action {
    transition: none;
  }
}
