/* thoughts & you: the landing page. "Afterglow": night only, colour means time.
   The support, privacy, terms and invite pages use styles.css. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --midnight: #0c0b10;
  --dusk: #17151d;
  --hairline: #2a2731;
  --bone: #efe9df;
  --fog: #8e8a97;
  --ember: #fd426c;
  --rose: #ee8fb0;
  --violet: #8274ea;
  /* Moods have their own light, never the time ramp. */
  --moonlight: #e4e6ff;
  --rain: #8fb3f0;
  --spark: #f6c35a;
  --ember-mood: #ff8b45;

  --display: "Instrument Serif", "New York", Georgia, serif;
  --text: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --badge: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  --page: 1180px;
  /* Never less than the notch or rounded corner in landscape. */
  --gutter: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left), env(safe-area-inset-right));
  --left: 1;              /* share of the page's 24 hours still left; set by home.js */
  --wick: var(--ember);   /* the wick's colour for that age; set by home.js */
  color-scheme: dark;
  scrollbar-color: var(--hairline) var(--midnight);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--bone);
  font: 18px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: rgba(239, 233, 223, 0.24); color: var(--bone); }

/* Film grain over everything, as in the app. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.4'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, video { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }
p, li { text-wrap: pretty; }
h1, h2, h3, summary, .statement { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--bone);
  color: var(--midnight);
  padding: 12px 18px;
  border-radius: 999px;
  font: 600 13px/1 var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.eyebrow {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}

/* ---------- Buttons and store badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--midnight);
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease, background-color .2s ease;
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.98); opacity: 0.8; }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 12px; }

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 14px;
  background: var(--bone);
  color: var(--midnight);
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease;
}
.store:hover { background: #fff; }
.store:active { transform: scale(0.98); }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font: 600 21px/1.05 var(--badge); letter-spacing: -0.01em; }
.store small { font: 500 11px/1.2 var(--badge); letter-spacing: 0.01em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-center { justify-content: center; }
.cta-note { color: var(--fog); font-size: 16px; line-height: 1.55; max-width: 44ch; margin-top: 18px; }
.cta-address {
  display: inline-block;
  margin-top: 6px;
  color: var(--bone);
  font: 500 14px/1.4 var(--mono);
  letter-spacing: 0.02em;
  text-underline-offset: 4px;
  text-decoration-color: var(--hairline);
}
.cta-address:hover { text-decoration-color: var(--bone); }

/* ---------- The page wick (signature) ---------- */
.page-wick { position: fixed; z-index: 50; pointer-events: none; }
.page-wick-track { position: relative; background: color-mix(in srgb, var(--hairline) 70%, transparent); border-radius: 2px; }
.page-wick-lit {
  position: absolute;
  inset: 0 auto auto 0;
  border-radius: 2px;
  background: var(--wick);
  box-shadow: 0 0 6px var(--wick), 0 0 20px color-mix(in srgb, var(--wick) 55%, transparent);
  transition: opacity .6s ease;
}
.page-wick-lit::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 12px var(--wick);
}
.wick-out .page-wick-lit { opacity: 0; }
.wick-final .page-wick-lit, .wick-final .closing-wick-lit { animation: flicker 1.6s steps(1, end) infinite; }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  12% { opacity: 0.55; }
  18% { opacity: 1; }
  57% { opacity: 0.7; }
  61% { opacity: 1; }
}

/* Wide screens: a vertical wick in the left margin, lit from the top down. */
@media (min-width: 1100px) {
  .page-wick { left: max(14px, calc((100vw - var(--page)) / 2 - 64px)); top: 18vh; bottom: 12vh; width: 2px; }
  .page-wick-track { width: 2px; height: 100%; }
  .page-wick-lit { width: 2px; height: calc(var(--left) * 100%); }
  .page-wick-lit::after { left: -2px; bottom: -3px; }
}
/* Narrow screens: the wick runs along the bottom edge of the header. */
@media (max-width: 1099px) {
  /* An 8px box around the 2px line keeps the tip's glow, and clips it at the screen edge. */
  .page-wick { left: 0; right: 0; top: 63px; height: 8px; overflow: hidden; }
  .page-wick-track { top: 3px; height: 2px; background: transparent; }
  .page-wick-lit { height: 2px; width: calc(var(--left) * 100%); }
  .page-wick-lit::after { right: 0; top: -2px; }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 12px var(--gutter);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--midnight) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 var(--hairline);
}
@supports not (backdrop-filter: blur(1px)) { .nav.scrolled { background: var(--midnight); } }
@media (max-width: 1099px) {
  .nav { min-height: 68px; }
  .nav.scrolled { background: var(--midnight); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  /* Safari on iPhone draws the page behind the status bar; once the header is stuck,
     the night continues up behind it so text doesn't show through. */
  .nav.scrolled::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 120px; background: var(--midnight); pointer-events: none; }
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--hairline); }
.brand span { font: 400 26px/1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.nav nav { display: flex; gap: 8px; }
.nav nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav nav a:hover { color: var(--bone); }
/* The section links need about 960px beside the name and the button. */
@media (max-width: 959px) { .nav nav { display: none; } .nav { gap: 12px; } }
@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand img { width: 32px; height: 32px; border-radius: 8px; }
  .brand span { font-size: 21px; }
  .btn-small { padding: 0 14px; font-size: 11px; letter-spacing: 0.08em; }
}
/* Below 340px the name and the button can't share a row; the hero below says the name. */
@media (max-width: 339px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Layout ---------- */
/* iOS Safari lets the page pan sideways if anything pokes past the screen, even with
   overflow-x on body, so the page's own boxes clip what overflows them. */
main, .footer { overflow-x: clip; }
@supports not (overflow-x: clip) { main, .footer { overflow-x: hidden; } }

main > section, .footer {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  min-height: min(820px, calc(100svh - 68px));
  padding-top: clamp(24px, 5vh, 56px);
  padding-bottom: clamp(32px, 6vh, 72px);
}
.wordmark {
  font: 400 clamp(76px, 11.5vw, 164px)/0.86 var(--display);
  letter-spacing: -0.015em;
  margin: 0 0 30px;
}
.wordmark em { display: block; padding-left: 0.45em; }
.hero-line {
  font: 400 clamp(26px, 2.8vw, 36px)/1.2 var(--display);
  color: var(--fog);
  max-width: 26ch;
  margin-bottom: 22px;
}
.hero-line span { display: block; }
.hero-line em { color: var(--bone); }

/* The page's own countdown, read the way the app reads a thought's. */
.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 34px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
}
.countdown .clock-time { color: var(--wick); font-size: 14px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 10px; }
.hero-facts li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--hairline); box-shadow: inset 0 0 0 1px var(--fog); }

.hero-visual { position: relative; display: grid; justify-items: center; gap: 18px; }
.phone-hero { width: min(100%, 340px); }
.caption { font: 500 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog); text-align: center; }

/* The afterglow: the one slow-breathing light. */
.halo {
  position: absolute;
  z-index: -1;
  width: 130%;
  aspect-ratio: 1;
  top: -12%;
  left: -15%;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--ember), var(--rose), var(--violet), var(--ember));
  filter: blur(110px);
  opacity: 0.3;
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe {
  from { opacity: 0.2; transform: scale(0.94); }
  to { opacity: 0.38; transform: scale(1.05); }
}
.halo-low { animation: none; opacity: 0.16; width: 56%; top: 18%; left: 22%; }

@media (max-width: 900px) {
  .halo { width: 100%; left: 0; top: 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { margin-top: 12px; }
  .phone-hero { width: min(78vw, 320px); }
}

@media (max-width: 959px) and (orientation: landscape) and (max-height: 520px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 28px; }
  .wordmark { font-size: clamp(56px, 17vh, 96px); margin-bottom: 18px; }
  .hero-line { font-size: 24px; }
  .hero-visual { margin-top: 0; }
  .phone-hero { width: min(100%, calc((100svh - 120px) * 0.46)); min-width: 160px; }
  .halo { width: 100%; left: 0; top: 0; }
}

/* ---------- Phones ---------- */
.phone {
  position: relative;
  padding: 2.6%;
  border-radius: 13% / 6%;
  background: linear-gradient(160deg, #1d1b24, #111016);
  box-shadow:
    0 0 0 1px var(--hairline),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 50px 90px -40px rgba(0, 0, 0, 0.9);
}
.phone img, .phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 11% / 5.05%;
  background: var(--midnight);
}

/* Pause and play, on the phone itself. */
.video-toggle {
  position: absolute;
  /* On the frame's corner, clear of the screen it controls. */
  right: -14px;
  bottom: -14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--dusk);
  box-shadow: 0 0 0 1px var(--hairline), 0 8px 20px -8px rgba(0, 0, 0, 0.8);
  color: var(--bone);
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.video-toggle:hover { background: var(--hairline); }
.video-toggle:active { transform: scale(0.94); }
.video-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.video-toggle .icon-pause { display: none; }
.is-playing .video-toggle .icon-pause { display: inline; }
.is-playing .video-toggle .icon-play { display: none; }

/* ---------- Section rules: label, line, real count ---------- */
.section { padding-top: clamp(64px, 9vw, 120px); }
.rule { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.rule-label, .rule-count {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog);
}
.rule-line { flex: 1; height: 1px; background: var(--hairline); }

/* ---------- How it works ---------- */
.ideas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.idea picture, .more picture { display: block; margin-bottom: 22px; }
.idea img, .more img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 1440;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--hairline);
  background: var(--midnight);
}
.idea h3 { font: 400 clamp(30px, 2.6vw, 38px)/1 var(--display); letter-spacing: -0.005em; margin-bottom: 12px; }
.idea p, .more p { color: var(--fog); font-size: 16px; line-height: 1.55; }

/* ---------- Feature spotlights ---------- */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 110px);
  padding: clamp(40px, 6vw, 80px) 0;
}
.chapter + .chapter { border-top: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent); }
.chapter.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.chapter.flip .chapter-copy { order: 2; }
.chapter h3 { font: 400 clamp(46px, 5.4vw, 76px)/0.95 var(--display); letter-spacing: -0.01em; margin-bottom: 24px; }
.chapter-copy > p { font-size: 19px; line-height: 1.6; max-width: 36ch; }
.points { margin-top: 28px; max-width: 38ch; }
.points li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--hairline);
  color: var(--fog);
  font-size: 16px;
  line-height: 1.5;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25px;
  width: 14px;
  height: 1px;
  background: var(--fog);
}

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 3vw, 36px); align-items: start; }
.duo > :nth-child(2) { margin-top: 18%; }
.solo { display: grid; justify-items: center; }
.phone-solo { width: min(100%, 360px); }

/* The time ramp: colour appears only where it means time. */
.ramp { margin-top: 30px; max-width: 36ch; }
.ramp-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), var(--rose) 55%, var(--violet));
}
.ramp-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font: 500 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fog);
}

/* Moods: the drawn marks, lit while their mood plays in the video beside them. */
.moods { margin-top: 30px; max-width: 38ch; }
.moods li {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.moods .glyph { grid-row: 1 / 3; width: 28px; height: 28px; justify-self: center; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), filter .5s var(--ease-out); }
.moods [data-mood="moon"] .glyph { fill: var(--moonlight); }
.moods [data-mood="rain"] .glyph { stroke: var(--rain); }
.moods [data-mood="spark"] .glyph { fill: var(--spark); }
.moods [data-mood="ember"] .glyph { fill: var(--ember-mood); }
.mood-name { font: 400 28px/1.05 var(--display); }
.mood-meaning { color: var(--fog); font-style: italic; font-size: 16px; }
.moods:has(.is-playing) li:not(.is-playing) .glyph { opacity: 0.32; }
.moods:has(.is-playing) li:not(.is-playing) .mood-name { color: var(--fog); }
.moods li.is-playing .glyph { transform: scale(1.18); filter: drop-shadow(0 2px 10px currentColor); }
.moods [data-mood="moon"] { color: var(--moonlight); }
.moods [data-mood="rain"] { color: var(--rain); }
.moods [data-mood="spark"] { color: var(--spark); }
.moods [data-mood="ember"] { color: var(--ember-mood); }
.moods .mood-name { color: var(--bone); transition: color .5s var(--ease-out); }

/* The rest of the app, one row. */
.more {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  padding-top: clamp(40px, 6vw, 80px);
}
/* The rule above the row belongs to the last spotlight. */
#features .chapter:last-of-type { border-bottom: 1px solid color-mix(in srgb, var(--hairline) 60%, transparent); }
.more h3 { font: 400 clamp(26px, 2.2vw, 30px)/1.05 var(--display); margin-bottom: 10px; }

@media (max-width: 960px) {
  .ideas, .more {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(74vw, 300px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
  }
  .more { padding-top: clamp(40px, 6vw, 80px); }
  .idea, .more li { scroll-snap-align: start; }
}
@media (max-width: 900px) {
  .chapter, .chapter.flip { grid-template-columns: 1fr; gap: 40px; }
  .chapter.flip .chapter-copy { order: 0; }
  .chapter-copy > p, .points, .ramp, .moods { max-width: none; }
  .duo { max-width: 560px; }
}
/* Phones: one readable screen at a time, swiped. */
@media (max-width: 600px) {
  .duo {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 74vw;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--gutter);
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
  }
  .duo > * { scroll-snap-align: start; }
  .duo > :nth-child(2) { margin-top: 0; }
  .phone-solo { width: 78vw; }
}

/* ---------- Also in the app ---------- */
.also { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--hairline); }
.also li { padding: 28px 32px 32px 0; border-bottom: 1px solid var(--hairline); }
.also h3 { font: 400 26px/1.1 var(--display); margin-bottom: 10px; }
.also p { color: var(--fog); font-size: 16px; line-height: 1.5; max-width: 34ch; }
@media (max-width: 960px) { .also { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .also { grid-template-columns: 1fr; } .also li { padding-right: 0; } }

/* ---------- Privacy ---------- */
.statement { font: 400 clamp(56px, 9vw, 132px)/0.92 var(--display); letter-spacing: -0.015em; }
.lede { color: var(--fog); font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; max-width: 40ch; }
.privacy .lede { margin-top: 28px; }
.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(40px, 6vw, 72px); }
.promises li { border-top: 1px solid var(--bone); padding-top: 20px; }
.promises h3 { font: 600 12px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.promises p { color: var(--fog); font-size: 16px; line-height: 1.55; }
.promises a { color: var(--bone); text-underline-offset: 3px; text-decoration-color: var(--fog); }
@media (max-width: 960px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .promises { grid-template-columns: 1fr; } }

/* ---------- Questions ---------- */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-child { border-top: 1px solid var(--hairline); }
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 24px 56px 24px 0;
  font: 400 clamp(24px, 2.4vw, 30px)/1.2 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--fog);
  transition: transform .25s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover::before, .faq summary:hover::after { background: var(--bone); }
.faq details p { color: var(--fog); font-size: 18px; line-height: 1.6; max-width: 62ch; padding: 0 0 26px; }
.faq details a { color: var(--bone); text-underline-offset: 3px; text-decoration-color: var(--fog); }

/* ---------- Closing: where the page's wick runs out ---------- */
.closing {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 26px;
  padding-top: clamp(96px, 14vw, 190px);
  padding-bottom: clamp(90px, 12vw, 150px);
}
.closing .lede { max-width: 36ch; }
.closing .cta-note { margin-top: 0; max-width: 40ch; }
.closing-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--hairline), 0 24px 50px -24px rgba(0, 0, 0, 0.9); }
.closing-wick { width: min(100%, 460px); margin-top: 6px; }
.closing-wick-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
}
.closing-wick-row .clock-time { color: var(--wick); font-size: 20px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; transition: color .6s ease; }
.closing-wick-track { position: relative; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--hairline) 80%, transparent); }
.closing-wick-lit {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--left) * 100%);
  border-radius: 2px;
  background: var(--wick);
  box-shadow: 0 0 6px var(--wick), 0 0 18px color-mix(in srgb, var(--wick) 50%, transparent);
  transition: opacity .6s ease;
}
.wick-out .closing-wick-lit { opacity: 0; }
.wick-out .closing-wick-row .clock-time { color: var(--fog); }
.wick-out .closing-wick-label { color: var(--bone); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 40px;
  align-items: end;
  padding-top: 40px;
  padding-bottom: 40px;
}
/* A hairline across the content width, not the gutters. */
.footer::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--hairline); }
.wordmark-small { font: 400 44px/0.9 var(--display); margin: 0 0 14px; }
.wordmark-small em { display: inline; padding-left: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
  text-decoration: none;
}
.footer-links a:hover { color: var(--bone); }
.footer-small { grid-column: 1 / -1; }
@media (max-width: 640px) { .footer { grid-template-columns: 1fr; padding-bottom: 112px; } }

/* ---------- Phone dock: the main action within thumb reach ---------- */
.dock {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: transform .4s var(--ease-out), opacity .3s ease, visibility 0s linear .4s;
}
.dock.show { visibility: visible; opacity: 1; transform: none; transition: transform .4s var(--ease-out), opacity .3s ease, visibility 0s; }
.dock .btn { width: 100%; box-shadow: 0 0 0 1px rgba(12, 11, 16, 0.4), 0 18px 40px -12px rgba(0, 0, 0, 0.85); }
@media (min-width: 861px) { .dock { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .halo { animation: none; }
  .wick-final .page-wick-lit, .wick-final .closing-wick-lit { animation: none; }
  .dock, .moods .glyph, .moods .mood-name { transition: none; }
}

/* ---------- Motion: "light and ink" (docs/DESIGN.md) ----------
   Arrivals are slow and settle softly; exits are quick. Four moments, each one
   something the app does: the name is written in and the wick catches, screens
   develop from a dark blur, the time ramp burns across, and the page's wick goes
   out in a curl of smoke. Nothing is hidden at rest without JavaScript, and Reduce
   Motion shows every end state at once. */
:root {
  --arrive: cubic-bezier(.16, 1, .3, 1);
  --leave: cubic-bezier(.4, 0, 1, 1);
}
.wordmark .ink-line { display: block; }
.ramp { position: relative; }
.ramp-tip {
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}
.closing-wick { position: relative; }
.smoke {
  position: absolute;
  z-index: -1;            /* behind the headline it drifts toward */
  left: -26px;
  bottom: -1px;
  width: 30px;
  height: 72px;
  fill: none;
  stroke: var(--bone);
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: blur(0.8px);
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 100%;
}
.smoke path { stroke-dasharray: 100; stroke-dashoffset: 100; }

@media (prefers-reduced-motion: no-preference) {
  /* 1. Arrival: the name is written in, the rest rises into focus after it. */
  .js .wordmark .ink-line {
    /* Room for ascenders, descenders and the italic overhang inside the mask. */
    padding: 0.16em 0.14em 0.24em;
    margin: -0.16em -0.14em -0.24em;
    -webkit-mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
    mask-image: linear-gradient(90deg, #000 44%, transparent 56%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: write 1.3s cubic-bezier(.45, .05, .3, 1) 0.1s both;
  }
  .js .wordmark em.ink-line { padding-left: calc(0.45em + 0.14em); animation-delay: 0.5s; }
  .js .hero-line span,
  .js .countdown,
  .js .hero .cta,
  .js .hero .cta-note,
  .js .hero-facts { animation: rise 0.9s var(--arrive) both; }
  .js .hero-line span:first-child { animation-delay: 0.72s; }
  .js .hero-line span:last-child { animation-delay: 0.84s; }
  .js .countdown { animation-delay: 0.96s; }
  .js .hero .cta, .js .hero .cta-note { animation-delay: 1.06s; }
  .js .hero-facts { animation-delay: 1.18s; }
  .js .hero-visual .phone { animation: develop 1.5s var(--arrive) 0.3s both; }
  /* The wick catches and burns out to its length. */
  .js .page-wick-track { animation: catch-down 1.7s var(--arrive) 0.2s both; }

  /* 2. Screens develop from a dark blur as they arrive, like photos in the reader. */
  .develop {
    opacity: 0.2;
    filter: blur(16px) brightness(0.4);
    transition: opacity 1.1s var(--arrive), filter 1.4s var(--arrive);
  }
  .develop.developed { opacity: 1; filter: none; }

  /* 3. The ramp burns across, lighting each age as the tip passes it. */
  .ramp.will-burn .ramp-bar { clip-path: inset(-8px 100% -8px 0); }
  .ramp.will-burn .ramp-labels span { opacity: 0; }
  .ramp.burning .ramp-bar { animation: burn-across 2.4s var(--arrive) forwards; }
  .ramp.burning .ramp-tip { animation: tip-across 2.4s var(--arrive) forwards; }
  .ramp.burning .ramp-labels span { animation: rise 0.7s var(--arrive) both; }
  .ramp.burning .ramp-labels span:nth-child(1) { animation-delay: 0.1s; }
  .ramp.burning .ramp-labels span:nth-child(2) { animation-delay: 0.55s; }
  .ramp.burning .ramp-labels span:nth-child(3) { animation-delay: 1.2s; }

  /* 4. The end: smoke lifts from where the wick went out, and "Gone" is written in. */
  .closing-wick.smoking .smoke { animation: smoke-lift 2.8s ease-out forwards; }
  .closing-wick.smoking .smoke path { animation: smoke-draw 2.8s var(--arrive) forwards; }
  .closing-wick-label.ink-in { animation: rise 0.8s var(--arrive) 0.25s both; }

  /* Answers ink in as they open. */
  .faq details[open] > p { animation: rise 0.6s var(--arrive) both; }
}

@keyframes write {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes develop {
  from { opacity: 0.15; filter: blur(18px) brightness(0.35); }
  to { opacity: 1; filter: none; }
}
@keyframes catch-down {
  from { clip-path: inset(-30px -30px 100% -30px); }
  to { clip-path: inset(-30px); }
}
@keyframes burn-across { to { clip-path: inset(-8px 0 -8px 0); } }
@keyframes tip-across {
  0% { left: 0; opacity: 0; }
  8% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}
@keyframes smoke-lift {
  0% { opacity: 0; transform: translateY(6px) scaleX(0.9); }
  16% { opacity: 0.55; }
  100% { opacity: 0; transform: translateY(-22px) scaleX(1.25); }
}
@keyframes smoke-draw { to { stroke-dashoffset: 0; } }

/* On phones the wick lies along the top edge, so it catches from the left. */
@media (max-width: 600px) { .smoke { left: -16px; } }
@media (max-width: 1099px) and (prefers-reduced-motion: no-preference) {
  .js .page-wick-track { animation-name: catch-across; }
}
@keyframes catch-across {
  from { clip-path: inset(-30px 100% -30px -30px); }
  to { clip-path: inset(-30px); }
}
