/* idée — presentation site. Colors mirror IDTheme; serif is the system serif (New York on Apple devices, as in the app). */
:root {
  --bg: #f6f5ff;
  --surface: #ffffff;
  --fg: #1d1a33;
  --muted: #625e7d;
  --accent: #5b4dff;
  --accent-fill: #5b4dff;
  --line: #e2dff5;
  --panel: #ecebff;
  --error: #b42344;
  --sky-top: #f5f2ff;
  --sky-mid: #fce8ed;
  --sky-low: #ebe6fc;
  /* Elevation: tinted by day, neutral by night so nothing glows on the dark sky. */
  --shadow-field: 0 10px 30px rgb(91 77 255 / .12);
  --shadow-button: 0 5px 10px rgb(91 77 255 / .17);
  --shadow-card: 0 8px 22px rgb(91 77 255 / .1);
  --shadow-lift: 0 10px 26px rgb(91 77 255 / .3);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110f20; --surface: #201d36; --fg: #ecebf8; --muted: #a6a2c2;
    --accent: #a59eff; --line: #2c2848; --panel: #1a1730; --error: #ff8fa6;
    --sky-top: #110f20; --sky-mid: #423361; --sky-low: #332e57;
    --shadow-field: 0 10px 30px rgb(0 0 0 / .35);
    --shadow-button: 0 5px 12px rgb(0 0 0 / .35);
    --shadow-card: 0 8px 22px rgb(0 0 0 / .3);
    --shadow-lift: 0 10px 26px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110f20; --surface: #201d36; --fg: #ecebf8; --muted: #a6a2c2;
  --accent: #a59eff; --line: #2c2848; --panel: #1a1730; --error: #ff8fa6;
  --sky-top: #110f20; --sky-mid: #423361; --sky-low: #332e57;
  --shadow-field: 0 10px 30px rgb(0 0 0 / .35);
  --shadow-button: 0 5px 12px rgb(0 0 0 / .35);
  --shadow-card: 0 8px 22px rgb(0 0 0 / .3);
  --shadow-lift: 0 10px 26px rgb(0 0 0 / .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  caret-color: var(--accent);
  accent-color: var(--accent);
}
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; }
h1, h2, h3, dt { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.12; }
h3 { font-size: 1.35rem; line-height: 1.25; }
p, dd { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.visually-hidden, .honeypot {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: 400 1.6rem/1 var(--serif); }
.cloud { width: 38px; height: auto; display: block; filter: drop-shadow(0 4px 6px rgb(29 26 51 / .14)); overflow: visible; }
.cloud.big { width: 84px; }
.top-cta {
  font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--accent);
  padding: 9px 16px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .2s ease;
}
.top-cta:hover { background: var(--surface); }

/* ---------- Painted scenes ---------- */
.scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene [data-layer="ridges"] { filter: blur(1.2px); }
.scene [data-layer="valley-clouds"] { filter: blur(3.5px); }
.scene [data-layer="sea"] { filter: blur(3px); }

/* ---------- Hero ---------- */
/* Text on the sky, then the dawn valley as a band below it, like the app's home screen. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(var(--sky-top) 0%, var(--sky-top) 22%, var(--sky-mid) 64%, var(--sky-low) 100%);
  padding: clamp(112px, 16vh, 170px) var(--gutter) 0;
  text-align: center;
}
.hero::after { /* fade into the page below */
  content: ""; position: absolute; inset: auto 0 0 0; height: 14%; z-index: 1;
  background: linear-gradient(transparent, var(--bg));
}
.hero-text { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 1.04; }
.lead { margin: 22px auto 0; max-width: 31em; font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--muted); }
.hero .waitlist { margin: 34px auto 0; text-align: left; }
.hero .scene.valley { position: relative; inset: auto; height: clamp(300px, 44vw, 620px); margin: clamp(8px, 2vw, 24px) calc(-1 * var(--gutter)) 0; }

/* ---------- Waitlist form ---------- */
.waitlist { margin-top: 28px; max-width: 470px; }
.field-label { display: block; margin: 0 0 10px 18px; font-size: .95rem; font-weight: 500; color: var(--fg); }
.field {
  display: flex; gap: 6px; padding: 6px;
  background: var(--surface); border-radius: 999px;
  box-shadow: var(--shadow-field), 0 0 0 1px var(--line);
  transition: box-shadow .2s ease;
}
.field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg);
  font: inherit; font-size: 1rem; padding: 10px 6px 10px 16px;
}
.field input::placeholder { color: var(--muted); opacity: .75; }
.field input:focus { outline: none; }
.field:focus-within { box-shadow: var(--shadow-field), 0 0 0 2px var(--accent); }
.waitlist[data-invalid] .field { box-shadow: var(--shadow-field), 0 0 0 2px var(--error); }
.field button {
  flex: none; border: 0; cursor: pointer; border-radius: 999px; min-width: 9.5em;
  background: var(--accent-fill); color: #fff; font: 500 1rem/1 var(--sans);
  padding: 14px 22px; box-shadow: var(--shadow-button);
  transition: transform .15s ease, opacity .15s ease, background-color .15s ease;
}
.field button:hover { transform: translateY(-1px); background: #4c3df0; }
.field button:active { transform: translateY(0); }
.field button:disabled { opacity: .7; cursor: progress; transform: none; }
.form-note { margin-top: 12px; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.form-note[data-state="error"] { color: var(--error); }
.form-link { margin-top: 6px; padding-left: 18px; font-size: .9rem; }
.waitlist.done .field, .waitlist.done .field-label { display: none; }
.waitlist.done .form-note { padding: 16px 20px; background: var(--surface); border-radius: 18px; color: var(--fg); font-size: 1rem; box-shadow: 0 0 0 1px var(--line); }

/* ---------- Sections ---------- */
main > section:not(.hero):not(.final) { padding: clamp(64px, 10vw, 120px) var(--gutter); max-width: 1120px; margin: 0 auto; }

/* The ritual reads as three moments in a row: the drawing carries each one, no card around it. */
.ritual h2 { text-align: center; }
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 48px 32px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps h3 { margin-top: 26px; }
.steps p { margin-top: 8px; color: var(--muted); max-width: 30em; }
.art { height: 170px; display: grid; place-items: center; background: var(--panel); border-radius: 28px; overflow: hidden; }

.notif {
  display: flex; align-items: center; gap: 10px; width: min(88%, 270px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 18px; padding: 12px 14px;
  box-shadow: var(--shadow-card);
}
.notif-icon { width: 34px; padding: 6px 4px; background: var(--bg); border-radius: 9px; flex: none; }
.notif div { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.notif strong { font-size: .85rem; }
.notif span { font-size: .8rem; color: var(--muted); }
.notif small { font-size: .68rem; color: var(--muted); align-self: flex-start; }

/* The one authored moment: the notification drops in from the top edge, like on the phone.
   Visible by default; script arms it only when it can also play it. */
.armed .art-notif .notif { transform: translateY(-150%); opacity: 0; filter: blur(4px); }
.armed .art-notif .notif.arrived {
  transform: none; opacity: 1; filter: none;
  transition: transform .9s var(--ease-out), opacity .5s ease, filter .6s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .armed .art-notif .notif { transform: none; filter: none; }
  .armed .art-notif .notif.arrived { transition: opacity .6s ease; }
}

.ring { width: 118px; }
.ring circle { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--line); }
.ring-value { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 84 100; transform: rotate(-90deg); transform-origin: 60px 60px; }
.ring text { font: 400 26px var(--serif); fill: var(--fg); font-variant-numeric: tabular-nums; }

.check { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

.why { display: grid; gap: 48px; align-items: center; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.why p { margin-top: 18px; color: var(--muted); font-size: 1.12rem; max-width: 32em; }
.notes { position: relative; height: 240px; }
.notes span {
  position: absolute; font: 400 1.15rem var(--serif); padding: 12px 18px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-card), 0 0 0 1px var(--line);
  transform: rotate(var(--r));
}
.notes span:nth-child(1) { left: 6%; top: 8%; }
.notes span:nth-child(2) { left: 52%; top: 0; }
.notes span:nth-child(3) { left: 14%; top: 58%; }
.notes span:nth-child(4) { left: 40%; top: 34%; background: var(--accent-fill); color: #fff; box-shadow: var(--shadow-lift); }
.notes span:nth-child(5) { left: 68%; top: 60%; }

/* What's inside: a ruled page, one line per promise, like entries in the journal. */
.inside { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.inside h2 { max-width: 9em; }
.ledger { margin: 0; }
.ledger div { padding: 22px 0 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ledger div:last-child { border-bottom: 1px solid var(--line); }
.ledger dt { font-size: 1.4rem; line-height: 1.25; }
.ledger dd { color: var(--muted); max-width: 34em; }

.faq { max-width: 760px !important; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative;
  font: 400 1.25rem/1.3 var(--serif); border-radius: 6px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 300 1.6rem var(--sans); color: var(--accent); transition: transform .2s ease; }
.faq summary:hover { color: var(--accent); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 36em; }

/* ---------- Final call ---------- */
.final {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(80px, 12vw, 140px) var(--gutter) clamp(190px, 26vw, 300px);
  background: linear-gradient(var(--bg), var(--sky-low));
  text-align: center;
}
.final-text { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; }
.final .cloud { margin: 0 auto 22px; }
.final .scene.sea {
  top: auto; height: clamp(150px, 20vw, 240px);
  -webkit-mask-image: linear-gradient(transparent, #000 40%); mask-image: linear-gradient(transparent, #000 40%);
}
.final-text > p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }
.final .waitlist { margin: 30px auto 0; text-align: left; }

/* ---------- Footer ---------- */
.bottom {
  padding: 36px var(--gutter) max(36px, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line);
}
.brand-line span { font: 400 1.25rem var(--serif); color: var(--fg); margin-right: 8px; }
.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bottom nav a { color: var(--muted); text-decoration: none; }
.bottom nav a:hover, .bottom nav a[aria-current] { color: var(--accent); }

/* ---------- Text pages (privacy, legal notice) ---------- */
.page .top { position: static; }
.doc { max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vw, 88px) var(--gutter) clamp(64px, 10vw, 112px); }
.doc h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1.08; }
.doc .lede { margin-top: 18px; font-size: 1.15rem; color: var(--muted); }
.doc section { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.doc h2 { font-size: 1.6rem; line-height: 1.2; }
.doc section > * + * { margin-top: 12px; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 6px; }
.doc .brief { margin-top: 32px; padding: 24px 26px; background: var(--panel); border-radius: 24px; display: grid; gap: 10px; }
.doc .brief p { margin: 0; }
.doc .path { font-weight: 600; white-space: nowrap; }
.doc .updated { margin-top: 44px; font-size: .9rem; color: var(--muted); }

@media (max-width: 520px) {
  .field { flex-direction: column; border-radius: 22px; }
  .field input { padding: 12px 14px; }
  .field button { padding: 15px; border-radius: 16px; }
  .field-label, .form-note, .form-link { padding-left: 4px; margin-left: 0; }
  .notes { height: 200px; }
  .top-cta { padding: 8px 13px; font-size: .9rem; }
}
