/* ============================================================
   CORTEX JOIN — same design system as the main landing
   ============================================================ */
:root {
  --bg: #0B0A08;
  --bg-2: #12100C;
  --ink: #FFFFFF;
  --ink-2: rgba(255, 255, 255, 0.64);
  --ink-3: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --gold: #E4B95B;
  --copper: #C87E3C;
  --cream: #F3E2B3;
  --jade: #5BC08F;
  --accent-hi: #E7C77F;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.055);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: rgba(228, 185, 91, 0.35); }
.mono { font-family: var(--mono); }

.container { width: min(920px, calc(100% - 40px)); margin-inline: auto; }

.noise {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 9998;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

.grad-text {
  background: linear-gradient(100deg, var(--cream), var(--gold) 45%, var(--copper));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 10, 8, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-word { font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.nav-back {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  font-family: var(--mono);
  transition: color 0.2s;
}
.nav-back:hover { color: var(--gold); }

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -80px 0 0;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(228,185,91,0.09), transparent 65%);
  pointer-events: none;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--gold); text-transform: uppercase;
  border: 1px solid rgba(228, 185, 91, 0.25);
  background: rgba(228, 185, 91, 0.06);
  padding: 7px 14px; border-radius: 999px;
  margin-bottom: 26px;
}
.kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 8px var(--jade);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-2);
  max-width: 560px; margin: 0 auto 14px;
}
.ref-banner {
  display: none;
  margin: 0 auto 8px; max-width: 520px;
  font-size: 14px; color: var(--cream);
  background: rgba(228, 185, 91, 0.08);
  border: 1px solid rgba(228, 185, 91, 0.3);
  border-radius: var(--r-sm); padding: 10px 16px;
}
.ref-banner.show { display: block; }

/* ---------- form ---------- */
.join-form {
  display: flex; gap: 10px; max-width: 520px;
  margin: 28px auto 12px;
}
.join-form input[type="email"] {
  flex: 1; min-width: 0;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 15px 18px;
  color: var(--ink); font-size: 15.5px; font-family: var(--sans);
  outline: none;
  transition: border-color 0.2s;
}
.join-form input[type="email"]:focus { border-color: rgba(228, 185, 91, 0.5); }
.join-form input[type="email"]::placeholder { color: var(--ink-3); }

.btn-gold {
  background: linear-gradient(100deg, var(--gold), var(--copper));
  color: #1A1408; font-weight: 700; font-size: 15.5px;
  border: none; border-radius: var(--r-sm);
  padding: 15px 26px; cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(228, 185, 91, 0.22);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 32px rgba(228, 185, 91, 0.32); }
.btn-gold:disabled { opacity: 0.55; cursor: wait; transform: none; }

.form-note { font-size: 12.5px; color: var(--ink-3); }
.form-error { color: #E77F7F; font-size: 13.5px; margin-top: 8px; display: none; }
.form-error.show { display: block; }
.queue-count { font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-top: 18px; display: none; }
.queue-count.show { display: block; }
.queue-count b { color: var(--gold); font-weight: 500; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- status (after joining) ---------- */
.status { display: none; padding: 70px 0 30px; text-align: center; }
.status.show { display: block; }
.status-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--jade); margin-bottom: 14px;
}
.big-pos {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(64px, 13vw, 128px);
  line-height: 1; letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.pos-total { color: var(--ink-3); font-size: 15px; margin-bottom: 34px; }
.pos-total b { color: var(--ink-2); font-weight: 600; }

.share-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 620px; margin: 0 auto 20px;
  text-align: left;
}
.share-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.share-card p { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }

.ref-row { display: flex; gap: 8px; margin-bottom: 16px; }
.ref-link {
  flex: 1; min-width: 0;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-family: var(--mono); font-size: 13px; color: var(--cream);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-copy {
  background: var(--glass-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 18px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--sans);
  transition: border-color 0.2s, background 0.2s;
}
.btn-copy:hover { border-color: rgba(228,185,91,0.45); }
.btn-copy.copied { color: var(--jade); border-color: rgba(91,192,143,0.5); }

.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--glass-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; font-family: var(--sans);
  transition: border-color 0.2s, transform 0.15s;
}
.share-btn:hover { border-color: rgba(228,185,91,0.45); transform: translateY(-1px); }

.rewards { max-width: 620px; margin: 0 auto; text-align: left; }
.reward-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.reward-row:last-child { border-bottom: none; }
.reward-count {
  font-family: var(--mono); font-size: 13px; color: var(--gold);
  min-width: 64px; font-weight: 500;
}
.reward-desc { color: var(--ink-2); }
.reward-row.unlocked .reward-desc { color: var(--jade); }
.reward-row.unlocked .reward-count { color: var(--jade); }
.refs-so-far { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.refs-so-far b { color: var(--gold); }

/* ---------- demo ---------- */
.demo { padding: 60px 0 30px; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head .kicker { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.section-head p { color: var(--ink-2); font-size: 15.5px; max-width: 520px; margin: 0 auto; }

.demo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  max-width: 860px; margin: 0 auto;
}
@media (max-width: 720px) { .demo-grid { grid-template-columns: 1fr; } }

.demo-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex; flex-direction: column;
  min-height: 300px;
}
.demo-card-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 14px;
}

.mic-zone { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1; justify-content: center; }
.mic-btn {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--copper));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 30px rgba(228, 185, 91, 0.28);
  transition: transform 0.15s var(--ease);
  position: relative;
}
.mic-btn:hover { transform: scale(1.05); }
.mic-btn.recording { animation: micPulse 1.4s infinite; }
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(228,185,91,0.45); }
  50% { box-shadow: 0 0 0 18px rgba(228,185,91,0); }
}
.mic-hint { font-size: 13.5px; color: var(--ink-3); text-align: center; }

.demo-input {
  width: 100%; flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--ink); font-family: var(--sans); font-size: 14px;
  padding: 12px 14px; resize: none; outline: none;
  margin-bottom: 12px;
}
.demo-input:focus { border-color: rgba(228,185,91,0.45); }
.demo-actions { display: flex; gap: 8px; align-items: center; }
.demo-transcript {
  font-size: 14px; color: var(--ink-2); font-style: italic;
  min-height: 22px; margin-top: 10px; text-align: center;
}

.note-output {
  font-family: var(--mono); font-size: 13px; line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  flex: 1; overflow-y: auto;
}
.note-output .h { color: var(--cream); font-weight: 600; }
.note-output .tag { color: var(--gold); }
.note-output .task { color: var(--jade); }
.note-placeholder { color: var(--ink-3); font-style: italic; font-family: var(--sans); font-size: 14px; }
.cursor-blink { display: inline-block; width: 7px; height: 15px; background: var(--gold); animation: pulse 1s infinite; vertical-align: text-bottom; }

/* ---------- steps ---------- */
.steps { padding: 56px 0 30px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .steps-grid { grid-template-columns: 1fr; } }
.step {
  background: var(--glass); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px;
}
.step-num {
  font-family: var(--mono); font-size: 12px; color: var(--gold);
  margin-bottom: 10px; letter-spacing: 0.1em;
}
.step h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--ink-2); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  margin-top: 60px; padding: 30px 0 40px;
  text-align: center;
}
footer p { font-size: 13.5px; color: var(--ink-3); }
footer a { color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--gold); }

.fade-in { animation: fadeIn 0.6s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
