/* landing.css: the duskmoment.com landing page. Same tokens as the app
   (app/styles.css), copied here because the app's shell CSS locks scrolling.
   Dark only. Left aligned. One idea per section. The one signature motion:
   the sun setting into the horizon as you scroll the first screen. */

@font-face { font-family: 'Bricolage Grotesque'; font-weight: 400; font-display: swap; src: url('fonts/bricolage-grotesque-v9-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('fonts/bricolage-grotesque-v9-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url('fonts/bricolage-grotesque-v9-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url('fonts/bricolage-grotesque-v9-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/fraunces-v38-latin-italic.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --ground: #16111A;
  --deep: #100C13;
  --surface-1: #221A27;
  --surface-2: #2C2232;
  --line: rgba(246, 239, 230, 0.12);
  --line-strong: rgba(246, 239, 230, 0.22);
  --text: #F6EFE6;
  --text-2: #C9BDC8;
  --text-3: #A99CA8;
  --accent: #FFB38A;
  --accent-hover: #FFD1B5;
  --good: #7FD6C2;
  --sky-glow: rgba(255, 150, 120, 0.24);
  --glow: rgba(255, 179, 138, 0.28);

  --sans: 'Bricolage Grotesque', -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;

  --t-sm: 14px; --t-md: 15px; --t-body: 17px; --t-lg: 19px;
  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 40px; --s-10: 64px; --s-12: 96px; --s-14: 128px;
  --gutter: clamp(20px, 5vw, 48px);
  --r-m: 18px; --r-l: 28px; --r-pill: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
  --set: 0;   /* 0 = sun on the horizon, 1 = set. Driven by scroll in landing.js. */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--text); font-family: var(--sans); font-size: var(--t-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 400; text-wrap: balance; }
figure { margin: 0; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--text); color: var(--ground); padding: 10px 16px; border-radius: var(--r-pill); font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-2); }
.display { font-family: var(--serif); font-style: italic; letter-spacing: -0.5px; line-height: 1.04; }
.display em { font-style: italic; color: var(--accent); }
.lead { font-size: var(--t-lg); line-height: 1.55; color: var(--text-2); max-width: 30em; }
.fine { font-size: var(--t-sm); color: var(--text-3); }
/* "Started by 1,240 people across North America and Asia." Only shown past a threshold. */
.proof { margin-top: var(--s-6); display: flex; flex-direction: column; gap: 6px; }
.proof[hidden] { display: none; }
.proof-num {
  font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1;
  font-size: clamp(56px, 11vw, 88px); color: var(--accent); letter-spacing: -1px;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(255, 179, 138, 0.35);
}
.proof-label { font-size: var(--t-body); color: var(--text-2); display: flex; align-items: flex-start; gap: 10px; max-width: 30ch; }
.proof-label::before { content: ''; width: 8px; height: 8px; margin-top: 0.6em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex-shrink: 0; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 2; padding-top: calc(var(--s-5) + env(safe-area-inset-top, 0px)); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 19px; color: var(--text); text-decoration: none; letter-spacing: -0.2px; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; }
.head-link { font-weight: 700; font-size: var(--t-md); text-decoration: none; color: var(--text); min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); }
.head-link:hover { color: var(--text); border-color: var(--text-2); }

/* ---------- buttons ---------- */
.btn {
  min-height: 56px; padding: 0 28px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background 150ms var(--ease-out), border-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.btn.primary { background: var(--text); color: var(--ground); }
.btn.primary:hover { background: #fff; color: var(--ground); }
.btn:active { transform: scale(0.98); }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn.quiet:hover { border-color: var(--text-2); }

/* ---------- 1. hero: the promise over a setting sun ---------- */
.hero { position: relative; z-index: 1; padding-top: clamp(40px, 9vw, 104px); overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; inset: -140px 0 0 0; pointer-events: none; z-index: 0;
  background: radial-gradient(70% 70% at 72% 78%, var(--sky-glow) 0%, rgba(0, 0, 0, 0) 70%);
  opacity: calc(1 - var(--set) * 0.7);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--s-5); }
.hero h1 { font-size: clamp(52px, 10.5vw, 112px); max-width: 9.5em; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-2); }

/* The scene: a sun sinking behind a full-width horizon, with its reflection. */
.dusk { position: relative; z-index: 1; height: clamp(150px, 24vw, 280px); margin-top: var(--s-6); }
/* The sun sinks behind the horizon (clipped there); its glow lives on the scene, unclipped, and fades as it sets. */
.dusk-sky { position: absolute; left: 0; right: 0; top: 0; height: 62%; overflow: hidden; }
.dusk::before {
  content: ""; position: absolute; left: 66%; top: 62%; width: clamp(420px, 60vw, 760px); aspect-ratio: 2 / 1; transform: translate(-50%, -60%);
  background: radial-gradient(closest-side, var(--glow), rgba(255, 179, 138, 0)); opacity: calc(1 - var(--set) * 0.85); pointer-events: none;
}
.dusk .sun {
  position: absolute; left: 66%; bottom: 0; width: clamp(150px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #FFC7A3 0%, var(--accent) 60%, #F59A72 100%);
  transform: translate(-50%, calc(48% + var(--set) * 52%));
}
.dusk .line {
  position: absolute; left: 0; right: 0; top: 62%; height: 1px;
  background: linear-gradient(90deg, rgba(246, 239, 230, 0) 0%, rgba(246, 239, 230, 0.6) 14%, rgba(246, 239, 230, 0.6) 86%, rgba(246, 239, 230, 0) 100%);
}
.dusk .ref { position: absolute; left: 66%; height: 4px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); opacity: calc(var(--o) * (1 - var(--set))); }
.dusk .r1 { top: calc(62% + 14px); width: clamp(90px, 14vw, 170px); --o: 0.55; }
.dusk .r2 { top: calc(62% + 28px); width: clamp(54px, 8vw, 100px); --o: 0.32; }
.dusk .r3 { top: calc(62% + 42px); width: clamp(22px, 3vw, 40px); --o: 0.16; }

/* ---------- 2. moments ---------- */
.moments { padding-block: var(--s-10) var(--s-12); background: linear-gradient(to bottom, var(--ground), var(--deep)); }
.moments h2 { font-size: clamp(40px, 6.4vw, 72px); margin-bottom: var(--s-8); }
.moment-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s-8); max-width: 54em; }
.moment-list li { display: flex; flex-direction: column; gap: var(--s-2); }
.moment-list .when { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.moment-list .what { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.25; color: var(--text); max-width: 22em; }

/* ---------- 3, 4, 6: one claim, one real piece of the app ---------- */
.beat, .song { padding-block: var(--s-12); background: var(--deep); }
.beat-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-8); align-items: center; }
.beat-copy { display: flex; flex-direction: column; gap: var(--s-4); }
.beat h2, .song h2 { font-size: clamp(40px, 6vw, 68px); max-width: 10em; }
.shot { width: 100%; max-width: 420px; justify-self: center; }
.shot img {
  width: 100%; height: auto; border-radius: var(--r-l); border: 1px solid var(--line);
  box-shadow: 0 40px 120px -50px rgba(255, 150, 120, 0.4);
}

/* ---------- 5. the season song, drawn live ---------- */
.song { background: linear-gradient(to bottom, var(--deep), var(--ground) 50%, var(--deep)); }
.song .hear { align-self: flex-start; margin-top: var(--s-2); }
.phone { justify-self: center; width: min(72vw, 300px); border-radius: 40px; padding: 10px; background: #0B080D; border: 1px solid var(--line-strong); box-shadow: 0 40px 120px -40px rgba(255, 150, 120, 0.35); }
.phone canvas { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 30px; background: var(--ground); }

/* ---------- 7. trust, 8. maker, 9. tomorrow ---------- */
.trust { padding-block: var(--s-12) var(--s-10); background: linear-gradient(to bottom, var(--deep), var(--ground)); }
.trust .wrap { display: flex; flex-direction: column; gap: var(--s-4); }
.trust h2 { font-size: clamp(44px, 7.4vw, 88px); max-width: 9em; }
.maker { padding-block: 0 var(--s-10); }
.maker .wrap { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); font-size: var(--t-md); }
.last { padding-block: var(--s-10) var(--s-14); }
.last .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); }
.last h2 { font-size: clamp(44px, 7.4vw, 88px); }

/* ---------- footer and legal ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: var(--s-6) calc(var(--s-8) + env(safe-area-inset-bottom, 0px)); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); font-size: var(--t-sm); color: var(--text-2); }
.site-foot a { min-height: 44px; display: inline-flex; align-items: center; }
.site-foot button { background: none; border: 0; padding: 0 4px; min-width: 44px; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.site-foot .legal-line { flex-basis: 100%; color: var(--text-3); }
#legal { padding-block: var(--s-6); }
.legal { background: var(--surface-1); border-radius: var(--r-m); padding: var(--s-6); line-height: 1.6; max-width: 46em; }
.legal h2 { margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-size: 32px; }
.legal h3 { margin: 18px 0 4px; font-size: 17px; font-weight: 700; }
.legal p { margin: 4px 0 10px; }
.legal .muted { color: var(--text-2); }

/* Reveal on scroll: only with JS, and the page reads complete without it. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- wider screens ---------- */
@media (min-width: 880px) {
  .moment-list { grid-template-columns: repeat(3, 1fr); gap: var(--s-10); max-width: none; }
  .beat-grid { grid-template-columns: 1fr 1fr; gap: var(--s-12); }
  .beat-grid.flip .beat-copy { order: 2; }
  .shot { max-width: 460px; }
  .phone { width: 300px; }
}
