/* ============================================================
   NOVA X AUTH — Cyber Serif Theme
   ------------------------------------------------------------
   Black (#050505) dominant · Emerald (#10B981) surgical accent
   Newsreader serif headlines · Space Grotesk technical labels
   Inter for body · Glassmorphism · Shimmer borders · Spotlight
   ============================================================ */

/* ---------------- Reset + base ---------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --text: #EBEBEB;
  --text-muted: rgba(235, 235, 235, 0.5);
  --text-faint: rgba(235, 235, 235, 0.4);
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.3);
  --emerald-glow: rgba(16, 185, 129, 0.5);
  --emerald-tint: rgba(16, 185, 129, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.02);
  --glass-hover: rgba(255, 255, 255, 0.04);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

code { font-family: 'Space Grotesk', monospace; }

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--emerald); }

/* ---------------- Container ---------------- */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   AMBIENT BACKGROUND — morphing emerald blobs + grain
   ============================================================ */
.morph-blob {
  position: fixed;
  width: 384px;
  height: 384px;
  background: var(--emerald-tint);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%;
  animation: morph 8s ease-in-out infinite alternate;
  will-change: border-radius, transform;
}
.blob-1 { top: 10%; left: -5%; animation-delay: 0s; }
.blob-2 { top: 60%; right: -5%; animation-delay: -3s; background: rgba(16, 185, 129, 0.06); }
.blob-3 { top: 130%; left: 30%; animation-delay: -6s; background: rgba(16, 185, 129, 0.05); }

@keyframes morph {
  0%   { border-radius: 40% 60% 60% 40% / 70% 30% 70% 30%; transform: translate(0, 0) rotate(0deg); }
  50%  { border-radius: 50% 50% 40% 60% / 40% 60% 40% 60%; transform: translate(40px, -20px) rotate(180deg); }
  100% { border-radius: 60% 40% 40% 60% / 30% 70% 30% 70%; transform: translate(-20px, 30px) rotate(360deg); }
}

/* Subtle film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
              border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-soft);
  padding: 10px 0;
}

.nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  color: var(--bg);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s var(--ease);
}
.nav-logo:hover .logo-icon { transform: rotate(360deg); }
.logo-icon svg { width: 16px; height: 16px; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-mark {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-mark-em {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: 18px;
  font-style: italic;
  color: var(--emerald);
  margin-left: 2px;
}
.logo-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Center links */
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s var(--ease);
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--emerald);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* Right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-signin {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-signin:hover { color: var(--text); background: var(--glass-hover); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--emerald);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.nav-cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #000;
  animation: pulse-dot 2s ease-in-out infinite;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px var(--emerald-tint), 0 8px 24px var(--emerald-glow);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-signin { display: none; }
}

/* ============================================================
   HERO — 100vh split-screen
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
  z-index: 2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Tech label (uppercase with pulse dot) */
.tech-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 var(--emerald-glow);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--emerald-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Hero headline */
.hero-headline {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 32px;
}
.serif-em {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
}

/* Hero body */
.hero-body {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(235, 235, 235, 0.5);
  max-width: 480px;
  margin-bottom: 40px;
  font-weight: 300;
}

/* CTA buttons */
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-pill svg { width: 16px; height: 16px; }
.btn-pill-solid {
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 0 var(--emerald-glow);
}
.btn-pill-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--emerald-glow), 0 0 0 4px var(--emerald-tint);
}
.btn-pill-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-pill-ghost:hover {
  border-color: var(--text);
  background: var(--glass);
  transform: translateY(-2px);
}
.btn-pill-full { width: 100%; }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-stat-num {
  font-family: 'Newsreader', serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.hero-stat-lbl {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 8px;
}

/* Hero right — floating mockup */
.hero-right {
  position: relative;
  perspective: 1200px;
  min-height: 480px;
}
.mockup-stack {
  position: relative;
  width: 100%;
  height: 480px;
  transform-style: preserve-3d;
  animation: float-stack 6s ease-in-out infinite;
}
@keyframes float-stack {
  0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-2deg); }
  50% { transform: translateY(-12px) rotateX(2deg) rotateY(-2deg); }
}

.mockup-card {
  position: absolute;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.mockup-card-main {
  top: 40px;
  left: 0;
  right: 0;
  padding: 16px;
}
.mockup-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-r { background: #ef4444; }
.dot-y { background: #f59e0b; }
.dot-g { background: #10b981; }
.mockup-url {
  margin-left: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.mockup-body { display: flex; flex-direction: column; gap: 12px; }
.mockup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.mockup-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.mockup-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.mockup-val.em { color: var(--emerald); }

.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  margin-top: 8px;
  padding: 0 4px;
}
.bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(180deg, var(--emerald), var(--emerald-tint));
  border-radius: 4px 4px 0 0;
  animation: bar-grow 1.2s var(--ease) infinite alternate;
  animation-delay: calc(var(--i, 0) * 0.1s);
}
.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.4s; }
.bar:nth-child(6) { animation-delay: 0.5s; }
.bar:nth-child(7) { animation-delay: 0.6s; }
@keyframes bar-grow {
  0% { transform: scaleY(0.7); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Floating cards */
.mockup-card-float {
  padding: 14px 18px;
  width: 220px;
  font-size: 12px;
}
.mockup-card-1 {
  top: 0;
  right: -20px;
  animation: float-card-1 5s ease-in-out infinite;
}
.mockup-card-2 {
  bottom: 20px;
  left: -30px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float-card-2 7s ease-in-out infinite;
}
@keyframes float-card-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-8px, 12px); }
}
@keyframes float-card-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, -12px); }
}

.mockup-float-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--emerald);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mockup-float-code {
  font-family: 'Space Grotesk', monospace;
  font-size: 10px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre;
}
.mockup-float-icon {
  width: 32px; height: 32px;
  background: var(--emerald-tint);
  color: var(--emerald);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mockup-float-icon svg { width: 16px; height: 16px; }
.mockup-float-title {
  font-family: 'Newsreader', serif;
  font-size: 14px;
  color: var(--text);
}
.mockup-float-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.mockup-float-sub.em { color: var(--emerald); }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--emerald), transparent);
  animation: scroll-pulse 2s var(--ease) infinite;
}
@keyframes scroll-pulse {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { min-height: 360px; }
  .mockup-stack { height: 360px; }
  .mockup-card-main { top: 0; }
  .mockup-card-float { width: 180px; }
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  position: relative;
  z-index: 2;
  padding: 120px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-title {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 20px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  font-weight: 300;
}

/* ============================================================
   FEATURE GRID — spotlight cards with shimmer border
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .feature-grid { grid-template-columns: 1fr; } }

/* Spotlight card — cursor-tracked radial glow + shimmer border */
.spotlight-card {
  position: relative;
  padding: 1px;
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Shimmer border — animated gradient pseudo */
.spotlight-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent 30%, var(--emerald-soft) 50%, transparent 70%);
  background-size: 200% 100%;
  background-position: 200% 0;
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  animation: shimmer 4s linear infinite;
  animation-play-state: paused;
}
.spotlight-card:hover::after {
  opacity: 1;
  animation-play-state: running;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Spotlight cursor-tracked glow */
.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), var(--emerald-tint), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-4px);
}

.spotlight-inner {
  position: relative;
  z-index: 1;
  padding: 40px;
}

/* Card icon */
.card-icon-wrap {
  margin-bottom: 32px;
}
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--emerald-tint);
  color: var(--emerald);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s var(--ease), background 0.4s var(--ease);
}
.spotlight-card:hover .card-icon {
  transform: rotate(8deg) scale(1.05);
  background: rgba(16, 185, 129, 0.15);
}
.card-icon svg { width: 24px; height: 24px; }

.card-title {
  font-family: 'Newsreader', serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}
.card-body {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(235, 235, 235, 0.4);
  font-weight: 300;
  margin-bottom: 24px;
}
.card-footer {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}
.card-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.inline-code {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85em;
  padding: 2px 6px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald);
  border-radius: 4px;
}

/* ============================================================
   BENCHMARK TABLE
   ============================================================ */
.bench-wrap {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.bench-table {
  width: 100%;
  border-collapse: collapse;
}
.bench-th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  font-weight: 500;
}
.bench-th-num { text-align: right; }

.bench-row {
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.3s var(--ease);
}
.bench-row:last-child { border-bottom: none; }
.bench-row:hover { background: rgba(255,255,255,0.02); }
.bench-row-best {
  background: rgba(16, 185, 129, 0.04);
  position: relative;
}
.bench-row-best::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--emerald);
}

.bench-td {
  padding: 18px 24px;
  font-size: 14px;
  color: var(--text-muted);
  vertical-align: middle;
}
.bench-td.em { color: var(--emerald); font-weight: 600; }
.bench-td.mono { font-family: 'Space Grotesk', monospace; }
.bench-th-num + .bench-td, .bench-td:nth-child(n+2) { text-align: right; }
.bench-td:first-child { text-align: left; }

.bench-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  margin-right: 8px;
  vertical-align: middle;
}

.check-pulse {
  display: inline-flex;
  color: var(--emerald);
  width: 18px; height: 18px;
  animation: check-pulse 2s ease-in-out infinite;
}
.check-pulse svg { width: 100%; height: 100%; }
@keyframes check-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 var(--emerald-glow)); }
  50% { opacity: 0.7; filter: drop-shadow(0 0 6px var(--emerald-glow)); }
}
.check-dim { color: var(--text-muted); font-size: 12px; }

/* ============================================================
   CODE SECTION
   ============================================================ */
.code-wrap {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.code-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  padding: 0 8px;
  overflow-x: auto;
}
.code-tab {
  padding: 18px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.code-tab:hover { color: var(--text); }
.code-tab.active {
  color: var(--emerald);
  border-bottom-color: var(--emerald);
}

.code-panel {
  padding: 32px;
  overflow-x: auto;
}
.code-panel pre {
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre;
}
.code-panel code {
  font-family: inherit;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 160px 0;
  text-align: center;
}
.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-headline {
  font-family: 'Newsreader', serif;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 24px 0 32px;
}
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--emerald) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s linear infinite;
}
@keyframes gradient-shift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.cta-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 480px;
  font-weight: 300;
}

/* Mega pill button */
.btn-pill-mega {
  padding: 22px 40px;
  font-size: 16px;
  background: #fff;
  color: #000;
  position: relative;
}
.btn-pill-mega .mega-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--emerald-glow);
  animation: mega-pulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes mega-pulse {
  0% { box-shadow: 0 0 0 0 var(--emerald-glow); }
  70% { box-shadow: 0 0 0 24px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.btn-pill-mega .mega-label { position: relative; z-index: 1; }
.btn-pill-mega svg { width: 18px; height: 18px; position: relative; z-index: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  padding: 48px 0;
  border-top: 1px solid var(--border-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  font-family: 'Newsreader', serif;
  font-size: 18px;
  font-weight: 600;
}
.footer-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--emerald);
  transition: width 0.3s var(--ease);
}
.footer-links a:hover { color: var(--text); }
.footer-links a:hover::after { width: 100%; }

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: auth-fade 0.3s var(--ease);
}
.auth-overlay.active { display: flex; }
@keyframes auth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(16, 185, 129, 0.1);
  animation: auth-in 0.4s var(--ease);
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.auth-close:hover { color: var(--text); background: var(--glass-hover); }
.auth-close svg { width: 18px; height: 18px; }

.auth-brand {
  text-align: center;
  font-family: 'Newsreader', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.auth-brand .logo-sub {
  display: inline;
  margin-left: 6px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin: 32px 0 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.auth-tab.active {
  background: var(--emerald-tint);
  color: var(--emerald);
}

.auth-form { display: none; }
.auth-form.active-form { display: block; animation: form-in 0.3s var(--ease); }
@keyframes form-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Role toggle (admin / user) */
.auth-role-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.role-option { flex: 1; cursor: pointer; }
.role-option input { display: none; }
.role-pill {
  display: block;
  text-align: center;
  padding: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  transition: all 0.3s var(--ease);
}
.role-option input:checked + .role-pill {
  background: var(--emerald-tint);
  color: var(--emerald);
  border-color: var(--emerald-soft);
}

.field { margin-bottom: 18px; }
.field-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field-input:focus {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.03);
}
.field-input::placeholder { color: var(--text-muted); }

.auth-hint {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.auth-footer {
  margin-top: 32px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 280px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  animation: toast-in 0.3s var(--ease);
}
.toast.success { border-left: 2px solid var(--emerald); }
.toast.error { border-left: 2px solid #ef4444; }
.toast.info { border-left: 2px solid #60a5fa; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child reveals inside a grid */
.feature-grid .reveal:nth-child(1) { transition-delay: 0s; }
.feature-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.feature-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding: 100px 0 60px; }
  .hero-stats { gap: 24px; }
  .hero-stat-num { font-size: 28px; }
  .auth-card { padding: 28px 24px; }
  .spotlight-inner { padding: 28px; }
  .bench-td, .bench-th { padding: 12px 14px; font-size: 12px; }
  .bench-td:nth-child(n+5), .bench-th:nth-child(n+5) { display: none; }
}
