/* Wieve landing · the sections after the hero (8 Oct 2026). Layouts approved by Pedro, after Grail (Mobbin).
   Ink and chalk carry it; the only colour is the gap (red) and the app's own evidence marks. */

:root { --red: #DB3F26; --ground-chalk: radial-gradient(circle, rgba(244, 244, 241, .14) 0 .7px, transparent 1.05px) 0 0 / 24px 24px; }

.eyebrow { margin: 0 0 18px; font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--g600); }

/* ---------- hero → Ch01: the screen turns to grain (timed, in sections.js) ---------- */

/* ---------- the story: Ch01 + Ch02 on one pinned stage, then the journey sheet over it ---------- */
.story { position: relative; z-index: 2; margin-top: -1px; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ground-ink), var(--chalk); }
.s-ink { display: none; position: absolute; inset: 0; background: var(--ink); }
.stage.nogl .s-ink { display: block; }
.s-grain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage.nogl .s-grain { display: none; }
.s-over { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; display: block; }
.story-run { height: 400vh; }

/* Ch01 · the problem (chalk on ink). Layout A (Pedro, 8 Oct): two columns. The text (eyebrow, headline,
   paragraph) is one block on the left, vertically centred; the book sits low in the right column and its
   bubbles rise only there. Columns align to the page's 1280 px frame. */
.ch1 { position: absolute; inset: 0; z-index: 5; /* above the bubbles' canvas (.s-over, 4): they rise behind the text */ color: var(--chalk); display: flex; align-items: center; padding: 0 max(var(--gutter), calc(50vw - 640px)); pointer-events: none; }
.ch1-col { width: min(600px, 46vw); }
.ch1 .eyebrow { color: rgba(244, 244, 241, .56); }
.ch1-h { margin: 0; font: 700 clamp(56px, 5.8vw, 84px)/.98 var(--sans); letter-spacing: -.025em; color: var(--ink); }
.ch1-h .ln { display: block; white-space: nowrap; }
.ch1-pw { margin-top: 32px; }
.ch1 .ch1-p { max-width: 40ch; margin: 0; font-size: 18px; line-height: 1.55; color: rgba(244, 244, 241, .72); text-wrap: pretty; }
.ch1 .ch1-p strong { color: var(--chalk); font-weight: 500; }
.book { position: absolute; z-index: 2; right: max(var(--gutter), calc(50vw - 640px)); bottom: 12svh; width: min(34vw, 480px); }
.book svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Ch02 · about Wieve (ink on chalk), the phone in the middle */
.ch2 { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ch2-top { position: absolute; left: 0; right: 0; top: clamp(52px, 7vh, 80px); text-align: center; padding: 0 var(--gutter); }
.ch2-top .eyebrow { margin-bottom: 12px; }
.ch2 h2 { margin: 0; font: 700 46px/1.04 var(--sans); letter-spacing: -.02em; }
.ch2 .rule { position: absolute; left: var(--gutter); right: var(--gutter); top: 78svh; height: 1px; background: var(--ink); opacity: .2; transform-origin: left; }
.ch2 p.l, .ch2 p.r { position: absolute; top: calc(78svh + 20px); width: min(44ch, 34vw); margin: 0; font-size: 16px; line-height: 1.5; color: var(--g600); text-wrap: pretty; }
.ch2 p.l { left: var(--gutter); }
.ch2 p.r { right: var(--gutter); }
.ch2 p b { color: var(--ink); font-weight: 500; }
.s-phone { position: absolute; z-index: 2; left: 50%; top: 27vh; transform: translateY(100vh); will-change: transform; }
.s-phone .phone { transform: translateX(-50%); }

/* the drawn phone: an ink hairline 9 px outside the screen, no buttons, no reflections */
.phone { position: relative; border: 1.5px solid var(--ink); border-radius: var(--r, 52px); background: var(--chalk); }
.phone-in { position: absolute; inset: calc(var(--pad, 9px) - 1.5px); border-radius: var(--ri, 42px); overflow: hidden; background: #F4F4F1; }

/* ---------- app screens (assets/js/screens.js): 390 × 844 points, scaled ---------- */
.scr { position: absolute; left: 0; top: 0; width: 390px; height: 844px; background: #F4F4F1; overflow: hidden; transform-origin: 0 0; color: #0B0B0C; font: 400 16px/1.3 var(--sans); -webkit-font-smoothing: antialiased; }
.scr .st, .scr .sb { position: absolute; }
.scr .st { white-space: nowrap; }
.scr .mono { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #585856; }
.scr .code { font-family: var(--mono); font-weight: 500; }
.scr .sfinger { position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(11, 11, 12, .2); opacity: 0; z-index: 10; pointer-events: none; }

/* ---------- Ch03 · the journey sheet ---------- */
.sheet { position: relative; z-index: 5; margin: 0 clamp(6px, 1vw, 14px); padding: clamp(56px, 8vw, 112px) var(--gutter) clamp(56px, 8vw, 104px); border-radius: 28px; background: var(--paper);
  box-shadow: 0 -1px 0 rgba(11, 11, 12, .06), 0 -28px 60px -32px rgba(11, 11, 12, .3); }
.sheet-in { max-width: 1240px; margin: 0 auto; }
.sheet h2 { margin: 0; font: 700 64px/1.02 var(--sans); letter-spacing: -.025em; }
.sheet h2 .dia { display: inline-block; width: .42em; height: .54em; margin: 0 .1em 0 .02em; vertical-align: -.02em; } /* sits on the baseline, about the letters' x-height */
.sheet h2 .dia svg { display: block; width: 100%; height: 100%; }
.sheet h2 .soft { color: var(--g600); } /* 7:1 on the sheet; g400 was too faint */
.sheet .lede { margin: 22px 0 0; max-width: 46ch; font-size: 18px; color: var(--g600); }
.jrows { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; }
.jrow { display: grid; grid-template-columns: minmax(0, 1fr) 230px minmax(0, 1fr); column-gap: clamp(24px, 4vw, 64px); align-items: start; padding: 40px 0; border-top: 1px solid var(--line); }
.jrow:last-child { border-bottom: 1px solid var(--line); }
.jrow .jl { display: grid; grid-template-rows: auto 1fr auto; min-height: 477px; }
.jrow .jl .eyebrow { margin-bottom: 8px; }
.jrow h3 { margin: 0; font: 600 26px/1.15 var(--sans); letter-spacing: -.01em; }
.jrow .num { align-self: end; font: 500 13px/1 var(--mono); color: var(--g400); letter-spacing: .06em; }
.jrow .jr { margin: 0; padding-top: 26px; font-size: 17px; line-height: 1.5; color: var(--g600); max-width: 30ch; justify-self: end; text-wrap: pretty; }
.rphone { width: 230px; }
.rphone .phone { background: #F4F4F1; }
.jrow { opacity: .001; transform: translateY(24px); transition: opacity .6s var(--settle), transform .6s var(--settle); }
.jrow.in { opacity: 1; transform: none; }

/* ---------- the CTA: get in early (ink), revealed as the sheet lifts off it ---------- */
.cta { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100svh; height: 200vh; height: 200svh; background: var(--ink); color: var(--chalk); }
.cta-in { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 72px var(--gutter) 88px; overflow: hidden; }
.cta-in > * { position: relative; z-index: 1; }
.cta-in > .cta-cv { position: absolute; inset: 0; z-index: 0; display: block; }
.wave { width: 144px; height: 144px; margin-bottom: 28px; flex: none; }
.cta .eyebrow { color: rgba(244, 244, 241, .56); margin-bottom: 14px; }
.cta h2 { margin: 0; font: 700 44px/1.05 var(--sans); letter-spacing: -.02em; }
.cta .cta-lede { margin: 16px 0 0; max-width: 44ch; font-size: 18px; line-height: 1.5; color: rgba(244, 244, 241, .7); text-wrap: pretty; }
/* the form: one joined pill, the field with the button inside it on the right (the pattern Circle, Ramp and
   ClickUp use; Pedro picked it over Grail's giant underlined field) */
.wl { position: relative; width: min(440px, 100%); margin-top: 36px; }
.wl-row { display: flex; align-items: center; height: 52px; padding: 4px; border: 1px solid rgba(244, 244, 241, .28); border-radius: 999px; background: rgba(11, 11, 12, .72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); transition: border-color .18s var(--settle); }
.wl-row:focus-within { border-color: rgba(244, 244, 241, .7); }
.wl input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 18px; border: 0; outline: 0; background: transparent; color: var(--chalk); font: 400 16px/1 var(--sans); caret-color: var(--red); }
.wl input::placeholder { color: rgba(244, 244, 241, .42); opacity: 1; }
.wl input[aria-invalid="true"] { color: #F2A595; }
.wl-row:has(input[aria-invalid="true"]) { border-color: #F2A595; }
.wl button { flex: none; height: 100%; padding: 0 20px; border: 0; border-radius: 999px; background: var(--chalk); color: var(--ink); font: 500 15px/1 var(--sans); cursor: pointer; transition: background-color .18s var(--settle), transform .1s; }
.wl button:hover { background: #FFFFFF; }
.wl button:active { transform: scale(.97); }
.wl button:disabled { opacity: .6; cursor: progress; }
.wl .wl-short { display: none; }
.cta :focus-visible { outline-color: var(--chalk); }
.wl-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* a field only bots fill in */
.wl-note { margin: 12px 0 0; font-size: 13px; line-height: 18px; color: rgba(244, 244, 241, .5); }
.wl-msg { min-height: 24px; margin: 12px 0 0; font-size: 15px; color: rgba(244, 244, 241, .8); }
.wl-msg[data-kind="error"] { color: #F2A595; }
.cta-in > .cta-foot { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; display: flex; justify-content: space-between; font: 500 12px/16px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(244, 244, 241, .45); }

/* ---------- smaller screens ---------- */
@media (max-width: 1039px) {
  .ch1 { display: block; padding: 92px var(--gutter) 0; }
  .ch1-col { width: auto; }
  /* phones: the bubbles rise behind the text, so it sits on a translucent ink panel (no blur: Pedro) that fades in with
     the ground (--pa is tweened by sections.js; 0 while the page is still chalk) */
  .ch1-col { margin: -14px; padding: 14px; border-radius: 18px; background: rgba(11, 11, 12, var(--pa, 0)); }
  .ch1-h { font-size: 46px; }
  .ch1-pw { margin-top: 22px; }
  .ch1 .ch1-p { font-size: 16px; max-width: 34ch; }
  .ch1 .ch1-p .more, .ch2 p .more { display: none; }
  .book { right: auto; left: 50%; bottom: 7svh; width: min(84vw, 380px); margin: 0 0 0 calc(-1 * min(42vw, 190px)); }
  .ch2-top { top: 64px; }
  .ch2 h2 { font-size: 28px; }
  .s-phone { top: 172px; }
  .ch2 .rule { display: none; }
  .ch2 p.l, .ch2 p.r { top: auto; bottom: 20px; width: auto; font-size: 14px; line-height: 1.45; }
  .ch2 p.l { left: var(--gutter); right: 52%; }
  .ch2 p.r { right: var(--gutter); left: 52%; }
  .story-run { height: 380vh; }
  .sheet { border-radius: 22px; }
  .sheet h2 { font-size: 38px; }
  .sheet .lede { font-size: 16px; }
  .jrow { grid-template-columns: minmax(0, 1fr); row-gap: 20px; padding: 32px 0; }
  .jrow .jl { min-height: 0; grid-template-rows: auto auto; }
  .jrow .num { display: none; }
  .jrow .rphone { justify-self: center; }
  .jrow .jr { justify-self: start; padding-top: 0; font-size: 16px; }
  .cta h2 { font-size: 32px; }
  .cta .cta-lede { font-size: 16px; }
  .wave { width: 144px; height: 144px; margin-bottom: 20px; }
}
@media (max-width: 420px) {
  .wl .wl-long { display: none; }
  .wl .wl-short { display: inline; }
  .ch1-h { font-size: 40px; }
}
@media (max-height: 760px) and (min-width: 1040px) {
  .ch1-h { font-size: 72px; }
  .ch2 h2 { font-size: 44px; }
}

/* ---------- reduced motion: no travel; each chapter cross-fades to its end state ---------- */
@media (prefers-reduced-motion: reduce) {
  .jrow { opacity: 1; transform: none; transition: none; }
  .s-grain, .s-phone { transition: opacity .15s linear; }
}

/* Link jumps (waitlist, back to top): a short ink cross-fade hides the jump. */
.curtain { position: fixed; inset: 0; z-index: 90; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .42s cubic-bezier(.4, 0, .2, 1); }
.curtain.on { opacity: 1; pointer-events: auto; }

/* Start states for everything GSAP brings in, so nothing flashes before the scripts run (a refresh showed a
   glimpse of About Wieve). GSAP's inline styles take over from these. */
.ch1 .eyebrow, .ch1 .ch1-p, .book-in, .ch2 .eyebrow, .ch2 h2, .ch2 p.l, .ch2 p.r, .cta-body { visibility: hidden; opacity: 0; }
.s-phone { visibility: hidden; } /* the stage paints it visible as the find lands */
.ch2 .rule { transform: scaleX(0); }
