/* ================================================================
   Speed Dial — Landing Page
   "Control Room" aesthetic — void black, blue signal, analog grain
   ================================================================ */

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

:root {
  --void: #05060a;
  --base: #0a0b10;
  --surface: #10121a;
  --card: #151821;
  --card-hover: #1a1e2b;
  --elevated: #202536;

  --border-faint: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);

  --text-1: #e8eaf2;
  --text-2: #8b8ea2;
  --text-3: #4a4d62;
  --text-4: #2a2d3e;

  --blue: #5b9fff;
  --blue-dim: rgba(91, 159, 255, 0.08);
  --blue-glow: rgba(91, 159, 255, 0.15);

  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Outfit', sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--void);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(91, 159, 255, 0.2);
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover { opacity: 0.8; }

/* ---- Grain ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  mix-blend-mode: overlay;
  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.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ================================================================
   Navigation
   ================================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(5, 6, 10, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-faint);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-1);
}

.nav-logo {
  width: 28px;
  height: 28px;
}

.nav-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text-1);
  opacity: 1;
}

/* Theme toggle */
.theme-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.15s;
}

.theme-btn:hover {
  color: var(--text-1);
  border-color: var(--border-medium);
}

/* Show sun in dark mode, moon in light mode */
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--blue);
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-cta:hover {
  opacity: 1 !important;
  box-shadow: 0 0 20px var(--blue-glow);
  transform: translateY(-1px);
}

/* ================================================================
   Hero
   ================================================================ */

.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
}

/* Atmospheric glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, var(--blue-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--blue-dim);
  border: 1px solid rgba(91, 159, 255, 0.12);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  margin-bottom: 28px;
  animation: fadeUp 0.6s var(--ease) both;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.6s var(--ease) 0.1s both;
}

.hero h1 .accent {
  color: var(--blue);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.6;
  animation: fadeUp 0.6s var(--ease) 0.2s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s var(--ease) 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 4px 24px var(--blue-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  opacity: 1;
  border-color: var(--border-medium);
  background: var(--card);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Hero screenshot */
.hero-screenshot {
  margin-top: 60px;
  position: relative;
  animation: fadeUp 0.8s var(--ease) 0.4s both;
}

.screenshot-img {
  width: 100%;
  max-width: 1060px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px var(--border-faint),
    0 0 40px var(--blue-glow);
  transition: opacity 0.3s;
}

.hero-screenshot::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 10%;
  right: 10%;
  height: 80px;
  background: radial-gradient(ellipse, rgba(91, 159, 255, 0.06), transparent);
  pointer-events: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Features
   ================================================================ */

.features {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-2);
  font-size: 16px;
  max-width: 480px;
  margin-bottom: 48px;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-faint);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: var(--border-subtle);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-glow), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-dim);
  border: 1px solid rgba(91, 159, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--blue);
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ================================================================
   How it works
   ================================================================ */

.how {
  padding: 80px 0 100px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step {
  text-align: center;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--text-4);
  line-height: 1;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto;
}

/* ================================================================
   CTA banner
   ================================================================ */

.cta-section {
  padding: 80px 0;
}

.cta-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 28px;
}

.cta-box .hero-actions {
  animation: none;
}

/* ================================================================
   Footer
   ================================================================ */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-faint);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
}

.footer-brand img {
  width: 20px;
  height: 20px;
  opacity: 0.5;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-3);
  font-size: 12px;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-2);
  opacity: 1;
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-4);
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 36px; }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nav-links { display: none; }

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

  .footer-left { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* ================================================================
   Privacy page specifics
   ================================================================ */

.legal-page {
  padding: 140px 0 80px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
}

.legal-page p, .legal-page li {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-page li { margin-bottom: 6px; }

/* ================================================================
   Light theme
   ================================================================ */

[data-theme="light"] {
  --void: #f2f3f6;
  --base: #f7f8fa;
  --surface: #ffffff;
  --card: #f9fafb;
  --card-hover: #f0f1f5;
  --elevated: #e8eaef;

  --border-faint: rgba(0, 0, 0, 0.04);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.13);

  --text-1: #1a1c24;
  --text-2: #5c5f72;
  --text-3: #8b8ea0;
  --text-4: #c0c2ce;

  --blue: #3a7fe6;
  --blue-dim: rgba(58, 127, 230, 0.06);
  --blue-glow: rgba(58, 127, 230, 0.08);
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(58, 127, 230, 0.03) 0%, transparent 70%),
    var(--void);
}

[data-theme="light"] nav {
  background: rgba(242, 243, 246, 0.8);
}

[data-theme="light"] .grain { opacity: 0.01; }

[data-theme="light"] .screenshot-img {
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.08),
    0 0 0 1px var(--border-subtle);
}

[data-theme="light"] .feature-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* ================================================================
   Scrollbar
   ================================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-medium); }
