@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* "Aurora" palette on ink: every branch picks one of these. */
:root {
  --bg: #05070a;
  --fg: #e9ecef;
  --muted: #7f8a93;
  --line: rgba(233, 236, 239, 0.14);
  --c1: #5de4c7; /* aqua */
  --c2: #7cb7ff; /* sky */
  --c3: #b9a2ff; /* lilac */
  --c4: #ffb38a; /* peach */
  --c5: #c8f25a; /* lime */
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100svh;
  background:
    radial-gradient(50% 55% at 64% 55%, rgba(124, 183, 255, 0.06) 0%, transparent 70%),
    radial-gradient(40% 30% at 64% 88%, rgba(185, 162, 255, 0.05) 0%, transparent 70%),
    var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--c1); color: var(--bg); }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

#physical { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: manipulation; }

.stage {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 3.4vw, 40px);
  pointer-events: none;
}
.top { display: flex; justify-content: space-between; align-items: center; pointer-events: auto; }
.logo { display: block; width: 96px; color: var(--fg); }
.logo svg { display: block; width: 100%; height: auto; }
.place { color: var(--muted); }
.center { display: flex; align-items: center; padding: 28px 0; }
.ui { pointer-events: auto; width: min(100%, 28rem); margin-left: clamp(0px, 3vw, 48px); }

/* Progressive entrance: each piece on its own clock (pure CSS, cannot jump). */
.fade { opacity: 0; filter: blur(6px); transform: translateY(6px); animation: reveal var(--dur, 2.6s) cubic-bezier(.22, .61, .36, 1) var(--at, 0s) forwards; }
@keyframes reveal { to { opacity: 1; filter: blur(0); transform: none; } }
.top .logo   { --at: 0.6s; --dur: 3s; }
.top .place  { --at: 1.8s; }
.kicker      { --at: 3.0s; }
h1 .h1a      { --at: 4.0s; --dur: 3s; }
h1 .h1b      { --at: 6.4s; --dur: 4s; }
.lead        { --at: 8.0s; }
.fields .field:nth-child(1) { --at: 9.0s; }
.fields .field:nth-child(2) { --at: 9.4s; }
.consent     { --at: 9.9s; }
.row-submit button { --at: 10.4s; }
.foot > span:first-child { --at: 11.2s; }
.foot nav    { --at: 11.6s; }
.hint        { --at: 12.6s; --dur: 3.4s; }

.kicker { color: var(--muted); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 10px; }
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c3)); box-shadow: 0 0 10px var(--c2); }

h1 { font-weight: 400; margin: 0 0 22px; letter-spacing: -0.03em; }
h1 > span { display: inline-block; }
h1 .h1a { font-size: clamp(26px, 2.9vw, 38px); line-height: 1.12; text-shadow: 0 0 20px var(--bg); }
h1 .h1b {
  display: block;
  font-size: clamp(56px, 7vw, 116px); line-height: 1; font-weight: 500; letter-spacing: -0.055em;
  white-space: nowrap; width: max-content; max-width: none;
  background: linear-gradient(100deg, var(--c1) 0%, var(--c2) 35%, var(--c3) 70%, var(--c4) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.14em;
}
.lead { color: color-mix(in srgb, var(--fg) 70%, transparent); margin: 0 0 26px; max-width: 24rem; font-size: 15px; text-shadow: 0 0 14px var(--bg); }

form { display: grid; gap: 10px; }
.fields { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.field { position: relative; }
.field label {
  position: absolute; left: 14px; top: 7px; z-index: 1;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); pointer-events: none;
}
input[type="email"], input[type="text"] {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg);
  padding: 23px 14px 8px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.72);
  backdrop-filter: blur(6px);
  outline: none; transition: border-color .4s;
}
input[type="email"]:focus, input[type="text"]:focus { border-color: var(--c2); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: color-mix(in srgb, var(--fg) 60%, transparent); text-shadow: 0 0 10px var(--bg); }
.consent input { margin: 2px 0 0; accent-color: var(--c2); width: 15px; height: 15px; flex: none; }
.row-submit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
button {
  font: inherit; font-weight: 500; font-size: 14.5px; color: #071018;
  background: linear-gradient(110deg, var(--c1), var(--c2) 55%, var(--c3));
  border: 0; border-radius: 999px; padding: 12px 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: filter .4s, transform .4s;
}
button:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: .6; cursor: progress; transform: none; }
button svg { width: 15px; height: 15px; }
.msg { font-size: 13.5px; margin: 0; }
.msg:empty { display: none; }
.msg.ok { color: var(--c1); }
.msg.err { color: var(--c4); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; }

.foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: 12.5px; pointer-events: auto;
}
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.hint { color: color-mix(in srgb, var(--c2) 65%, var(--muted)); }
.how-touch { display: none; }
@media (hover: none) { .how-desk { display: none; } .how-touch { display: inline; } }

@media (max-width: 760px) {
  .fields { grid-template-columns: 1fr; }
  #physical { opacity: 0.62; }
  .center { align-items: flex-start; padding-top: 4vh; }
  .ui { margin-left: 0; }
  h1 .h1b { font-size: 72px; }
  .ui p, .ui .consent, .ui h1 .h1a { text-shadow: 0 0 10px var(--bg), 0 0 3px var(--bg), 0 0 18px var(--bg); }
  .foot { justify-content: center; text-align: center; font-size: 12px; }
  .hint { width: 100%; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .fade { animation: none; opacity: 1; filter: none; transform: none; }
}

/* Legal pages */
.doc { position: relative; z-index: 2; max-width: 46rem; margin: 0 auto; padding: clamp(20px, 5vw, 56px) clamp(20px, 4vw, 32px) 80px; font-size: 17px; }
.doc .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 56px; }
.doc .logo { display: block; width: 96px; color: var(--fg); }
.doc .top .mono { color: var(--muted); }
.doc h1 { font-weight: 400; font-size: clamp(32px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 8px; }
.doc h2 { font-weight: 500; font-size: 20px; margin: 40px 0 8px; letter-spacing: -0.01em; }
.doc p, .doc li { color: color-mix(in srgb, var(--fg) 82%, transparent); }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 16px 0; }
.doc dt { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.doc dd { margin: 0; }
.doc .updated { color: var(--muted); }
.doc p a, .doc dd a, .doc li a { color: var(--c2); }
@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; } .doc dd { margin-bottom: 10px; } }
