/* Timeframes. One theme per visit (follows the phone's light/dark setting),
   one accent (the flame), one radius scale (14px surfaces, pill buttons).
   Type is the system rounded face: SF Pro Rounded on iPhone and Mac, the
   same face the app uses. No web fonts, no scripts from anywhere else. */

:root {
  --bg: #eef0f1;
  --bg-deep: #e3e6e8;
  --ink: #15171b;
  --muted: #565b63;
  --line: #d3d7db;
  --flame: #d9441c;
  --flame-ink: #ffffff;
  --radius: 14px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131418;
    --bg-deep: #1b1d22;
    --ink: #eceef0;
    --muted: #a0a5ad;
    --line: #2b2e35;
    --flame: #e85a30;
    --flame-ink: #131418;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

section[id] { scroll-margin-top: 24px; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  z-index: 10;
}

.skip:focus-visible { top: 12px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img { width: 24px; height: auto; }

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 16px;
  font-weight: 600;
}

.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--flame);
  color: var(--flame-ink);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover { opacity: 0.9; }
.button:active { transform: scale(0.98); }

.quiet-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
}

.quiet-link:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 6px; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  min-height: min(760px, calc(100dvh - 68px));
  padding: 24px 0 56px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(44px, 6.4vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 11ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--flame);
}

.hero p {
  margin: 0 0 32px;
  font-size: 21px;
  color: var(--muted);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hero-art {
  justify-self: center;
  width: min(100%, 360px);
}

/* Shared section rhythm */

section { padding: 96px 0; }

h2 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  max-width: 46ch;
}

.label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flame);
}

/* Burn: the slider */

.burn {
  background: var(--bg-deep);
}

.burn-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
  margin-top: 48px;
}

.burn-candle {
  position: relative;
  width: 300px;
  aspect-ratio: 600 / 720;
}

.burn-candle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.12s ease;
}

.slider-row {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.slider-row label {
  font-weight: 700;
  font-size: 17px;
}

.slider-row output {
  color: var(--flame);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  max-width: 520px;
  accent-color: var(--flame);
  height: 32px;
}

.notice {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  max-width: 520px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  min-height: 92px;
}

.notice img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #1d1620;
  object-fit: contain;
  padding: 3px;
}

.notice strong {
  display: block;
  font-size: 16px;
}

.notice span {
  display: block;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.burn-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 52ch;
}

/* Windows: a day on a line */

.day {
  margin-top: 56px;
}

.day-candles {
  display: grid;
  grid-template-columns: 6fr 5fr 2fr 3fr 2fr;
  align-items: end;
  min-height: 170px;
}

.day-candles figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.day-candles img { width: 120px; }

.day-bar {
  display: grid;
  grid-template-columns: 6fr 5fr 2fr 3fr 2fr;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
}

.day-bar .win { background: var(--flame); opacity: 0.9; }
.day-bar .win.spent { opacity: 0.35; }
.day-bar .win.later { opacity: 0.6; }

.day-hours {
  display: grid;
  grid-template-columns: 6fr 5fr 2fr 3fr 2fr;
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.day-captions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 44px;
}

.day-captions h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.day-captions p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Weak moments: big statement + facts */

.rules {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.rules h2 { max-width: 14ch; }

.facts {
  display: grid;
  gap: 28px;
  padding-top: 12px;
}

.facts p {
  margin: 0;
  padding-left: 18px;
  border-left: 3px solid var(--flame);
  font-size: 18px;
}

.facts strong { display: block; }

/* Make it stick: two verbs */

.stick {
  border-top: 1px solid var(--line);
}

.stick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 40px;
}

.stick-grid h3 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.stick-grid p {
  margin: 0;
  color: var(--muted);
}

/* Pricing: free next to Pro */

.plans {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.plan { padding: 36px; }

.plan + .plan {
  background: var(--ink);
  color: var(--bg);
}

.plan + .plan .plan-note { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.plan h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.price {
  margin: 0 0 4px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.plan-note {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.plan li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border-radius: 2px;
  background: var(--flame);
  transform: translateY(-2px);
}

/* Privacy line */

.promise {
  text-align: center;
  padding: 120px 0;
}

.promise p {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.promise p span { color: var(--muted); }

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* Reading pages (privacy, terms, support) */

.doc {
  max-width: 720px;
  padding: 40px 0 80px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(38px, 5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.doc h2 {
  margin: 48px 0 10px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.doc h3 { margin: 28px 0 6px; font-size: 19px; }

.doc p, .doc li { color: var(--ink); }
.doc .meta, .doc .updated { color: var(--muted); font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--flame); }

.doc details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.doc details:last-of-type { border-bottom: 1px solid var(--line); }

.doc summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 19px;
  list-style: none;
}

.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; float: right; color: var(--flame); font-weight: 800; }
.doc details[open] summary::after { content: "\2212"; }

/* Entry motion: sections settle in as they arrive. Off for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal.in { opacity: 1; transform: none; }
  /* The hero never waits on a script: it rises in on load. */
  .hero .rise { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero .rise:nth-child(2) { animation-delay: 0.08s; }
  .hero .rise:nth-child(3) { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}

/* Phones */

@media (max-width: 420px) {
  .brand { font-size: 18px; }
  .nav-links { gap: 12px; font-size: 14px; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 16px 0 48px;
    gap: 8px;
  }
  .hero-art { order: -1; width: 128px; justify-self: start; margin-left: -12px; }
  .hero p { font-size: 19px; }
  section { padding: 72px 0; }
  .burn-grid { grid-template-columns: 1fr; gap: 24px; }
  .burn-candle { width: 200px; justify-self: center; }
  .day-candles img { width: 64px; }
  .day-candles { min-height: 120px; }
  .day-hours { font-size: 12px; }
  .day-captions, .rules, .stick-grid, .plans { grid-template-columns: 1fr; gap: 28px; }
  .plans { gap: 0; }
  .plan { padding: 28px 24px; }
  .promise { padding: 88px 0; }
}

.doc .lead { font-size: 20px; color: var(--muted); margin: 0 0 32px; }
.doc .card {
  margin-top: 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-deep);
}
.doc .card h2 { margin-top: 0; }
