:root {
  --bg: #0a0a0a;
  --bg-2: #0f0f10;
  --fg: #ededed;
  --dim: #8a8a8f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent: #a78bfa;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --radius: 14px;
  --maxw: 980px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; letter-spacing: .02em; }
.dim { color: var(--dim); }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

/* === Background layers === */
.grid-bg {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 80%);
}
.orb {
  position: fixed; z-index: -2; border-radius: 50%; filter: blur(90px);
  opacity: .55; pointer-events: none;
  animation: float 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(167,139,250,.7), transparent 60%);
  top: -120px; left: -120px;
}
.orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,211,238,.45), transparent 60%);
  bottom: -180px; right: -160px;
  animation-delay: -8s;
}
@keyframes float {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(40px,-20px,0) scale(1.06); }
  100% { transform: translate3d(-30px,30px,0) scale(.96); }
}
.noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* === Nav === */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -.01em;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0a0a; font-size: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 8px 30px rgba(167,139,250,.35);
}
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.02); backdrop-filter: blur(8px);
  font-size: .82rem; color: var(--dim);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74,222,128,.15);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

/* === Hero === */
.hero {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) clamp(20px, 4vw, 48px) 40px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 28px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  font-size: .78rem; color: #cfcfd4;
  font-family: 'Geist Mono', monospace;
  animation: fadeUp .8s var(--ease) both;
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.title {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0;
}
.title .line { display: block; animation: fadeUp .9s var(--ease) both; }
.title .line:nth-child(2) { animation-delay: .1s; }
.title .gradient {
  background: linear-gradient(100deg, #fff 10%, var(--accent) 40%, var(--accent-2) 70%, var(--accent-3) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: fadeUp .9s var(--ease) .1s both, shimmer 8s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.lede {
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.6;
  color: #c8c8cf;
  margin: 0;
  animation: fadeUp 1s var(--ease) .2s both;
}
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  animation: fadeUp 1s var(--ease) .3s both;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  font: inherit; font-size: .92rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--line-2);
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .3s var(--ease);
  color: var(--fg);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #fff; color: #0a0a0a; border-color: #fff;
  box-shadow: 0 6px 20px rgba(255,255,255,.12);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(167,139,250,.35); }
.btn-ghost {
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: var(--line-2); }

/* === Countdown === */
.countdown {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  backdrop-filter: blur(10px);
  animation: fadeUp 1s var(--ease) .4s both;
}
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.cd-num {
  font-family: 'Geist Mono', monospace;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.cd-lbl { font-size: .68rem; color: var(--dim); margin-top: 2px; text-transform: uppercase; letter-spacing: .12em; }
.cd-sep {
  font-family: 'Geist Mono', monospace;
  font-size: 1.4rem; color: var(--dim);
  transform: translateY(-7px);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* === Progress === */
.progress-wrap {
  width: 100%; max-width: 480px;
  animation: fadeUp 1s var(--ease) .5s both;
}
.progress-meta {
  display: flex; justify-content: space-between;
  color: var(--dim); margin-bottom: 8px;
}
.progress {
  height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(167,139,250,.7);
  transition: width 1.6s var(--ease);
}

/* === Footer === */
.foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 4vw, 48px);
  max-width: 1280px; margin: 0 auto; width: 100%;
  color: var(--dim); border-top: 1px solid var(--line);
}
.foot a:hover { color: #fff; }

/* === Dialog === */
.dialog {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #111114;
  color: var(--fg);
  padding: 0; max-width: 420px; width: calc(100% - 32px);
}
.dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.dialog-inner { padding: 24px; position: relative; }
.dialog h2 { margin: 0 0 6px; font-size: 1.2rem; }
.dialog .field { display: flex; flex-direction: column; gap: 6px; margin: 16px 0; font-size: .85rem; color: var(--dim); }
.dialog input {
  font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); background: #0a0a0a; color: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.dialog input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167,139,250,.2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-close {
  position: absolute; top: 10px; right: 12px;
  background: transparent; border: 0; color: var(--dim);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.dialog-close:hover { color: #fff; }

/* === Animations === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 520px) {
  .countdown { gap: 4px; padding: 14px 12px; }
  .cd-cell { min-width: 48px; }
  .foot { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
