:root {
  --bg-a: #3b2418;
  --bg-b: #0c0b0b;
  --ink: #f6f2ec;
  --brand: #ff5a1f;
  --brand-deep: #e2461a;
  --glow-x: 70%;
  --glow-y: 50%;
  --gutter: max(24px, 6vw);
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-b); color: var(--ink); overflow-x: hidden; }

/* The WebGL stage and its gradient sit fixed behind the scrolling page. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(90% 80% at var(--glow-x) var(--glow-y), var(--bg-a), var(--bg-b) 72%);
}
#stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.ready #stage { opacity: 1; }

/* ---- header */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  color: var(--ink);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 800 1.35rem/1 "Inter Tight", sans-serif;
  letter-spacing: -0.03em;
}
.logo-mark {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--brand);
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 4px 4px 6px;
  border-radius: 3px;
  background: #111;
}
.logo-mark::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 9px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: blip 1.6s ease-in-out infinite;
}
@keyframes blip { 50% { opacity: 0.25; transform: scale(0.7); } }

/* ---- sections */

.panel {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 112px var(--gutter);
}
.panel[data-tone="dark"] { --text: #f6f2ec; --soft: rgba(246, 242, 236, 0.72); --line: rgba(255, 255, 255, 0.14); --card: rgba(14, 12, 11, 0.64); }
.panel[data-tone="light"] { --text: #1b1a17; --soft: rgba(27, 26, 23, 0.7); --line: rgba(0, 0, 0, 0.12); --card: rgba(255, 255, 255, 0.74); }

.copy { max-width: 33rem; color: var(--text); }
.js .copy {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .copy.in { opacity: 1; transform: none; }

.copy .eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}
h1, h2 {
  margin: 0 0 20px;
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); line-height: 0.98; }
h2 { font-size: clamp(2.2rem, 4.3vw, 3.9rem); line-height: 1.02; }
.copy p, .steps { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; color: var(--soft); margin: 0 0 16px; text-wrap: pretty; }
.copy .lede { color: var(--text); opacity: 0.86; }
.copy .fineprint { font-size: 0.9rem; margin-top: 18px; }

.steps { padding-left: 1.3em; }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps strong { color: var(--text); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: 700 1rem/1 "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(255, 90, 31, 0.9);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .text-link:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffb08a; outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }
.btn-small { padding: 11px 18px; font-size: 0.9rem; box-shadow: none; }
.text-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }

/* ---- waitlist form */

.waitlist { margin-top: 26px; display: grid; gap: 18px; }
.colors { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.colors legend { width: 100%; margin-bottom: 10px; font-size: 0.9rem; font-weight: 600; color: var(--soft); }
.colors label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.colors input { position: absolute; opacity: 0; pointer-events: none; }
.colors span { width: 22px; height: 22px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.colors label:has(input:checked) { border-color: var(--text); }
.colors label:has(input:focus-visible) { outline: 3px solid #ffb08a; outline-offset: 2px; }

.field { display: grid; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--soft); }
select, .signup input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: 500 1rem "Inter", sans-serif;
}
select option { color: #111; }
.signup { display: flex; gap: 10px; }
.signup input { flex: 1; min-width: 0; }
.signup .btn { flex: none; }
.trap { position: absolute; left: -9999px; }
.copy .form-status { margin: 0; font-weight: 600; color: var(--text); }
.copy .form-status:empty { display: none; }
.copy .form-status.error { color: #fca5a5; }
.copy .waitlist .fineprint { margin: 0; }
.waitlist.done .colors, .waitlist.done .field, .waitlist.done .signup { display: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 28px var(--gutter) 36px;
  background: #0c0b0b;
  color: rgba(246, 242, 236, 0.6);
  font-size: 0.9rem;
}
.footer a { color: inherit; }

/* ---- phones: the cube sits in the top half, text in a card underneath */

@media (max-width: 819px) {
  :root { --glow-x: 50%; --glow-y: 30%; --gutter: 16px; }
  .panel { align-items: flex-end; padding: 96px 16px 20px; }
  .copy {
    max-width: none;
    width: 100%;
    padding: 22px 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
  }
  h1 { font-size: clamp(2.2rem, 10vw, 3rem); margin-bottom: 14px; }
  h2 { font-size: clamp(1.9rem, 8.5vw, 2.5rem); margin-bottom: 14px; }
  .copy p, .steps { font-size: 0.98rem; line-height: 1.5; }
  .copy .eyebrow { margin-bottom: 12px; font-size: 0.7rem; letter-spacing: 0.1em; }
  .actions { margin-top: 18px; }
  .actions .text-link { display: none; }
  .copy .fineprint { margin-top: 14px; }
  .signup { flex-direction: column; }
  /* Taller, so the cube on its pedestal shows before the form slides up over it. */
  #join { min-height: 150svh; }
  .waitlist { gap: 14px; margin-top: 18px; }
  .colors { flex-wrap: nowrap; gap: 6px; }
  .colors label { padding: 6px 10px 6px 6px; font-size: 0.85rem; gap: 6px; }
  .colors span { width: 18px; height: 18px; }
  .nav .btn-small { padding: 10px 14px; font-size: 0.85rem; }
}

/* ---- no WebGL, or reduced motion */

.no-webgl #stage { display: none; }
.no-webgl .panel[data-tone="light"] { background: #f4efe7; }
.no-webgl .panel[data-tone="dark"] { background: #16110e; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .copy { transition: none; opacity: 1; transform: none; }
  .logo-mark::before { animation: none; }
}
