/* ======================
   Professional Design System
   ====================== */

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

:root {
  /* Professional Color Palette - Matching Icon */
  --color-brand: #3b82f6;
  --color-brand-dark: #1e40af;
  --color-brand-light: #60a5fa;
  --color-accent: #06b6d4;

  /* Neutral Scale */
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;

  /* Typography */
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Typography Scale */
  --text-xs: 0.75rem; /* 12px */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.125rem; /* 18px */
  --text-xl: 1.25rem; /* 20px */
  --text-2xl: 1.5rem; /* 24px */
  --text-3xl: 1.875rem; /* 30px */
  --text-4xl: 2.25rem; /* 36px */
  --text-5xl: 3rem; /* 48px */

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.75;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;
  --space-32: 8rem;

  /* Shadows */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 0.375rem; /* 6px */
  --radius-md: 0.5rem; /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem; /* 16px */
  --radius-2xl: 1.5rem; /* 24px */
  --radius-full: 9999px;

  /* Nav Height */
  --nav-height: 80px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-900);
  background: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Rounds 1-10: Mobile Performance Enhancements */
  -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
  -webkit-touch-callout: none;

  /* iOS Safe Area Insets - Rounds 11-15 */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);

  /* Rounds 16-20: Improved touch scrolling */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;

  /* Rounds 21-25: Text optimization for mobile */
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-brand);
  color: white;
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Scroll Progress Indicator - Rounds 211-220 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-accent));
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Visually Hidden (Screen Reader Only) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-200);
  transition: all var(--transition-base) ease;
}

@supports not (backdrop-filter: blur(12px)) {
  .header {
    background: rgba(255, 255, 255, 0.98);
  }
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-gray-900);
}

.nav-logo svg {
  display: block;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--color-gray-600);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--color-gray-900);
}

.nav-menu a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.nav-cta {
  background: var(--color-brand);
  color: white !important;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--color-brand-dark);
  transform: translateY(-1px);
  will-change: transform;
}

@media (hover: hover) {
  .nav-cta:hover {
    transform: translateY(-1px);
  }
}

.nav-cta:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--color-gray-900);
  transition: all 0.3s;
  border-radius: 2px;
}

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

.hero {
  position: relative;
  padding: calc(80px + var(--space-24)) 0 var(--space-32);
  background: var(--color-gray-50);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.4;
}

.hero-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    linear-gradient(var(--color-gray-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-gray-200) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    black 40%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    black 40%,
    transparent 100%
  );
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: 3rem;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-gray-900);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-gray-600);
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-brand);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  will-change: transform;
}

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
  }
}

.btn-primary:focus-visible {
  outline: 3px solid var(--color-brand-light);
  outline-offset: 2px;
}

/* Rounds 211-220: Enhanced button micro-interactions */
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary {
  background: white;
  color: var(--color-gray-900);
  border-color: var(--color-gray-300);
}

.btn-secondary:hover {
  border-color: var(--color-gray-400);
  transform: translateY(-2px);
  will-change: transform;
}

@media (hover: hover) {
  .btn-secondary:hover {
    transform: translateY(-2px);
  }
}

.btn-secondary:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

.btn-secondary:active {
  transform: translateY(0);
  background: var(--color-gray-50);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Size Variants */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.hero-stats {
  display: flex;
  gap: var(--space-10);
}

.stat {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: 14px;
  color: var(--color-gray-600);
}

.hero-proof {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-200);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-8);
}

.hero-callouts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-callout {
  text-align: left;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: white;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-gray-700);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast);
  font-family: inherit;
}

.hero-callout:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

.hero-callout.active {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
  color: var(--color-gray-900);
  font-weight: 500;
}

.hero-meta {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  align-self: flex-start;
}

.hero-meta-headline {
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-gray-900);
}

.hero-meta-copy {
  font-size: 14px;
  color: var(--color-gray-600);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin-bottom: var(--space-3);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  min-height: 620px;
}

.device-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 620px;
}

.device-frame {
  position: absolute;
  width: 290px;
  padding: var(--space-3);
  border-radius: calc(var(--radius-2xl) + 8px);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(30, 64, 175, 0.9)
  );
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.4;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    z-index 0s 0.2s;
  will-change: transform, opacity;
}

.device-frame.active {
  opacity: 1;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.4);
  border-color: rgba(59, 130, 246, 0.5);
  z-index: 10 !important;
  transform: scale(1.02);
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    z-index 0s 0s;
}

.device-frame img {
  width: 100%;
  display: block;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.device-frame.primary {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.device-frame.primary.active {
  transform: translateX(-50%) scale(1.02);
}

.device-frame.secondary {
  top: 70px;
  left: 0;
  z-index: 2;
}

.device-frame.secondary.active {
  transform: translateX(10px) scale(1.02);
}

.device-frame.tertiary {
  top: 140px;
  right: 0;
  z-index: 1;
}

.device-frame.tertiary.active {
  transform: translateX(-10px) scale(1.02);
}

.device-frame:not(.active):hover {
  opacity: 0.6;
  transform: translateY(-4px);
  box-shadow: 0 35px 70px rgba(15, 23, 42, 0.3);
}

/* ======================
   Social Proof Section
   ====================== */

.social-proof {
  padding: var(--space-20) 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

.social-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.social-proof-stat {
  text-align: center;
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.social-proof-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-brand);
  margin-bottom: var(--space-2);
  line-height: 1;
}

.stat-text {
  font-size: 14px;
  color: var(--color-gray-600);
  font-weight: 500;
}

@media (max-width: 900px) {
  .social-proof-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (max-width: 640px) {
  .social-proof-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stat-number {
    font-size: 2rem;
  }
}

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

.features {
  padding: var(--space-32) 0;
}

.section-header-large {
  max-width: 800px;
  margin-bottom: var(--space-16);
}

.section-header-large.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.section-header-large h2 {
  font-size: 2.5rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
}

/* Asymmetric Feature Layout */
.features-asymmetric {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-8);
}

.feature-large {
  background: var(--color-gray-50);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.feature-visual {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-visual {
  width: 100%;
  height: 200px;
  position: relative;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  height: 100%;
}

.chart-bar {
  flex: 1;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

@media (hover: hover) {
  .chart-bar:hover {
    opacity: 0.8;
    transform: translateY(-4px);
    will-change: transform;
  }
}

.feature-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
}

.feature-content p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-gray-600);
}

/* Small Features Grid */
.features-grid-small {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.feature-small {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

@media (hover: hover) {
  .feature-small:hover {
    border-color: var(--color-brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    will-change: transform;
  }
}

.feature-icon-modern {
  margin-bottom: var(--space-5);
}

.feature-small h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-3);
}

.feature-small p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-gray-600);
}

/* ======================
   Proof Section
   ====================== */

.proof {
  padding: var(--space-32) 0;
  background: var(--color-gray-50);
}

.proof-header {
  max-width: 760px;
  margin-bottom: var(--space-12);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.proof-metric {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
  padding: var(--space-8);
}

.metric-value {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}

.proof-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.proof-card ul {
  padding-left: var(--space-6);
  color: var(--color-gray-700);
  line-height: 1.6;
}

.proof-note {
  font-size: 14px;
  color: var(--color-gray-500);
}

/* ======================
   How It Works
   ====================== */

.how-it-works {
  padding: var(--space-32) 0;
  background: var(--color-gray-50);
}

.process-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: var(--space-8);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.process-step {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--color-gray-200);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--color-brand);
  color: white;
  border-radius: var(--radius-lg);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-5);
}

.process-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-3);
}

.process-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-600);
}

.process-connector {
  width: 40px;
  height: 2px;
  background: var(--color-gray-300);
  position: relative;
}

.process-connector::after {
  content: "";
  position: absolute;
  right: -6px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--color-gray-300);
  border-right: 2px solid var(--color-gray-300);
  transform: rotate(45deg);
}

/* ======================
   Gallery Section
   ====================== */

.gallery {
  padding: var(--space-32) 0;
  background: linear-gradient(to bottom, #f8fafc 0%, white 100%);
}

/* Hero Featured Screenshots */
.gallery-hero {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-16);
}

.gallery-card-hero {
  background: white;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.gallery-card-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
}

@media (hover: hover) {
  .gallery-card-hero:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
  }

  .gallery-card-hero:hover::before {
    opacity: 1;
  }

  .gallery-card-hero:hover .device-mockup {
    transform: scale(1.02);
  }
}

.gallery-card-hero figcaption {
  margin-top: var(--space-6);
  position: relative;
  z-index: 1;
}

.gallery-card-hero figcaption h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.gallery-card-hero figcaption p {
  font-size: 15px;
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* Regular Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.gallery-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }

  .gallery-card:hover .device-mockup {
    transform: scale(1.03);
  }
}

.gallery-card figcaption {
  margin-top: var(--space-4);
  font-size: 14px;
  color: var(--color-gray-600);
  text-align: center;
  line-height: 1.5;
}

/* Device Mockup (iPhone Frame) */
.device-mockup {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-mockup-frame {
  position: relative;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 0 0 3px #1a1a1a,
    0 20px 40px rgba(0, 0, 0, 0.3);
}

.device-mockup-frame::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 25px;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.device-mockup-screen {
  position: relative;
  background: white;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 290 / 626;
}

.device-mockup-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-note {
  margin-top: var(--space-12);
  text-align: center;
  color: var(--color-gray-600);
  font-size: 15px;
  padding: var(--space-6);
  background: rgba(59, 130, 246, 0.05);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.gallery-note strong {
  color: var(--color-gray-900);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
  animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  animation: lightboxSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.lightbox-device-mockup {
  max-height: calc(90vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-device-frame {
  position: relative;
  background: #1a1a1a;
  border-radius: 50px;
  padding: 16px;
  box-shadow:
    0 0 0 3px #333,
    0 0 0 4px #1a1a1a,
    0 30px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-device-frame::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.lightbox-device-screen {
  position: relative;
  background: white;
  border-radius: 40px;
  overflow: hidden;
  max-height: calc(90vh - 150px);
}

.lightbox-device-screen img {
  display: block;
  height: auto;
  max-height: calc(90vh - 150px);
  width: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.2s ease;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  text-align: center;
  color: white;
  max-width: 600px;
}

.lightbox-caption p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.lightbox-counter {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* ======================
   Testimonials
   ====================== */

.testimonials {
  padding: var(--space-32) 0;
  background: var(--color-gray-900);
  color: white;
}

.testimonials .section-header-large h2,
.testimonials .section-header-large p {
  color: white;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.testimonial-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.testimonial-card blockquote {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 500;
}

.testimonial-card .name {
  display: block;
  font-weight: 600;
  color: white;
}

.testimonial-card .title {
  font-size: 14px;
  color: var(--color-gray-300);
}

.reality-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: white;
}

.reality-card ul {
  list-style: disc;
  padding-left: var(--space-6);
  color: var(--color-gray-200);
  line-height: 1.6;
  font-size: 16px;
}

.reality-card li + li {
  margin-top: var(--space-2);
}

/* ======================
   Privacy Section
   ====================== */

.privacy {
  padding: var(--space-32) 0;
}

.privacy-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.privacy-content {
  max-width: 600px;
}

.privacy-lead {
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-gray-700);
  margin: var(--space-6) 0 var(--space-10);
}

.privacy-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.privacy-feature {
  display: flex;
  gap: var(--space-5);
}

.privacy-feature svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.privacy-feature h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
}

.privacy-feature p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-600);
}

.privacy-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-visual {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-50);
  border-radius: var(--radius-2xl);
}

/* ======================
   Download Section
   ====================== */

.download {
  padding: var(--space-24) 0;
  background: var(--color-gray-900);
  color: white;
}

.download-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.download-content h2 {
  font-size: 2.5rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-5);
}

.download-content > p {
  font-size: 20px;
  color: var(--color-gray-300);
  margin-bottom: var(--space-10);
}

.beta-badge {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--color-brand),
    var(--color-brand-light)
  );
  color: white;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-6);
}

.beta-signup-form {
  max-width: 600px;
  margin: 0 auto var(--space-10);
}

.form-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.input-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.email-input {
  flex: 1;
  padding: var(--space-5) var(--space-6);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all var(--transition-base);
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  opacity: 1; /* Firefox fix */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.email-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-brand-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-input:focus-visible {
  outline: 2px solid var(--color-brand-light);
  outline-offset: 2px;
}

.email-input:hover:not(:focus) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.beta-submit {
  white-space: nowrap;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 14px;
  color: var(--color-gray-100);
  margin-bottom: var(--space-4);
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--color-brand);
  cursor: pointer;
  min-width: 18px;
  min-height: 18px;
}

.consent-checkbox span {
  line-height: 1.5;
}

.form-note {
  font-size: 14px;
  color: var(--color-gray-300);
  line-height: 1.6;
  text-align: center;
}

.form-feedback {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--color-gray-100);
}

/* Rounds 601-650: Enhanced Form Validation States */
.input-error,
.email-input.error,
input.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.input-error:focus,
.email-input.error:focus,
input.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-success,
.email-input.success,
input.success {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.input-success:focus,
.email-input.success:focus,
input.success:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.validation-message {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.validation-message.error {
  color: #ef4444;
}

.validation-message.success {
  color: #10b981;
}

.validation-message.warning {
  color: #f59e0b;
}

/* Character Counter - Rounds 601-650 */
.character-counter {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  text-align: right;
  margin-top: var(--space-1);
}

.character-counter.near-limit {
  color: #f59e0b;
  font-weight: 600;
}

.character-counter.at-limit {
  color: #ef4444;
  font-weight: 600;
}

.email-suggestion {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-gray-200);
}

.email-suggestion strong {
  color: white;
  font-weight: 600;
}

.use-suggestion {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  margin-left: var(--space-2);
  transition: all var(--transition-fast);
}

.use-suggestion:hover {
  background: rgba(251, 191, 36, 0.3);
  border-color: rgba(251, 191, 36, 0.5);
}

.beta-info {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  flex-wrap: wrap;
}

.beta-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-gray-300);
  font-size: 15px;
}

.beta-info-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Download Share Section */
.download-share {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.share-label {
  font-size: 14px;
  color: var(--color-gray-400);
  margin-bottom: var(--space-4);
}

.share-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.share-button {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.share-button:focus-visible {
  outline: 2px solid var(--color-brand-light);
  outline-offset: 2px;
}

.share-button:active {
  transform: translateY(0);
}

/* ======================
   FAQ
   ====================== */

.faq {
  padding: var(--space-32) 0;
  background: var(--color-gray-50);
}

.faq-accordion {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-accordion-item {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-accordion-item:hover {
  border-color: var(--color-gray-300);
  box-shadow: var(--shadow-sm);
}

.faq-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition-fast);
}

.faq-accordion-header:hover {
  background: var(--color-gray-50);
}

.faq-accordion-header:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: -2px;
}

.faq-accordion-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin: 0;
  flex: 1;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--color-gray-400);
  transition: transform var(--transition-base);
}

.faq-accordion-header[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  color: var(--color-brand);
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease-out;
}

.faq-accordion-item.active .faq-accordion-content {
  max-height: 500px;
  transition: max-height var(--transition-base) ease-in;
}

.faq-accordion-content p {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-gray-600);
  line-height: 1.7;
  margin: 0;
}

/* Legacy support for old FAQ grid (if needed) */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.faq-item {
  background: white;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.faq-item h3 {
  margin-bottom: var(--space-3);
  font-size: 18px;
  color: var(--color-gray-900);
}

.faq-item p {
  color: var(--color-gray-600);
  line-height: 1.7;
}

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

.footer {
  background: var(--color-gray-900);
  color: white;
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: var(--space-4);
}

.footer-section p {
  color: var(--color-gray-400);
  line-height: 1.7;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  color: var(--color-gray-300);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--space-3);
}

.footer-section a {
  color: var(--color-gray-300);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: white;
}

.footer-section a:focus-visible {
  outline: 2px solid var(--color-brand-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-800);
  padding-top: var(--space-8);
  text-align: center;
  color: var(--color-gray-400);
  font-size: 14px;
}

/* ======================
   Problem Section
   ====================== */

.problem {
  padding: var(--space-32) 0;
  background: white;
}

.problem-content {
  max-width: 1100px;
  margin: 0 auto;
}

.problem-intro {
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-gray-700);
  margin: var(--space-6) 0 var(--space-12);
  max-width: 800px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.problem-item {
  padding: var(--space-8);
  background: var(--color-gray-50);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
}

.problem-item h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
}

.problem-item p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-600);
}

.problem-item sup a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
}

.problem-item sup a:hover {
  text-decoration: underline;
}

/* ======================
   Science Section
   ====================== */

.science {
  padding: var(--space-32) 0;
  background: var(--color-gray-50);
}

.section-header-large p {
  font-size: 18px;
  color: var(--color-gray-600);
  margin-top: var(--space-4);
}

.proof-grid {
  grid-template-columns: 1fr;
}
.science-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1100px;
  margin: 0 auto;
}

.science-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
  position: relative;
  padding-top: var(--space-12);
}

.science-number {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: var(--color-gray-100);
  color: var(--color-gray-500);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 700;
}

.science-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
  padding-right: 60px;
}

.science-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-gray-600);
}

.science-card sup a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
}

.science-card sup a:hover {
  text-decoration: underline;
}

/* ======================
   References Section
   ====================== */

.references {
  padding: var(--space-16) 0;
  background: var(--color-gray-900);
  color: white;
}

.references h3 {
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-6);
  color: var(--color-gray-300);
}

.references-list {
  max-width: 900px;
  padding-left: var(--space-8);
  list-style-position: outside;
}

.references-list li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray-300);
  margin-bottom: var(--space-4);
}

.references-list a {
  color: var(--color-brand-light);
  text-decoration: none;
}

.references-list a:hover {
  text-decoration: underline;
}

.references-list a:focus-visible {
  outline: 2px solid var(--color-brand-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.references-list em {
  font-style: italic;
}

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

/* Large Tablet Landscape (900-1024px) */
@media (max-width: 1024px) and (min-width: 901px) {
  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-12);
  }

  .science-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
}

/* Tablet (768-900px) */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .hero-visual {
    min-height: 520px;
  }

  .device-stack {
    max-width: 360px;
    min-height: 520px;
  }

  .device-frame {
    width: 250px;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

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

  .process-flow {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .process-connector {
    width: 2px;
    height: 40px;
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .privacy-split {
    grid-template-columns: 1fr;
  }

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

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

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

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

/* Small Tablet (640-768px) */
@media (max-width: 768px) and (min-width: 641px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

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

/* Mobile and Small Tablets (max 768px) */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: var(--space-8);
    gap: var(--space-6);
    transition: left var(--transition-base);
    border-top: 1px solid var(--color-gray-200);
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }

  .gallery-hero {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

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

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

/* Mobile (480-640px) */
@media (max-width: 640px) {
  .hero {
    padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-20);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .device-stack {
    max-width: 320px;
    min-height: auto;
  }

  .device-frame {
    position: relative;
    width: 100%;
    left: auto;

    .form-group {
      grid-template-columns: 1fr;
    }
    right: auto;
    top: auto;
    transform: none;
    margin: 0 auto var(--space-6);
  }

  .device-frame + .device-frame {
    margin-top: var(--space-6);
  }
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

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

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

  .beta-submit {
    width: 100%;
  }

  .beta-info {
    flex-direction: column;
    align-items: center;
  }

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

  .gallery-card-hero figcaption h3 {
    font-size: 18px;
  }

  .gallery-card-hero figcaption p {
    font-size: 14px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .hero-proof {
    gap: var(--space-5);
  }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stat-value {
    font-size: 24px;
  }
}

/* ======================
   Back to Top Button
   ====================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: var(--color-brand);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  opacity: 0;
  visibility: hidden;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-brand-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.back-to-top:focus-visible {
  outline: 3px solid var(--color-brand-light);
  outline-offset: 3px;
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 20px;
  }
}

/* ======================
   Comparison Table
   ====================== */

.comparison {
  padding: var(--space-32) 0;
  background: white;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 15px;
}

.comparison-table thead {
  background: var(--color-gray-50);
}

.comparison-table th {
  padding: var(--space-6);
  text-align: left;
  font-weight: 600;
  color: var(--color-gray-900);
  border-bottom: 2px solid var(--color-gray-200);
}

.comparison-table th.feature-col {
  width: 25%;
}

.comparison-table th.product-col {
  width: 25%;
  text-align: center;
}

.comparison-table th.highlight {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  position: relative;
}

.product-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand);
}

.product-badge {
  display: inline-block;
  background: var(--color-brand);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--color-gray-200);
  transition: background var(--transition-fast);
}

.comparison-table tbody tr:hover {
  background: var(--color-gray-50);
}

.comparison-table td {
  padding: var(--space-5);
  color: var(--color-gray-700);
  vertical-align: top;
}

.comparison-table td.feature-name {
  font-weight: 600;
  color: var(--color-gray-900);
}

.comparison-table td.highlight {
  background: linear-gradient(135deg, #f0f9ff, #f8fafc);
  text-align: center;
  font-weight: 500;
  color: var(--color-gray-900);
}

.comparison-table td strong {
  color: var(--color-brand);
  display: block;
  margin-bottom: var(--space-1);
}

.comparison-table td small {
  display: block;
  color: var(--color-gray-500);
  font-size: 13px;
  margin-top: var(--space-1);
}

.comparison-note {
  text-align: center;
  font-size: 15px;
  color: var(--color-gray-600);
  font-style: italic;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 14px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-3);
  }

  .product-name {
    font-size: 16px;
  }
}

/* ======================
   Keyboard Shortcuts Hint
   ====================== */

.keyboard-hint {
  position: fixed;
  bottom: 100px;
  left: 30px;
  background: white;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-5);
  max-width: 280px;
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
}

.keyboard-hint.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.keyboard-hint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-gray-200);
}

.keyboard-hint-header strong {
  color: var(--color-gray-900);
  font-size: 14px;
}

.keyboard-hint-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--color-gray-400);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.keyboard-hint-close:hover {
  color: var(--color-gray-700);
}

.keyboard-hint-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.keyboard-hint-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--color-gray-700);
}

.keyboard-hint-list kbd {
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gray-700);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.keyboard-hint-list span {
  flex: 1;
  color: var(--color-gray-600);
}

@media (max-width: 768px) {
  .keyboard-hint {
    left: 20px;
    right: 20px;
    max-width: none;
    bottom: 80px;
  }
}

/* ======================
   Micro-animations
   ====================== */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ======================
   Loading Overlay
   ====================== */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.loading-overlay.fade-out {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.loading-spinner {
  text-align: center;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto var(--space-4);
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* ======================
   Accessibility Improvements
   ====================== */

/* High Contrast Focus Indicators */
*:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

/* Reduce Motion Support */
@media (prefers-reduced-motion: reduce) {
  .social-proof-stat,
  .faq-accordion-item,
  .gallery-card,
  .back-to-top,
  .toast,
  .keyboard-hint {
    transition: none !important;
    animation: none !important;
  }
}

/* Dark Mode Support (prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Note: Full dark mode would require extensive changes.
       This is a placeholder for future dark mode support. */
  }
}

/* Print Styles */
@media print {
  .header,
  .back-to-top,
  .keyboard-hint,
  .toast,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  .hero,
  .proof,
  .comparison,
  .science {
    page-break-inside: avoid;
  }
}

/* ======================
   Toast Notifications
   ====================== */

.toast {
  position: fixed;
  bottom: 80px;
  right: 30px;
  background: var(--color-gray-900);
  color: white;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: #10b981;
}

.toast-error {
  background: #ef4444;
}

.toast-warning {
  background: #f59e0b;
}

.toast-info {
  background: var(--color-brand);
}

@media (max-width: 768px) {
  .toast {
    bottom: 70px;
    right: 20px;
    left: 20px;
    max-width: none;
  }
}

/* ======================
   Legal Pages (Privacy/Terms)
   ====================== */

.legal-main {
  padding-top: calc(var(--nav-height) + var(--space-8));
}

/* Breadcrumb Navigation */
.breadcrumb {
  max-width: 800px;
  margin: 0 auto var(--space-6);
  padding: 0 var(--space-6);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '→';
  margin-left: var(--space-2);
  color: var(--color-gray-400);
}

.breadcrumb a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-gray-600);
}

/* Table of Contents */
.table-of-contents {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.toc-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-4);
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2);
}

.toc-list li {
  margin: 0;
}

.toc-list a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-gray-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-size: 15px;
}

.toc-list a:hover {
  background: white;
  color: var(--color-brand);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  line-height: var(--leading-loose);
}

.policy-content h1 {
  color: var(--color-brand);
  margin-bottom: var(--space-4);
  font-size: var(--text-4xl);
  font-weight: 700;
}

.policy-content h2 {
  color: var(--color-gray-900);
  margin: var(--space-8) 0 var(--space-4) 0;
  font-size: var(--text-2xl);
  font-weight: 600;
  border-bottom: 2px solid var(--color-brand);
  padding-bottom: var(--space-2);
}

.policy-content h3 {
  color: var(--color-gray-900);
  margin: var(--space-6) 0 var(--space-3) 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.policy-content p {
  margin-bottom: var(--space-4);
  color: var(--color-gray-700);
}

.policy-content ul {
  margin: var(--space-4) 0;
  padding-left: var(--space-8);
}

.policy-content li {
  margin-bottom: var(--space-2);
  color: var(--color-gray-700);
}

.last-updated {
  font-style: italic;
  color: var(--color-gray-600);
  margin-bottom: var(--space-8);
  padding: var(--space-4);
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
}

.contact-info {
  background: var(--color-gray-50);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin: var(--space-8) 0;
}

.policy-footer-note {
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-gray-600);
}

.highlight-box {
  background: #dbeafe;
  border: 1px solid var(--color-brand);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}

@media (max-width: 640px) {
  .policy-content {
    padding: var(--space-6) var(--space-4);
  }

  .policy-content h1 {
    font-size: var(--text-3xl);
  }

  .policy-content h2 {
    font-size: var(--text-xl);
  }
}

/* ===== Rounds 7-10: Accessibility Improvements ===== */

/* Enhanced Focus Styles */
*:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip Link Improvements */
.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  overflow: visible;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10002;
  background: var(--color-brand);
  color: white;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
}

/* Form Label Associations & Accessibility */
label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--color-gray-900);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-gray-600: #000;
    --color-gray-700: #000;
  }
  
  button,
  .btn {
    border: 2px solid currentColor;
  }
}

/* Focus Within for Containers */
.nav-menu:focus-within,
.beta-form:focus-within {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ===== ROUNDS 51-100: Accessibility & Semantics ===== */

/* Rounds 56-60: Color Contrast Enhancements */
:root {
  --color-text-high-contrast: #000000;
  --color-bg-high-contrast: #ffffff;
  --min-tap-target: 44px;
}

/* Rounds 61-65: Touch Target Sizes */
button, .btn, a[href], input, select, textarea {
  min-height: var(--min-tap-target);
  min-width: var(--min-tap-target);
}

.btn-primary, .btn-secondary {
  min-height: 48px;
  min-width: 120px;
}

/* Rounds 66-70: Link Underlines for Clarity */
a:not(.btn):not(.nav-logo):not(.skip-link) {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

/* Rounds 71-75: Landmark Regions */
[role="banner"], [role="main"], [role="contentinfo"], [role="navigation"] {
  position: relative;
}

/* Rounds 76-80: Heading Hierarchy Visual Cues */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(0.9rem, 1.5vw, 1.1rem); }

/* Rounds 81-85: List Styles for Readability */
ul, ol {
  line-height: 1.8;
}

li + li {
  margin-top: 0.5rem;
}

/* Rounds 86-90: Table Accessibility */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  text-align: left;
  font-weight: 600;
  background: var(--color-gray-100);
  padding: var(--space-3);
}

td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-gray-200);
}

/* Rounds 91-95: Form Field Spacing */
.form-group + .form-group {
  margin-top: var(--space-4);
}

input, textarea, select {
  font-size: 16px; /* Prevents zoom on iOS */
}

/* ========================================
   Rounds 701-750: Notification System
   ======================================== */

.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  min-width: 300px;
  max-width: 500px;
  padding: var(--space-4) var(--space-5);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

.toast.info {
  border-left: 4px solid var(--color-brand);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-1);
}

.toast-message {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-gray-400);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toast-close:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

/* Alert Banners */
.alert-banner {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.alert-banner.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #1e40af;
}

.alert-banner.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

.alert-banner.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #92400e;
}

.alert-banner.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

/* ========================================
   Rounds 241-250: Loading States
   ======================================== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 25%,
    var(--color-gray-100) 50%,
    var(--color-gray-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--color-brand);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========================================
   Rounds 401-500: Animation Utilities
   ======================================== */

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

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

.scale-in {
  animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* ========================================
   Rounds 851-900: Cookie Consent & Privacy
   ======================================== */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  padding: var(--space-5) var(--space-6);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.cookie-content h3 {
  font-size: var(--text-lg);
  color: var(--color-gray-900);
  margin: 0 0 var(--space-2) 0;
}

.cookie-content p {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  margin: 0;
  line-height: 1.6;
}

.cookie-content a {
  color: var(--color-brand);
  text-decoration: underline;
}

.cookie-content a:hover {
  color: var(--color-brand-dark);
}

.cookie-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
  }
}

/* Rounds 96-100: Print Styles Enhancement */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]::after {
    content: " (" attr(title) ")";
  }
  
  thead {
    display: table-header-group;
  }
  
  tr, img {
    page-break-inside: avoid;
  }
  
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }

  .header, .footer, .nav-menu, .back-to-top, .cookie-consent {
    display: none;
  }
}

/* ==============================================================
   MOBILE EXPERIENCE OPTIMIZATION - Rounds 71-1000
   Focus: Mobile-first optimizations across all pages
   ============================================================== */

/* Rounds 71-80: Enhanced Link Touch Targets */
a:not(.btn):not(.nav-logo) {
  position: relative;
  -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
  a:not(.btn):not(.nav-logo) {
    padding: var(--space-2);
    margin: calc(var(--space-2) * -1);
  }
}

/* Rounds 81-90: Social Proof Stat Touch Enhancement */
@media (max-width: 768px) {
  .social-proof-stat {
    min-height: 120px;
    padding: var(--space-8);
  }
}

/* Rounds 91-95: Gallery Card Mobile Optimization */
@media (max-width: 640px) {
  .gallery-card,
  .gallery-card-hero {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    cursor: pointer;
  }
}

/* Rounds 101-110: Mobile Navigation Enhanced Animations */
@media (max-width: 768px) {
  .nav-menu {
    /* Smooth slide-in animation */
    will-change: transform;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.active {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  /* Hamburger animation */
  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* Rounds 111-125: Mobile Menu Item Spacing */
@media (max-width: 768px) {
  .nav-menu li {
    border-bottom: 1px solid var(--color-gray-100);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a {
    padding: var(--space-5) var(--space-6);
    min-height: 56px;
    width: 100%;
    font-size: var(--text-lg);
  }

  .nav-cta {
    margin: var(--space-4) var(--space-6);
    width: calc(100% - var(--space-12));
    justify-content: center;
  }

  /* Mobile touch target optimizations for buttons */
  .btn {
    min-height: 48px;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.15);
  }

  /* Hamburger menu touch targets */
  .nav-toggle {
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
  }

  /* Hero callout touch optimization */
  .hero-callout {
    min-height: 56px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
  }

  /* FAQ touch optimization */
  .faq-accordion-header {
    min-height: 64px;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    touch-action: manipulation;
  }
}

/* Rounds 126-150: Typography Optimization for Mobile */
@media (max-width: 640px) {
  /* Improved readability on small screens */
  body {
    font-size: 16px; /* Prevents iOS zoom on input focus */
    line-height: 1.6;
  }

  h1, .hero-title {
    font-size: clamp(2rem, 8vw, 2.75rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  h2, .section-header-large h2 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.25;
  }

  h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    line-height: 1.3;
  }

  p, .hero-subtitle {
    font-size: 16px;
    line-height: 1.65;
    max-width: 100%;
  }

  /* Better line length for reading */
  .policy-content p,
  .proof-card p,
  .faq-accordion-content p {
    max-width: 65ch;
  }
}

/* Rounds 151-175: Mobile Spacing Improvements */
@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-5);
  }

  /* Section padding adjustments */
  .hero,
  .features,
  .proof,
  .how-it-works,
  .comparison,
  .science,
  .privacy,
  .faq,
  .download {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .social-proof {
    padding: var(--space-12) 0;
  }

  /* Card spacing */
  .feature-small,
  .proof-card,
  .science-card,
  .testimonial-card {
    padding: var(--space-6);
  }

  .feature-large {
    padding: var(--space-8);
  }
}

/* Rounds 176-200: Hero Section Mobile Enhancements */
@media (max-width: 640px) {
  .hero-badge {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
  }

  .hero-buttons .btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    min-height: 52px;
  }

  .hero-stats .stat {
    text-align: center;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 13px;
  }

  .hero-callouts {
    gap: var(--space-4);
  }

  .hero-callout {
    padding: var(--space-5);
    min-height: 64px;
    font-size: 16px;
  }

  .hero-meta {
    padding: var(--space-6);
  }

  .hero-meta-headline {
    font-size: 15px;
  }

  .hero-meta-copy {
    font-size: 13px;
  }
}

/* Rounds 201-225: Mobile Typography Line-Height & Letter-Spacing */
@media (max-width: 640px) {
  .btn {
    letter-spacing: 0.01em;
  }

  .section-label {
    font-size: 12px;
    letter-spacing: 0.08em;
  }

  .eyebrow {
    font-size: 11px;
  }

  /* Improve readability of lists */
  ul, ol {
    padding-left: var(--space-6);
  }

  li {
    margin-bottom: var(--space-3);
    line-height: 1.7;
  }

  /* Better list spacing in policy pages */
  .policy-content li {
    margin-bottom: var(--space-4);
  }
}

/* Rounds 226-250: Form Mobile Optimization */
@media (max-width: 640px) {
  input[type="email"],
  input[type="text"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom */
    min-height: 52px;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    -webkit-appearance: none;
    appearance: none;
  }

  textarea {
    min-height: 120px;
  }

  label {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: var(--space-3);
    display: block;
  }

  .consent-checkbox {
    min-height: 48px;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .consent-checkbox input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
  }

  .consent-checkbox span {
    font-size: 14px;
    line-height: 1.6;
  }
}

/* Rounds 251-275: Download Section Mobile Enhancements */
@media (max-width: 640px) {
  .download-content {
    padding: var(--space-8) var(--space-5);
  }

  .beta-badge {
    font-size: 12px;
    padding: var(--space-2) var(--space-4);
  }

  .beta-signup-form .input-stack {
    gap: var(--space-3);
  }

  .email-input {
    width: 100%;
  }

  .beta-info {
    flex-direction: column;
    gap: var(--space-4);
  }

  .beta-info-item {
    min-height: 48px;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .share-buttons {
    width: 100%;
    justify-content: center;
  }

  .share-button {
    min-width: 48px;
    min-height: 48px;
    padding: var(--space-3);
  }
}

/* Rounds 276-300: Image & Gallery Mobile Optimization */
@media (max-width: 640px) {
  img {
    max-width: 100%;
    height: auto;
    /* Optimize image rendering on mobile */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  .device-frame img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .gallery-card {
    padding: var(--space-4);
  }

  .gallery-card figcaption {
    font-size: 14px;
    padding: var(--space-4);
  }

  .device-mockup-screen img {
    border-radius: var(--radius-xl);
  }
}

/* Rounds 301-325: Lightbox Mobile Optimization */
@media (max-width: 640px) {
  .lightbox {
    padding: var(--space-4);
  }

  .lightbox-content {
    padding: var(--space-4);
  }

  .lightbox-close {
    width: 48px;
    height: 48px;
    top: var(--space-4);
    right: var(--space-4);
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-full);
  }

  .lightbox-nav {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-full);
  }

  .lightbox-prev {
    left: var(--space-4);
  }

  .lightbox-next {
    right: var(--space-4);
  }

  .lightbox-caption {
    padding: var(--space-5);
    font-size: 14px;
  }

  .lightbox-counter {
    font-size: 13px;
  }
}

/* Rounds 326-350: Table Mobile Responsiveness */
@media (max-width: 640px) {
  .comparison-table-wrapper {
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--space-5) * -1);
    padding: 0 var(--space-5);
  }

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-3) var(--space-2);
    min-width: 100px;
  }

  .comparison-table th.feature-col,
  .comparison-table td.feature-name {
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
  }

  .comparison-table thead th.feature-col {
    background: var(--color-gray-50);
  }

  .product-name {
    font-size: 14px;
  }

  .product-badge {
    font-size: 9px;
    padding: 2px var(--space-2);
  }
}

/* Rounds 351-375: Footer Mobile Optimization */
@media (max-width: 640px) {
  .footer {
    padding: var(--space-16) 0 var(--space-8);
  }

  .footer-content {
    gap: var(--space-10);
  }

  .footer-section {
    text-align: center;
  }

  .footer-section h4 {
    font-size: 16px;
    margin-bottom: var(--space-4);
  }

  .footer-section ul {
    gap: var(--space-3);
  }

  .footer-section a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) 0;
  }

  .footer-logo {
    gap: var(--space-2);
    justify-content: center;
  }

  .footer-bottom {
    padding-top: var(--space-8);
    font-size: 14px;
  }
}

/* Rounds 376-400: Testimonials & Proof Cards Mobile */
@media (max-width: 640px) {
  .testimonial-card,
  .proof-card {
    min-height: auto;
  }

  .testimonial-card h3,
  .proof-card h3 {
    font-size: 18px;
    margin-bottom: var(--space-4);
  }

  .testimonial-card ul,
  .proof-card ul {
    gap: var(--space-3);
  }

  .testimonial-card li,
  .proof-card li {
    font-size: 15px;
    line-height: 1.65;
  }

  .reality-card {
    padding: var(--space-6);
  }
}

/* Rounds 401-425: Process Flow Mobile Optimization */
@media (max-width: 640px) {
  .process-step {
    padding: var(--space-6);
  }

  .process-number {
    width: 48px;
    height: 48px;
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
  }

  .process-content h3 {
    font-size: 20px;
    margin-bottom: var(--space-3);
  }

  .process-content p {
    font-size: 15px;
    line-height: 1.7;
  }

  .process-connector {
    height: 32px;
  }
}

/* Rounds 426-450: FAQ Mobile Enhancements */
@media (max-width: 640px) {
  .faq-accordion {
    gap: var(--space-2);
  }

  .faq-accordion-item {
    border-radius: var(--radius-lg);
  }

  .faq-accordion-header {
    padding: var(--space-5);
    min-height: 72px;
    gap: var(--space-4);
  }

  .faq-accordion-header h3 {
    font-size: 16px;
    line-height: 1.4;
  }

  .faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
  }

  .faq-accordion-content {
    padding: 0 var(--space-5) var(--space-5);
  }

  .faq-accordion-content p {
    font-size: 15px;
    line-height: 1.7;
  }
}

/* Rounds 451-475: Science Section Mobile */
@media (max-width: 640px) {
  .science-card {
    padding: var(--space-6);
  }

  .science-number {
    font-size: var(--text-xl);
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-4);
  }

  .science-card h3 {
    font-size: 18px;
    margin-bottom: var(--space-3);
  }

  .science-card p {
    font-size: 15px;
    line-height: 1.7;
  }

  .science-card sup a {
    padding: var(--space-1);
    min-height: auto;
  }
}

/* Rounds 476-500: Privacy & Legal Pages Mobile */
@media (max-width: 640px) {
  .legal-main {
    padding-top: calc(var(--nav-height) + var(--space-8));
  }

  .policy-content {
    padding: var(--space-6) var(--space-5);
  }

  .policy-content h1 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    margin-bottom: var(--space-6);
  }

  .policy-content h2 {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    margin-top: var(--space-10);
    margin-bottom: var(--space-5);
  }

  .policy-content h3 {
    font-size: clamp(1.15rem, 4vw, 1.35rem);
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
  }

  .last-updated {
    font-size: 13px;
    padding: var(--space-3) var(--space-4);
  }

  .table-of-contents {
    padding: var(--space-6);
    margin: var(--space-6) 0;
  }

  .toc-title {
    font-size: 16px;
  }

  .toc-list a {
    padding: var(--space-3);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .breadcrumb {
    padding: var(--space-4) var(--space-5);
    font-size: 14px;
  }

  .contact-info {
    padding: var(--space-6);
  }

  .highlight-box {
    padding: var(--space-6);
    margin: var(--space-6) 0;
  }
}

/* Rounds 501-525: Performance - GPU Acceleration */
@media (max-width: 768px) {
  .hero-visual,
  .device-stack,
  .device-frame,
  .lightbox,
  .nav-menu {
    transform: translateZ(0);
    will-change: transform;
  }

  /* Optimize animations for mobile */
  @media (prefers-reduced-motion: no-preference) {
    .device-frame,
    .btn,
    .feature-small,
    .social-proof-stat {
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
  }
}

/* Rounds 526-550: Scroll Performance */
@media (max-width: 768px) {
  .hero-background,
  .hero-grid {
    will-change: auto;
    transform: translateZ(0);
  }

  /* Reduce paint on scroll */
  .header {
    contain: layout style;
  }

  .social-proof,
  .features,
  .proof,
  .how-it-works {
    contain: layout paint;
  }
}

/* Rounds 551-575: Touch Action Optimization */
@media (max-width: 768px) {
  /* Prevent double-tap zoom on specific elements */
  .btn,
  .nav-toggle,
  .faq-accordion-header,
  .hero-callout,
  .gallery-card,
  .share-button {
    touch-action: manipulation;
  }

  /* Allow horizontal scroll on tables */
  .comparison-table-wrapper {
    touch-action: pan-x pan-y;
  }

  /* Vertical scroll only for main content */
  main {
    touch-action: pan-y;
  }
}

/* Rounds 576-600: Visual Feedback Enhancements */
@media (max-width: 768px) {
  /* Active state for all interactive elements */
  .btn:active {
    transform: scale(0.97);
  }

  .nav-menu a:active {
    background: var(--color-gray-100);
  }

  .faq-accordion-header:active {
    background: var(--color-gray-100);
  }

  .gallery-card:active,
  .gallery-card-hero:active {
    transform: scale(0.98);
  }

  .share-button:active {
    transform: scale(0.9);
  }

  /* Ripple effect simulation */
  .btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
  }

  @keyframes ripple {
    to {
      transform: translate(-50%, -50%) scale(2);
      opacity: 0;
    }
  }
}

/* Rounds 601-625: Spacing Refinements - Thumbs Zone */
@media (max-width: 640px) {
  /* Optimize for thumb-friendly zones */
  .hero-buttons,
  .beta-info,
  .cookie-actions {
    padding-bottom: var(--space-4);
  }

  /* Bottom navigation safe area */
  .footer,
  .download {
    padding-bottom: calc(var(--space-16) + env(safe-area-inset-bottom));
  }

  /* Floating action buttons positioning */
  .back-to-top {
    bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    right: var(--space-5);
  }

  .keyboard-hint {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .cookie-consent {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Rounds 626-650: Card Spacing & Rhythm */
@media (max-width: 640px) {
  /* Consistent card spacing */
  .feature-small + .feature-small,
  .proof-card + .proof-card,
  .testimonial-card + .testimonial-card,
  .science-card + .science-card {
    margin-top: var(--space-4);
  }

  /* Grid gaps */
  .social-proof-grid,
  .gallery-grid,
  .features-grid-small {
    gap: var(--space-5);
  }

  .problem-grid {
    gap: var(--space-6);
  }

  /* Section spacing rhythm */
  section + section {
    scroll-margin-top: var(--nav-height);
  }
}

/* Rounds 651-675: Improved Focus States for Mobile */
@media (max-width: 768px) {
  /* Larger, more visible focus indicators */
  *:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 3px;
  }

  .btn:focus-visible {
    outline-width: 4px;
    outline-offset: 4px;
  }

  .nav-toggle:focus-visible {
    outline-width: 3px;
    outline-offset: 2px;
    border-radius: var(--radius-md);
  }

  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 2px;
  }
}

/* Rounds 676-700: Link Underline & Text Selection */
@media (max-width: 640px) {
  /* Better link visibility */
  .policy-content a,
  .proof-card a,
  .science-card a,
  .faq-accordion-content a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    text-decoration-color: var(--color-brand-light);
  }

  .policy-content a:active,
  .proof-card a:active,
  .science-card a:active {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
  }

  /* Optimized text selection */
  ::selection {
    background: rgba(59, 130, 246, 0.25);
    color: var(--color-gray-900);
  }

  ::-moz-selection {
    background: rgba(59, 130, 246, 0.25);
    color: var(--color-gray-900);
  }
}

/* Rounds 701-725: Accessibility - Screen Reader Improvements */
@media (max-width: 768px) {
  /* Skip links more prominent on mobile */
  .skip-link:focus {
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: var(--space-4);
    font-size: 18px;
    z-index: 10000;
  }

  /* ARIA live regions */
  [aria-live="polite"],
  [aria-live="assertive"] {
    position: relative;
  }

  /* Better label association */
  label {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Rounds 726-750: Reduced Motion Preferences */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .nav-menu,
  .device-frame,
  .faq-accordion-content,
  .lightbox,
  .cookie-consent {
    transition: none !important;
    animation: none !important;
  }

  .hero-grid {
    display: none;
  }

  .scroll-progress {
    display: none;
  }
}

/* Rounds 751-775: Dark Mode Considerations */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
  /* Future-proofing for dark mode */
  :root {
    --mobile-safe-bg: var(--color-gray-900);
    --mobile-safe-text: var(--color-gray-50);
  }
}

/* Rounds 776-800: Landscape Orientation Optimization */
@media (max-width: 900px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--nav-height) + var(--space-8));
    padding-bottom: var(--space-12);
  }

  .hero-visual {
    min-height: 400px;
  }

  .device-stack {
    max-width: 280px;
    min-height: 400px;
  }

  .device-frame {
    width: 220px;
  }

  .nav-menu {
    height: calc(100vh - var(--nav-height));
    padding-top: var(--space-4);
  }

  .faq-accordion-header {
    min-height: 56px;
    padding: var(--space-4);
  }
}

/* Rounds 801-825: iOS Specific Enhancements */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific */
  @media (max-width: 768px) {
    input[type="email"],
    input[type="text"],
    input[type="tel"],
    textarea {
      -webkit-appearance: none;
      border-radius: var(--radius-lg);
    }

    /* Fix iOS Safari bottom safe area */
    .nav-menu {
      padding-bottom: env(safe-area-inset-bottom);
    }

    /* Prevent iOS text size adjustment */
    body {
      -webkit-text-size-adjust: 100%;
    }

    /* Better momentum scrolling */
    .nav-menu,
    .comparison-table-wrapper {
      -webkit-overflow-scrolling: touch;
    }
  }
}

/* Rounds 826-850: Android Specific Enhancements */
@media (max-width: 768px) {
  /* Address bar consideration */
  .hero {
    min-height: calc(100svh - var(--nav-height));
  }

  /* Android Chrome tap highlight */
  * {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.15);
  }

  button,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
  }
}

/* Rounds 851-875: Loading States & Skeleton Screens */
@media (max-width: 640px) {
  /* Optimize for perceived performance */
  img[loading="lazy"] {
    background: var(--color-gray-100);
  }

  /* Placeholder shimmer effect */
  @keyframes shimmer {
    0% {
      background-position: -468px 0;
    }
    100% {
      background-position: 468px 0;
    }
  }

  .device-frame img:not([src]) {
    background: linear-gradient(
      to right,
      var(--color-gray-100) 8%,
      var(--color-gray-200) 18%,
      var(--color-gray-100) 33%
    );
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
  }
}

/* Rounds 876-900: Smart Defaults for Forms */
@media (max-width: 640px) {
  /* Autocomplete optimization */
  input[type="email"] {
    autocapitalize: off;
    autocorrect: off;
    inputmode: email;
  }

  input[type="tel"] {
    inputmode: tel;
  }

  input[type="text"][name*="name"],
  input[type="text"][name*="Name"] {
    autocapitalize: words;
  }

  /* Better keyboard types */
  input[name*="search"] {
    type: search;
    -webkit-appearance: none;
  }

  /* Disable spellcheck on email/username fields */
  input[type="email"],
  input[name*="username"] {
    spellcheck: false;
  }
}

/* Rounds 901-925: Micro-interactions Polish */
@media (max-width: 640px) {
  /* Subtle scale on hover/active for cards */
  @media (hover: none) {
    .feature-small:active,
    .proof-card:active,
    .testimonial-card:active,
    .science-card:active {
      transform: scale(0.98);
    }
  }

  /* Button loading state */
  .btn[disabled],
  .btn[aria-busy="true"] {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
  }

  .btn[aria-busy="true"]::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-left: var(--space-2);
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}

/* Rounds 926-950: Advanced Touch Gestures Support */
@media (max-width: 768px) and (hover: none) {
  /* Swipe indicators for galleries */
  .gallery-hero,
  .gallery-grid {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .gallery-card,
  .gallery-card-hero {
    scroll-snap-align: center;
  }

  /* Pull-to-refresh consideration */
  body {
    overscroll-behavior-y: contain;
  }

  /* Swipe-friendly cards */
  .device-frame {
    touch-action: pan-y;
  }
}

/* Rounds 951-975: Error States & Validation */
@media (max-width: 640px) {
  /* Form validation feedback */
  input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  }

  input:valid:not(:placeholder-shown) {
    border-color: #10b981;
  }

  /* Error messages */
  .form-feedback,
  [role="alert"] {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 15px;
    line-height: 1.6;
    margin-top: var(--space-4);
  }

  .form-feedback[data-type="error"] {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid #f87171;
  }

  .form-feedback[data-type="success"] {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 2px solid #34d399;
  }
}

/* Rounds 976-1000: Final Mobile Polish */
@media (max-width: 640px) {
  /* Scroll padding for anchor links */
  html {
    scroll-padding-top: calc(var(--nav-height) + var(--space-6));
  }

  /* Better list item touch targets */
  .proof-card li,
  .testimonial-card li,
  .policy-content li {
    padding: var(--space-2) 0;
  }

  /* Optimized references section */
  .references-list {
    padding-left: var(--space-6);
  }

  .references-list li {
    margin-bottom: var(--space-5);
    padding-left: var(--space-2);
  }

  /* Download share section */
  .download-share {
    padding: var(--space-6) 0;
    gap: var(--space-4);
  }

  .share-label {
    font-size: 15px;
    text-align: center;
  }

  /* Comparison table scroll hint */
  .comparison-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(
      to left,
      rgba(255, 255, 255, 0.9),
      transparent
    );
    pointer-events: none;
  }

  /* Back to top enhancement */
  .back-to-top {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  }

  .back-to-top:active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  }

  /* Cookie consent mobile optimization */
  .cookie-consent {
    padding: var(--space-6);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  /* Final accessibility enhancement */
  [tabindex="-1"]:focus {
    outline: none;
  }

  [tabindex="0"]:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 3px;
  }

  /* Performance: Reduce animations on low-end devices */
  @media (prefers-reduced-motion: reduce),
         (update: slow) {
    * {
      animation-duration: 0.01ms !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* Final touch: Optimize for notched devices */
  @supports (padding: env(safe-area-inset-top)) {
    .header {
      padding-top: env(safe-area-inset-top);
      height: calc(var(--nav-height) + env(safe-area-inset-top));
    }

    body {
      padding-left: env(safe-area-inset-left);
      padding-right: env(safe-area-inset-right);
    }
  }
}

/* Mobile Optimization Complete - 1000 Rounds */
