/* DreamGate · dreamgate.one
   Self-contained on purpose: no web fonts, CDNs or third-party assets.

   Colour comes only from docs/design/tokens.json (D-021): the dark (obsidian),
   light (warm paper) and red (night) palettes below. Components read the theme
   variables (--bg, --fg, --accent...), never raw colours. Don't add colours here
   without control (D-020). */

:root {
  /* tokens.json · palettes.dark */
  --dark-background: #000000;
  --dark-surface: rgba(255, 255, 255, 0.03);
  --dark-border: rgba(255, 255, 255, 0.08);
  --dark-text: #F5F5F7;
  --dark-text-muted: #A1A1A6;
  --dark-accent: #D9B77E;
  --dark-on-accent: #000000;
  --dark-overlay: rgba(0, 0, 0, 0.7);
  /* tokens.json · palettes.light */
  --light-background: #F5F3EF;
  --light-surface: rgba(0, 0, 0, 0.03);
  --light-border: rgba(0, 0, 0, 0.08);
  --light-text: #111111;
  --light-text-muted: #4B4B50;
  --light-accent: #6E5220;
  --light-on-accent: #FFFFFF;
  /* tokens.json · palettes.red (zero green, zero blue) */
  --red-background: #000000;
  --red-surface: rgba(255, 0, 0, 0.04);
  --red-border: #330000;
  --red-text: #FF0000;
  --red-accent: #FF0000;
  --red-on-accent: #000000;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 18px;              /* tokens.json shape.radius.card */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --page-bg: var(--dark-background);
}

/* ---------- Themes ----------
   --line is the decorative border token. --line-strong outlines interactive controls,
   so it uses textMuted to stay above 3:1 against the background (WCAG 1.4.11).
   Sections vary only by laying the surface token over the background (--tone). */
[data-theme="night"], [data-theme="ember"] {
  color-scheme: dark;
  --bg: var(--dark-background);
  --surface: var(--dark-surface);
  --fg: var(--dark-text);
  --muted: var(--dark-text-muted);
  --line: var(--dark-border);
  --line-strong: var(--dark-text-muted);
  --card: var(--dark-surface);
  --field: var(--dark-surface);
  --accent: var(--dark-accent);
  --accent-ink: var(--dark-on-accent);
  --moon: var(--dark-text);
  --star: var(--dark-text);
}
[data-theme="morning"] {
  color-scheme: light;
  --bg: var(--light-background);
  --surface: var(--light-surface);
  --fg: var(--light-text);
  --muted: var(--light-text-muted);
  --line: var(--light-border);
  --line-strong: var(--light-text-muted);
  --card: var(--light-surface);
  --field: var(--light-surface);
  --accent: var(--light-accent);
  --accent-ink: var(--light-on-accent);
  --moon: var(--light-text);
  --star: var(--light-text);
}
[data-theme="red"], html[data-night="on"] [data-theme] {
  color-scheme: dark;
  --bg: var(--red-background);
  --surface: var(--red-surface);
  --fg: var(--red-text);
  --muted: var(--red-text);   /* never a dimmer red: hierarchy comes from size and weight */
  --line: var(--red-border);
  --line-strong: var(--red-text);
  --card: var(--red-surface);
  --field: var(--red-surface);
  --accent: var(--red-accent);
  --accent-ink: var(--red-on-accent);
  --moon: var(--red-text);
  --star: var(--red-text);
}
html[data-night="on"] { --page-bg: var(--red-background); }
html[data-night="on"] body { color: var(--red-text); }
html[data-night="on"] .skip { background: var(--red-accent); color: var(--red-on-accent); }
.tone-2, .tone-4 { background-image: linear-gradient(var(--surface), var(--surface)); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  background: var(--page-bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Type follows the token scale (body 16/25, heading 18/24 semibold, title bold with
   tight tracking) in the system sans; display sizes scale the title style up. */
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5625;
  color: var(--dark-text);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h1, h2 { font-weight: 700; letter-spacing: -.027em; text-wrap: balance; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.33; letter-spacing: -.011em; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent, var(--dark-accent)); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent, var(--dark-accent)); color: var(--accent-ink, var(--dark-on-accent)); }

[data-theme] {
  background-color: var(--bg);
  color: var(--fg);
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--dark-accent); color: var(--dark-on-accent); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .8em 1.35em;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .4s, color .4s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -14px var(--accent); }
.btn:active { transform: none; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-small { padding: .55em 1.05em; font-size: .875rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background-color: var(--dark-overlay);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
html[data-night="on"] .site-header { background-color: var(--red-background); -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1.125rem; letter-spacing: .01em; text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.mark-arch { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.mark-moon { fill: var(--moon); }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 12px; border-radius: 999px;
  color: var(--muted); font-size: .9375rem; text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--fg); background: var(--card); }
.nav .nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.brand + .header-actions { margin-left: auto; }
.night-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--fg);
  font-size: .875rem; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.night-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.night-toggle:hover { border-color: var(--accent); }
.night-toggle[aria-pressed="true"] { background: var(--card); border-color: var(--accent); }
.night-toggle[aria-pressed="true"] svg { fill: currentColor; }

.menu-toggle {
  display: none; width: 40px; height: 40px; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 12px; background: transparent; cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 16px; height: 1.5px; background: var(--fg); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -5px; }
.menu-bars::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 880px) {
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .nav .nav-cta { display: block; color: var(--accent); }
}
@media (max-width: 560px) {
  .header-cta { display: none; }
  .night-toggle { padding: 9px; }
  .night-toggle-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(72px, 9vw, 124px); }
.section-tight { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  margin-bottom: 14px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.section-head h2 { font-size: clamp(1.9rem, 1.3rem + 2.5vw, 3rem); margin-bottom: 18px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 1.0625em; max-width: 60ch; }
.section-head.center p:not(.kicker) { margin-inline: auto; }
.split {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(36px, 6vw, 88px); align-items: center;
}
.split-top { align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: .5em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Artwork ----------
   Photos and paintings carry blue and green, so in night mode a pure-red multiply
   layer strips both channels and the image renders red-only, like the rest of the page. */
.art { isolation: isolate; }
.art img { width: 100%; height: 100%; object-fit: cover; }
html[data-night="on"] .art::after,
.phone-screen::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: var(--red-accent); mix-blend-mode: multiply; border-radius: inherit;
}

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center; overflow: hidden;
  min-height: clamp(600px, calc(100vh - 64px), 880px);
  padding-block: clamp(56px, 8vw, 104px) clamp(96px, 11vw, 150px);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { object-position: 72% 50%; }
.hero-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--dark-background) 90%, transparent) 0%, color-mix(in srgb, var(--dark-background) 66%, transparent) 36%, color-mix(in srgb, var(--dark-background) 14%, transparent) 68%, color-mix(in srgb, var(--dark-background) 0%, transparent) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--dark-background) 35%, transparent) 0%, color-mix(in srgb, var(--dark-background) 0%, transparent) 22%, color-mix(in srgb, var(--dark-background) 0%, transparent) 58%, var(--dark-background) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-copy { max-width: 640px; }
@media (max-width: 880px) {
  .hero-media img { object-position: 80% 50%; }
  .hero-media::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--dark-background) 50%, transparent) 0%, color-mix(in srgb, var(--dark-background) 72%, transparent) 45%, color-mix(in srgb, var(--dark-background) 55%, transparent) 75%, var(--dark-background) 100%);
  }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .8125rem; color: var(--muted);
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.hero h1 { font-size: clamp(2.5rem, 1.2rem + 3.8vw, 4.4rem); line-height: 1.04; margin-bottom: 26px; }
.h1-line { display: block; }
.h1-accent { color: var(--muted); }
.h1-warm { color: var(--accent); }
.lede { max-width: 34em; margin-bottom: 34px; color: var(--muted); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-points {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: .9rem; color: var(--muted);
}
.hero-points li { position: relative; padding-left: 20px; }
.hero-points li::before {
  content: ""; position: absolute; left: 1px; top: .5em;
  width: 9px; height: 5px;
  border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}

/* The gate illustration (used on the 404 page) */
.gate { width: min(240px, 60vw); height: auto; margin: 0 auto 32px; overflow: visible; }
.gate .sky-a, .gate .sky-b { stop-color: var(--sky-top, var(--dark-background)); }
.gate .sky-c { stop-color: var(--sky-mid, var(--light-accent)); }
.gate .sky-d { stop-color: var(--sky-low, var(--dark-accent)); }
.gate .glow-a { stop-color: var(--accent); stop-opacity: .5; }
.gate .glow-b { stop-color: var(--accent); stop-opacity: 0; }
.gate-stars circle { fill: var(--star); }
.gate-moon { fill: var(--moon); }
.gate-hill-back { fill: var(--dark-background); opacity: .55; }
.gate-hill-front { fill: var(--dark-background); }
.gate-frame { fill: none; stroke: var(--accent); stroke-width: 2; }
.gate-frame-inner { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .35; }
.gate-halo { fill: none; stroke: var(--accent); stroke-width: 22; opacity: .07; }
.gate-ground { stroke: var(--accent); stroke-width: 1; opacity: .35; }
.tw { animation: twinkle 4s ease-in-out infinite; }
.tw-2 { animation-delay: 1.3s; }
.tw-3 { animation-delay: 2.6s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
html[data-night="on"] .gate { --sky-top: var(--red-background); --sky-mid: var(--red-background); --sky-low: var(--red-border); }
html[data-night="on"] .gate-hill-back { opacity: 1; stroke: var(--red-border); stroke-width: 1; }

@media (max-width: 560px) {
  .eyebrow { font-size: .75rem; padding: 6px 12px; gap: 8px; }
}

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.step-icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 22px;
  border-radius: 14px; background: var(--card); color: var(--accent);
}
.step-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step-label { display: block; margin-bottom: 8px; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.step h3 { margin-bottom: 10px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.step p { color: var(--muted); }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Demo ---------- */
.demo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  border: 1px solid var(--line); border-radius: 24px; background: var(--card); overflow: hidden;
}
.demo-input { display: flex; flex-direction: column; gap: 16px; padding: clamp(20px, 3vw, 32px); border-right: 1px solid var(--line); }
.demo-output { display: grid; gap: 16px; align-content: start; padding: clamp(20px, 3vw, 32px); background: var(--field); }
@media (max-width: 880px) {
  .demo { grid-template-columns: 1fr; }
  .demo-input { border-right: 0; border-bottom: 1px solid var(--line); }
}
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted);
  font-size: .875rem; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--card); border-color: var(--accent); color: var(--fg); }
.field-label { font-weight: 600; font-size: .9375rem; }
.demo textarea {
  width: 100%; min-height: 180px; resize: vertical;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--field); color: var(--fg);
  line-height: 1.55;
}
.demo textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.demo-meta { font-size: .8125rem; color: var(--muted); }

.lane { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lane-head h3 { display: flex; align-items: center; gap: 10px; }
.lane-tag { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lane-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.lane-dot-warm { background: var(--accent); }
.dream-text { margin-bottom: 14px; font-size: 1.0625rem; line-height: 1.6; }
.motif-label { margin-bottom: 8px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.motifs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.motif { padding: 4px 11px; border-radius: 999px; background: var(--card); font-size: .8125rem; }
.focus-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.focus-item label {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  cursor: pointer;
}
.focus-item input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); }
.focus-text { display: block; }
.focus-item input:checked + .focus-body .focus-text { text-decoration: line-through; opacity: .6; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.tag {
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.tag-today { border-color: var(--accent); color: var(--accent); }
.empty { color: var(--muted); font-size: .9375rem; }
.fineprint { margin-top: 18px; font-size: .875rem; color: var(--muted); }
.rise { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Practice ---------- */
.practice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.practice {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.practice-abbr { font-weight: 700; letter-spacing: -.03em; font-size: clamp(2.25rem, 1.7rem + 1.8vw, 3rem); line-height: 1; color: var(--accent); }
.practice-name { margin-top: 6px; }
.practice p:not(.practice-abbr) { color: var(--muted); }
.badge {
  position: absolute; top: 22px; right: 22px;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: .75rem; color: var(--muted);
}
.note { max-width: 760px; margin-top: 28px; padding: 6px 0 6px 20px; border-left: 2px solid var(--accent); color: var(--muted); }
.section-cta { margin-top: 32px; }
@media (max-width: 720px) { .practice-grid { grid-template-columns: 1fr; } }

/* ---------- Red night section ---------- */
.night-section h2 { margin-bottom: 18px; font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem); }
.night-section p { max-width: 52ch; }
.night-section .ticks { margin: 26px 0 34px; }
.phone {
  width: min(290px, 78vw); aspect-ratio: 9 / 19; justify-self: center;
  padding: 10px; border-radius: 46px;
  border: 1px solid var(--red-border); background: var(--red-background);
  box-shadow: 0 40px 120px -40px var(--red-border);
}
.phone-screen {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; height: 100%;
  padding: 18px 22px 24px; border-radius: 36px;
  background: var(--red-background) url("../img/red-glow.jpg") center 70% / cover no-repeat;
  color: var(--red-text); text-align: center;
}
.phone-status { display: flex; align-items: center; justify-content: space-between; width: 100%; font-size: .75rem; font-weight: 600; }
.phone-island { width: 74px; height: 22px; border-radius: 999px; background: var(--red-surface); }
.phone-kicker { margin-top: 36px; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase; }
.phone-title { margin-top: 12px; font-size: 1.625rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.phone-sub { margin-top: 14px; font-size: .875rem; line-height: 1.5; }
.phone-mic {
  position: relative; display: grid; place-items: center;
  width: 86px; height: 86px; margin-top: auto;
  border: 1.5px solid var(--red-text); border-radius: 50%;
}
.phone-mic span { width: 26px; height: 26px; border-radius: 50%; background: var(--red-text); }
.phone-mic::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid var(--red-text); opacity: 0;
  animation: pulse 6s var(--ease) infinite; /* ~0.17 Hz, the app's optional slow glow (D-004) */
}
.phone-hint { margin-top: 14px; font-size: .8125rem; }
.phone-foot { margin-top: 18px; font-size: .6875rem; letter-spacing: .06em; opacity: .9; }

/* ---------- Rest first ---------- */
.pledge-quote { max-width: 860px; margin: 0 0 clamp(36px, 5vw, 56px); }
.pledge-quote p { font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.3; color: var(--fg); }
.pledge-quote footer { margin-top: 14px; font-size: .875rem; color: var(--muted); }
.rest-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.rest-item { padding: clamp(22px, 3vw, 32px); background: var(--bg); }
.rest-item h3 { margin-bottom: 8px; }
.rest-item h3::before {
  content: ""; display: block; width: 22px; height: 2px; margin-bottom: 16px; background: var(--accent);
}
.rest-item p { color: var(--muted); }
@media (max-width: 880px) { .rest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rest-grid { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.tone-privacy .section-head { margin-bottom: 0; }
.tone-privacy h2 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.5rem); }
.pledges { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.pledge {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
}
.pledge h3 { margin-bottom: 4px; }
.pledge p { color: var(--muted); }
.pledge-icon { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--card); }
.pledge-icon::after {
  content: ""; position: absolute; left: 11px; top: 12px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.site-note { margin-top: 20px; font-size: .9375rem; color: var(--muted); }
.site-note a { color: var(--fg); }

/* The sky lightening into the morning sections */
.horizon {
  position: relative; height: clamp(140px, 20vw, 240px); overflow: hidden;
  background: linear-gradient(180deg, var(--dark-background) 0%, var(--light-accent) 42%, var(--dark-accent) 74%, var(--light-background) 100%);
}
.horizon::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: min(640px, 110vw); aspect-ratio: 1; transform: translate(-50%, 50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--light-background) 0%, var(--dark-accent) 40%, transparent 100%);
}
/* Evening falls again before the closing section: one loop, night to night. */
.horizon-dusk {
  height: clamp(100px, 14vw, 180px);
  background: linear-gradient(180deg, var(--light-background) 0%, var(--dark-accent) 28%, var(--light-accent) 58%, var(--dark-background) 100%);
}
.horizon-dusk::after { display: none; }
html[data-night="on"] .horizon { height: 1px; background: var(--red-border); }
html[data-night="on"] .horizon::after { display: none; }

/* ---------- Comparison ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 18px 22px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { background: var(--card); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.compare thead th.us { color: var(--accent); }
.compare tbody th { width: 20%; font-weight: 600; }
.compare td.them { width: 38%; color: var(--muted); }
.compare td.us { background: var(--card); font-weight: 600; }
@media (max-width: 720px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto !important; }
  .compare tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare th, .compare td { padding: 8px 18px; border: 0; }
  .compare td.us { margin: 4px 12px 6px; padding: 10px 14px; border-radius: 12px; }
  .compare td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  }
  .compare td.us::before { color: var(--accent); }
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan {
  display: flex; flex-direction: column; gap: 22px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.plan-featured { border-color: var(--accent); }
.plan-name { margin-bottom: 10px; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.plan-price { font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.plan-price small { margin-left: 6px; font-size: 1rem; font-weight: 400; letter-spacing: normal; color: var(--muted); }
.plan-price-soft { color: var(--muted); }
.plan-foot { margin-top: auto; font-size: .875rem; color: var(--muted); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 4px; list-style: none; cursor: pointer;
  font-size: 1.0625rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq summary:hover { color: var(--accent); }
.answer { max-width: 68ch; padding: 0 4px 24px; color: var(--muted); }
.answer p + p { margin-top: 10px; }

/* ---------- Launch updates ---------- */
.updates { overflow: hidden; }
.updates-grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.updates h2 { margin-bottom: 14px; font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); }
.updates-lede { max-width: 30em; color: var(--muted); font-size: 1.0625rem; }
.updates-art {
  position: relative; aspect-ratio: 1376 / 768; margin-right: calc(-1 * var(--gutter));
  -webkit-mask-image: linear-gradient(180deg, var(--dark-background) 62%, transparent 100%), linear-gradient(90deg, transparent 0%, var(--dark-background) 14%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, var(--dark-background) 62%, transparent 100%), linear-gradient(90deg, transparent 0%, var(--dark-background) 14%);
  mask-composite: intersect;
}
@media (max-width: 880px) {
  .updates-grid { grid-template-columns: 1fr; }
  .updates-art { margin-inline: calc(-1 * var(--gutter)); }
}
.signup {
  display: flex; gap: 8px; max-width: 520px; margin: 32px 0 0; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
}
.signup:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup input { flex: 1; min-width: 0; padding: 10px 16px; border: 0; background: transparent; color: var(--fg); font-size: 1rem; }
.signup input:focus { outline: none; }
.signup input::placeholder { color: var(--muted); opacity: .8; }
.form-status { min-height: 1.6em; margin-top: 14px; font-weight: 600; }
.form-note { margin-top: 4px; font-size: .875rem; color: var(--muted); }
@media (max-width: 520px) {
  .signup { flex-direction: column; border-radius: 22px; }
  .signup .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: 56px 40px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.footer-tagline { max-width: 36ch; margin-top: 12px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
.footer-legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.site-footer .wrap > .footer-legal:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.disclaimer { max-width: 92ch; font-size: .8125rem; color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: .8125rem; color: var(--muted); }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- Late-night suggestion ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  width: min(460px, calc(100% - 32px)); padding: 16px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 24px 60px -20px var(--dark-overlay);
  animation: rise .4s var(--ease) both;
}
.toast[hidden] { display: none; }
.toast p { flex: 1 1 200px; font-size: .9375rem; }
.toast-actions { display: flex; gap: 8px; }

/* ---------- Methods page ---------- */
.hero-methods { min-height: clamp(560px, calc(92vh - 64px), 820px); }
.hero-methods .hero-media img { object-position: 85% 50%; }
.hero-methods h1 { font-size: clamp(2.6rem, 1.4rem + 4vw, 4.75rem); }
.night-index {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 8px 0 0; padding: 0; list-style: none;
}
.night-index a {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--dark-overlay);
  font-size: .9375rem; text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.night-index a:hover { border-color: var(--accent); }
.night-index span { font-weight: 700; color: var(--accent); }
html[data-night="on"] .night-index a { background: var(--red-background); }

.chapter-grid {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 2fr);
  gap: clamp(24px, 5vw, 72px);
}
.chapter-time { position: sticky; top: 100px; align-self: start; }
.chapter-clock { font-weight: 700; letter-spacing: -.03em; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.75rem); line-height: 1; color: var(--accent); }
.chapter-when { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.chapter-body { max-width: 680px; }
.chapter-body h2 { margin-bottom: 8px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.chapter-sub { margin-bottom: 22px; font-size: 1.1875rem; line-height: 1.45; color: var(--muted); }
.chapter-body > p:not(.kicker):not(.chapter-sub):not(.section-cta), .method-card > p:not(.practice-abbr) { color: var(--muted); }

.steps-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; counter-increment: step; }
.steps-list li::before {
  content: counter(step);
  display: grid; place-items: center; width: 28px; height: 28px; margin-top: -2px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  font-size: .8125rem; font-weight: 600; color: var(--accent);
}
.helps { margin-top: 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.helps h3 { margin-bottom: 12px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.helps .ticks { gap: 8px; }
.helps .tag { margin-right: 6px; vertical-align: 1px; }
.caution { margin-top: 22px; padding: 4px 0 4px 18px; border-left: 2px solid var(--accent); color: var(--muted); }

.method-pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  margin-top: clamp(28px, 4vw, 44px);
}
.method-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.method-card .helps { margin-top: auto; }
.method-card .steps-list { margin: 10px 0 22px; }
.rest-check {
  max-width: 820px; margin-top: clamp(28px, 4vw, 44px); padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--card);
}
.rest-check h3 { margin-bottom: 10px; font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.rest-check p:not(.kicker) { color: var(--muted); }

.reading { max-width: 760px; padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.reading h2 { margin-bottom: 12px; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); }
.reading > p { color: var(--muted); }
.refs { display: grid; gap: 12px; margin: 20px 0 0; padding-left: 1.2em; color: var(--muted); font-size: .9375rem; }
.refs cite { font-style: italic; color: var(--fg); }
.reading-note { margin-top: 24px; padding: 16px 20px; border-radius: 14px; background: var(--card); font-size: .9375rem; }

@media (max-width: 880px) {
  .chapter-grid { grid-template-columns: 1fr; gap: 16px; }
  .chapter-time { position: static; display: flex; align-items: baseline; gap: 14px; }
  .chapter-when { margin-top: 0; }
  .method-pair { grid-template-columns: 1fr; }
}

/* ---------- Plain pages (privacy, 404) ---------- */
.doc { max-width: 720px; }
.doc h1 { margin-bottom: 12px; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.25rem); }
.doc .updated { margin-bottom: 40px; color: var(--muted); }
.doc h2 { margin: 40px 0 12px; font-size: 1.5rem; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0 0; padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--accent); }
.doc strong { color: var(--fg); font-weight: 600; }
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.lost h1 { margin-bottom: 16px; font-size: clamp(2.4rem, 1.6rem + 3vw, 3.75rem); }
.lost p { margin: 0 auto 28px; max-width: 42ch; color: var(--muted); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
