/* ==========================================================================
   layout.css — Distinctive editorial layout
   Fixed left sidebar nav rail (desktop) + bento grids + oversized numerals.
   Loaded AFTER theme.css / components.css so it can override structure.
   ========================================================================== */

/* ---------------------------------------------------------------
   1. Left sidebar navigation rail (desktop ≥ 1080px)
   --------------------------------------------------------------- */
:root { --rail-w: 268px; }

@media (min-width: 1080px) {
  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed; inset: 0 auto 0 0; width: var(--rail-w);
    background: linear-gradient(180deg, var(--cream-100), var(--cream-200));
    border-right: 1px solid var(--line); border-bottom: 0;
    backdrop-filter: none; z-index: 60;
  }
  .site-header .nav {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    height: 100%; padding: 2.2rem 1.5rem 1.8rem; gap: 0;
  }
  .site-header .brand { flex-direction: row; margin-bottom: 2.2rem; }
  .nav__toggle { display: none !important; }

  .nav__links {
    position: static; flex-direction: column; align-items: stretch; gap: .15rem;
    width: 100%; transform: none; background: none; box-shadow: none; padding: 0;
    border: 0; inset: auto;
  }
  .nav__links > li { position: relative; }
  .nav__links a {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    padding: .7rem .8rem; font-size: 1rem; border-radius: 10px; color: var(--brand-dark);
  }
  /* editorial index numbers on rail items */
  .nav__links > li:not(.nav__cta) a::before {
    content: counter(rail); counter-increment: rail;
    font-family: var(--font-head); font-size: .72rem; font-weight: 700;
    color: var(--brand); opacity: .5; width: 1.2rem; letter-spacing: .05em;
  }
  .nav__links { counter-reset: rail; }
  .nav__links a[aria-current="page"] {
    background: var(--brand-dark); color: #fff;
  }
  .nav__links a[aria-current="page"]::before { color: var(--gold-400); opacity: 1; }

  .nav__cta { margin-top: auto; padding-top: 1.4rem; width: 100%; }
  .nav__cta .btn { width: 100%; justify-content: center; }

  /* Pay buttons sit below the "Phoenix · Glendale · Tucson" note, which is the
     ::after on .nav__cta. They are not nav items, so suppress the rail's
     editorial numbering (which also stops the counter incrementing). */
  .nav__pay { width: 100%; margin-top: .9rem; }
  .nav__pay a::before { content: none !important; }

  /* a subtle rail footer note */
  .nav__cta::after {
    content: "Phoenix · Glendale · Tucson"; display: block;
    margin-top: 1rem; font-size: .72rem; letter-spacing: .04em;
    color: var(--muted); text-align: center;
  }
}

/* ---------------------------------------------------------------
   2. Keyword marquee strip
   --------------------------------------------------------------- */
.marquee {
  background: var(--brand-dark); color: var(--cream-100);
  overflow: hidden; white-space: nowrap; padding-block: .8rem;
  border-block: 1px solid rgba(255,255,255,.08);
}
.marquee__track {
  display: inline-flex; gap: 2.5rem; align-items: center;
  animation: marquee 32s linear infinite; will-change: transform;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 2.5rem; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .02em; }
.marquee__track span::after { content: "◆"; color: var(--gold-400); font-size: .7rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------------------------------------------------------------
   3. Bento hero
   --------------------------------------------------------------- */
.bento-hero {
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(54,138,132,.28), transparent 60%),
    linear-gradient(165deg, var(--navy-900), var(--navy-800) 55%, var(--navy-700));
  color: var(--cream-100); padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
.bento {
  display: grid; gap: 1rem; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(96px, auto);
}
.bento__cell {
  border-radius: var(--r-lg); padding: clamp(1.3rem, 2.4vw, 2rem);
  border: 1px solid rgba(255,255,255,.12); position: relative; overflow: hidden;
}
.bento__cell--head {
  grid-column: span 6; grid-row: span 3;
  background: rgba(255,255,255,.04); display: flex; flex-direction: column; justify-content: center;
}
.bento__cell--stat { grid-column: span 3; background: rgba(255,255,255,.05); display: flex; flex-direction: column; justify-content: center; }
.bento__cell--accent {
  grid-column: span 3; grid-row: span 2; background: linear-gradient(150deg, var(--teal-600), var(--gold-500));
  color: var(--navy-900); display: flex; flex-direction: column; justify-content: space-between;
}
.bento__cell--cta { grid-column: span 3; background: var(--gold-500); color: var(--navy-900); display: flex; flex-direction: column; justify-content: center; gap: .8rem; }
.bento__cell--quote { grid-column: span 6; background: rgba(255,255,255,.04); display: flex; align-items: center; }

@media (min-width: 780px) {
  .bento__cell--head { grid-column: span 4; grid-row: span 4; }
  .bento__cell--accent { grid-column: span 2; grid-row: span 4; }
  .bento__cell--stat { grid-column: span 2; grid-row: span 2; }
  .bento__cell--cta { grid-column: span 2; grid-row: span 2; }
  .bento__cell--quote { grid-column: span 4; grid-row: span 2; }
}

.bento h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
.bento__badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(217,164,65,.16); border: 1px solid rgba(217,164,65,.4); color: var(--gold-400);
  padding: .35rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 700; margin-bottom: 1.1rem;
}
.bento__lead { color: #cdd6de; margin-top: 1rem; max-width: 46ch; }
.bento .stat__num { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); color: var(--gold-400); }
.bento__cell--accent .stat__num { color: var(--navy-900); }
.bento__cell--accent p, .bento__cell--cta p { color: rgba(13,27,42,.8); margin: 0; }
.bento__eyebrow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.55); }
.bento__cell--accent .bento__eyebrow { color: rgba(13,27,42,.6); }
.bento__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }
/* Rooms cell: stat with the Pathway link beside it, the pair centred in the cell.
   Keyed to the cell's own width (container query): when the cell is too narrow
   to hold both — phones, and tablet widths where the bento is tight — they stack. */
.bento__cell--stat-split { container-type: inline-size; }
.bento__stat-split {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .9rem; text-align: center; height: 100%;
}
.bento__stat-split .stat__label { white-space: nowrap; }
.bento__stat-btn {
  padding: .6rem .9rem; font-size: .78rem; line-height: 1.25;
  white-space: normal; text-align: center;
}
@container (min-width: 220px) {
  .bento__stat-split { flex-direction: row; text-align: left; gap: 1.1rem; }
  .bento__stat-split > div { flex: none; }
  .bento__stat-btn { flex: 0 1 8.5rem; }
}

/* ---------------------------------------------------------------
   4. Editorial numbered sections (giant outline numerals)
   --------------------------------------------------------------- */
.numbered { counter-reset: sec; }
.editorial {
  display: grid; gap: clamp(1rem, 4vw, 3rem); align-items: start;
  grid-template-columns: 1fr; padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) { .editorial { grid-template-columns: minmax(140px, .35fr) 1fr; } }
.editorial__num {
  counter-increment: sec; font-family: var(--font-head); font-weight: 800; line-height: .8;
  font-size: clamp(3.5rem, 3rem + 5vw, 7rem);
  -webkit-text-stroke: 2px var(--brand); color: transparent;
  position: sticky; top: 90px;
}
.editorial__num::before { content: counter(sec, decimal-leading-zero); }
.editorial__body { max-width: 68ch; }

/* ---------------------------------------------------------------
   5. Bento feature grid (asymmetric cards)
   --------------------------------------------------------------- */
.feature-bento { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 820px) { .feature-bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; } }
.feature-bento .card { margin: 0; }
.feature-bento .card--wide { grid-column: span 2; }
.feature-bento .card--tall { grid-row: span 2; background: linear-gradient(160deg, var(--teal-600), var(--navy-800)); color: #fff; border-color: transparent; }
.feature-bento .card--tall h3, .feature-bento .card--tall p { color: #fff; }
.feature-bento .card--tall .card__icon { background: rgba(255,255,255,.14); color: #fff; }

/* ---------------------------------------------------------------
   6. Angled section accent
   --------------------------------------------------------------- */
.angle-top { position: relative; }
.angle-top::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 40px;
  background: inherit; clip-path: polygon(0 100%, 100% 0, 100% 100%); transform: translateY(-100%);
}

/* Full-bleed helper so hero/marquee ignore the reading container */
.bleed { width: 100%; }
