/* ============================================================
   LUXURY SALES — apply.css (the funnel)
   Page-specific styles only. Consumes base.css + motion.js.
   Modules: seat hero (drift toasts, one beam) → setter quote
   rail → pay race (flourish + monthly ledger) → career ladder
   bands → fit check → wins timestamps → booking finale.
   ============================================================ */

/* ---------- Rhythm: after the first full section, tops breathe tighter ---------- */
main .section ~ .section { padding-top: clamp(48px, 7vw, 96px); }
.sec-rail { padding-top: clamp(56px, 8vw, 100px); }

/* ---------- §9 choreography: overflow guards ----------
   Every section whose children travel horizontally (rail drift, rung drift,
   ghost numeral, roll-in near edges) clips at its own bounds — the
   zero-horizontal-overflow requirement at 375/768/1280/1680. */
.sec-rail, #pay, #ladder, #fit, #wins, #book { overflow: clip; }

/* ---------- 01 · HERO ---------- */
.ahero {
  position: relative; overflow: clip;
  min-height: 88svh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 84px));
  padding-bottom: clamp(48px, 7vw, 84px);
}
.ahero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(40px, 6vw, 96px); align-items: center;
  position: relative; z-index: 1;
}
.ahero-h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.7rem, 6.6vw, 4.9rem);
  line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.ahero-h1 .clause { font-size: 1.03em; }
.ahero-lede { margin-top: 24px; }
.ahero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ahero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.ahero-proof {
  margin-top: 36px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  font-variant-numeric: tabular-nums;
}

/* Booked-call toasts: independent sine drifts, one border beam.
   Offsets trade width for margin (total stays 100% — nothing overflows). */
.ahero-toasts { display: grid; gap: 18px; width: min(400px, 100%); justify-self: end; }
.ahero-toasts .toast { width: 100%; }
.ahero-toasts .t2 { width: 91%; margin-left: 9%; }
.ahero-toasts .t3 { width: 93%; }
.ahero-toasts .beam { --beam-cover: linear-gradient(180deg, #1C1710, #13100A); }

/* Toast layering (matches the homepage hero):
   outer .t1/.t2/.t3 holder — scroll parallax via the independent translate
   property (--p from the data-scrub .ahero-toasts wrapper; 0.5 fallback =
   zero offset pre-JS); middle [data-reveal] wrapper — one-shot entrance from
   the card's screen edge with a ~5% overshoot; inner .toast.drift — the
   infinite sine float. Reduced-motion guard: the engine pins --p to 1 there. */
@media (prefers-reduced-motion: no-preference) {
  .ahero-toasts .t1 { translate: 0 calc((var(--p, 0.5) - 0.5) * -40px); }
  .ahero-toasts .t2 { translate: 0 calc((var(--p, 0.5) - 0.5) * -26px); }
  .ahero-toasts .t3 { translate: 0 calc((var(--p, 0.5) - 0.5) * -52px); }
  html.js .ahero-toasts [data-reveal].is-in {
    animation: ls-toast-in 0.8s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    animation-delay: var(--d, 0s);
  }
}
@keyframes ls-toast-in {
  from { transform: translateX(var(--from, 44px)) scale(0.94); }
  to { transform: none; }
}

@media (max-width: 940px) {
  .ahero { min-height: 0; }
  .ahero-grid { grid-template-columns: 1fr; gap: 48px; }
  .ahero-toasts { justify-self: stretch; width: 100%; max-width: 420px; margin-inline: auto; }
  .ahero-toasts .t1, .ahero-toasts .t2, .ahero-toasts .t3 { translate: none; }
  .ahero-toasts .t2 { width: 95%; margin-left: 5%; }
  .ahero-toasts .t3 { width: 100%; }
}

/* ---------- 02 · QUOTE RAIL ---------- */
.rail-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: clamp(24px, 4vw, 36px);
}
.rail-top .eyebrow { margin-bottom: 16px; }
.rail-card {
  flex: 0 0 min(380px, 84vw);
  display: flex; flex-direction: column; gap: 22px;
  padding: clamp(24px, 3vw, 34px);
}
.rail-card blockquote {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.16rem; line-height: 1.55; flex: 1;
  text-wrap: pretty;
}
.rail-card .qm-role { letter-spacing: 0.08em; }
.rail-prev svg, .rail-next svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .rail-top { flex-direction: column; align-items: flex-start; }
}

/* Desktop: the track wrapper drifts against scroll (~60px total travel) on
   the section's --p via the independent translate property. The scroller
   inside is untouched — native swipe and snap keep working. Zero at
   --p 0.5 (mid-viewport, the authored spot); .sec-rail clips the travel. */
@media (min-width: 941px) and (prefers-reduced-motion: no-preference) {
  .rail-drift { translate: calc((var(--p, 0.5) - 0.5) * -60px) 0; }
}

/* ---------- 03 · PAY RACE ---------- */
.race-panel { padding: clamp(28px, 4vw, 52px); margin-top: clamp(36px, 5vw, 56px); }
.race-panel .race-head { flex-wrap: wrap; }

/* Ghost "10%" drifting behind the race panel on the section's --p
   (sub-perceptual fill — exempt from the gold budget, §9.4) */
.pay-ghost { right: -0.08em; top: 24%; font-size: clamp(8rem, 20vw, 15rem); }
#pay .wrap { position: relative; z-index: 1; }

/* Ledger leaders draw left→right as the band scrubs, one row after the
   next (--ri staggers the start; independent scale — composes with the
   leaders' translateY). Defaults land drawn: no scrub / no JS → --p: 1. */
.pay-math .leader.rule-draw {
  scale: clamp(0, calc((var(--p, 1) - var(--ri, 0) * 0.09) * 2.4), 1) 1;
}

/* One-shot gold sheen across the winning track (fires with .is-won) */
.race-row.winner .race-track::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 220, 0.55) 50%, transparent 62%);
  transform: translateX(-130%) skewX(-18deg);
}
.race-panel.is-won .race-row.winner .race-track::after {
  animation: ls-sheen 0.8s var(--ease-out) 0.05s forwards;
}

/* Gold flourish stamp — slams in when the gold bar wins */
.race-verdict { display: flex; justify-content: flex-end; margin-top: 8px; }
.race-flourish {
  font-family: var(--font-mono); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); border: 2px solid var(--gold); border-radius: 8px;
  padding: 7px 13px 7px 16px;
  transform: rotate(-8deg);
  /* right-edge origin: the pre-slam scale(2.2) grows inward, never past the viewport */
  transform-origin: right center;
}
html.js .race-flourish { opacity: 0; transform: rotate(-19deg) scale(2.2); }
.race-panel.is-won .race-flourish { animation: ls-stamp 0.55s var(--ease-out) 0.12s forwards; }

/* Monthly ledger — the honest math */
.pay-math {
  max-width: 640px; margin: clamp(28px, 4vw, 48px) auto 0;
  padding: clamp(24px, 3.4vw, 40px);
  font-family: var(--font-mono);
}
.pm-head {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.pm-head::after { content: ''; flex: 1; height: 1px; background: var(--hairline-strong); }
.pm-row {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 0.85rem; color: var(--ink-dim); padding-block: 7px;
}
.pm-row .leader { flex: 1; border-bottom: 1px dotted rgba(245, 237, 219, 0.18); transform: translateY(-4px); }
.pm-row .val { color: var(--ink); font-weight: 600; white-space: nowrap; }
.pm-row.total { border-top: 1px dashed var(--hairline-strong); margin-top: 8px; padding-top: 15px; }
.pm-row.total .val { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.pm-row.rival, .pm-row.rival .val { color: var(--ink-faint); font-weight: 500; }
.pm-foot { margin-top: 18px; font-size: 0.72rem; color: var(--ink-faint); line-height: 1.7; }

/* ---------- 04 · LADDER BANDS ---------- */
.band {
  margin-top: 14px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 0.95rem; color: var(--ink);
}
.band .band-tag {
  display: block; margin-top: 5px;
  font-weight: 500; font-size: 0.66rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- 05 · FIT CHECK ---------- */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.fit-col { padding: clamp(26px, 3.4vw, 42px); }
.fit-col.yes { border-color: rgba(134, 199, 154, 0.28); }
.fit-col.no { border-color: rgba(224, 139, 123, 0.24); }
.fit-stamp {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  border: 2px solid; border-radius: 8px; padding: 7px 13px 7px 16px;
  transform: rotate(-3deg); margin-bottom: 24px;
}
.fit-col.yes .fit-stamp { color: var(--green); border-color: var(--green); }
.fit-col.no .fit-stamp { color: var(--red); border-color: var(--red); }
.fit-list { list-style: none; display: grid; gap: 15px; }
.fit-item {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: 0.97rem; color: var(--ink-dim); line-height: 1.6;
}
.fit-item .fi {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; margin-top: 3px;
}
.fit-col.yes .fi { background: rgba(134, 199, 154, 0.12); color: var(--green); }
.fit-col.no .fi { background: rgba(224, 139, 123, 0.1); color: var(--red); }
/* Reveal lives on the wrapper, tilt on the card — base's .is-in
   transform:none would otherwise out-specify [data-tilt]. */
.fit-wrap { display: grid; }
@media (max-width: 720px) {
  .fit { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

/* ---------- 06 · WINS TIMESTAMPS ---------- */
.win-head .win-time { margin-left: auto; letter-spacing: 0.06em; flex: none; }

/* Multi-speed columns: base .wins grid now holds three .win-col wrappers;
   each carries a .pz-* depth (independent translate on the section's --p).
   Stacked below 860px the parallax rests — single-column drift reads as jitter. */
.win-col { display: grid; gap: 16px; align-content: start; }
@media (max-width: 860px) {
  .win-col { translate: none; }
}

/* ---------- 07 · BOOK — native booking calendar (the one light element) ----------
   Dark-on-white palette, checked against #fff:
   --cal-ink 16.8:1 · --cal-dim 7.6:1 · --cal-faint 5.8:1 · --cal-gold 5.0:1 */
.book-lede { margin-top: 18px; }

.cal-wrap { margin-top: clamp(36px, 5vw, 56px); }
.cal-card {
  position: relative;
  max-width: 920px; margin-inline: auto;
  text-align: left;
  --cal-ink: #241C10;
  --cal-dim: #5C5340;
  --cal-faint: #6E6450;
  --cal-gold: #8A6A1C;
  --cal-line: rgba(36, 28, 16, 0.13);
  color: var(--cal-ink);
}
.cal-card :focus-visible { outline-color: var(--cal-gold); }

/* One-shot gold sheen along the top border on arrival (transform-only,
   JS adds .is-lit once at section --p ≥ 0.3; card is the ambient scope) */
.cal-sheen {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  overflow: hidden; z-index: 3; pointer-events: none;
}
.cal-sheen::before {
  content: ''; position: absolute; inset: 0; width: 34%;
  background: linear-gradient(90deg, transparent, #D4AF37 40%, #FFF3D0 55%, transparent);
  transform: translateX(-110%);
}
html.js .cal-card.is-lit .cal-sheen::before {
  animation: cal-sheen-run 1.2s var(--ease-out) 0.15s forwards;
}
@keyframes cal-sheen-run { to { transform: translateX(420%); } }

/* Gating: JS runs the tool; without it the card shows the mono note only */
html.js .cal-fallback { display: none; }
html:not(.js) .cal { display: none; }
.cal-fallback .mono { letter-spacing: 0.18em; margin-bottom: 10px; }
.cal-fallback a { color: var(--cal-gold); text-decoration: underline; }

/* Two panels */
.cal { display: grid; grid-template-columns: 1.12fr 0.88fr; }
.cal-left { padding: clamp(22px, 3.2vw, 38px); }
.cal-right {
  border-left: 1px solid var(--cal-line);
  padding: clamp(22px, 3.2vw, 38px);
  display: flex; flex-direction: column; justify-content: center;
}

/* Month head */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cal-month {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.005em;
  color: var(--cal-ink);
}
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1px solid var(--cal-line); color: var(--cal-ink);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.3s, border-color 0.3s, opacity 0.3s, transform 0.34s var(--ease-out);
}
.cal-nav svg { width: 17px; height: 17px; }
.cal-nav:hover:not([disabled]) { background: rgba(36, 28, 16, 0.05); transform: translateY(-1px); }
.cal-nav[disabled] { opacity: 0.32; cursor: default; }

/* Day-of-week header (mono) */
.cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.14em; color: var(--cal-faint);
  text-align: center; margin-bottom: 8px;
}

/* Day grid — height reserved for the tallest month (6 rows): month
   switches never resize the card */
.cal-grids { min-height: calc(6 * 42px + 5 * 4px); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; grid-auto-rows: 42px; }
.cal-grid[hidden] { display: none; }
html.js .cal-grid.is-in { animation: cal-grid-in 0.45s var(--ease-out); }
@keyframes cal-grid-in { from { opacity: 0; translate: 0 10px; } }

.cal-day {
  position: relative; border-radius: 10px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.86rem; font-weight: 500;
  color: var(--cal-ink);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.25s, color 0.25s;
}
.cal-day:hover:not([disabled]):not([aria-pressed="true"]) { background: rgba(36, 28, 16, 0.06); }
.cal-day[disabled] { color: #A99E88; cursor: default; }
.cal-day.is-past { color: #C2B9A6; }
.cd-dot {
  position: absolute; left: 50%; bottom: 5px; translate: -50% 0;
  width: 4px; height: 4px; border-radius: 50%; background: #B8912C;
}
/* Selected day: gold fill, soft stamp (independent scale — one-shot,
   retriggers each time aria-pressed lands on a new day) */
.cal-day[aria-pressed="true"] {
  background: var(--grad-btn); color: #171106; font-weight: 700;
  animation: cal-day-pop 0.4s var(--ease-out);
}
.cal-day[aria-pressed="true"] .cd-dot { background: #171106; opacity: 0.55; }
@keyframes cal-day-pop { from { scale: 1.3; } 62% { scale: 0.95; } to { scale: 1; } }

.cal-key {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cal-faint);
  display: flex; align-items: center; gap: 8px;
}
.cal-key .cd-dot { position: static; translate: none; }

/* Right panel state machine: empty → slots → held */
.cal[data-state="empty"] .cal-slots-view, .cal[data-state="empty"] .cal-confirm,
.cal[data-state="slots"] .cal-empty, .cal[data-state="slots"] .cal-confirm,
.cal[data-state="held"] .cal-empty, .cal[data-state="held"] .cal-slots-view { display: none; }

.cal-empty { text-align: center; color: var(--cal-faint); padding-block: 20px; }
.cal-empty-mark { width: 44px; height: 44px; margin: 0 auto 16px; opacity: 0.55; }
.cal-empty-line { font-family: var(--font-display); font-size: 1.3rem; color: var(--cal-dim); }
.cal-empty-sub { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; margin-top: 8px; }

.cal-day-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.2rem, 2vw, 1.45rem); color: var(--cal-ink); }
.cal-day-sub { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--cal-faint); margin-top: 5px; }

/* Slots cascade in (opacity + independent translate, per-slot delay);
   the .is-in class is re-added per day pick so the cascade replays */
.cal-slots { display: grid; gap: 8px; margin-top: 18px; }
.cal-slot {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 12px 16px; border-radius: 11px;
  border: 1px solid var(--cal-line);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 0.9rem; font-weight: 500;
  color: var(--cal-ink); text-align: left;
  transition: border-color 0.25s, background-color 0.25s;
}
html.js .cal-slots-view.is-in .cal-slot {
  animation: cal-slot-in 0.5s var(--ease-out) both;
  animation-delay: calc(var(--si, 0) * 0.07s);
}
@keyframes cal-slot-in { from { opacity: 0; translate: 0 14px; } }
.cal-slot:hover { border-color: rgba(36, 28, 16, 0.32); background: rgba(36, 28, 16, 0.03); }
.cs-r {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  border: 1.5px solid #8A8066;
  transition: border-color 0.25s, background-color 0.25s;
}
.cal-slot[aria-pressed="true"] {
  border-color: var(--cal-gold);
  box-shadow: inset 0 0 0 1px var(--cal-gold);
  background: rgba(212, 175, 55, 0.12);
  font-weight: 700;
}
.cal-slot[aria-pressed="true"] .cs-r { border-color: var(--cal-gold); background: #B8912C; }

/* The armed hold — the viewport's one gold CTA */
.cal-hold { width: 100%; margin-top: 18px; }
.cal-hold[disabled] { opacity: 0.4; box-shadow: none; cursor: default; }
.cal-hold[disabled]:hover { transform: none; box-shadow: none; }
html.js .cal-hold.is-armed { animation: cal-arm 0.4s var(--ease-out); }
@keyframes cal-arm { 45% { scale: 1.035; } }

/* Confirm state: TIME HELD stamp slams (ls-stamp pattern, gold on white) */
.cal-confirm { text-align: center; padding-block: 14px; outline: none; }
.cal-stamp {
  display: inline-block;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--cal-gold); border: 2px solid var(--cal-gold); border-radius: 8px;
  padding: 8px 14px 8px 18px;
  opacity: 0; transform: rotate(-19deg) scale(2.2);
}
.cal[data-state="held"] .cal-stamp { animation: ls-stamp 0.55s var(--ease-out) 0.05s forwards; }
.cal-confirm-line { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.4rem); color: var(--cal-ink); margin-top: 18px; }
.cal-confirm-sum { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--cal-dim); margin-top: 10px; }
.cal-change {
  margin-top: 22px;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cal-dim);
  border-bottom: 1px solid var(--cal-line); padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.cal-change:hover { color: var(--cal-ink); border-color: var(--cal-dim); }

/* Panels stack on mobile */
@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; }
  .cal-right { border-left: 0; border-top: 1px solid var(--cal-line); min-height: 280px; }
}
@media (max-width: 400px) {
  .cal-left, .cal-right { padding: 18px 14px; }
  .cal-slot { font-size: 0.84rem; }
}
.book-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.book-note {
  font-family: var(--font-mono); font-size: 0.74rem;
  letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 22px;
}
.book-note a { color: var(--champagne); }
.book-note a:hover { text-decoration: underline; }

/* ---------- No-JS: the 5% bar lands honestly at half ---------- */
html:not(.js) .race-fill[data-share="0.5"] { transform: scaleX(0.5); }

/* ---------- Reduced motion: land page-added accents complete ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .race-flourish { opacity: 1; transform: rotate(-8deg) scale(1); }
  .race-row.winner .race-track::after { display: none; }
  /* calendar: states swap instantly, nothing travels */
  .cal-sheen { display: none; }
  html.js .cal-slots-view.is-in .cal-slot { animation: none !important; opacity: 1 !important; translate: none !important; }
  .cal-day[aria-pressed="true"] { animation: none !important; scale: none !important; }
  html.js .cal-grid.is-in, html.js .cal-hold.is-armed { animation: none !important; }
  .cal[data-state="held"] .cal-stamp { animation: none !important; opacity: 1; transform: rotate(-8deg) scale(1); }
  /* choreography wrappers rest at their finished frame */
  .rail-drift, .rung-drift, .win-col { translate: none !important; }
}
