/* Take Interest · erin walk-through · the cinematic guided overview
   =================================================================
   A short, warm, calm trailer that RESOLVES INTO the product (today.html).
   Layout + motion only. All color / type / radius / shadow tokens come from
   product.css, which is linked FIRST. This sheet adds:
     1. the four motion tokens (THE SETTLE — one gesture, three speeds)
     2. the full-bleed cinematic walk-through layout
     3. the hand-off-to-product resolve overlay
   No external deps. System fonts only. Works from disk. CSP-safe
   (same-origin file, no inline-blocking needs). Honors prefers-reduced-motion.
   ================================================================= */

/* ============================================================
   1 · THE ONE MOTION LANGUAGE — "The Settle"
   One gesture: content arrives by rising a few px + fading in,
   on cubic-bezier(.22,1,.36,1). Never slides sideways, never
   bounces, never crossfades flat. Three speeds, nothing else.
   (Values verbatim from the website's hero + reveal mechanic.)
   ============================================================ */
:root {
  --ease:       cubic-bezier(.22, 1, .36, 1); /* the single house easing */
  --dur-micro:  0.15s;  /* hover / press / focus — a state nudge */
  --dur-settle: 0.30s;  /* THE BEAT: word-swap, panel change, the signature */
  --dur-reveal: 0.80s;  /* first arrival: scroll-into-view, the slow landing */
}

/* a) FIRST ARRIVAL — content entering the viewport (slow, rise 26px) */
.settle    { opacity: 0; transform: translateY(26px);
             transition: opacity var(--dur-reveal) var(--ease),
                         transform var(--dur-reveal) var(--ease); }
.settle.in { opacity: 1; transform: none; }

/* b) THE BEAT — a thing changing in place (the rotating word) (rise 14px) */
.beat     { transition: opacity var(--dur-settle) var(--ease),
                        transform var(--dur-settle) var(--ease); }
.beat.out { opacity: 0; transform: translateY(14px); }

/* c) THE NUDGE — hover / press / focus (fast, lift UP) — one family, same curve */
.nudge    { transition: transform var(--dur-micro) var(--ease),
                        background var(--dur-micro) var(--ease),
                        border-color var(--dur-micro) var(--ease),
                        box-shadow var(--dur-micro) var(--ease); }

/* staggered groups cascade — capped at 3 steps, same on every surface */
.stagger > *           { } /* base; children carry .settle individually */
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(n+4) { transition-delay: 0.16s; }

/* ============================================================
   2 · CINEMATIC WALK-THROUGH LAYOUT
   Full-bleed, scroll-driven. Editorial register (17px body, the
   warm paper base). The trailer reads at arm's length.
   ============================================================ */

body.walkthrough {
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* --- transparent nav that solidifies past 40px (website behavior) --- */
.wt-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  transition: background var(--dur-settle) var(--ease),
              box-shadow var(--dur-settle) var(--ease),
              border-color var(--dur-settle) var(--ease);
  border-bottom: 1px solid transparent;
}
.wt-nav.solid {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
/* nav text must track the theme so it never blends into the solid bar */
.wt-nav.solid .brand { color: var(--text); }
.wt-nav.solid .skip { color: var(--text); border-color: var(--border); }
.wt-nav .brand {
  font-family: var(--serif); font-size: 19px; letter-spacing: -0.01em;
  color: var(--text); border: none; padding: 0;
}
.wt-nav .skip {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.wt-nav .skip:hover { color: var(--accent-deep); border-color: var(--border-teal); }
.wt-nav .skip:focus-visible,
.wt-close .primary-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --- the opening frame: a centered cinematic title card over a deep field --- */
.wt-hero {
  position: relative;
  min-height: 88vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 13vh clamp(20px, 6vw, 80px) 15vh;
  overflow: hidden;
}
.wt-hero .hero-photo {
  position: absolute; inset: 0;
  border-radius: 0; border: none;
  min-height: 0;
  /* depth so the field never reads flat/empty: a soft teal glow up top, a faint
     clay warmth low-right, over a deep evergreen base. Stands in for a photo. */
  background:
    radial-gradient(120% 78% at 50% 12%, rgba(126,214,204,0.40) 0%, rgba(126,214,204,0) 56%),
    radial-gradient(80% 62% at 82% 104%, rgba(189,117,68,0.16) 0%, rgba(189,117,68,0) 60%),
    linear-gradient(168deg, #0f4944 0%, #0b3a36 54%, #082d2a 100%);
}
/* a gentle vignette so the centered copy holds against the glow */
.wt-hero .hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, transparent 44%, rgba(8,40,37,0.42) 100%);
}
/* a wide measure so the title sets in ~3 multi-word lines, not a one-word ladder.
   24ch against the 74px serif fit only ~3 chars/line and balance stacked it into a
   tall thin ribbon; min(92vw,940px) lets it breathe and fill the frame. */
.wt-hero .hero-inner { position: relative; z-index: 2; max-width: min(92vw, 940px); margin: 0 auto; }
.wt-hero .eyebrow { color: var(--accent-light); margin-bottom: 22px; display: block; }
.wt-hero h1 {
  font-family: var(--serif); font-weight: 500; color: var(--on-dark, #eef3f0);
  font-size: clamp(38px, 5.2vw, 78px); line-height: 1.06;
  letter-spacing: -0.025em; margin: 0;
  max-width: none;
  text-wrap: balance;
}
/* the rotating word — teal-on-dark, does the 0.30s beat. An inline-grid stack
   reserves exactly the longest candidate (all words in one cell, only the active
   one visible) so the box auto-sizes to the true max — zero dead space, zero
   reflow on swap. The measuring ghosts are aria-hidden + non-interactive. */
.wt-hero h1 .rot {
  display: inline-grid;
  vertical-align: baseline;
  text-align: center;
}
.wt-hero h1 .rot > * { grid-area: 1 / 1; white-space: nowrap; }
.wt-hero h1 .rot .rot-ghost { visibility: hidden; }
.wt-hero h1 .rot .rot-live {
  color: var(--accent-light);
  font-style: italic;       /* matches the website's rotating-word treatment */
}
.wt-hero .hero-sub {
  color: var(--on-dark-dim, rgba(238,243,240,0.82));
  font-size: clamp(16px, 1.6vw, 20px); margin: 26px auto 0; max-width: 48ch;
  line-height: 1.55;
}

/* the looping scroll cue (one of the two sanctioned ambient motions) */
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--on-dark-dim, rgba(238,243,240,0.82));
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 34px;
  background: linear-gradient(to bottom, var(--accent-light), transparent);
  animation: cue 2.1s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* --- the body beats: alternating warm bands, editorial --- */
.wt-band {
  padding: clamp(72px, 13vh, 132px) clamp(20px, 5vw, 56px);
}
.wt-band.warm { background: var(--bg-warm, #efe7d9); }
.wt-band.tint { background: var(--surface-3); }
.wt-band-inner { max-width: 1180px; margin: 0 auto; }

.wt-step-eyebrow { color: var(--accent); display: block; margin-bottom: 14px; }
.wt-band h2 {
  font-family: var(--serif); font-weight: 500; color: var(--text);
  font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 16px; max-width: 18ch;
}
.wt-band .lead {
  font-size: clamp(17px, 1.5vw, 20px); color: var(--text-dim);
  max-width: 58ch; margin: 0;
}

/* a beat shown as: copy on one side, a "living card" on the other */
.wt-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.wt-split.flip .wt-split-copy { order: 2; }
.wt-split.flip .wt-split-art  { order: 1; }

/* the photo slot inside a band */
.wt-art-photo { min-height: 340px; }

/* a mock "thread" card — the result the product produces, shown in the trailer.
   styled with --paper editorial surface so even the demo reads warm, not admin.
   Radius + shadow come from product.css's hero tier (--radius-lg / --shadow-lg)
   so the trailer's cards match the product they resolve into — one radius, one
   shadow across every card here (was 16px + a puffier fallback shadow). */
.wt-thread {
  background: var(--paper, #fffdf8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 22px);
  padding: 26px;
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(25,28,27,0.10));
}
.wt-thread .who {
  font-family: var(--serif); font-size: 21px; color: var(--text); margin-bottom: 3px;
}
.wt-thread .stage {
  font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 700; margin-bottom: 16px;
}
.wt-thread .line {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--border-soft);
  font-size: 14px; color: var(--text);
}
.wt-thread .line:last-child { border-bottom: none; }
.wt-thread .line .src {
  font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text-dimmer); font-weight: 600; flex-shrink: 0; width: 84px;
  padding-top: 2px;
}
.wt-thread .line.is-next { color: var(--accent-deep); font-weight: 600; }
.wt-thread .line.is-next .src { color: var(--accent); }

/* a small "draft prepared" chip stack */
.wt-drafts { display: grid; gap: 10px; }
.wt-draft {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius, 14px); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.wt-draft .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
}
.wt-draft .txt { font-size: 14px; color: var(--text); }
.wt-draft .txt b { font-weight: 600; }
.wt-draft .tag {
  margin-left: auto; font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-pale);
  padding: 3px 9px; border-radius: 999px; font-weight: 600; flex-shrink: 0;
}

/* a three-up of small lifestyle frames inside a band */
.wt-trio {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-top: 36px;
}
.wt-trio .photo-frame { min-height: 200px; }
.wt-trio .cap {
  position: absolute; left: 14px; bottom: 14px;
  color: #fff; font-size: 12px; font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* --- BEAT 5 · the TAPESTRY: a compact echo of the buyer's space --------
   The result the dashboard exists to produce, shown BEFORE the dashboard.
   A still frame of buyer.html (hero + path-to-keys). No new motion idiom:
   it rides .settle + .stagger like every other beat. The buyer hero word
   stays still here. The rotating word is the trailer's one mechanic, and
   this is a quiet still of the destination, not a second moving thing. */
/* Beat 5 (the tapestry) earns its own register — distinct from Beat 2's flat warm:
   a faint teal top-glow (echoing the hero) + a vertical wash + a hairline, so the
   emotional climax reads as a warmer, arrived-at room, not a repeat skin. */
.wt-band.result {
  background:
    radial-gradient(130% 72% at 50% 0%, rgba(126,214,204,0.12) 0%, rgba(126,214,204,0) 62%),
    linear-gradient(180deg, #f3eee5 0%, var(--bg-warm, #efe7d9) 100%);
  border-top: 1px solid var(--border);
}
/* The result band's background is pinned light, so pin its text dark too —
   otherwise var(--text)/var(--text-dim) flip white in dark mode and the
   "Every family gets their own calm space" headline + lead go white-on-white. */
.wt-band.result h2 { color: #191c1b; }
.wt-band.result .lead { color: #4a4f4d; }
.wt-band.result .wt-step-eyebrow { color: #073f3b; }
.wt-band.result .bp-journey-label { color: #191c1b; }
/* The .bp-journey card is a pinned-light "paper" surface, so pin its text dark
   too — the step labels, stamps, and note used var(--text)/var(--text-dimmer)
   which flip light in dark mode → low-contrast text on the light card. */
.wt-band.result .bp-journey { background: #fffdf8; border-color: #e7e0d2; }
.wt-band.result .bp-step-txt { color: #2a2e2c; }
.wt-band.result .bp-step-txt b { color: #191c1b; }
.wt-band.result .bp-step.is-now .bp-step-txt b { color: #073f3b; }
.wt-band.result .bp-stamp { color: #6a6f6c; }
.wt-band.result .bp-stamp-now { color: #073f3b; background: rgba(47,111,106,0.16); }
.wt-band.result .bp-note { color: #6a6f6c; }
.wt-band.result .bp-dot { border-color: #cfc8ba; background: #fff; }
.wt-band.result .bp-step::before { background: #e7e0d2; }

.wt-buyer-preview {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(20px, 3.5vw, 40px); align-items: stretch;
  margin-top: 40px;
}

/* the buyer hero, as a framed card (a window into their page) */
.bp-frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg, 22px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(25,28,27,0.10));
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(22px, 3vw, 34px);
  /* a soft warm-teal gradient stands in for the buyer's neighborhood photo,
     scrimmed dark at the base so the copy reads (same dialect as .wt-hero). */
  background:
    linear-gradient(to top, rgba(20,28,26,0.78) 0%, rgba(20,28,26,0.34) 46%, rgba(20,28,26,0.12) 78%, transparent 100%),
    radial-gradient(130% 120% at 80% 0%, var(--accent, #2f6f6a) 0%, var(--accent-deep, #1d4f4b) 55%, #163d3a 100%);
}
.bp-photo-label {
  position: absolute; top: 14px; left: 16px;
  font-size: 11px; letter-spacing: 0.5px;
  color: rgba(238,243,240,0.78);
}
.bp-hero { position: relative; max-width: 30ch; }
.bp-eyebrow {
  display: block; margin-bottom: 10px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-light, #8fd6cf);
}
.bp-h1 {
  font-family: var(--serif); font-weight: 500;
  color: var(--on-dark, #eef3f0);
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.06;
  letter-spacing: -0.02em; margin: 0;
}
.bp-rot { color: var(--accent-light, #8fd6cf); font-style: italic; }
.bp-sub {
  color: var(--on-dark-dim, rgba(238,243,240,0.82));
  font-size: 14px; line-height: 1.6; margin: 14px 0 0; max-width: 38ch;
}

/* the path-to-the-keys, as a compact rail (a still of buyer.html's journey) */
.bp-journey {
  background: var(--paper, #fffdf8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 22px);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-lg, 0 16px 48px rgba(25,28,27,0.10));
}
.bp-journey-label {
  display: block; margin-bottom: 18px;
  font-family: var(--serif); font-size: 18px; color: var(--text);
}
.bp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.bp-step {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 0 0 18px 0;
}
.bp-step:last-child { padding-bottom: 0; }
/* the connecting rail between dots */
.bp-step::before {
  content: ""; position: absolute;
  left: 6px; top: 16px; bottom: -2px; width: 1px;
  background: var(--border);
}
.bp-step.bp-step-last::before { display: none; }
.bp-dot {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  margin-top: 3px;
}
.bp-step.is-done .bp-dot { background: var(--ok, #3f8f6b); border-color: var(--ok, #3f8f6b); }
.bp-step.is-now .bp-dot {
  background: var(--accent, #2f6f6a); border-color: var(--accent, #2f6f6a);
  box-shadow: 0 0 0 4px var(--accent-pale, rgba(47,111,106,0.16));
}
.bp-step.is-done::before { background: var(--ok, #3f8f6b); }
.bp-step-txt {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex: 1; font-size: 14px; color: var(--text);
}
.bp-step.is-now .bp-step-txt b { color: var(--accent-deep, #1d4f4b); }
.bp-stamp {
  flex-shrink: 0; font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase;
  font-weight: 600; color: var(--text-dimmer); padding-top: 1px;
}
.bp-stamp-now {
  color: var(--accent-deep, #1d4f4b);
  background: var(--accent-pale, rgba(47,111,106,0.16));
  padding: 2px 8px; border-radius: 999px;
}
.bp-note {
  margin: 18px 0 0; font-size: 12px; color: var(--text-dimmer);
}

/* --- the closing band: the resolve into the product --- */
.wt-close {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(56px, 10vh, 120px) clamp(20px, 5vw, 56px);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--surface-3), transparent 60%),
    var(--bg);
}
.wt-close .eyebrow { color: var(--accent); margin-bottom: 16px; display: block; }
.wt-close h2 {
  font-family: var(--serif); font-weight: 500; color: var(--text);
  font-size: clamp(32px, 5.5vw, 60px); line-height: 1.04; letter-spacing: -0.025em;
  margin: 0 0 18px; max-width: 16ch;
}
.wt-close .sub {
  font-size: clamp(17px, 1.6vw, 20px); color: var(--text-dim);
  max-width: 50ch; margin: 0 0 36px;
}
/* the CTA reuses product.css .primary-cta, plus the nudge family */
.wt-close .primary-cta { font-size: 15px; padding: 15px 30px; }
.wt-close .quiet {
  margin-top: 18px; font-size: 13px; color: var(--text-dimmer);
}

/* the footer matches the product footer voice */
.wt-foot {
  padding: 28px 20px 40px; text-align: center;
  font-size: 11px; color: var(--text-dimmer); letter-spacing: 0.4px;
}
.wt-foot .promise { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.wt-foot .promise span::before { content: "✓ "; color: var(--ok); }

/* ============================================================
   3 · THE RESOLVE — hand-off overlay into today.html
   On "Continue", the whole trailer settles UP and out while a
   warm paper veil rises, THEN navigation happens. The product
   loads behind the same gesture the trailer used on its words —
   one continuous camera move, not a cut.
   ============================================================ */
.wt-veil {
  position: fixed; inset: 0; z-index: 120;
  /* lands on the EXACT product surface color (--bg = today.html's background),
     with a faint warm-teal glow up top echoing the hero photo — so the resolve
     reads as the camera tilting up off the photo INTO the product, not a flat cut.
     today.html paints behind this while it's fully opaque, masking any flash. */
  background:
    radial-gradient(130% 80% at 50% -10%, var(--surface-3), transparent 62%),
    var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-reveal) var(--ease);
  display: flex; align-items: center; justify-content: center;
}
.wt-veil.up { opacity: 1; pointer-events: all; }
.wt-veil .veil-inner {
  text-align: center;
  opacity: 0; transform: translateY(26px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}
.wt-veil.up .veil-inner { opacity: 1; transform: none; }
.wt-veil .veil-inner .brand {
  font-family: var(--serif); font-size: 24px; color: var(--text); display: block; margin-bottom: 10px;
}
.wt-veil .veil-inner .line { font-size: 15px; color: var(--text-dim); }

/* when resolving, the page content itself rises away (the trailer leaving frame) */
body.wt-resolving .wt-content {
  opacity: 0; transform: translateY(-22px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
}

/* ============================================================
   4 · RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .wt-split { grid-template-columns: 1fr; }
  .wt-split.flip .wt-split-copy { order: 1; }
  .wt-split.flip .wt-split-art  { order: 2; }
  .wt-trio { grid-template-columns: 1fr; }
  .wt-hero .hero-inner { max-width: none; }
  .wt-buyer-preview { grid-template-columns: 1fr; }
}

/* ============================================================
   5 · REDUCED MOTION — meaning is never load-bearing on motion.
   Everything arrives instantly; the word still changes (text only);
   the looping cue stops. (JS also short-circuits — see walkthrough.js)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .settle    { opacity: 1 !important; transform: none !important; }
  .beat.out  { opacity: 1 !important; transform: none !important; }
  .scroll-cue::after { animation: none !important; opacity: 0 !important; }
  .wt-veil   { transition: none !important; }
  .wt-veil .veil-inner { transition: none !important; opacity: 1 !important; transform: none !important; }
  body.wt-resolving .wt-content { transition: none !important; opacity: 1 !important; transform: none !important; }
}
