/* === TOKENS === */
:root {
  --bg-deep: #08080d;
  --bg-surface: #0e0e15;
  --bg-elevated: #15151f;
  --border-subtle: #1a1a2a;
  --border-default: #26263a;
  --text-primary: #ececf0;
  --text-secondary: #8585a0;
  --text-muted: #5a5a74;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dim: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.12);
  --accent-glow-strong: rgba(99, 102, 241, 0.25);
  --success: #22c55e;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* === BACKGROUND ATMOSPHERE === */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 60%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 40% 50% at 85% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* === WAVEFORM DECORATION === */
.waveform {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, 92vw);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0.05;
}

.wave-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent-light);
  will-change: transform;
  transform-origin: center;
  animation: wave-pulse 2.5s ease-in-out infinite;
}

@keyframes wave-pulse {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* === LAYOUT === */
.content { position: relative; z-index: 1; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* === NAV === */
.nav {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 18px; height: 18px; color: #fff; }

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-default);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.nav-cta:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* === HERO === */
.hero {
  padding: 90px 0 72px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 36px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.1s forwards;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.25s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-light);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 52px;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.4s forwards;
}

/* === FORMS === */
.signup-form {
  max-width: 480px;
  margin: 0 auto;
}

.hero .signup-form {
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.55s forwards;
}

.form-fields { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 12px; }
.form-field { flex: 1; }

.form-field input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field input::placeholder { color: var(--text-muted); }

.form-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-field input:hover:not(:focus) { border-color: var(--border-default); }

.form-field.shake input {
  border-color: rgba(239, 68, 68, 0.5);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.submit-btn {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.submit-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.submit-btn:hover::after { opacity: 1; }
.submit-btn:active { transform: translateY(0); }
.submit-btn.loading { pointer-events: none; opacity: 0.75; }

.form-trust {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
  text-align: center;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 0.7s forwards;
}

/* === SUCCESS STATE === */
.form-success {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.form-success.visible {
  display: block;
  animation: fade-up 0.5s var(--ease-out) forwards;
}

.success-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.success-check svg { width: 26px; height: 26px; color: var(--success); }

.form-success h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 6px;
}

.form-success p { color: var(--text-secondary); font-size: 15px; }

/* === DIVIDER === */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 30%, var(--border-subtle) 70%, transparent);
}

/* === FEATURES === */
.features { padding: 72px 0 80px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out),
              background 0.3s ease, border-color 0.3s ease;
}

.feature-card.visible { opacity: 1; transform: translateY(0); }

.feature-card:hover {
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.12);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.feature-icon svg { width: 22px; height: 22px; color: var(--accent-light); }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* === BOTTOM CTA === */
.bottom-cta {
  padding: 76px 0 80px;
  text-align: center;
}

.bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.bottom-cta > p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 36px;
  font-weight: 300;
}

/* Reveal targets in bottom CTA */
.bottom-cta [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.bottom-cta [data-reveal].visible { opacity: 1; transform: translateY(0); }

/* === FOOTER === */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text { font-size: 13px; color: var(--text-muted); }

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--text-secondary); }

/* === ANIMATIONS === */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 56px 0 48px; }
  .form-row { flex-direction: column; }
  .features { padding: 48px 0 56px; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .bottom-cta { padding: 56px 0 60px; }
  .footer { flex-direction: column; gap: 14px; text-align: center; }
  .waveform { height: 130px; top: 32%; }
}

@media (max-width: 480px) {
  .nav { padding: 16px 0; }
  .hero h1 { font-size: 38px; }
  .feature-card { padding: 24px 20px; }
}
