:root {
  --canvas: #0a0a0a;
  --text: #fafafa;
  --muted: #a3a3a3;
  --hint: #737373;
  --hair: #262827;
  --green: #0bd37c;
  --green-deep: #02ac62;
  --glow: rgba(2, 172, 98, 0.45);
  --err: #ff8a8a;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--canvas); color: var(--text); }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.stage {
  position: fixed;
  inset: 0 var(--shift, 0px) 0 0; /* scene.js animates --shift while the drawer opens */
  padding: max(20px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

.brand { position: absolute; top: max(28px, env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: center; }
.brand img { width: clamp(150px, 20vw, 230px); height: auto; opacity: 0; animation: rise 1.6s 1.1s cubic-bezier(.2,.7,.2,1) forwards; }

/* The horizon line is drawn at 56% of the viewport height by scene.js. */
.hero {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(56% + 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3.4vh, 34px);
}

.soon {
  margin: 0;
  font-weight: 800;
  font-size: clamp(52px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(2, 172, 98, 0.18);
  opacity: 0;
  animation: rise 2.2s 3.4s cubic-bezier(.2,.7,.2,1) forwards;
}

.cta {
  appearance: none;
  font: 600 15px/1 "Inter", sans-serif;
  letter-spacing: 0.01em;
  color: var(--text);
  background: rgba(10, 10, 10, 0.55);
  border: 1px solid rgba(11, 211, 124, 0.45);
  border-radius: 999px;
  padding: 16px 28px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: 0 0 24px 0 rgba(2, 172, 98, 0.18), inset 0 0 18px rgba(2, 172, 98, 0.08);
  transition: box-shadow .35s, border-color .35s, background .35s, transform .2s;
  opacity: 0;
  animation: rise 1.6s 5.2s cubic-bezier(.2,.7,.2,1) forwards;
}
.cta:hover, .cta:focus-visible {
  border-color: var(--green);
  background: rgba(2, 172, 98, 0.12);
  box-shadow: 0 0 34px 0 var(--glow), inset 0 0 18px rgba(2, 172, 98, 0.16);
  outline: none;
}
.cta:active { transform: translateY(1px); }

.foot {
  position: absolute;
  left: 0; right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  text-align: center;
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  color: var(--hint);
  opacity: 0;
  animation: rise 1.6s 5.6s ease forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Drawer ----------
   Desktop (>= 900px): slides in from the right over the page; the scene keeps
   animating on the left (scene.js shifts its composition, see __ivSetDrawer).
   Mobile: slides up and covers the screen. */
dialog.drawer {
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1); /* power3.out */
  --ease-in: cubic-bezier(0.55, 0.055, 0.675, 0.19); /* power3.in */
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  width: min(460px, 100vw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
  color: var(--text);
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -1px 0 0 rgba(11, 211, 124, 0.12), -28px 0 90px rgba(2, 172, 98, 0.12);
  transform: translateX(104%);
  transition: transform 0.55s var(--ease-in);
}
dialog.drawer.is-open { transform: none; transition-timing-function: var(--ease-out); }
dialog.drawer::backdrop { background: rgba(0, 0, 0, 0); transition: background 0.55s ease; }
dialog.drawer.is-open::backdrop { background: rgba(0, 0, 0, 0.18); }

.sheet {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px 28px max(28px, env(safe-area-inset-bottom));
}
.x-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; color: var(--muted); border: 0; border-radius: 10px; cursor: pointer;
}
.x-close:hover, .x-close:focus-visible { color: var(--text); background: rgba(255,255,255,.06); outline: none; }

@media (max-width: 899px) {
  dialog.drawer {
    inset: 0;
    width: 100vw;
    border-left: 0;
    background: rgba(10, 10, 10, 0.97);
    transform: translateY(100%);
  }
  dialog.drawer.is-open { transform: none; }
  .sheet { padding: max(30px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); }
}

.eyebrow {
  margin: 0 0 10px;
  font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}
h2 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.lede { margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
label, legend {
  display: block; padding: 0; margin: 0 0 7px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.req, .opt {
  margin-left: 6px;
  font: 500 10px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--hint);
}
.req { color: var(--green); }

input[type="text"], select, textarea {
  width: 100%;
  font: 400 16px/1.4 "Inter", sans-serif; /* 16px stops iOS zoom */
  color: var(--text);
  background: #121212;
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 46px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 92px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #a3a3a3 50%), linear-gradient(135deg, #a3a3a3 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input::placeholder, textarea::placeholder { color: var(--hint); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--green-deep); box-shadow: 0 0 0 3px rgba(2, 172, 98, 0.22);
}
input[readonly] { color: var(--green); border-color: rgba(11, 211, 124, 0.4); }

.prefixed { display: flex; align-items: stretch; background: #121212; border: 1px solid var(--hair); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
.prefixed:focus-within { border-color: var(--green-deep); box-shadow: 0 0 0 3px rgba(2, 172, 98, 0.22); }
.prefixed span { display: grid; place-items: center; padding: 0 0 0 14px; color: var(--hint); }
.prefixed input { border: 0; background: transparent; box-shadow: none !important; border-radius: 10px; padding-left: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--hair); border-radius: 999px; background: #121212;
  transition: all .2s;
}
.chip input:checked + span { color: var(--text); border-color: var(--green); background: rgba(2, 172, 98, 0.16); box-shadow: 0 0 16px rgba(2, 172, 98, 0.25); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(2, 172, 98, 0.35); }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green-deep); }

.hint { margin: 6px 0 0; font-size: 12px; color: var(--hint); }
.err { margin: 6px 0 0; font-size: 13px; color: var(--err); min-height: 0; }
.err:empty { display: none; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-x {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none;
  border: 1px solid var(--hair); border-radius: 999px; background: #121212;
}
.btn-x:hover, .btn-x:focus-visible { border-color: var(--green); outline: none; }

.turnstile { margin: 4px 0 16px; min-height: 65px; }
.altcha-slot { margin: 4px 0 16px; min-height: 52px; }
altcha-widget {
  display: block;
  --altcha-color-base: #121212;
  --altcha-color-border: #262827;
  --altcha-color-border-focus: #02ac62;
  --altcha-color-text: #fafafa;
  --altcha-color-active: #0bd37c;
  --altcha-color-error-text: #ff8a8a;
  --altcha-border-radius: 10px;
  --altcha-max-width: 100%;
  font: 500 13px/1.3 "Inter", sans-serif;
}
.altcha { color-scheme: dark; }
.altcha input[type="checkbox"] { accent-color: #02ac62; }
.cta-solid { width: 100%; opacity: 1; animation: none; background: rgba(2, 172, 98, 0.18); }
.cta-solid:disabled { opacity: .5; cursor: progress; }
.status { margin: 12px 0 0; min-height: 20px; font-size: 14px; color: var(--muted); }
.status[data-kind="error"] { color: var(--err); }
.status[data-kind="ok"] { color: var(--green); }

.done .cta { opacity: 1; animation: none; margin-top: 8px; }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  h2 { font-size: 26px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero { top: calc(56% + 10px); flex-direction: row; gap: 22px; }
  .soon { font-size: 44px; }
}

/* Reduced motion: everything is simply present. */
@media (prefers-reduced-motion: reduce) {
  .brand img, .soon, .cta, .foot { animation: none; opacity: 1; }
  dialog.drawer, dialog.drawer::backdrop { transition: none !important; }
  * { transition: none !important; }
}

/* Still capture mode (?still=1&og=1): used to render the OG image. */
html.og .cta, html.og .foot { display: none; }
html.og .brand img, html.og .soon { animation: none; opacity: 1; }
