/* Dyad — deep-space glass. Two stars (amber A, ice-blue B) orbit one answer. */
:root {
  --bg: #05061a;
  --bg-1: rgba(255, 255, 255, .055);
  --bg-2: rgba(255, 255, 255, .09);
  --bg-3: rgba(255, 255, 255, .14);
  --solid: #0b0c26;                 /* opaque surface for popovers over busy backgrounds */
  --line: rgba(255, 255, 255, .13);
  --line-2: rgba(255, 255, 255, .26);
  --ink: #f3f2ff;
  --ink-2: rgba(243, 242, 255, .74);
  --ink-3: rgba(243, 242, 255, .47);
  --a: #ffb86b;       /* star A — the drafter */
  --a-dim: #ffb86b22;
  --b: #7fe3ff;       /* star B — the challenger */
  --b-dim: #7fe3ff22;
  --v: #a99bff;       /* nebula */
  --c: #f3f2ff;
  --danger: #ff9d8f;
  --ok: #a6f5c0;
  --radius: 22px;
  --glow: 0 20px 50px rgba(2, 3, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background: var(--bg) linear-gradient(180deg, #2b1c72 0%, #1d1658 12%, #120f3c 30%, #0a0a26 52%, #050617 74%, #020309 100%) no-repeat;
  background-attachment: fixed;
  font: 300 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* nebula haze sits above the gradient, under the starfield */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 40% at 78% 8%, rgba(169, 155, 255, .28), transparent 70%),
    radial-gradient(45% 35% at 10% 30%, rgba(127, 227, 255, .12), transparent 70%),
    radial-gradient(40% 30% at 70% 70%, rgba(255, 184, 107, .07), transparent 70%);
}
#space { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-weight: 300; letter-spacing: -.035em; text-wrap: balance; }
p { text-wrap: pretty; }
h1 em, h1 i, h2 em, h2 i, h3 em, h4 em { font-style: normal; }
b, strong { font-weight: 500; }

.mono { font-family: var(--mono); }
.serif { font-family: var(--display); font-weight: 300; letter-spacing: -.035em; }
.eyebrow {
  font: 400 11px/1.6 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3);
}
/* bracketed section labels, as on a mission readout */
.site .eyebrow::before { content: '[ '; } .site .eyebrow::after { content: ' ]'; }
.wrap { width: min(1360px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.paper { display: none; }

/* ── header ───────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, rgba(8, 8, 36, .72), rgba(8, 8, 36, .28) 70%, rgba(8, 8, 36, 0));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav-in { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 500 13px var(--mono); letter-spacing: .34em; text-transform: uppercase; white-space: nowrap; }
.brand svg, .brand img { width: 30px; height: 30px; flex: none; }
.brand img.logo { border-radius: 8px; }
.brand small { font: 500 9px var(--mono); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 99px; padding: 3px 7px; letter-spacing: .2em; }
.alt { display: flex; gap: 14px; align-items: center; margin: 0 auto; font: 500 11px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3); pointer-events: none; }
.alt .v { color: var(--ink); min-width: 8ch; text-align: right; }
.alt .rail { width: 90px; height: 1px; background: rgba(243, 242, 255, .2); position: relative; overflow: hidden; }
.alt .rail i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--a), var(--b)); transform-origin: left; transform: scaleX(0); }
.alt .z { font-size: 10px; min-width: 11ch; }
.nav-r { display: flex; gap: 10px; align-items: center; }
.nav-links { display: none; }
.nav-x svg { width: 16px; height: 16px; }
#menu .mfoot a { text-decoration: none; color: var(--ink-2); } #menu .mfoot a:hover { color: var(--ink); }
.nav-wallet.on { font: 500 12px var(--mono); letter-spacing: .04em; }
.nav-wallet.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
@media (max-width: 560px) { .nav-wallet { display: none; } }
@media (max-width: 860px) { .alt { display: none; } .nav-r .btn.primary { display: none; } .nav-in { justify-content: space-between; } }

/* fullscreen menu */
#menu { position: fixed; inset: 0; z-index: 60; background: rgba(4, 4, 24, .66); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); display: flex; flex-direction: column; justify-content: center; padding: 0 var(--gutter); opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s; }
#menu.open { opacity: 1; visibility: visible; }
#menu .close { position: absolute; top: 14px; right: var(--gutter); }
#menu nav { display: flex; flex-direction: column; gap: 4px; }
#menu nav a { font-size: clamp(34px, 6vw, 84px); font-weight: 300; letter-spacing: -.035em; line-height: 1.08; display: flex; align-items: baseline; gap: 22px; text-decoration: none; transform: translateY(18px); opacity: 0; transition: transform .6s var(--ease), opacity .5s, color .3s; color: var(--ink-2); }
#menu.open nav a { transform: none; opacity: 1; }
#menu nav a:hover, #menu nav a[aria-current="page"] { color: #fff; }
#menu nav a small { font: 400 11px var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); min-width: 6ch; }
#menu nav a:nth-child(2) { transition-delay: .04s; } #menu nav a:nth-child(3) { transition-delay: .08s; } #menu nav a:nth-child(4) { transition-delay: .12s; } #menu nav a:nth-child(5) { transition-delay: .16s; } #menu nav a:nth-child(6) { transition-delay: .2s; }
#menu .mfoot { margin-top: 44px; font: 400 11px var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); display: flex; gap: 18px; flex-wrap: wrap; }

/* ── buttons: glass pills ─────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .08); color: var(--ink); text-decoration: none;
  font: 400 15px var(--sans); cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(2, 3, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .35s var(--ease), background .35s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .15); }
.btn:active { transform: none; }
.btn.primary { background: var(--ink); color: #0a0a26; border-color: var(--ink); font-weight: 400; }
.btn.primary:hover { background: #fff; }
.btn .dot { width: 22px; height: 22px; border-radius: 50%; background: #0a0a26; color: var(--ink); display: grid; place-items: center; font-size: 12px; flex: none; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { height: 36px; padding: 0 15px; font-size: 14px; }
.btn.ico { width: 44px; padding: 0; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── surfaces ─────────────────────────────── */
.card {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--glow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.pill { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255, 255, 255, .06); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.dot.a { background: var(--a); box-shadow: 0 0 10px var(--a); } .dot.b { background: var(--b); box-shadow: 0 0 10px var(--b); }
.dot.live { background: var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(166, 245, 192, .2); } 50% { box-shadow: 0 0 0 8px rgba(166, 245, 192, .05); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.input {
  width: 100%; height: 44px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .06); outline: none; transition: border-color .2s, background .2s; font-weight: 400;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .09); }
textarea.input { height: auto; padding: 12px 16px; resize: vertical; }
select option, select optgroup { background: var(--solid); color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 100;
  background: rgba(20, 18, 60, .85); color: var(--ink); border: 1px solid var(--line-2); backdrop-filter: blur(14px);
  padding: 11px 18px; border-radius: 99px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase;
  transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── loader ───────────────────────────────── */
#loader { position: fixed; inset: 0; z-index: 100; background: #0a0a26 radial-gradient(60% 50% at 50% 45%, #2b1c72, #0a0a26 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; transition: opacity .7s ease, visibility .7s; }
#loader.done { opacity: 0; visibility: hidden; }
#loader img { width: 88px; height: 88px; border-radius: 22px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); filter: brightness(1.2); } }
#loader svg .oa { transform-origin: 36px 36px; animation: spin 2.4s linear infinite; }
#loader .txt { font: 500 11px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase; }
#loader .bar { width: 220px; height: 1px; background: rgba(243, 242, 255, .2); position: relative; overflow: hidden; }
#loader .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--a), var(--b)); transition: width .2s var(--ease); }
#loader .pct { font: 500 12px/1 var(--mono); letter-spacing: .2em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── footer ───────────────────────────────── */
.foot { padding: 56px 0 64px; color: var(--ink-3); font: 400 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }

/* reveal: rise out of a blur */
.reveal { opacity: 0; filter: blur(8px); transform: translateY(16px); transition: opacity .8s ease, filter .8s ease, transform .8s var(--ease); }
.reveal.in { opacity: 1; filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; filter: none; transform: none; transition: none; } html { scroll-behavior: auto; } }
