/* Fonts loaded via <link> in head — no @import flash */

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold:      #fc0;
  --purple:    #c0f;
  --dark:      #160016;
  --text:      rgba(255, 255, 255, 0.82);
  --text-dim:  rgba(255, 255, 255, 0.45);
  --gold-line: rgba(255, 204, 0, 0.12);
  --card-bg:   rgba(255, 255, 255, 0.04);
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: hidden; /* locked until planet forms */
  background: var(--dark);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
}
body.scrollable { overflow-y: auto; }

body > canvas {
  position: fixed !important;
  top: 0; left: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(255,204,0,0.7),
      0 0 50px rgba(255,204,0,0.35),
      0 0 90px rgba(204,0,255,0.25);
  }
  50% {
    text-shadow:
      0 0 30px rgba(255,204,0,1),
      0 0 70px rgba(255,204,0,0.6),
      0 0 140px rgba(204,0,255,0.5),
      0 0 200px rgba(204,0,255,0.2);
  }
}

@keyframes flicker {
  0%, 93%, 100% { opacity: 1; }
  94%  { opacity: 0.8; }
  95%  { opacity: 1; }
  97%  { opacity: 0.88; }
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0);   opacity: 0.4; }
  50%       { transform: translateY(9px); opacity: 0.9; }
}

@keyframes word-enter {
  0%   { opacity: 0; letter-spacing: 0.42em; transform: translateY(-16px) scale(0.9); }
  65%  { letter-spacing: 0.015em; }
  100% { opacity: 1; letter-spacing: 0;     transform: none; }
}

@keyframes tagline-enter {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hint-enter {
  from { opacity: 0; }
  to   { opacity: 0.4; }
}

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
.feat-card:nth-child(1) { transition-delay: 0.04s; }
.feat-card:nth-child(2) { transition-delay: 0.10s; }
.feat-card:nth-child(3) { transition-delay: 0.16s; }
.feat-card:nth-child(4) { transition-delay: 0.22s; }
.feat-card:nth-child(5) { transition-delay: 0.28s; }
.feat-card:nth-child(6) { transition-delay: 0.34s; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 700px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 55% at 50% 50%, rgba(22,0,22,0.5) 0%, transparent 100%);
  pointer-events: none;
}

/* Only Aelus gets the special treatment */
#word {
  font-family: Megrim, cursive;
  font-size: clamp(5rem, 18vw, 16rem);
  line-height: 0.95;
  color: var(--gold);
  -webkit-text-stroke: 0.12vh var(--purple);
  user-select: none;
  margin-bottom: 1.2rem;
  /* entrance state — invisible until planet forms */
  opacity: 0;
  letter-spacing: 0.42em;
}
#word.show {
  animation:
    word-enter 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    glow-pulse 3.5s 1.1s ease-in-out infinite,
    flicker    9s   3.6s ease-in-out infinite;
}

.tagline {
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.80);
  width: 100%;
  max-width: 420px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  letter-spacing: 0.015em;
  text-align: center;
  /* entrance state */
  opacity: 0;
}
.tagline.show {
  animation: tagline-enter 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-hint {
  color: rgba(255,255,255,0.3);
  display: inline-block;
  text-decoration: none;
  transition: color 0.2s;
  opacity: 0;
}
.scroll-hint:hover { color: rgba(255,255,255,0.7); }
.scroll-hint svg { width: 1.8rem; height: 1.8rem; }
.scroll-hint.show {
  animation: hint-enter 0.9s ease forwards, bounce-down 2s 0.9s ease-in-out infinite;
}

/* ── INFO SECTION ─────────────────────────────────────────── */
.info-sect {
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(22,0,22,0) 0%,
    rgba(22,0,22,0.94) 5%,
    rgba(14,0,14,0.98) 100%
  );
  padding: 7rem 2rem 6rem;
  border-top: 1px solid var(--gold-line);
}

.sect-wrap { max-width: 1100px; margin: 0 auto; }

.sect-eye {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.75rem;
}

.sect-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.sect-sub {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 4rem;
}

/* Feature grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 5rem;
}
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }

.feat-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.25s, transform 0.25s;
}
.feat-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-3px);
}

.feat-icon {
  width: 1.6rem; height: 1.6rem;
  color: var(--purple);
  margin-bottom: 0.85rem;
}
.feat-icon svg { width: 100%; height: 100%; }

.feat-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}

.feat-desc {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.feat-compare {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.7rem;
  font-family: 'Fira Code', 'SF Mono', monospace;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 0.75rem;
}
.old { color: rgba(255,255,255,0.2); text-decoration: line-through; }
.new { color: var(--purple); font-weight: 500; }

/* Stats */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 0 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.stat {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat-line {
  width: 1px;
  height: 2.5rem;
  background: rgba(255,255,255,0.08);
}
@media (max-width: 600px) { .stat-line { display: none; } .stats-row { justify-content: center; } }

/* ── Custom scrollbar ────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(22, 0, 22, 0.9);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold) 0%, var(--purple) 100%);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd740 0%, #d966ff 100%);
}
* { scrollbar-width: thin; scrollbar-color: var(--gold) rgba(22,0,22,0.9); }

/* ── Brand ────────────────────────────────────────────────── */
#brand {
  position: fixed;
  bottom: 1.6rem;
  right: 1.8rem;
  font-family: Megrim, cursive;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: rgba(255,204,0,0.25);
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* ── Waitlist / Chaos Button ────────────────────────────────── */
.waitlist-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 2.5rem;
  opacity: 0;
}
.waitlist-wrap.show {
  animation: tagline-enter 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chaos-button {
  position: relative;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: linear-gradient(135deg, rgba(255,204,0,0.1) 0%, rgba(204,0,255,0.1) 100%);
  padding: 0;
  cursor: pointer;
  width: 200px;
  height: 52px;
  border-radius: 150px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.chaos-button:hover {
  transform: scale(1.03);
  border-color: rgba(255, 204, 0, 0.6);
}
.chaos-button.holding {
  box-shadow:
    0 0 calc(var(--hold-glow, 0) * 32px) rgba(255, 204, 0, 0.65),
    0 0 calc(var(--hold-glow, 0) * 70px) rgba(204, 0, 255, 0.35);
  border-color: rgba(255, 204, 0, calc(0.35 + var(--hold-glow, 0) * 0.65));
}
.chaos-button.exploded {
  animation: btn-explode 0.45s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
  pointer-events: none;
}
@keyframes hold-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50%       { opacity: 0.9;  transform: scale(1.06); }
}
@keyframes hold-ring {
  from { stroke-dashoffset: 220; }
  to   { stroke-dashoffset: 0; }
}

@keyframes btn-explode {
  0%   { transform: scale(1);    opacity: 1; }
  40%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(0.05); opacity: 0; }
}

.chaos-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.chaos-label {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.6);
  pointer-events: none;
  font-family: 'Inter', sans-serif;
}
.hold-hint-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
  transition: opacity 0.4s;
  animation: hold-pulse 2s ease-in-out infinite;
}
.hold-hint-label svg {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.85;
  flex-shrink: 0;
}

/* Waitlist inline error */
.waitlist-error {
  font-size: 0.72rem;
  color: rgba(255, 110, 110, 0.95);
  text-align: center;
  letter-spacing: 0.02em;
  min-height: 1em;
  margin-bottom: 0.4rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}
.waitlist-error.show {
  opacity: 1;
  transform: none;
}
.waitlist-email.invalid {
  outline: 2px solid rgba(255, 80, 80, 0.65) !important;
}

/* Form — slot keeps button + form stacked in same space */
.waitlist-slot {
  position: relative;
  width: 320px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.waitlist-form-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  opacity: 0;
  transform: translateY(14px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.waitlist-form-wrap.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.waitlist-form {
  display: flex;
  background: rgba(10, 0, 14, 0.75);
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.waitlist-form:focus-within {
  border-color: rgba(255, 204, 0, 0.7);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.08);
}
.waitlist-email {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem 1.1rem;
  color: #fff;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  caret-color: var(--gold);
}
.waitlist-email::placeholder { color: rgba(255, 255, 255, 0.35); }
.waitlist-submit {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,204,0,0.85), rgba(204,0,255,0.75));
  border: none;
  cursor: pointer;
  padding: 0 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.waitlist-submit:hover:not(:disabled) { opacity: 0.8; }
.waitlist-submit:disabled { opacity: 0.4; cursor: default; }
.waitlist-submit svg { width: 1rem; height: 1rem; color: #fff; }
.waitlist-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: rgba(255, 204, 0, 0.75);
  text-align: center;
  margin-top: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.5s;
}
.waitlist-success.show { opacity: 1; }

/* Already-on-waitlist badge */
.already-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255, 204, 0, 0.85);
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: rgba(255, 204, 0, 0.06);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
  animation: tagline-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.already-check {
  font-size: 0.9rem;
  color: #ffcc00;
}

/* ── Thank-you overlay ─────────────────────────────────── */
#thankyou-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(ellipse at 50% 55%, #0f001f 0%, #080010 50%, #000005 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
#thankyou-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.ty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}
.ty-word {
  font-family: Megrim, cursive;
  font-size: clamp(4.5rem, 16vw, 14rem);
  line-height: 0.95;
  color: var(--gold);
  -webkit-text-stroke: 0.12vh var(--purple);
  animation: glow-pulse 3.5s ease-in-out infinite;
  user-select: none;
  letter-spacing: 0.04em;
  text-shadow:
    0 2px 8px rgba(0,0,0,1),
    0 0 40px rgba(0,0,0,0.95),
    0 8px 32px rgba(0,0,0,0.9);
}
.ty-sub {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.06em;
  max-width: 34ch;
  text-shadow: 0 1px 12px rgba(0,0,0,1), 0 4px 24px rgba(0,0,0,0.9);
}
.ty-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'Inter', sans-serif;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ty-back:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
