@charset "utf-8";
/* ==========================================================================
   Habit Now — site styles

   Three typefaces, one rule that runs through the whole site:

     Fraunces  ..  the tree talking. Every first-person line is set in it.
     Nunito    ..  headings, labels, numerals, buttons. The app's own display
                   face (lib/theme/app_theme.dart bundles 600/700/800).
     system    ..  body copy. The app deliberately leaves `fontFamily` unset so
                   iOS renders it in SF Pro; the site does the same thing, so
                   paragraphs here match paragraphs there on the target device.

   Colour comes from lib/theme/app_theme.dart — teal #14B8A6, flame #FF8A3D —
   plus a trunk brown the app has no name for, used here for display type.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/nunito.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens -- */
:root {
  --bark:   #5E3F29;   /* trunk — display type            */
  --ink:    #16212E;   /* body                            */
  --haze:   #5C7186;   /* secondary text, labels          */
  --leaf:   #14B8A6;   /* the app's accent                */
  --leaf-d: #0E9384;
  --flame:  #FF8A3D;   /* the app's streak colour         */

  --glass:      rgba(255, 255, 255, .58);
  --glass-edge: rgba(255, 255, 255, .78);
  --glass-deep: rgba(255, 255, 255, .74);

  /* AppShadows.card / .floating, ported verbatim */
  --sh-card: 0 6px 16px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --sh-lift: 0 8px 20px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.06);

  --r-card: 20px;      /* AppSpacing.cardRadius */
  --r-pill: 999px;

  --sans: "Nunito", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 48px);

  /* Fraunces carries a soft/wonky axis pair on top of the usual weight and
     optical size. SOFT at the top of its range rounds every terminal and WONK
     swaps in the single-storey g and splayed leg forms — together they are
     what keeps the display type from reading as a stock high-contrast serif.
     opsz is pinned low deliberately: at display sizes the font would otherwise
     ramp up its stroke contrast and turn brittle, which is the opposite of a
     cartoon tree with a face. */
  --wonk: "opsz" 24, "SOFT" 100, "WONK" 1;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: #D6EAFA;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: rgba(20,184,166,.28); }

:focus-visible {
  outline: 3px solid var(--leaf-d);
  outline-offset: 3px;
  border-radius: 4px;
}

.skiplink {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skiplink:focus { transform: none; }

.wrap { width: min(var(--wrap), 100% - var(--gut) * 2); margin-inline: auto; }

/* ------------------------------------------------------------------ sky -- */
/* One day, top to bottom of the page. Five stacked gradients cross-fade
   instead of one gradient being recomputed on every scroll frame. */
.sky { position: fixed; inset: 0; z-index: -2; }

.sky__layer {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.sky__layer.is-lit { opacity: 1; }

.sky__layer[data-sky="0"] { background: linear-gradient(#9FCDF0 0%, #D6EAFA 52%, #FBF1E4 100%); }
.sky__layer[data-sky="1"] { background: linear-gradient(#79BEEE 0%, #C7E6FA 55%, #EAF7FE 100%); }
.sky__layer[data-sky="2"] { background: linear-gradient(#98A6B5 0%, #C4CDD7 55%, #E4E8EC 100%); }
.sky__layer[data-sky="3"] { background: linear-gradient(#86C9EC 0%, #DDEDF4 52%, #FFE7C0 100%); }
.sky__layer[data-sky="4"] { background: linear-gradient(#7B9AD4 0%, #C3C9E8 50%, #FFD3AE 100%); }
/* Past the acts the day is over and the page has facts to deliver — this one
   is deliberately quiet so the glass cards on top of it stay readable. */
.sky__layer[data-sky="5"] { background: linear-gradient(#B4D2EC 0%, #DCE8F4 46%, #F7EFE4 100%); }

.clouds { position: absolute; inset: 0; overflow: hidden; }
.clouds i {
  position: absolute;
  top: var(--y);
  left: 0;
  width: 46vw; height: 22vw;
  min-width: 320px; min-height: 150px;
  opacity: var(--o);
  background:
    radial-gradient(50% 60% at 30% 60%, #fff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(46% 68% at 58% 45%, #fff 0%, rgba(255,255,255,0) 72%),
    radial-gradient(38% 52% at 78% 62%, #fff 0%, rgba(255,255,255,0) 70%);
  transform: scale(var(--s)) translate3d(-60vw, 0, 0);
  animation: drift var(--d) linear infinite;
  will-change: transform;
}
@keyframes drift {
  from { transform: scale(var(--s)) translate3d(-60vw, 0, 0); }
  to   { transform: scale(var(--s)) translate3d(160vw, 0, 0); }
}

/* --------------------------------------------------------------- sprite -- */
/* Sheets are square grids. `jump-none` is what makes this work: it lands the
   final step exactly on 100%, so an N-column sheet shows all N columns and
   nothing past the edge. One pair of keyframes covers every grid size. */
@keyframes spriteX { to { background-position-x: 100%; } }
@keyframes spriteY { to { background-position-y: 100%; } }

/* --------------------------------------------------------------- topbar -- */
/* A floating capsule instead of a full-bleed scrim. It carries the same width
   math as .wrap, so its edges line up with the hero and every slab below it,
   and the sky stays unbroken down both gutters. Nothing needs to fade out:
   the bar simply ends, and content passes beside it as well as under it.
   Matching `top` and `margin-top` means it starts where it sticks — no jump
   the first time the page scrolls. */
.topbar {
  position: sticky; top: 10px; z-index: 40;
  width: min(var(--wrap), 100% - var(--gut) * 2);
  margin: 10px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-pill);
  /* Lighter and flat, not a gradient that dies halfway down the bar. The
     blur does the legibility work; the tint only warms what shows through. */
  background: linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.66));
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7),
              0 8px 24px rgba(22,33,46,.10);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -.01em; color: var(--ink); text-decoration: none;
}
.wordmark img { border-radius: 8px; box-shadow: var(--sh-card); }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a {
  font-family: var(--sans); font-weight: 700; font-size: .95rem;
  text-decoration: none; color: var(--ink);
  padding: 9px 15px; border-radius: var(--r-pill);
  transition: background-color .18s ease, color .18s ease,
              box-shadow .18s ease, transform .18s ease;
}
/* An ink tint, not a white one: the bar is already white, so lifting a link
   out of it means going darker rather than lighter. */
.topnav a:hover { background: rgba(22,33,46,.07); }
/* The interior pages already mark their own link; it just had nothing to say
   for itself until now. A leaf underline, not a filled pill — the filled pill
   is the CTA's job and two of them would compete. */
/* The 4px pays for the rule below it, so the link stays exactly as tall as
   its neighbours and the capsule doesn't grow on interior pages. */
.topnav a[aria-current="page"] { color: var(--leaf-d); padding-bottom: 4px; }
.topnav a[aria-current="page"]::after {
  content: ""; display: block;
  height: 2px; margin: 3px 3px 0;
  border-radius: 2px; background: var(--leaf);
}
/* Type selector included on purpose: `.topnav a` above would otherwise
   out-specify a lone `.topnav__cta` and leave white text on a white pill. */
a.topnav__cta {
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 10px rgba(22,33,46,.24);
}
a.topnav__cta:hover {
  background: #26374a; color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(22,33,46,.28);
}
a.topnav__cta:active { transform: none; }

/* ------------------------------------------------------------ type roles -- */
/* Anything the tree says. */
.say {
  font-family: var(--serif);
  font-optical-sizing: none;
  font-variation-settings: var(--wonk);
  font-weight: 600;
  color: var(--bark);
  letter-spacing: -.012em;
  line-height: 1.04;
  margin: 0 0 .5em;
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  text-wrap: balance;
}
.say--xl { font-size: clamp(2.6rem, 5.6vw, 4.15rem); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 700; font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--haze);
  margin: 0 0 .9em;
}
/* For eyebrows whose own casing matters — "iOS" must not become "IOS". */
.eyebrow--asis { text-transform: none; letter-spacing: .11em; font-size: .8rem; }

h2, h3 {
  font-family: var(--sans); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.12;
  color: var(--ink);
}

/* ----------------------------------------------------------------- hero -- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
  width: min(var(--wrap), 100% - var(--gut) * 2);
  margin-inline: auto;
  min-height: min(86svh, 776px);
  padding: clamp(12px, 2.5vh, 32px) 0 84px;
  position: relative;
}
.hero__copy { max-width: 33rem; }
.hero .say--xl { max-width: 13ch; }
.hero .lede {
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: #24384b;
  margin: 0 0 28px;
  max-width: 40ch;
}
.hero .fineprint {
  margin: 18px 0 0;
  font-size: .9rem; color: var(--haze);
  max-width: 40ch;
}

/* --- the hero tree ------------------------------------------------------- */
.hero__tree {
  position: relative;
  display: grid; place-items: center;
  justify-self: center;
}
.hero__tree::before {           /* warm light behind it */
  content: "";
  position: absolute;
  width: 165%; aspect-ratio: 1;
  background:
    radial-gradient(closest-side, rgba(255,251,232,.95), rgba(255,246,214,.35) 46%, rgba(255,246,214,0) 74%);
  pointer-events: none;
}
.tree {
  --sz: clamp(248px, 32vw, 396px);
  position: relative;
  width: var(--sz); height: var(--sz);
}
.tree__sprite {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  background-position: 0% 0%;
}

/* --- layer 1: the still --------------------------------------------------
   The stage-2 rest pose, the same 35 KB file act 1 grows into, so it is one
   fetch for both. This is what a reader sees the instant the page paints, and
   what they keep for good if they asked for reduced motion or have no script. */
.tree__sprite--still {
  background-image: var(--img-still, url("../assets/tree/stage-2.webp"));
  background-size: 100% 100%;
  transition: opacity .4s ease;
}
.tree[data-phase="idle"] .tree__sprite--still { opacity: 0; }

/* --- layer 2: the idle loop ----------------------------------------------
   5x5, 25 frames, slowed to a 2.5s breath. The sheet's own rest frame matches
   the still underneath, so the crossfade has nothing to reconcile — the tree
   simply starts breathing. */
.tree__sprite--idle {
  opacity: 0;
  transition: opacity .4s ease;
}
.tree[data-phase="idle"] .tree__sprite--idle {
  opacity: 1;
  background-image: var(--img-idle, url("../assets/tree/idle-2.webp"));
  background-size: 500% 500%;
  animation: spriteX .5s steps(5, jump-none) infinite,
             spriteY 2.5s steps(5, jump-none) infinite;
}
.tree__shadow {
  position: absolute; bottom: 8%; left: 50%;
  width: 46%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(30,60,80,.22), rgba(30,60,80,0) 75%);
  pointer-events: none;
}

.scrollcue {
  position: absolute; bottom: 26px; left: 0;
  margin: 0;
  font-family: var(--serif);
  font-variation-settings: var(--wonk);
  font-size: 1rem; color: var(--haze);
}
.scrollcue span { display: inline-block; animation: nudge 2.6s ease-in-out infinite; }
.scrollcue span::before { content: "↓ "; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* --------------------------------------------------------------- stores -- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.stores--center { justify-content: center; }

.store {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 20px 11px 17px;
  border-radius: 15px;
  background: var(--ink); color: #fff;
  text-decoration: none;
  box-shadow: var(--sh-lift);
  transition: transform .16s ease, background .16s ease;
}
.store:hover { background: #24374b; transform: translateY(-2px); }
.store:active { transform: translateY(0) scale(.985); }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span {
  display: flex; flex-direction: column; line-height: 1.14;
  font-family: var(--sans); font-weight: 800; font-size: 1.06rem;
  letter-spacing: -.01em;
}
.store small {
  font-weight: 600; font-size: .66rem;
  letter-spacing: .09em; text-transform: uppercase;
  opacity: .72;
}

/* ----------------------------------------------------------------- acts -- */
.acts {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  width: min(var(--wrap), 100% - var(--gut) * 2);
  margin-inline: auto;
}

.acts__stage {
  grid-column: 2; grid-row: 1;
  position: sticky; top: 0;
  height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  /* Tight, because the sprite square carries its own transparent margin and
     the tree scales down inside it at low levels — a generous gap here reads
     as the rail drifting away from the tree. */
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

/* Hidden on desktop, where the copy sits in its own column and never overlaps.
   `background-attachment: fixed` is the whole trick: it measures the gradient
   against the viewport, exactly as the fixed .sky does, so the two match. */
.acts__skin { display: none; position: absolute; inset: 0; z-index: -1; }
.acts__skin .sky__layer { background-attachment: fixed; }

.stagetree {
  --sz: clamp(272px, 38vw, 452px);
  position: relative;
  width: var(--sz); height: var(--sz);
  /* JS scales this from .8 to 1 as the tree levels up — it takes up more of
     the screen the bigger it gets, which is the whole point. */
  transform: scale(var(--grow, .82));
  transition: transform .55s cubic-bezier(.22, 1.2, .36, 1);
}
.stagetree__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .42s ease;
  transform-origin: 50% 92%;
  animation: sway 7s ease-in-out infinite alternate;
}
.stagetree__img.is-on { opacity: 1; }
/* The still is a rest pose; this gives it wind. Origin sits at the base of
   the trunk so the island underneath stays put. */
@keyframes sway {
  from { transform: rotate(-.55deg) scaleY(.997); }
  to   { transform: rotate(.55deg)  scaleY(1.003); }
}

.stagetree.is-popping { animation: pop .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop {
  0%   { transform: scale(var(--grow, .82)); }
  38%  { transform: scale(calc(var(--grow, .82) * 1.075)); }
  100% { transform: scale(var(--grow, .82)); }
}

/* leaves thrown out on a level-up */
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute; top: 46%; left: 50%;
  width: 11px; height: 11px;
  border-radius: 60% 10% 60% 10%;
  background: var(--lc, #34C7A8);
  opacity: 0;
}
.burst.is-on i {
  animation: fly 1.05s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: var(--dl);
}
@keyframes fly {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
  18%  { opacity: 1; }
  100% { opacity: 0;
         transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
                    scale(1) rotate(var(--rot)); }
}

/* ornaments that land in the branches in act 3 */
.orns { position: absolute; inset: 0; pointer-events: none; }
.orns i {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: var(--ow, 15%); aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.4);
  opacity: 0;
  background-repeat: no-repeat;
  background-size: 700% 700%;         /* 7x7 sheets, 49 frames */
  background-position: 0% 0%;
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1.3, .36, 1);
}
.orns i.is-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: spriteX .35s steps(7, jump-none) infinite,
             spriteY 2.45s steps(7, jump-none) infinite;
}

/* the level rail — ten notches because there are ten stages */
.rail { display: flex; align-items: center; gap: 14px; }
.rail__track {
  position: relative;
  width: clamp(140px, 17vw, 210px); height: 5px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 1px rgba(30,60,80,.07);
  background-image: repeating-linear-gradient(
      to right, transparent 0 calc(10% - 1px), rgba(30,60,80,.16) calc(10% - 1px) 10%);
}
.rail__fill {
  position: absolute; inset: 0 auto 0 0;
  width: 10%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--leaf), #2DD4BF);
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}
.rail__read {
  margin: 0;
  font-family: var(--sans); font-weight: 800; font-size: .95rem;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 6px;
}
.rail__read small {
  font-weight: 700; font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--haze);
}

.acts__flow { grid-column: 1; grid-row: 1; }

.act {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 12vh 0;
}
.act p:not(.eyebrow) {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: #24384b;
}

/* --------------------------------------------------------------- slabs -- */
.slab { padding: clamp(56px, 9vh, 104px) 0; }
.slab + .slab { padding-top: 0; }
.slab__head { max-width: 46ch; margin: 0 0 clamp(28px, 4.5vh, 48px); scroll-margin-top: 96px; }
.slab__head h2 { font-size: clamp(1.75rem, 3.3vw, 2.6rem); margin: 0 0 .5em; text-wrap: balance; }
.slab__sub { margin: 0; color: #24384b; }

/* --- the Today list, rebuilt in HTML ------------------------------------- */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.phone {
  position: sticky; top: 96px;
  padding: 12px;
  border-radius: 38px;
  background: linear-gradient(#1d2b3a, #101a25);
  box-shadow: 0 26px 60px rgba(16,40,60,.28), 0 2px 6px rgba(0,0,0,.14);
}
.phone__screen {
  border-radius: 28px;
  padding: 26px 14px 22px;
  background: linear-gradient(#BEDDF4 0%, #D9ECFA 45%, #EAF4FC 100%);
}
.phone__greet {
  margin: 0; text-align: center;
  font-family: var(--sans); font-weight: 800; font-size: 1.4rem;
  color: var(--ink); letter-spacing: -.02em;
}
.phone__streak {
  margin: 2px 0 20px; text-align: center;
  font-family: var(--sans); font-weight: 700; font-size: .92rem;
  color: var(--flame);
}

.hcard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  margin-bottom: 10px;
  border-radius: var(--r-card);
  background: var(--glass-deep);
  box-shadow: var(--sh-card);
}
.hcard__icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(var(--c1), var(--c2));
  box-shadow: 0 3px 0 rgba(0,0,0,.09);
}
.hcard__icon svg { width: 24px; height: 24px; fill: #fff; }
.hcard__icon svg[fill="none"] { fill: none; }
.hcard__body { display: block; min-width: 0; }
.hcard__body b {
  display: block;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  color: var(--ink); letter-spacing: -.01em;
}
.hcard__meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: .82rem;
  color: var(--haze);
  margin-top: 1px;
}
.pill {
  font-style: normal;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: .76rem; font-weight: 700;
}
.pill--flame { background: rgba(255,138,61,.16); color: #C2571A; }
.pill--clean { background: rgba(40,199,111,.16); color: #17864B; }

.hcard__bar {
  display: block; height: 5px; margin-top: 8px;
  border-radius: var(--r-pill);
  background: rgba(120,145,165,.2);
  overflow: hidden;
}
.hcard__bar i {
  display: block; height: 100%; width: 0;
  border-radius: var(--r-pill);
  background: var(--c);
  transition: width 1.1s cubic-bezier(.22, 1, .36, 1);
}
.hcard.is-filled .hcard__bar i { width: calc(var(--to, 34) * 1%); }

.hcard__btn {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  border: 1.5px solid rgba(90,115,135,.28);
  background: transparent;
  color: rgba(90,115,135,.55);
  font-size: 1rem; line-height: 1;
  cursor: default;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.hcard.is-done .hcard__btn {
  background: var(--leaf); border-color: var(--leaf); color: #fff;
  transform: scale(1.06);
}

.facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  align-content: start;
}
.facts li {
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sh-card), inset 0 1px 0 var(--glass-edge);
}
.facts h3 { margin: 0 0 5px; font-size: 1.02rem; }
.facts p { margin: 0; font-size: .96rem; color: #34495e; }

/* --------------------------------------------------------------- letter -- */
.letter { padding: clamp(48px, 7vh, 88px) 0; }
.letter__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.letter__intro p:not(.eyebrow) { margin: 0; max-width: 42ch; color: #24384b; }

.note {
  margin: 0;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: var(--r-card);
  background: linear-gradient(#FFFDF7, #FFF8EC);
  box-shadow: var(--sh-lift);
  position: relative;
  transform: rotate(-.7deg);
}
.note blockquote {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-variation-settings: var(--wonk);
  font-weight: 400;
  font-size: clamp(1.14rem, 1.9vw, 1.44rem);
  line-height: 1.44;
  color: #3E2C1C;
  text-wrap: pretty;
}
.note figcaption {
  font-family: var(--sans); font-weight: 600;
  font-size: .82rem; line-height: 1.5; color: #8A7A66;
  border-top: 1px solid rgba(120,100,70,.16);
  padding-top: 14px;
}
.note figcaption b { font-weight: 800; color: #6B5A44; }

/* ---------------------------------------------------------------- tiers -- */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 16px;
}
.tier {
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r-card);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--sh-card), inset 0 1px 0 var(--glass-edge);
}
.tier h3 {
  margin: 0 0 16px;
  font-size: 1.3rem;
}
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.tier li {
  position: relative; padding-left: 26px;
  font-size: .98rem; color: #24384b;
}
.tier li::before {
  content: "";
  position: absolute; left: 0; top: .52em;
  width: 13px; height: 13px;
  border-radius: 60% 10% 60% 10%;
  background: rgba(92,113,134,.4);
}
.tier--pro { background: var(--glass-deep); box-shadow: var(--sh-lift), inset 0 1px 0 var(--glass-edge); }
.tier--pro li::before { background: linear-gradient(140deg, #34C7A8, var(--leaf)); }

/* ------------------------------------------------------------------ get -- */
.get { padding: clamp(56px, 9vh, 120px) 0 clamp(72px, 11vh, 140px); text-align: center; }
.get__inner { display: grid; justify-items: center; }
.get__tree { width: clamp(220px, 30vw, 330px); margin-bottom: -6px; }
.get .say { margin-bottom: .3em; }
.get p { margin: 0 0 28px; color: #24384b; font-size: 1.06rem; }

/* --------------------------------------------------------------- footer -- */
.foot {
  padding: 34px 0 48px;
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.6);
}
.foot__inner { display: grid; gap: 14px; justify-items: center; text-align: center; }
.foot__mark {
  margin: 0; display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 800; color: var(--ink);
}
.foot__mark img { border-radius: 7px; }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.foot__nav a {
  font-family: var(--sans); font-weight: 600; font-size: .94rem;
  color: #3B5268; text-decoration: none;
  border-bottom: 1.5px solid transparent; padding-bottom: 1px;
}
.foot__nav a:hover { border-bottom-color: var(--leaf); }
.foot__note {
  margin: 4px 0 0;
  font-family: var(--serif); font-variation-settings: var(--wonk);
  color: var(--haze); font-size: .95rem;
}

/* ------------------------------------------------------------- reveals -- */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}

/* ====================================================== sub-page (prose) == */
/* A narrower measure than the landing page: these are documents, and a
   reading column that wanders to 1120px is a document nobody finishes. */
.page { --wrap: 776px; padding: clamp(40px, 7vh, 80px) 0 clamp(64px, 10vh, 120px); }
.page__head { max-width: 60ch; margin-bottom: clamp(28px, 4vh, 44px); }
.page__head .pagepet { margin-bottom: 2px; }
.page__h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: clamp(40px, 6vh, 64px) 0 18px; }
.page__head h1 {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: -.03em; margin: 0 0 .35em; color: var(--ink);
}
.page__stamp { margin: 0; font-size: .9rem; color: var(--haze); font-family: var(--sans); font-weight: 600; }

.prose {
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--r-card);
  background: var(--glass-deep);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sh-card), inset 0 1px 0 var(--glass-edge);
}
.prose h2 {
  font-size: 1.3rem;
  margin: 2.1em 0 .55em;
  scroll-margin-top: 88px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 1.7em 0 .4em; }
.prose p, .prose li { color: #24384b; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 24px; margin-bottom: .55em; }
.prose li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 11px; height: 11px; border-radius: 60% 10% 60% 10%;
  background: rgba(20,184,166,.55);
}
.prose a { color: var(--leaf-d); font-weight: 600; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose__note {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(20,184,166,.09);
  box-shadow: inset 0 0 0 1px rgba(20,184,166,.2);
}
.prose__note p:last-child { margin-bottom: 0; }

.toc { margin: 0 0 clamp(28px, 4vh, 40px); }
.toc ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  counter-reset: toc;
}
.toc a {
  display: inline-block;
  font-family: var(--sans); font-weight: 700; font-size: .84rem;
  text-decoration: none; color: #34495e;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.toc a:hover { background: #fff; color: var(--leaf-d); }

/* the one sprite each sub-page gets, so it belongs to the same world */
.pagepet {
  --sz: 76px;
  width: var(--sz); height: var(--sz);
  background-repeat: no-repeat;
  background-size: 700% 700%;
  background-position: 0% 0%;
  animation: spriteX .35s steps(7, jump-none) infinite,
             spriteY 2.45s steps(7, jump-none) infinite;
  margin-bottom: 10px;
}

/* --------------------------------------------------------- support page -- */
.mailcard {
  display: grid; gap: 18px; justify-items: start;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--r-card);
  background: var(--glass-deep);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sh-lift), inset 0 1px 0 var(--glass-edge);
  margin-bottom: 28px;
}
.mailcard h2 { margin: 0; font-size: 1.4rem; }
.mailcard p { margin: 0; color: #24384b; }
.mailbtn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  background: var(--leaf); color: #fff;
  font-family: var(--sans); font-weight: 800; font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(20,184,166,.34);
  transition: transform .16s ease, background .16s ease;
}
.mailbtn:hover { background: var(--leaf-d); transform: translateY(-2px); }
.mailbtn:active { transform: translateY(0) scale(.985); }

.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--sh-card), inset 0 1px 0 var(--glass-edge);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 17px 52px 17px 22px;
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  color: var(--ink);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2.2px solid var(--haze); border-bottom: 2.2px solid var(--haze);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .22s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--leaf-d); }
.faq .faq__a { padding: 0 22px 20px; }
.faq .faq__a p { margin: 0 0 .8em; color: #24384b; font-size: .98rem; }
.faq .faq__a p:last-child { margin-bottom: 0; }

/* ------------------------------------------------ delete-account form -- */
.reqform {
  display: grid; gap: 20px; justify-items: start;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--r-card);
  background: var(--glass-deep);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sh-lift), inset 0 1px 0 var(--glass-edge);
}
.reqform .field { display: grid; gap: 7px; width: 100%; max-width: 46ch; }
.reqform label {
  font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--ink);
}
.reqform .field__opt {
  font-weight: 600; color: var(--haze); font-size: .85rem; margin-left: 4px;
}
.reqform input[type="email"],
.reqform textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid rgba(92,113,134,.32);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  font: inherit; font-size: 1rem; color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.reqform textarea { resize: vertical; min-height: 84px; }
.reqform input[type="email"]:focus,
.reqform textarea:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(20,184,166,.22);
}
.reqform [aria-invalid="true"] { border-color: #D9534F; }

/* Empty unless something is wrong, so it must not reserve space when blank. */
.reqform .field__err {
  margin: 0; font-size: .88rem; font-weight: 600; color: #C0392B;
  font-family: var(--sans);
}
.reqform .field__err:empty { display: none; }

.reqform .check {
  display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start;
  max-width: 52ch; cursor: pointer;
  font-weight: 600; font-size: .95rem; line-height: 1.5;
  font-family: var(--body); color: #24384b;
}
.reqform .check input {
  width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--leaf);
  cursor: pointer;
}
.reqform__alert {
  margin: 0; padding: 13px 16px; border-radius: 14px;
  background: rgba(217,83,79,.12);
  color: #A5342F; font-family: var(--sans); font-weight: 700; font-size: .93rem;
}
.reqform__foot {
  margin: 0; font-size: .9rem; color: var(--haze);
}
.reqform button { border: 0; cursor: pointer; }

/* Off-screen rather than display:none — some bots skip hidden fields. */
.reqform__hp {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ==================================================== responsive ========== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    padding-bottom: 108px;
    min-height: 0;
    padding-top: 8px;
  }
  .hero__copy { max-width: none; order: 2; }
  .hero__tree { order: 1; }
  .hero .lede, .hero .fineprint { margin-inline: auto; }
  .stores { justify-content: center; }
  .scrollcue { left: 0; right: 0; text-align: center; bottom: 30px; }

  /* Mirrors the app: the tree pins to the top and the list scrolls under it
     (lib/widgets/sticky_hero.dart). Unlike the app there is no opaque scaffold
     here, so the panel has to supply its own — without one the copy scrolls
     straight through the tree. It runs full-bleed past the page gutters and
     fades out at the bottom, which is also what hides the seam. */
  .acts { display: block; }
  .acts__stage {
    grid-column: auto; grid-row: auto;
    height: 47svh;
    justify-content: flex-start;
    /* clears the sticky top bar, which paints above this */
    padding: 56px var(--gut) 0;
    margin-inline: calc(var(--gut) * -1);
    gap: 10px;
    overflow: hidden;
  }
  .acts__skin {
    display: block;
    /* The fade is short on purpose: over a long one the headline ghosts
       through and reads as a bug. Over ~5% it reads as copy sliding under. */
    mask-image: linear-gradient(to bottom, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, #000 94%, transparent);
  }
  .stagetree { --sz: min(32svh, 56vw); }
  .act { min-height: 56svh; padding: 6vh 0; }
  .act:first-child { padding-top: 2vh; }
  .act p:not(.eyebrow) { max-width: none; }
  .rail__track { width: min(200px, 46vw); }

  .showcase { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .phone { position: static; width: min(320px, 100%); }
  .letter__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  /* The capsule keeps its shape; it just gives back the padding it can spare
     so the wordmark and both links still fit on one line. */
  .topbar { padding: 6px 6px 6px 12px; gap: 10px; }
  .topbar .wordmark { gap: 8px; font-size: 1rem; }
  .topnav { gap: 2px; }
  .topnav a { padding: 8px 11px; font-size: .9rem; }
  .store { flex: 1 1 auto; justify-content: center; }
  .note { transform: none; }
}

/* Under ~400px the two links plus the word cost more than the pill has to
   spend — measured, not guessed: they need 318px and a 360px phone leaves
   320px. The mark goes icon-only rather than letting anything squash, and
   the word stays in the accessibility tree so the link keeps its name. */
@media (max-width: 400px) {
  .topbar .wordmark span {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; white-space: nowrap;
    clip-path: inset(50%);
  }
}

/* ==================================================== reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clouds { display: none; }
  .scrollcue span,
  .stagetree__img,
  .tree__sprite,
  .orns i.is-in,
  .pagepet {
    animation: none !important;
  }
  /* The hero simply stays on the still it started with — the script never
     advances the phase, so the 555 KB sheet is neither shown nor fetched.
     These rules only need to survive someone forcing the phase by hand. */
  .tree[data-phase] .tree__sprite--still { opacity: 1; }
  .tree[data-phase] .tree__sprite--idle { opacity: 0; }
  .tree__sprite { transition: none; }
  .pagepet, .orns i { background-position: 0% 0%; }
  .stagetree { transition: none; }
  .stagetree.is-popping { animation: none; }
  .burst { display: none; }
  .reveal { opacity: 1; transform: none; }
  .reveal.is-in { transition: none; }
  .sky__layer { transition: none; }
  .stagetree__img { transition: opacity .01s linear; }
}
