/* The landing page and the policy pages, on the canon (docs/CANON.md). Every colour, material and face is a variable
   from /canon.css and every size from /tokens.css, both generated from tokens.ts by build.js: the blurred night city
   under a veil, content on frost, the floating layer on glass, one flat gold primary, indigo for identity and links. */
* { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; scroll-padding-top: var(--space-20); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; color: var(--ink); overflow-x: hidden;
  font: var(--w-body) var(--fs-body)/1.5 var(--font-sans); font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* The city, pre-blurred offline (assets/world, copied by build.js): one static image, no live blur, then the veil. */
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before { background: url('/assets/backdrop-night.webp') center / cover no-repeat; }
body::after { background: var(--veil); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--indigo); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--space-4); }
h1, h2 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.04; letter-spacing: 0.005em; }
h1 { font-size: clamp(var(--fs-display), 11vw, calc(var(--fs-display) * 1.75)); }
h2 { font-size: clamp(var(--fs-title), 7vw, calc(var(--fs-title) * 1.6)); }
h3 { font: var(--w-heading) var(--fs-heading)/1.25 var(--font-sans); margin: 0; }
p { margin: 0; }
.muted { color: var(--ink-muted); }
.caption { font-size: var(--fs-caption); color: var(--ink-muted); }
.kick {
  font: var(--w-label) var(--fs-label)/1.3 var(--font-mono); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-muted);
}
.eyebrow { color: var(--indigo); }
section { padding: var(--space-12) 0; }
@media (min-width: 56rem) { section { padding: var(--space-16) 0; } }
.sec-head { text-align: center; max-width: 40rem; margin: 0 auto var(--space-8); display: grid; gap: var(--space-3); }

/* content: the frost (thick, almost no rim, no glare) */
.frost, .card, .stat, details, .close .box, .waitlist, .doc {
  background: var(--frost-fill), var(--frost-base);
  box-shadow: var(--frost-edge), var(--frost-drop);
  border-radius: var(--radius-card);
}

/* the floating layer: glass where the browser blurs, the matte tint where it does not (the fallback is the baseline) */
.glass, .ctl, .pill, .badge { background: var(--glass); box-shadow: var(--glass-edge); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .ctl, .pill, .badge { background: var(--glass-blur); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
}

/* sticky header: clear at the top, glass once the page scrolls (site.js) */
.bar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid transparent; transition: background-color 0.2s, border-color 0.2s; }
.bar.scrolled { background: var(--glass); border-bottom-color: var(--hairline); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .bar.scrolled { background: var(--glass-blur); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--space-16); gap: var(--space-4); }
.brand {
  color: var(--ink); text-decoration: none; font: var(--w-label) var(--fs-label)/1 var(--font-mono);
  letter-spacing: calc(var(--track-label) * 2); display: inline-flex; align-items: center; min-height: var(--space-12);
}
.nav { display: none; gap: var(--space-6); }
.nav a { text-decoration: none; color: var(--ink-muted); }
.nav a:hover { color: var(--ink); }
@media (min-width: 56rem) { .nav { display: flex; } }

/* actions: pills. The one primary is solid flat gold, and only a real link earns it: the store badges are glass while
   they read "Coming soon", and site.js turns them into the gold link when config.js carries a storeUrl. */
.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--space-12);
  padding: 0 var(--space-5); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none;
  font-weight: var(--w-heading); font-size: var(--fs-caption);
}
.badges { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.badge {
  display: inline-grid; align-content: center; gap: 2px; min-width: 9.5rem; min-height: calc(var(--space-12) + var(--space-2));
  padding: var(--space-2) var(--space-6); border-radius: var(--radius-pill); color: var(--ink); cursor: default;
}
.badge .kick { font-size: var(--fs-caption); }
.badge b { font: var(--w-heading) var(--fs-heading)/1.15 var(--font-sans); }
a.badge { cursor: pointer; text-decoration: none; }
.badge.primary { background: var(--gold); color: var(--on-gold); box-shadow: var(--primary-drop); -webkit-backdrop-filter: none; backdrop-filter: none; }
.badge.primary .kick { color: var(--on-gold); }

/* hero: the promise beside the running demo */
.hero { padding-top: var(--space-8); }
.hero .wrap { display: grid; gap: var(--space-10); justify-items: center; text-align: center; }
.hero-copy { display: grid; gap: var(--space-5); justify-items: center; max-width: 36rem; }
.hero-copy .badges { justify-content: center; }
@media (min-width: 56rem) {
  .hero { padding-top: var(--space-12); }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; text-align: left; justify-items: start; align-items: center; gap: var(--space-12); }
  .hero-copy { justify-items: start; max-width: none; }
  .hero-copy .badges { justify-content: flex-start; }
  .hero .demo { justify-self: center; }
}

/* facts strip */
.stats { display: grid; gap: var(--space-4); }
.stat { padding: var(--space-6); display: grid; gap: var(--space-3); align-content: start; }
.stat .big { font: 400 var(--fs-display)/1 var(--font-display); color: var(--ink); }
@media (min-width: 48rem) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* the term's steps and the tools */
.grid { display: grid; gap: var(--space-4); }
.card { padding: var(--space-6); display: grid; gap: var(--space-2); align-content: start; }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid.five { grid-template-columns: repeat(5, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }

/* alternating feature rows: a phone and a few words */
.rows { display: grid; gap: var(--space-16); }
.row { display: grid; gap: var(--space-8); align-items: center; justify-items: center; }
.row .copy { display: grid; gap: var(--space-3); max-width: 30rem; }
.row h3 { font: 400 clamp(var(--fs-title), 4vw, calc(var(--fs-title) * 1.3))/1.08 var(--font-display); }
@media (min-width: 56rem) {
  .row { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
  .row:nth-child(even) .device { order: 2; }
}

/* faq accordion (details, no script) */
.faq { max-width: 44rem; margin: 0 auto; display: grid; gap: var(--space-3); }
summary {
  cursor: pointer; list-style: none; padding: var(--space-5) var(--space-6); min-height: var(--space-12);
  font: var(--w-heading) var(--fs-heading)/1.25 var(--font-sans);
  display: flex; justify-content: space-between; gap: var(--space-4); align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: var(--w-label) var(--fs-heading)/1 var(--font-mono); color: var(--indigo); }
details[open] summary::after { content: '\2212'; }
details p { padding: 0 var(--space-6) var(--space-5); color: var(--ink-muted); }

/* closing call and footer */
.close { text-align: center; }
.close .box { padding: var(--space-10) var(--space-4); display: grid; gap: var(--space-5); justify-items: center; }
.close .badges { justify-content: center; }
footer { border-top: 1px solid var(--hairline); padding: var(--space-8) 0 var(--space-12); }
footer .wrap { display: grid; gap: var(--space-4); }
footer nav, .doc nav.foot { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
footer nav a, .doc nav.foot a { display: inline-block; padding: var(--space-2) 0; }

/* policy, terms and deletion pages: one frost sheet */
.doc-top { width: min(46rem, calc(100% - 2 * var(--space-4))); margin: 0 auto; padding-top: var(--space-4); }
.doc {
  width: min(46rem, calc(100% - 2 * var(--space-4))); margin: var(--space-4) auto var(--space-16);
  padding: var(--space-8) var(--space-5); display: grid; gap: var(--space-4);
}
@media (min-width: 40rem) { .doc { padding: var(--space-10) var(--space-10); } }
.doc h1 { font-size: clamp(var(--fs-title), 8vw, calc(var(--fs-title) * 1.5)); }
.doc h2 { font: var(--w-heading) var(--fs-heading)/1.25 var(--font-sans); padding-top: var(--space-6); border-top: 1px solid var(--hairline); }
.doc ul, .doc ol { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-2); }
.doc .scroll { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.doc th, .doc td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--hairline); }
.doc th { font-weight: var(--w-heading); }
.doc .pending { font: var(--w-label) var(--fs-caption) var(--font-mono); color: var(--ink-muted); }
.doc nav.foot { padding-top: var(--space-6); border-top: 1px solid var(--hairline); }

/* waitlist: one frost box, an email field on the well and the gold button; the honeypot is out of sight and out of the tab order */
.waitlist { padding: var(--space-10) var(--space-4); display: grid; gap: var(--space-4); justify-items: center; text-align: center; max-width: 36rem; margin: 0 auto; }
.waitlist form { width: 100%; display: grid; gap: var(--space-2); text-align: left; }
.wl-row { display: grid; gap: var(--space-3); }
.waitlist input[type='email'] {
  width: 100%; min-height: var(--space-12); padding: 0 var(--space-4); font: inherit; color: var(--ink);
  background: var(--well); border: 1px solid var(--hairline); border-radius: var(--radius-control);
}
.waitlist input::placeholder { color: var(--ink-muted); }
.waitlist .go, .unsub .go {
  min-height: var(--space-12); padding: 0 var(--space-6); font: inherit; font-weight: var(--w-heading); cursor: pointer;
  border: 0; border-radius: var(--radius-pill); background: var(--gold); color: var(--on-gold); box-shadow: var(--primary-drop);
}
.waitlist .go:active, .unsub .go:active { background: var(--gold-pressed); }
.waitlist .go[disabled], .unsub .go[disabled] { opacity: 0.6; cursor: default; }
.waitlist .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.waitlist .note, .unsub .note { min-height: 1.5em; }
.waitlist .note.bad, .unsub .note.bad { color: var(--alert); }
@media (min-width: 30rem) { .wl-row { grid-template-columns: 1fr auto; } }
