/* AirGlass landing page.
   Palette and material are lifted from the receiver UI itself
   (engine/src/video/receiver_ui.h): aurora backdrop, translucent glass,
   bright top rim, ink type. The web version uses real backdrop-filter,
   which the app cannot do in ImGui. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #1b2226;
  --body: #333c47;
  --quiet: #4f5a66;
  --accent: #1f5cd6;
  --accent-ink: #ffffff;
  --hair: rgba(20, 32, 48, 0.10);
  --hair-strong: rgba(20, 32, 48, 0.16);

  --glass: rgba(255, 255, 255, 0.56);
  --glass-soft: rgba(255, 255, 255, 0.38);
  --glass-rim: rgba(255, 255, 255, 0.92);
  --glass-edge: rgba(24, 38, 58, 0.08);
  --glass-blur: 22px;

  --aurora-a: #eaf0fd;
  --aurora-b: #e4e9fa;
  --aurora-c: #d3dbf0;
  --aurora-d: #d9dff3;
  --g1: rgba(96, 156, 255, 0.42);
  --g2: rgba(158, 132, 255, 0.38);
  --g3: rgba(58, 214, 196, 0.26);
  --g4: rgba(255, 174, 130, 0.22);

  --shadow-lift: 0 1px 1px rgba(18, 30, 48, 0.05), 0 18px 40px -18px rgba(18, 30, 48, 0.28);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --nav-h: 64px;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f8;
    --body: #c3ccda;
    --quiet: #93a0b3;
    --accent: #6ea2ff;
    --accent-ink: #0b1424;
    --hair: rgba(198, 216, 244, 0.12);
    --hair-strong: rgba(198, 216, 244, 0.20);

    --glass: rgba(255, 255, 255, 0.07);
    --glass-soft: rgba(255, 255, 255, 0.045);
    --glass-rim: rgba(255, 255, 255, 0.22);
    --glass-edge: rgba(255, 255, 255, 0.06);

    --aurora-a: #0b1220;
    --aurora-b: #0c1524;
    --aurora-c: #0a1120;
    --aurora-d: #0d1626;
    --g1: rgba(56, 116, 232, 0.30);
    --g2: rgba(74, 122, 210, 0.22);
    --g3: rgba(30, 158, 148, 0.16);
    --g4: rgba(186, 132, 92, 0.10);

    --shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.4), 0 24px 50px -22px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

:where(a[href], button, summary, select, label[for]) {
  cursor: pointer;
}
:where(:disabled, [aria-disabled="true"]) {
  cursor: not-allowed;
}

html { scroll-behavior: smooth; }

/* Sticky header must not clip a heading when an anchor is opened. */
section[id] { scroll-margin-top: calc(var(--nav-h) + 18px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", sans-serif;
  color: var(--body);
  background-color: var(--aurora-c);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

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

h1, h2, h3 { color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); letter-spacing: -0.028em; }
h3 { font-size: 1.02rem; letter-spacing: -0.012em; line-height: 1.3; }
p { margin: 0; }

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(70% 55% at 8% -6%, var(--g1), transparent 62%),
    radial-gradient(62% 52% at 96% 2%, var(--g2), transparent 64%),
    radial-gradient(70% 60% at 82% 96%, var(--g3), transparent 66%),
    radial-gradient(52% 46% at 22% 92%, var(--g4), transparent 62%),
    linear-gradient(168deg, var(--aurora-a), var(--aurora-b) 42%, var(--aurora-d) 78%, var(--aurora-c));
}

.shot picture { display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--r-sm);
}
.skip:focus { left: 16px; top: 12px; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- navigation ---------- */

.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--glass) 92%, transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: 24px;
  height: 100%; display: flex; align-items: center; gap: 28px;
}
.wordmark {
  font-weight: 640; letter-spacing: -0.03em; font-size: 1.06rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark.small { font-size: 0.98rem; }

.nav nav { display: flex; gap: 26px; margin-left: 6px; }
.nav nav a {
  color: var(--body); text-decoration: none; font-size: 0.925rem;
  white-space: nowrap; padding-block: 6px;
  transition: color 0.18s ease;
}
.nav nav a:hover { color: var(--ink); }
.nav .btn { margin-left: auto; }

@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav-inner { gap: 12px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; white-space: nowrap;
  font: inherit; font-weight: 560; font-size: 0.95rem;
  padding: 12px 20px; border-radius: 999px;
  text-decoration: none; color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #000 30%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 24px -12px rgba(20, 60, 140, 0.6);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 30px -14px rgba(20, 60, 140, 0.7); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn-sm { padding: 8px 15px; font-size: 0.885rem; }

.btn-ghost {
  color: var(--ink);
  background: color-mix(in srgb, var(--glass) 46%, #fff 54%);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-rim), var(--shadow-lift);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--glass) 78%, #fff 22%); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(44px, 5vw, 72px) clamp(28px, 3.4vw, 48px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(28px, 4vw, 52px); align-items: center;
}
.hero-copy h1 {
  font-size: clamp(1.85rem, 1.1rem + 2.5vw, 2.85rem);
  letter-spacing: -0.032em; line-height: 1.07;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.lede {
  margin-top: 20px; max-width: 33ch;
  font-size: clamp(1rem, 0.96rem + 0.24vw, 1.1rem);
  color: var(--body);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.shot {
  margin: 0; position: relative; isolation: isolate;
  border-radius: var(--r-lg);
  padding: 9px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.10) 46%, rgba(255, 255, 255, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 0 0 1px rgba(26, 42, 66, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(22, 36, 58, 0.08),
    0 1px 2px rgba(14, 26, 44, 0.12),
    0 10px 18px -12px rgba(18, 34, 60, 0.45),
    0 38px 64px -32px rgba(22, 46, 92, 0.5),
    0 0 96px -28px rgba(96, 156, 255, 0.5);
}
.shot::before {
  content: ""; position: absolute; inset: -14% -10% -18%;
  z-index: -1; border-radius: 50%;
  background:
    radial-gradient(closest-side at 24% 24%, rgba(96, 156, 255, 0.55), rgba(96, 156, 255, 0.22) 42%, transparent 72%),
    radial-gradient(closest-side at 78% 82%, rgba(58, 214, 196, 0.44), rgba(58, 214, 196, 0.16) 44%, transparent 74%),
    radial-gradient(closest-side at 58% 44%, rgba(158, 132, 255, 0.34), transparent 72%);
}
.shot img { border-radius: calc(var(--r-lg) - 8px); box-shadow: 0 1px 2px rgba(12, 22, 40, 0.16); position: relative; }

@media (prefers-color-scheme: dark) {
  .shot {
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04) 46%, rgba(255, 255, 255, 0.07));
    box-shadow:
      inset 0 1.5px 0 rgba(255, 255, 255, 0.26),
      inset 0 -1px 0 rgba(255, 255, 255, 0.05),
      0 2px 6px rgba(0, 0, 0, 0.5),
      0 40px 70px -32px rgba(0, 0, 0, 0.85),
      0 0 110px -40px rgba(80, 140, 255, 0.5);
  }
  .shot img { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
}
.shot-small { max-width: 560px; }
.shot-cap {
  margin-top: 12px; padding-inline: 4px;
  font-size: 0.835rem; color: var(--body); line-height: 1.45;
}

@media (max-width: 640px) {
  .nav .btn { display: none; }
  .cta-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cta-row .btn { width: 100%; min-height: 52px; }
  .cta-row .btn-ghost { order: 2; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { order: 1; }
  .shot { order: 2; }
  .lede { max-width: 46ch; }
}

/* ---------- facts ---------- */

.facts { padding-block: clamp(20px, 2.4vw, 30px) clamp(24px, 3vw, 34px); }
.facts-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair);
}
.fact { padding: 22px 22px 22px 0; border-right: 1px solid var(--hair); }
.fact + .fact { padding-left: 24px; }
.fact:last-child { border-right: 0; padding-right: 0; }
.fact h2 { font-size: 1.04rem; letter-spacing: -0.015em; }
.fact p { margin-top: 7px; font-size: 0.895rem; color: var(--quiet); line-height: 1.5; }

@media (max-width: 900px) {
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .fact { padding: 18px 18px 18px 0; border-top: 1px solid var(--hair); }
  .fact + .fact { padding-left: 20px; }
  .fact:nth-child(2n) { border-right: 0; }
}
@media (max-width: 560px) {
  .facts-grid { grid-template-columns: minmax(0, 1fr); }
  .fact { border-right: 0; }
}

/* ---------- why ---------- */

.why { padding-block: clamp(56px, 7vw, 96px); }
.why-grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px); align-items: start;
}
.why-head h2 { max-width: 22ch; }
.why-head p { margin-top: 16px; max-width: 40ch; color: var(--quiet); }
.why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-strong); }
.why-list li { padding: 22px 0; border-bottom: 1px solid var(--hair); }
.why-list h3 { font-size: 1.06rem; }
.why-list p { margin-top: 8px; max-width: 56ch; color: var(--body); }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-head h2 { max-width: none; }
}

/* ---------- presets ---------- */

.presets { padding-block: clamp(44px, 5vw, 76px); }
.preset-head { max-width: 62ch; }
.preset-head p { margin-top: 16px; color: var(--quiet); max-width: 58ch; }
.preset-grid {
  list-style: none; margin: clamp(26px, 3vw, 36px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px);
}
.tile {
  padding: 22px 22px 24px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--glass) 88%, #fff 12%);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-rim), var(--shadow-lift);
}
.tile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tile h3 {
  font-size: 1.22rem; letter-spacing: -0.028em;
  font-variant-numeric: tabular-nums;
}
.tag {
  font-size: 0.72rem; font-weight: 560; letter-spacing: 0.02em;
  color: var(--accent);
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  white-space: nowrap;
}
.tile p { margin-top: 10px; font-size: 0.93rem; color: var(--body); }

.auto-row {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px;
  margin-top: clamp(16px, 1.8vw, 24px);
  padding: 20px 22px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--glass) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.auto-row h3 { font-size: 1.12rem; letter-spacing: -0.026em; min-width: 74px; }
.auto-row p { flex: 1 1 40ch; max-width: 62ch; font-size: 0.93rem; color: var(--body); }

@media (max-width: 1000px) { .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .auto-row { flex-direction: column; } }
@media (max-width: 560px) { .preset-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- mirror window & features ---------- */

.mirror { padding-block: clamp(48px, 6vw, 92px); }
.drop-feature {
  padding-block: clamp(48px, 6vw, 92px);
  border-top: 1px solid var(--hair);
}
.shot-margin {
  margin: 32px 0 36px;
}
.mirror-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.mirror-copy h2 { max-width: 20ch; }
.mirror-copy > p { margin-top: 16px; color: var(--quiet); max-width: 44ch; }
.plain-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.plain-list li {
  position: relative; padding-left: 20px; font-size: 0.95rem; color: var(--body);
}
.plain-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent); opacity: 0.75;
}
@media (max-width: 900px) {
  .mirror-grid { grid-template-columns: minmax(0, 1fr); }
  .mirror-copy h2 { max-width: none; }
}

/* ---------- requirements ---------- */

.req { padding-block: clamp(48px, 6vw, 88px); }
.req-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px); align-items: start;
}
.spec-list { margin: 22px 0 0; }
.spec-list > div {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--hair);
}
.spec-list > div:first-child { border-top: 1px solid var(--hair-strong); }
.spec-list dt { font-weight: 560; color: var(--ink); font-size: 0.92rem; }
.spec-list dd { margin: 0; font-size: 0.92rem; color: var(--quiet); }

.steps { list-style: none; counter-reset: step; margin: 22px 0 0; padding: 0; display: grid; gap: 20px; }
/* The number is a generated grid item, so auto-placement must not be left to
   decide: without explicit cells the step text lands in the 26px column and
   wraps one word per line. Number spans both rows, text owns column two. */
.steps li {
  display: grid; grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 16px; align-items: start;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  grid-column: 1; grid-row: 1 / span 2;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.steps li > strong { grid-column: 2; grid-row: 1; color: var(--ink); font-size: 0.96rem; font-weight: 560; }
.steps li > span { grid-column: 2; grid-row: 2; font-size: 0.92rem; color: var(--quiet); max-width: 46ch; }

@media (max-width: 860px) {
  .req-grid { grid-template-columns: minmax(0, 1fr); }
  .spec-list > div { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
}

/* ---------- limits ---------- */

.limits { padding-block: clamp(40px, 5vw, 72px); }
.limit-grid {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: 1px solid var(--hair-strong);
}
.limit-grid li { padding: 20px 22px 20px 0; border-right: 1px solid var(--hair); }
.limit-grid li:last-child { border-right: 0; }
.limit-grid h3 { font-size: 0.96rem; }
.limit-grid p { margin-top: 8px; font-size: 0.89rem; color: var(--quiet); }
@media (max-width: 900px) {
  .limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .limit-grid li { border-top: 1px solid var(--hair); }
  .limit-grid li:nth-child(2n) { border-right: 0; }
}
@media (max-width: 560px) {
  .limit-grid { grid-template-columns: minmax(0, 1fr); }
  .limit-grid li { border-right: 0; }
}

/* ---------- download ---------- */

.download { padding-block: clamp(28px, 3.4vw, 52px) clamp(52px, 6vw, 88px); }
.download-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 3vw, 48px); align-items: center;
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-rim), 0 30px 60px -30px rgba(18, 34, 58, 0.4);
}
.dl-meta { margin-top: 12px; color: var(--quiet); font-size: 0.95rem; max-width: 40ch; }
.dl-actions { display: grid; justify-items: start; gap: 14px; }
.dl-note { font-size: 0.855rem; color: var(--quiet); max-width: 42ch; line-height: 1.5; }
@media (max-width: 820px) {
  .download-panel { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--hair);
  padding-block: 32px 40px;
  background: color-mix(in srgb, var(--glass-soft) 70%, transparent);
}
.foot-grid {
  display: grid; grid-template-columns: minmax(0, 460px) auto; gap: 20px 56px; align-items: start;
}
.foot-note { margin-top: 6px; font-size: 0.9rem; color: var(--body); max-width: 42ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
/* WCAG 2.2 target size: footer links were 15px tall. */
.foot-links a { display: inline-block; padding-block: 6px; }
.foot-links a { color: var(--body); text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { grid-column: 1 / -1; font-size: 0.82rem; color: var(--quiet); max-width: 84ch; }
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1), transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
[data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}

/* Opacity is a courtesy, not a requirement: if the solid fallback is needed,
   the surface stays readable without any backdrop blur. */
@media (prefers-reduced-transparency: reduce) {
  .shot, .tile, .download-panel, .nav, .btn-ghost {
    background: color-mix(in srgb, var(--aurora-a) 92%, #fff 8%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 100dvh;
  display: grid; align-content: center;
  padding-block: clamp(48px, 8vw, 120px);
}
.notfound h1 { margin-top: 28px; font-size: clamp(2rem, 1.2rem + 2.4vw, 2.9rem); letter-spacing: -0.032em; }
.notfound .lede { margin-top: 14px; }
.notfound .cta-row { margin-top: 30px; }
