/* v6g, "evening falls": the lower half after the diorama. Loaded after style.css and overrides its lower-half rules.
   The ground warms from the page's stone to late-afternoon honey and, under the FAQ, falls into the dusk close. */
:root { interpolate-size: allow-keywords;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9 .28' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 -.45 .36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); } /* the app's and onboarding's paper fibre */

.eve { background: linear-gradient(var(--stone), transparent 320px), var(--grain), linear-gradient(180deg, var(--stone) 0, #e8d0a6 30%, #e4c597 62%, #dfba88 calc(100% - 240px), #a9776a calc(100% - 100px), var(--night) 100%); }
.eve .morning, .eve .name-sec, .eve .faq { background: none; }
.foot { background: var(--grain), var(--stone-deep); }

/* the report: the promise signs it off */
.report-sign { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); font: italic 400 clamp(1.3rem, 2.2vw, 1.6rem)/1.35 var(--serif); text-wrap: balance; }
/* it writes itself in, row by row, as if the night's check were filling it out (below.js adds .written).
   Fade and rise only: blur means "paid" on this page, so the free rows never blur */
@media (prefers-reduced-motion: no-preference) {
  .js .report :is(.report-row, .report-sign) { opacity: 0; transform: translateY(10px);
    transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
    transition-delay: calc(var(--i) * 260ms + 200ms); }
  .js .report.written :is(.report-row, .report-sign) { opacity: 1; transform: none; }
  .js .report .r-fig mark { transition: box-shadow .8s cubic-bezier(.16, 1, .3, 1) .9s; }
  .js .report:not(.written) .r-fig mark { box-shadow: none; }
}

/* the name: one centred column, the balance as its picture */
.name-sec { padding: clamp(96px, 12vw, 176px) 0; }
.name-stack { display: grid; justify-items: center; text-align: center; }
.name-stack .names { justify-content: center; }
.name-stack h2 { margin: 14px 0 0; max-width: 16ch; }
.name-stack p { max-width: 36rem; }
.name-stack .carat { margin-top: 16px; }
.name-stack .balance { margin: clamp(40px, 5vw, 64px) auto clamp(28px, 4vw, 48px); }
@media (min-width: 720px) { .name-stack .balance { transform: scale(1.2); margin-block: 72px 64px; } }
/* seeds: they fall in one by one and each one moves the beam (below.js sets --tilt and .in) */
.balance[data-own] { --tilt: 7deg; }
.balance[data-own] .bal-beam, .balance[data-own] .bal-pan { transition-duration: 1.1s; }
@media (prefers-reduced-motion: no-preference) {
  .js .balance[data-own] { --tilt: -8deg; }
  .js .balance[data-own] .seed-mark { opacity: 0; transform: translateY(-140px) rotate(-30deg);
    transition: transform .6s cubic-bezier(.55, 0, .85, .35), opacity .2s; }
  .js .balance[data-own] .seed-mark.in { opacity: 1; transform: none; }
}

/* FAQ: one centred column; answers ease open */
.faq { padding: clamp(88px, 11vw, 160px) 0 calc(clamp(88px, 11vw, 160px) + 180px); } /* +180: room for the ground to darken into night */
.faq-grid { max-width: 50rem; }
.faq h2 { text-align: center; margin-bottom: 32px; }
@media (min-width: 1024px) { .faq-grid { display: block; } }
details::details-content { block-size: 0; overflow: clip; transition: block-size .5s cubic-bezier(.16, 1, .3, 1), content-visibility .5s allow-discrete; }
details[open]::details-content { block-size: auto; }
@media (prefers-reduced-motion: reduce) { details::details-content { transition: none; } }

/* dusk: its own night painting of the same place (no grade, no tree layer), zoomed in on the house. The falling light above
   ends in the painting's own night blue, so there's no seam; a soft scrim on the text side keeps the headline readable */
.dusk { background: var(--night); }
.dk-scene { filter: none; }
/* the house is tall: desktop moves the picture down so the roof clears the form; phones show it smaller, under the form, with the sky fading into the dark */
@media (min-width: 720px) { .dk-scene { transform: translate(-50%, 11%); } }
@media (max-width: 719px) { .dk-scene { width: 254cqw; } .dk-plate { -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); } }
@media (max-width: 719px) { .dusk-inner { padding-bottom: 470px; } }
.dk-plate { background-image: none; }
.dusk.near .dk-plate, html:not(.js) .dk-plate { background-image: url(hero/night.webp); } /* below.js adds .near a screen early */
.dk-tree { display: none; }
.dusk-art::after { background: linear-gradient(180deg, var(--night) 0, transparent 16%, rgba(14, 14, 24, 0) 75%, rgba(14, 14, 24, .35) 100%),
  linear-gradient(90deg, rgba(20, 21, 40, .55), rgba(20, 21, 40, 0) 60%); }
@media (max-width: 719px) { .dusk-art::after { background: linear-gradient(180deg, var(--night) 0, rgba(20, 21, 40, .5) 14%, rgba(20, 21, 40, .3) 45%, rgba(20, 21, 40, 0) 60%); } }

/* the nav comes back when you scroll up past the hero (below.js), so the estimate is never ten screens away on a phone */
.nav { position: sticky; top: 0; z-index: 10; transition: transform .25s ease-out; }
.nav.away { transform: translateY(-100%); }
.nav.peek { transform: none; }
/* edge-to-edge frosted bar: it takes the colour of whatever section is under it, so no pale band on the honey ground */
.nav.peek::before { content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); background: color-mix(in srgb, var(--stone) 50%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 14px rgba(42, 28, 18, .12); }
@media (max-width: 720px) {
  .nav.peek .lang { display: none; }
  .nav.peek .btn-sm { display: inline-flex; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* a way to act at the two most convincing moments: Day 82 and the report */
.cap-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.cap-link::after { content: "→"; margin-left: .4em; }
.cap-link:hover { text-decoration-color: var(--ink); }
.js .fm-caps li:not(.on) { pointer-events: none; } /* the captions are stacked; only the one showing takes clicks */
.morning-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.morning-cta p { font: italic 400 1.1875rem/1.3 var(--serif); }
@media (min-width: 960px) { .morning-cta { grid-column: 2; margin-top: calc(32px - clamp(48px, 6vw, 112px)); } } /* sits 32px under the report, not a full grid gap */

/* hero card without the breeze (reduced motion / no WebGL): a still example, not draggable */
.soil[data-state="still"] [data-s="still"] { display: inline; }
[data-hero="g"] .soil.static { cursor: auto; transition: none; }
.soil.static .soil-card::after { display: none; } /* no grip dots */

/* the paid row is followed by the sign-off's own rule: no dashed rule on top of it */
.report-paid { border-bottom: 0; }

/* the way out of the pinned story, at the foot of the Day/% card (the readout itself is aria-hidden: the captions say it) */
.fm-read > div { display: grid; gap: 2px; }
/* top right of the card, on the "Day" line, so the card doesn't grow over the close-up */
.fm-skip { position: absolute; top: 0; right: 4px; display: flex; align-items: center; min-height: 44px; padding: 0 10px; font: var(--stencil-weight) .6875rem/1.2 var(--stencil);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; }
.fm-skip::after { content: "↓"; margin-left: .5em; }
.fm-skip:hover { color: var(--ink); }

/* the card's payback line: the verdict at each beat (story.js, from the caption's data-pay), gold once it's under 45 days */
.fm-pay { display: none; max-width: 16rem; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(42, 28, 18, .15);
  font-size: .875rem; line-height: 1.35; text-wrap: pretty; }
.fm-pay[data-days]:not([data-days=""]) { display: block; }
.fm-pay b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fm-wait { display: block; color: var(--ink-soft); }
.fm-go, .fm-pay.go .fm-wait { display: none; }
.fm-pay.go .fm-go { display: block; }
/* Day 82: the card flips from "wait" to "clean" */
.fm-pay.go { max-width: none; margin: 8px -18px -14px; padding: 8px 18px 12px; border-top: 0; background: var(--gold); color: var(--ink); }
.fm-pay.go .fm-go { font-weight: 600; }
@media (max-width: 720px) { .fm-pay.go { margin: 8px -14px -12px; padding: 8px 14px 10px; } }
@media (max-height: 560px) { .fm-pay { font-size: .8125rem; } .fm-pay.go { margin: 6px -12px -10px; padding: 6px 12px 8px; } }

/* the film: ~a screen per caption (style.css has 1020vh for the other drafts); stepped scenes under reduced motion need less */
.js .film { height: 720vh; }
@media (prefers-reduced-motion: reduce) { .js .film { height: 560vh; } }

/* the worked roof's inputs wrap on the left, clear of the canopy coming in on the right */
.story-sub { max-width: 34rem; text-wrap: balance; }
/* one note at a time, so the card never grows over the phone close-up: the verdict beats the hint, a wipe's answer beats the verdict */
.fm-pay[data-days]:not([data-days=""]) ~ .fm-hint, [data-note="yet"] .fm-pay[data-days], [data-note="pays"] .fm-pay[data-days] { display: none; }

/* desktop: the card sits above the caption in the same column, so the % and its sentence are read together, not across a diagonal */
@media (min-width: 721px) { .fm-read { right: auto; left: var(--gutter); } }

/* the card above already says the day, so the caption's day line is for screen readers only (the card is aria-hidden) */
.fm-caps .stencil { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Motion from transitions.dev, without its blur (blur means paid). CSS only; each rule can go on its own. */
@media (prefers-reduced-motion: no-preference) {
  /* first screen: headline, sentence, button arrive in turn, slowly enough to see. On these three, not the lines inside: those swap with the language and would replay. */
  .hero-copy > :is(h1, .lede, .cta-row) { animation: hero-in 1.4s cubic-bezier(.16, 1, .3, 1) calc(150ms + var(--i, 0) * 350ms) backwards; }
  .hero-copy > .lede { --i: 1; }
  .hero-copy > .cta-row { --i: 2; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(24px); } }

  /* text that used to snap: each starts from display none, so the fade replays whenever its state comes round */
  .soil-say > span, .fm-note, .fm-pay, .fm-go { animation: say-in .25s ease-out; }
  @keyframes say-in { from { opacity: 0; } }

  /* a caption leaves with a quick fade in place, so two barely overlap; only arriving rises */
  .js .fm-caps li { transition: opacity .2s ease, transform 0s linear .2s; }
  .js .fm-caps li.on { transition: opacity .45s ease-out, transform .45s ease-out; }

  /* arrows lean the way they go; decoration only, nothing depends on it */
  .cap-link::after, .fm-skip::after { transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
  .cap-link:focus-visible::after { transform: translateX(3px); }
  .fm-skip:focus-visible::after { transform: translateY(2px); }
  @media (hover: hover) {
    .cap-link:hover::after { transform: translateX(3px); }
    .fm-skip:hover::after { transform: translateY(2px); }
  }
}

/* cookie banner (consent.js): the app's banner, components/CookieConsent.tsx, in this page's button classes */
.cookie { position: fixed; inset: auto 0 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 14px clamp(20px, 5vw, 64px) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 400 1rem/1.4 var(--serif); }
.cookie p { flex: 1 1 20rem; margin: 0; }
.cookie a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cookie-btns { display: flex; gap: 8px; }
.cookie .btn { min-height: 44px; cursor: pointer; }
.cookie .cookie-no { border-color: var(--rule); background: none; }
@media (max-width: 479px) { .cookie-btns { flex: 1 1 100%; } .cookie .btn { flex: 1; } }
