/* youquit.app, the page in front of the app. One stylesheet for both languages.
   Every colour is the app's own (file and line beside it), so a card here looks like a card
   there. Poppins SemiBold is served from this server, never from a font network, and nothing
   on the page calls another server: a page about what stays on your phone does not hand a
   visitor's address to anybody. The legal pages carry their own styles and never load this. */

@font-face {
  font-family: "Poppins";
  src: url("/quit/poppins-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Colors.swift:18-43. ink-2 is InsightPalette.inkSecondary (InsightPalette.swift:124): the
     app's 6B6B6B drops to 4.2:1 where the halos peak, 5A5A5A stays above 5.3:1. */
  --canvas: #F8F5EE;
  --ink: #0A0A0A;
  --ink-2: #5A5A5A;
  --hairline: #E6E0D3;

  /* Glass: the canvas at Glass.neutralTint over a blur (Surfaces.swift:50, 96-97). Edge:
     Glass.edge, four even stops, top left to bottom right (Surfaces.swift:55-66). Only the bar
     casts a shadow (Surfaces.swift:71-73, GlassTabBar.swift:136), never a card. */
  --glass-bg: rgba(252, 250, 245, .55);
  --glass-bar: rgba(252, 250, 245, .72);
  --glass-solid: rgba(254, 252, 247, .94);
  --glass-blur: blur(20px) saturate(170%);
  --glass-blur-bar: blur(24px) saturate(180%);
  --glass-edge: linear-gradient(to bottom right,
      rgba(255,255,255,.95) 0%, rgba(255,255,255,.10) 33.33%,
      rgba(255,255,255,.04) 66.67%, rgba(255,255,255,.55) 100%);
  --bar-shadow: 0 8px 36px rgba(0, 0, 0, .12);
  --pill-on: rgba(10, 10, 10, .08);          /* the chosen tab, GlassTabBar.swift:103-107 */
  --pill-on-edge: rgba(255, 255, 255, .6);

  --halo-opacity: .45;                       /* GlassBackdrop, Surfaces.swift:255 */

  /* Sunset, the Progress line (ProgressCurve.swift:24-26). Never used as text colour on the
     cream: its coral end is 2.4:1 there. */
  --sunset: linear-gradient(90deg, #7A5CFF, #FF5CA8, #FF7A59);
  --hl-a: .30;
  --focus: #7A5CFF;

  --wash-ink: #141414;                       /* InsightPalette.ink, InsightPalette.swift:123 */
  --wash-ink-2: rgba(20, 20, 20, .8);

  --phone-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 1px rgba(10,10,10,.55),
                  0 28px 56px -18px rgba(20,20,20,.38), 0 10px 20px -12px rgba(20,20,20,.22);
  /* The drawings are black line art on nothing. On the dark canvas they are inverted; on a
     wash or the paper card, which stay light in both themes, they never are. */
  --doodle: none;

  --r-medium: 14px; --r-large: 20px; --r-sheet: 28px; --r-pill: 999px;   /* Spacing.swift:27-33 */
  --gutter: clamp(16px, 5vw, 24px);
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0A0A0A;
    --ink: #F5F5F5;
    --ink-2: #9A9A9A;
    --hairline: #232323;
    --glass-bg: rgba(20, 20, 20, .55);
    --glass-bar: rgba(16, 16, 16, .74);
    --glass-solid: rgba(20, 20, 20, .94);
    --glass-edge: linear-gradient(to bottom right,
        rgba(255,255,255,.40) 0%, rgba(255,255,255,.10) 33.33%,
        rgba(255,255,255,.04) 66.67%, rgba(255,255,255,.20) 100%);
    --bar-shadow: 0 8px 36px rgba(0, 0, 0, .35);
    --pill-on: rgba(245, 245, 245, .16);
    --pill-on-edge: rgba(255, 255, 255, .22);
    /* The app's .12 reads as plain black across a wide desktop page. .2 keeps #9A9A9A above
       5:1 where the halos peak. */
    --halo-opacity: .2;
    --hl-a: .40;
    --phone-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 0 1px #303030,
                    0 28px 56px -18px rgba(0,0,0,.7);
    --doodle: invert(1);
  }
}

/* 2. Base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html {
  /* The canvas is on html, not body: the halo layer sits at z-index -1 and must paint above it. */
  background-color: var(--canvas);
  font-synthesis: none;              /* the app has nothing above SemiBold: no fake bold */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;          /* an anchor lands below the floating bar, not under it */
}
body {
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: the hero glow may spill past the window without scrolling the page
     sideways, and clip makes no scroll container, so the bar still sticks. */
  overflow-x: clip;
}
img { max-width: 100%; }
b, strong { font-weight: 600; }
.wrap { max-width: 64rem; margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 1rem; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.5rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .75rem; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.015em; margin: 0; }
p { margin: 0; }
.lede { font-size: clamp(1.0625rem, 2.4vw, 1.2rem); color: var(--ink-2); max-width: 36rem; }
.eyebrow {
  display: flex; align-items: flex-start; gap: 10px;
  font: 600 .8125rem/1.2 var(--font-display);
  letter-spacing: .123em; text-transform: uppercase;      /* capsLabel, Typography.swift:120-125 */
  color: var(--ink-2); margin: 0 0 .75rem;
}
.eyebrow::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  margin-top: .18em;                 /* on the first line when a long label wraps */
  background: var(--sunset);
}
.section { padding-block: clamp(48px, 7vw, 88px); }
.head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 44px); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--canvas);
  font: 600 .9375rem/1 var(--font-display); text-decoration: none;
}
.skip:focus { top: 12px; }

/* 3. Page backdrop ----------------------------------------------------------
   GlassBackdrop (Surfaces.swift:250-265): four circles of the app's tints, sized on the width,
   blurred by 0.32 of their size. Drawn as one fixed layer of radial gradients whose stops follow
   a disc under that blur, so a phone never has to paint a filter: blur(). Nothing moves with the
   scroll, as in the app. Lime on top, then lavender, blush, sage. */
body::before {
  content: "";
  position: fixed; left: 0; top: 0;
  width: 100%; height: 100vh; height: 100lvh;
  z-index: -1; pointer-events: none;
  --u: min(100vw, 72rem);
  opacity: var(--halo-opacity);
  background:
    radial-gradient(circle calc(var(--u) * .90) at 92% 100%,
      rgb(233 245 166 / .705) 0%, rgb(233 245 166 / .637) 16.67%, rgb(233 245 166 / .465) 33.33%,
      rgb(233 245 166 / .266) 50%, rgb(233 245 166 / .115) 66.67%, rgb(233 245 166 / .036) 83.33%,
      rgb(233 245 166 / 0) 100%),
    radial-gradient(circle calc(var(--u) * 1.14) at 15% 78%,
      rgb(207 200 247 / .705) 0%, rgb(207 200 247 / .637) 16.67%, rgb(207 200 247 / .465) 33.33%,
      rgb(207 200 247 / .266) 50%, rgb(207 200 247 / .115) 66.67%, rgb(207 200 247 / .036) 83.33%,
      rgb(207 200 247 / 0) 100%),
    radial-gradient(circle calc(var(--u) * 1.02) at 98% 52%,
      rgb(255 193 218 / .705) 0%, rgb(255 193 218 / .637) 16.67%, rgb(255 193 218 / .465) 33.33%,
      rgb(255 193 218 / .266) 50%, rgb(255 193 218 / .115) 66.67%, rgb(255 193 218 / .036) 83.33%,
      rgb(255 193 218 / 0) 100%),
    radial-gradient(circle calc(var(--u) * 1.08) at 12% 48%,
      rgb(217 237 194 / .705) 0%, rgb(217 237 194 / .637) 16.67%, rgb(217 237 194 / .465) 33.33%,
      rgb(217 237 194 / .266) 50%, rgb(217 237 194 / .115) 66.67%, rgb(217 237 194 / .036) 83.33%,
      rgb(217 237 194 / 0) 100%);
}

/* 4. Glass ------------------------------------------------------------------
   .glass blurs what passes under it: the bar, the FAQ panel, the hero's second button.
   .pane is the same frosted look without the blur, for cards that only ever sit on the still
   halos: a blur of a smooth gradient looks the same and would cost a layer on a phone. */
.glass, .pane { position: relative; background: var(--glass-bg); }
.glass {
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
}
.glass::after, .pane::after, .wash::after, .paper::after, .night::after, .nav::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .nav { background: var(--glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .pane, .nav {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* 5. Washes -----------------------------------------------------------------
   InsightPalette.washes (InsightPalette.swift:80-91), line 0 / start .42 / end 1, top left to
   bottom right (34-44). Light in both themes with dark ink on all twelve (10-13), flat, with the
   glass edge only: a blur on a coloured card turns it grey (Surfaces.swift:134-149). */
.wash {
  --w-line: #F3F3A0; --w-start: #D9EDC2; --w-end: #B9DCB0;
  position: relative;
  border-radius: var(--r-large);
  color: var(--wash-ink);
  background: linear-gradient(to bottom right, var(--w-line) 0%, var(--w-start) 42%, var(--w-end) 100%);
}
.wash p { color: var(--wash-ink-2); }
.w-sage       { --w-start:#D9EDC2; --w-end:#B9DCB0; --w-line:#F3F3A0; }
.w-sky        { --w-start:#CFE2F0; --w-end:#AFD1EB; --w-line:#E4F58C; }
.w-sand       { --w-start:#F4E4C6; --w-end:#E8CFA6; --w-line:#F7C4B6; }
.w-clay       { --w-start:#F0D7DC; --w-end:#E0BCCB; --w-line:#C6F0DA; }
.w-lavender   { --w-start:#DFD8F0; --w-end:#C6BCE6; --w-line:#F5F1AE; }
.w-mint       { --w-start:#C9EFE2; --w-end:#A9DFCF; --w-line:#F8CCD8; }
.w-peach      { --w-start:#FBDCC6; --w-end:#F5C2A2; --w-line:#C5E4F7; }
.w-butter     { --w-start:#F8F0B6; --w-end:#EFE195; --w-line:#D8CFF4; }
.w-periwinkle { --w-start:#D5DBF7; --w-end:#B8C3EE; --w-line:#E6F59C; }
.w-blush      { --w-start:#FBD5D3; --w-end:#F3B6B4; --w-line:#C8F0DE; }
.w-aqua       { --w-start:#CDEAF3; --w-end:#AADBEB; --w-line:#FBDABF; }
.w-moss       { --w-start:#E4E9C2; --w-end:#CDD69C; --w-line:#F6CFDB; }

/* 6. Buttons ----------------------------------------------------------------
   PrimaryButton: ink fill, canvas text, 54 high (Buttons.swift:39-41). Press 0.975 and .85 over
   120ms (Buttons.swift:193-195). The hover glow is the pink of SpendEntrySheet.swift:32. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 54px; padding: 0 1.6rem;
  border-radius: var(--r-pill); border: 0;
  font: 600 1.0625rem/1.15 var(--font-display);
  text-align: center; max-width: 100%;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .12s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.btn-ink { background: var(--ink); color: var(--canvas); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(255, 92, 168, .35); }
.btn-glass { color: var(--ink); }
.btn-glass:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.975); opacity: .85; transition-duration: .12s; }
.btn-sm { min-height: 44px; padding: 0 1.1rem; font-size: .9375rem; }
.btn-cream { background: #F8F5EE; color: #0A0A0A; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* A narrow phone: a little less air so "Télécharger sur l'App Store" stays on one line. */
@media (max-width: 26rem) { .btn { padding-inline: 1.2rem; font-size: 1rem; } }
.note { margin: 1rem 0 0; font-size: .9375rem; color: var(--ink-2); }

/* 7. Nav ---------------------------------------------------------------------
   GlassTabBar (GlassTabBar.swift:61-140): a floating capsule, 4px inside, 44px targets, and on
   hover the pill of the chosen tab. On a phone the links scroll sideways inside the capsule:
   no script, and a <details> menu would stay open after a tap on an anchor. Nothing above the
   bar may be a scroll container (overflow hidden, auto or scroll), or it stops sticking. */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  padding: 10px var(--gutter);
  pointer-events: none;
}
.nav {
  position: relative;
  display: flex; align-items: center; gap: 4px;
  max-width: 64rem; margin: 0 auto; padding: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-bar);
  -webkit-backdrop-filter: var(--glass-blur-bar);
          backdrop-filter: var(--glass-blur-bar);
  box-shadow: var(--bar-shadow);
  pointer-events: auto;
}
.nav a { text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nav a:not(.btn) { color: var(--ink); }   /* :not(.btn), or the CTA text turns ink on ink */
.nav-brand {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px 0 6px; border-radius: var(--r-pill);
  font: 600 1.05rem/1 var(--font-display); letter-spacing: -.01em;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 22.5%; display: block; }
/* On a small phone the icon alone names the app, and the links get the room. */
@media (max-width: 25rem) {
  .nav-brand { padding: 0 6px; }
  .nav-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.nav-links {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 2px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* The fade on the right says there is more to swipe. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
/* The room that lets the last link leave the fade sits on the last item, not on the list:
   older WebKit leaves a flex scroller's end padding out of what it lets you scroll to. */
.nav-links li:last-child { padding-right: 28px; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a, .nav-lang {
  display: flex; align-items: center; height: 44px; padding: 0 14px;
  border-radius: var(--r-pill); white-space: nowrap;
  font: 600 .875rem/1 var(--font-display);
  transition: background-color .28s ease-in-out;
}
.nav-links a:hover, .nav-lang:hover, .nav-brand:hover {
  background: var(--pill-on);
  box-shadow: inset 0 0 0 .8px var(--pill-on-edge);
}
.nav-links a:focus-visible { outline-offset: -3px; }
.nav-lang { flex: none; }
.nav .nav-cta { display: none; }          /* .nav .nav-cta, or .btn's display wins */
@media (min-width: 60rem) {
  .nav-links { justify-content: center; overflow: visible; padding: 0;
               -webkit-mask-image: none; mask-image: none; }
  .nav-links li:last-child { padding-right: 0; }
  .nav .nav-cta { display: inline-flex; }
}
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* 8. Phone ------------------------------------------------------------------
   The captures come from a real iPhone: status bar inside, no Dynamic Island, square corners.
   The frame gives them the screen's corner (about 13.7% of the width, as make_screenshots.py)
   and the island. Body: CurvePalette.card (ProgressCurve.swift:64-68). The ratio comes from the
   img's width and height attributes, so any capture size fits. */
.phone {
  --sw: 16rem;
  --bz: calc(var(--sw) * .034);
  position: relative; margin: 0 auto;
  width: calc(var(--sw) + 2 * var(--bz));
  padding: var(--bz);
  border-radius: calc(var(--sw) * .137 + var(--bz));
  background: linear-gradient(to top right, #0A0A0A, #1B1917 50%, #2E2A26);
  box-shadow: var(--phone-shadow);
}
.phone picture { display: block; }
.phone img {
  display: block; width: var(--sw); height: auto;
  border-radius: calc(var(--sw) * .137);
  background: #0A0A0A;
}
/* About 125 x 37 pt, 11 pt from the top, on a 402 pt screen: it lands between the clock and
   the battery of the captures. */
.phone .island {
  position: absolute; left: 50%; top: calc(var(--bz) + var(--sw) * .028);
  width: calc(var(--sw) * .31); height: calc(var(--sw) * .092);
  translate: -50% 0; border-radius: 999px; background: #000;
}

/* 9. Hero --------------------------------------------------------------------- */
.hero { display: grid; gap: 48px; align-items: center; padding: 32px 0 24px; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.1fr .9fr; padding: 64px 0 40px; } }
.hero .lede { margin-bottom: 2rem; }
.hl {
  background: linear-gradient(90deg, rgb(122 92 255 / var(--hl-a)), rgb(255 92 168 / var(--hl-a)), rgb(255 122 89 / var(--hl-a)))
              0 88% / 100% .42em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .06em;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.pills li {
  display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px;
  border-radius: var(--r-pill); color: #141414;
  font: 600 .875rem/1.2 var(--font-display);
}
.pills li:nth-child(1) { background: #DFD8F0; }
.pills li:nth-child(2) { background: #FBD5D3; }
.pills li:nth-child(3) { background: #D9EDC2; }
.hero-visual { position: relative; display: grid; place-items: center; isolation: isolate; }
/* A sunset glow behind the phone. On a phone its sides stop at the gutter; wider, it spills
   past the column and fades out before the edge of the window. */
.hero-visual::before {
  content: ""; position: absolute; inset: -4% calc(-1 * var(--gutter)); z-index: -1;
  background: radial-gradient(closest-side, rgb(255 92 168 / .45), rgb(122 92 255 / .18) 60%, rgb(122 92 255 / 0) 100%);
}
@media (min-width: 52rem) { .hero-visual::before { inset: -12% -24%; } }
.hero-visual .phone { --sw: clamp(14rem, 62vw, 17.5rem); }
/* A chip stuck on the phone like a sticker: the 14 of the capture's own row. */
.hero-visual .chip {
  position: absolute; right: max(0px, calc(50% - var(--sw-hero) / 2 - 30px)); top: 9%;
  width: 60px; height: 60px; font-size: 1.3rem; rotate: 10deg;
  box-shadow: 0 0 0 3px #F8F5EE, 0 10px 22px -8px rgba(20,20,20,.45);
  --sw-hero: clamp(14rem, 62vw, 17.5rem);
}

/* 10. Chips -------------------------------------------------------------------
   The chip ladder (BadgePalette.swift:36-48); white numerals stay above 4.5:1 on every one. */
.chip {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; font: 600 1rem/1 var(--font-display); font-variant-numeric: tabular-nums;
  background: linear-gradient(to bottom right, var(--c1), var(--c2));
}
.c-d1{--c1:#5D6B7E;--c2:#47535F}.c-d3{--c1:#2F7A73;--c2:#225E58}.c-d7{--c1:#3E7A3C;--c2:#2E5F2D}
.c-d14{--c1:#5C7830;--c2:#475D23}.c-d30{--c1:#9A6B0F;--c2:#7E5408}.c-d60{--c1:#AE5A1E;--c2:#914512}
.c-d90{--c1:#B8543C;--c2:#9C412C}.c-m6{--c1:#B44A6A;--c2:#983857}.c-y1{--c1:#6E4FA8;--c2:#593E8E}

/* 11. How it works ------------------------------------------------------------ */
.habits { margin-bottom: clamp(56px, 8vw, 88px); }
.habits .lede { margin-bottom: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li {
  border-radius: var(--r-pill); padding: 9px 16px; font: 600 .9375rem/1.2 var(--font-display);
  color: #141414; background: #D9EDC2;
}
/* The twelve wash starts in turn, so no two neighbours share a colour. */
.tags li:nth-child(12n+2){background:#CFE2F0}.tags li:nth-child(12n+3){background:#F4E4C6}
.tags li:nth-child(12n+4){background:#F0D7DC}.tags li:nth-child(12n+5){background:#DFD8F0}
.tags li:nth-child(12n+6){background:#C9EFE2}.tags li:nth-child(12n+7){background:#FBDCC6}
.tags li:nth-child(12n+8){background:#F8F0B6}.tags li:nth-child(12n+9){background:#D5DBF7}
.tags li:nth-child(12n+10){background:#FBD5D3}.tags li:nth-child(12n+11){background:#CDEAF3}
.tags li:nth-child(12n+12){background:#E4E9C2}
.tags li.own { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.steps { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { border-radius: var(--r-large); padding: 24px; display: grid; align-content: start; gap: 10px; }
.step .chip { margin-bottom: 6px; }
.step p { color: var(--ink-2); }

/* 12. Gallery -----------------------------------------------------------------
   Each capture on its own wash, as on the App Store pages (make_screenshots.py:50-59). A phone
   swipes through them, snapping to each; from 60rem they sit three and two, centred. */
.gallery {
  display: flex; gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px 0 24px var(--gutter);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}
/* The gutter after the last card, as an item: older WebKit leaves a flex scroller's end
   padding out, and the last card would touch the edge of the screen. Gap + this = gutter. */
.gallery::after { content: ""; flex: none; width: max(1px, calc(var(--gutter) - 16px)); }
.shot {
  flex: none; margin: 0; padding: 20px 20px 24px; border-radius: var(--r-sheet);
  scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center;
}
.shot .phone { --sw: min(64vw, 15rem); }
.shot figcaption { width: calc(min(64vw, 15rem) + 16px); display: grid; gap: 6px; justify-items: center; }
.shot figcaption strong { font: 600 1.0625rem/1.3 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.shot figcaption span:last-child { font-size: .9375rem; line-height: 1.45; color: var(--wash-ink-2); }
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, .6); color: #141414;
  box-shadow: inset 0 0 0 .8px rgba(255, 255, 255, .9);
  font: 600 .75rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase;
}
.gallery:focus-visible { outline-offset: -3px; border-radius: var(--r-large); }
@media (min-width: 60rem) {
  .gallery {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 24px; margin-inline: 0; padding: 0;
    overflow: visible; scroll-snap-type: none;
  }
  .gallery::after { content: none; }
  /* 16px, not 20: at 60rem a column is 288px and the framed phone 256px wide. */
  .gallery > .shot { grid-column: span 2; padding-inline: 16px; }
  .gallery > .shot:nth-child(4) { grid-column: 2 / span 2; }
}

/* 13. Features ---------------------------------------------------------------- */
.features { display: grid; gap: 16px; }
@media (min-width: 40rem) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .features { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feature { padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.feature p { font-size: .98rem; line-height: 1.55; }
.feature.wide { display: grid; gap: 20px; align-items: center; }
.feature.wide > div:first-child { display: grid; gap: 10px; }
@media (min-width: 40rem) {
  .feature.wide { grid-column: 1 / -1; grid-template-columns: 1.3fr 1fr; padding: 32px; }
}
@media (min-width: 60rem) { .feature.wide.two { grid-column: span 2; } }
.feature .art { width: 100%; max-width: 13rem; height: auto; margin: 0 auto; display: block; }

/* The number climbing: the old one floats away, the new one slides in (StreakCounter.swift:224-240). */
.flip {
  position: relative; display: grid; height: 3.4rem; overflow: hidden; margin-bottom: 4px;
  font: 600 3rem/1.1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.flip span { grid-area: 1 / 1; }
.flip .old { opacity: 0; }

/* A small Progress line with its chips (ProgressCurve.swift:24-26, 78-80). */
.mini-curve { display: block; width: 100%; max-width: 15rem; height: auto; overflow: visible; margin-bottom: 4px; }

/* Chips overlapping like the row at the top of Today. */
.stack { display: flex; list-style: none; margin: 0 0 6px; padding: 0; }
.stack li + li { margin-left: -10px; }
.stack .chip { box-shadow: 0 0 0 2.5px var(--w-start); }

/* Breathe in for three, out for three (CravingViewModel.swift, a 6 s cycle). */
.breath { position: relative; display: grid; place-items: center; width: min(100%, 16rem); aspect-ratio: 1; margin: 0 auto; }
.breath::before, .breath::after { content: ""; position: absolute; border-radius: 50%; }
.breath::before { inset: 0; box-shadow: inset 0 0 0 1.5px rgba(20, 20, 20, .16); }
.breath::after {
  inset: 12%;
  background: radial-gradient(closest-side, rgb(255 92 168 / .40), rgb(122 92 255 / .28) 70%, rgb(122 92 255 / .12));
}
.breath img { position: relative; z-index: 1; width: 62%; height: auto; }
.breath .words {
  position: absolute; z-index: 1; bottom: -6px; left: 50%; translate: -50% 0;
  display: grid; padding: 6px 14px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 .8px rgba(255,255,255,.9);
  font: 600 .875rem/1.2 var(--font-display); color: #141414; white-space: nowrap;
}
.breath .words span { grid-area: 1 / 1; text-align: center; }
.breath .words span + span { opacity: 0; }

/* 14. Together ---------------------------------------------------------------- */
.together { display: grid; gap: 16px; }
.together > article { padding: 28px 24px; border-radius: var(--r-large); display: flex; flex-direction: column; gap: 10px; }
.together .pane p { color: var(--ink-2); }
@media (min-width: 40rem) {
  .together { grid-template-columns: repeat(2, 1fr); }
  .together .easy { grid-column: 1 / -1; }
}
@media (min-width: 60rem) {
  .together { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .together .choose { grid-column: span 2; }
  .together .easy { grid-column: auto; }
}
.easy .doodle { width: 7rem; height: auto; margin: 0 0 6px -4px; }
/* A picture of the switches, not the switches: the real ones live in the app. */
.switches { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; max-width: 26rem; }
.switches li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 8px 10px 8px 16px; border-radius: var(--r-medium);
  background: var(--pill-on); font: 600 .9375rem/1.2 var(--font-display);
}
.switches li::after {
  content: ""; flex: none; width: 46px; height: 28px; border-radius: 999px;
  background: radial-gradient(circle 11px at 14px 50%, #fff 96%, transparent) , rgba(120, 120, 128, .32);
}
.switches li.on::after {
  background: radial-gradient(circle 11px at 32px 50%, #fff 96%, transparent), linear-gradient(90deg, #7A5CFF, #FF5CA8);
}
@media (min-width: 60rem) { .choose .switches { grid-template-columns: repeat(2, 1fr); max-width: none; } }

/* 15. Privacy: CurvePalette.paper (ProgressCurve.swift:50-53), light in both themes. ---------- */
.paper {
  position: relative; border-radius: var(--r-sheet);
  padding: clamp(24px, 6vw, 56px);
  background: linear-gradient(to bottom right, #F3F0FF, #FFEEF4, #FFF6E9);
  color: #141414;
}
.paper .eyebrow, .paper .lede, .paper p { color: #5A5A5A; }
.paper-head { display: grid; gap: 24px; align-items: center; margin-bottom: clamp(28px, 4vw, 40px); }
@media (min-width: 48rem) { .paper-head { grid-template-columns: 1fr auto; } }
.paper-head img { width: 12rem; height: auto; }
.promises { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 40rem) { .promises { grid-template-columns: repeat(2, 1fr); } }
.promises li {
  display: grid; gap: 6px; align-content: start;
  padding: 20px; border-radius: var(--r-large);
  background: rgba(255, 255, 255, .58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9);
}
.promises h3 { font-size: 1.0625rem; display: flex; gap: 10px; align-items: baseline; }
.promises h3::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--sunset); translate: 0 -1px;
}
.paper .btn-ink { background: #141414; color: #F8F5EE; }
.paper a:not(.btn) { color: #141414; }

/* 16. FAQ ---------------------------------------------------------------------- */
.faq-list { border-radius: var(--r-large); max-width: 48rem; }
.faq-list details + details { border-top: 1px solid var(--hairline); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 18px 22px;
  font: 600 1.0625rem/1.35 var(--font-display);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  rotate: 45deg; translate: 0 -2px; transition: rotate .28s ease-in-out;
}
.faq-list details[open] summary::after { rotate: -135deg; translate: 0 2px; }
.faq-list details > div { padding: 0 22px 20px; color: var(--ink-2); }
.faq-list a { color: var(--ink); text-underline-offset: .15em; }
.faq-list summary:focus-visible { outline-offset: -3px; border-radius: var(--r-large); }

/* 17. Last call: the night card of the Progress curve (ProgressCurve.swift:71). The coral stays
   in the corner under the line, away from the text, where it would drop below 3:1. ------------ */
.night {
  position: relative; overflow: hidden; border-radius: var(--r-sheet);
  padding: clamp(28px, 6vw, 56px);
  display: grid; gap: 28px; align-items: center;
  background:
    radial-gradient(circle at 100% 100%, rgb(255 106 106 / .75), rgb(255 106 106 / 0) 55%),
    linear-gradient(to bottom right, #2A1F5E, #7B2D8E);
  color: #F5F5F5;
  --glass-edge: linear-gradient(to bottom right,
      rgba(255,255,255,.40) 0%, rgba(255,255,255,.10) 33.33%,
      rgba(255,255,255,.04) 66.67%, rgba(255,255,255,.20) 100%);
}
.night p { color: rgba(255, 255, 255, .82); margin-bottom: 1.5rem; font-size: 1.125rem; }
@media (min-width: 52rem) { .night { grid-template-columns: 1fr 1fr; } }
.curve { display: block; width: 100%; max-width: 30rem; height: auto; margin-left: auto; overflow: visible;
         filter: drop-shadow(0 6px 12px rgb(255 92 168 / .35)); }
.night :focus-visible { outline-color: #F5F5F5; }

/* 18. Footer ------------------------------------------------------------------- */
footer { border-top: 1px solid var(--hairline); padding: 2rem 0 3rem; color: var(--ink-2); font-size: .9375rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: 1rem; }
footer a { color: var(--ink-2); text-underline-offset: .15em; display: inline-block; padding: 6px 0; }
footer a:hover { color: var(--ink); }
footer p + p { margin-top: .5rem; }

.doodle { filter: var(--doodle); }

/* 19. Focus -----------------------------------------------------------------------
   3px of the sunset violet, above 3:1 everywhere on the page; ink inside the light cards. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wash :focus-visible, .paper :focus-visible { outline-color: #141414; }

/* 20. Motion --------------------------------------------------------------------
   Motion.arrive for the hero phone (Spacing.swift:49), Motion.standard .28s for pills and the
   chevron (41). All of it is off under prefers-reduced-motion, and the scroll reveal is simply
   absent where scroll-driven animations are. */
@keyframes arrive { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { scale: 1; opacity: .55; } 50% { scale: 1.6; opacity: 0; } }
@keyframes inhale { 0%, 100% { scale: .72; } 50% { scale: 1; } }
@keyframes word-in { 0%, 46% { opacity: 1; } 50%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes word-out { 0%, 46% { opacity: 0; } 50%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes old-away { 0%, 30% { opacity: 1; translate: 0 0; } 45%, 100% { opacity: 0; translate: 0 -70%; } }
@keyframes new-in { 0%, 38% { opacity: 0; translate: 0 70%; } 55%, 100% { opacity: 1; translate: 0 0; } }
@keyframes sticker { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-visual .phone { animation: arrive .75s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-visual .chip { animation: sticker .5s cubic-bezier(.3, 1.5, .5, 1) .6s both; }
  .curve .line, .mini-curve .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
  .curve .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out 1.7s infinite; }
  .breath::after { animation: inhale 6s ease-in-out infinite; }
  .breath .words span:first-child { animation: word-in 6s linear infinite; }
  .breath .words span + span { animation: word-out 6s linear infinite; }
  .flip .old { animation: old-away 4s ease-in-out infinite; }
  .flip .new { animation: new-in 4s cubic-bezier(.2, .8, .2, 1) infinite; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .curve .line, .mini-curve .line { animation-timeline: view(); animation-range: entry 20% cover 45%; animation-delay: 0s; animation-duration: auto; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .nav-links a, .nav-lang, .faq-list summary::after { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* 21. Forced colours ------------------------------------------------------------ */
@media (forced-colors: active) {
  .glass::after, .pane::after, .wash::after, .paper::after, .night::after, .nav::after, body::before { display: none; }
  .glass, .pane, .wash, .paper, .night, .nav, .btn, .tag, .tags li, .pills li, .chip, .promises li, .switches li { border: 1px solid CanvasText; }
  .eyebrow::before, .promises h3::before { background: CanvasText; }
}
