.cb-locations {
  --loc-ink: #e9f3ee;
  --loc-muted: rgba(233, 243, 238, 0.68);
  --loc-line: rgba(233, 243, 238, 0.14);
  --loc-green: #00c67b;
  --loc-deep: #07161c;
  --loc-panel: #0d242c;
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  background: radial-gradient(1200px 520px at 8% -10%, #16343c 0%, var(--loc-deep) 52%);
  color: var(--loc-ink);
  overflow: hidden;
  padding: 4.25rem 0 5.5rem;
}

.cb-locations::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cb-locations__inner {
  position: relative;
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.cb-locations__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "kicker count"
    "title count"
    "lede count";
  column-gap: 2rem;
  align-items: end;
  margin-bottom: 2.35rem;
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}

.cb-locations__intro.is-in {
  animation: cb-loc-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cb-locations__kicker {
  grid-area: kicker;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--loc-green);
}

.cb-locations__kicker::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin-right: 0.7rem;
  margin-bottom: 0.22rem;
  background: var(--loc-green);
  vertical-align: middle;
  transform-origin: left center;
}

.cb-locations__intro.is-in .cb-locations__kicker::before {
  animation: cb-loc-rule 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cb-locations h2 {
  grid-area: title;
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--loc-ink);
}

.cb-locations__lede {
  grid-area: lede;
  max-width: 34rem;
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--loc-muted);
}

.cb-locations__count {
  grid-area: count;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 0.8;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 198, 123, 0.55);
}

.cb-locations__count small {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--loc-muted);
  -webkit-text-stroke: 0;
  font-weight: 500;
}

.cb-locations__board {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: minmax(16.5rem, 30vh) minmax(13.75rem, 24vh) minmax(13.75rem, 24vh);
  grid-template-areas:
    "hq sa sa"
    "hq mi mo"
    "rm rm mo";
  gap: 0.7rem 0.75rem;
}

.cb-loc--hq { grid-area: hq; }
.cb-loc--sa { grid-area: sa; }
.cb-loc--mi { grid-area: mi; }
.cb-loc--rm { grid-area: rm; }
.cb-loc--mo { grid-area: mo; }

.cb-loc {
  position: relative;
  display: block;
  min-height: 14rem;
  overflow: hidden;
  background: var(--loc-panel);
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  opacity: 0;
  transform: translate3d(0, 42px, 0);
}

.cb-loc.is-in {
  animation: cb-loc-rise 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--d, 0s);
}

.cb-loc--hq {
  min-height: 22rem;
}

.cb-loc__media,
.cb-loc__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cb-loc__media img {
  object-fit: cover;
  transform: scale(1.12);
  filter: saturate(0.86) contrast(1.05);
  transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.cb-loc.is-in .cb-loc__media img {
  transform: scale(1);
}

.cb-loc:hover .cb-loc__media img,
.cb-loc:focus-visible .cb-loc__media img {
  transform: scale(1.07);
  filter: saturate(1.05) contrast(1.08);
}

.cb-loc__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 22, 28, 0.08) 12%, rgba(7, 22, 28, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 198, 123, 0.18), transparent 42%);
  z-index: 1;
}

.cb-loc__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.15rem 1.2rem 1.2rem;
}

.cb-loc__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--loc-green);
}

.cb-loc__index {
  font-variant-numeric: tabular-nums;
  color: rgba(233, 243, 238, 0.55);
}

.cb-loc h3 {
  margin: 0 0 0.28rem;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.cb-loc--hq h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.cb-loc address {
  margin: 0;
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--loc-muted);
}

.cb-loc__bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--loc-green);
  transform: scaleY(0);
  transform-origin: top;
  z-index: 3;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-loc:hover .cb-loc__bar,
.cb-loc:focus-visible .cb-loc__bar {
  transform: scaleY(1);
}

.cb-loc:focus-visible {
  outline: 2px solid var(--loc-green);
  outline-offset: 3px;
}

@keyframes cb-loc-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 42px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cb-loc-rule {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 64rem) {
  .cb-locations__board {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "hq hq"
      "sa sa"
      "mi rm"
      "mo mo";
  }
  .cb-loc--hq {
    min-height: 22rem;
  }
  .cb-loc--sa,
  .cb-loc--mo {
    min-height: 16rem;
  }
}

@media (max-width: 40rem) {
  .cb-locations {
    padding: 3.2rem 0 3.8rem;
  }
  .cb-locations__intro {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "title"
      "lede"
      "count";
  }
  .cb-locations__count {
    align-items: flex-start;
    margin-top: 1.1rem;
    font-size: 3.4rem;
  }
  .cb-locations__board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hq"
      "sa"
      "mi"
      "rm"
      "mo";
    gap: 0.6rem;
  }
  .cb-loc,
  .cb-loc--hq,
  .cb-loc--sa,
  .cb-loc--mo {
    min-height: 15.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb-locations__intro,
  .cb-loc,
  .cb-loc__media img,
  .cb-loc__bar,
  .cb-locations__kicker::before {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
