/* ===== CSS Variables ===== */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --border: #1e1e2a;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.15);
  --gradient-start: #818cf8;
  --gradient-end: #34d399;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-secondary: #f4f4f5;
  --bg-card: #f9fafb;
  --border: #d4d4d8;
  --text: #18181b;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.1);
  --gradient-start: #6366f1;
  --gradient-end: #059669;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-icon {
  color: var(--accent);
}

.logo-bg {
  fill: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-glow);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 8px;
}

.nav-icon-link {
  display: flex !important;
  align-items: center;
  padding: 8px !important;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition);
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-subscribe {
  margin-top: 28px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 92%, transparent), color-mix(in srgb, var(--bg-secondary) 96%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 10%, transparent);
}

.hero-subscribe-copy h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-subscribe-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-subscribe-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: stretch;
  flex-wrap: wrap;
}

.subscribe-form input,
.subscribe-form .formkit-input {
  flex: 1;
  min-width: 280px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.subscribe-form input::placeholder,
.subscribe-form .formkit-input::placeholder {
  color: var(--text-muted);
}

.subscribe-form input:focus,
.subscribe-form .formkit-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 70%, white 10%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.hero-subscribe-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.formkit-alert {
  width: 100%;
  list-style: none;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.formkit-alert:empty {
  display: none;
}

.formkit-alert-error {
  color: #fda4af;
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(248, 113, 113, 0.28);
}

.formkit-alert-success {
  color: #86efac;
  background: rgba(20, 83, 45, 0.2);
  border-color: rgba(74, 222, 128, 0.28);
}

.formkit-submit {
  min-width: 210px;
}

.formkit-submit span {
  display: inline-block;
}

.hero-subscribe-centered {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-subscribe-centered .hero-subscribe-text,
.hero-subscribe-centered .hero-subscribe-note {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.subscribe-form-centered {
  justify-content: center;
}

.subscribe-form-centered input {
  max-width: 420px;
}

.subscribe-form-centered .formkit-input {
  max-width: 420px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-visual {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mouse-icon {
  width: 220px;
  height: auto;
  color: var(--text);
}

.hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Features ===== */
.features {
  padding: 48px 0 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== CTA Section ===== */
.cta {
  padding: 40px 0 32px;
}

.cta-container {
  padding: 40px 40px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 260px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

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

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 120px 0 48px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form .btn {
    width: 100%;
  }

  .subscribe-form-centered input {
    max-width: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cta-container {
    padding: 28px 20px;
  }
}
