/* ==========================================================================
   Video Clarity Engine — Main Stylesheet
   ========================================================================== */

/* Fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Syne:wght@600;700;800&display=swap');

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
  /* Brand colors — deep studio tones with electric cyan accent */
  --bg-primary: #0a0e13;
  --bg-secondary: #111820;
  --bg-tertiary: #1a232d;
  --bg-card: #131b24;
  --bg-elevated: #1e2935;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f4f7fa;
  --text-secondary: #9aa9b8;
  --text-tertiary: #5d6e7e;
  --text-muted: #3d4a57;

  /* Accent palette — cinematic cyan-teal with warm highlights */
  --accent-primary: #00e5d4;
  --accent-primary-dim: #00b8aa;
  --accent-glow: rgba(0, 229, 212, 0.4);
  --accent-secondary: #4361ee;
  --accent-warm: #ff6b4a;
  --accent-gold: #f0a500;

  /* Gradient tokens */
  --gradient-hero: radial-gradient(ellipse at top right, rgba(67, 97, 238, 0.15), transparent 50%),
                   radial-gradient(ellipse at bottom left, rgba(0, 229, 212, 0.12), transparent 50%);
  --gradient-brand: linear-gradient(135deg, #00e5d4 0%, #4361ee 100%);
  --gradient-warm: linear-gradient(135deg, #ff6b4a 0%, #f0a500 100%);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --container-max: 1280px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.015;
  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.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  display: block;
}

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

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.mono {
  font-family: var(--font-mono);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

section {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 19, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 32px;
  max-width: 1440px;
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  border-radius: 8px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.logo-mark svg {
  width: 18px;
  height: 18px;
  color: var(--bg-primary);
}

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

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #000;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 229, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 229, 212, 0.4);
}

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

.btn-secondary:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 229, 212, 0.06);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-arrow::after {
  content: '→';
  transition: transform 0.25s ease;
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 100px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 229, 212, 0.08);
  border: 1px solid rgba(0, 229, 212, 0.2);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--accent-primary);
  margin-bottom: 24px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-visual {
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 20px;
}

/* ==========================================================================
   Before/After Comparison Slider
   ========================================================================== */
.compare-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-default);
  aspect-ratio: 16 / 9;
  cursor: ew-resize;
  user-select: none;
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-after-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid var(--accent-primary);
  box-shadow: 2px 0 20px var(--accent-glow);
}

.compare-after-wrap .compare-img {
  width: 200%;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px var(--accent-glow);
  z-index: 3;
  pointer-events: none;
}

.compare-handle svg {
  width: 24px;
  height: 24px;
  color: var(--bg-primary);
}

.compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  z-index: 4;
  pointer-events: none;
}

.compare-label.before { left: 16px; }
.compare-label.after { right: 16px; color: var(--accent-primary); border-color: rgba(0, 229, 212, 0.3); }

/* ==========================================================================
   Trusted By / Marquee
   ========================================================================== */
.trusted-bar {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.trusted-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}

.trusted-logos {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
}

.trusted-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-tertiary);
  opacity: 0.6;
  transition: opacity 0.3s ease;
  letter-spacing: -0.02em;
}

.trusted-logo:hover {
  opacity: 1;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section headings
   ========================================================================== */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 16px;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features {
  padding: 120px 0;
}

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

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-default);
  background: var(--bg-elevated);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(0, 229, 212, 0.08);
  border: 1px solid rgba(0, 229, 212, 0.2);
  border-radius: 12px;
  color: var(--accent-primary);
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

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

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats {
  padding: 100px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   How It Works
   ========================================================================== */
.how-it-works {
  padding: 120px 0;
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  position: relative;
}

.step {
  position: relative;
  padding: 32px;
  text-align: left;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-primary);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.step-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--accent-primary);
  box-shadow: inset 0 0 20px rgba(0, 229, 212, 0.05);
}

.step-icon svg {
  width: 28px;
  height: 28px;
}

.step h3 {
  margin-bottom: 12px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
  padding: 120px 0;
}

.cta-box {
  background: linear-gradient(135deg, rgba(0, 229, 212, 0.08) 0%, rgba(67, 97, 238, 0.08) 100%);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  padding: 80px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  pointer-events: none;
}

.cta-box > * {
  position: relative;
  z-index: 2;
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto 32px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 32px;
  position: relative;
  z-index: 2;
}

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

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 20px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.footer-social a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 229, 212, 0.05);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in.delay-1 { animation-delay: 0.1s; }
.fade-in.delay-2 { animation-delay: 0.2s; }
.fade-in.delay-3 { animation-delay: 0.3s; }
.fade-in.delay-4 { animation-delay: 0.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .cta-box {
    padding: 48px 24px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 40px);
  }

  .features, .how-it-works, .cta-section {
    padding: 80px 0;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
