/* ============================================
   COMO AI — Global Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Custom Properties */
:root {
  --bg: rgba(5, 5, 7, 0.82);
  --bg-2: rgba(10, 10, 15, 0.82);
  --bg-3: rgba(17, 17, 24, 0.82);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);

  --white: #ffffff;
  --gray-100: #f0f0f5;
  --gray-400: #8888aa;
  --gray-600: #44445a;

  --blue: #4A8FFF;
  --blue-glow: rgba(74, 143, 255, 0.25);
  --blue-soft: rgba(74, 143, 255, 0.12);
  --cyan: #00d4ff;
  --purple: #8855ff;
  --gold: #c8a96e;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 48px;
  --radius-full: 9999px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #050507; /* deep-black base — body is transparent so html is the canvas */
}

body {
  font-family: var(--font);
  background-color: transparent;
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

img, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ============================================
   TYPOGRAPHY SCALE
   ============================================ */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 2rem; }
.text-4xl  { font-size: 2.5rem; }
.text-5xl  { font-size: 3.5rem; }
.text-6xl  { font-size: 5rem; }
.text-7xl  { font-size: 7rem; }
.text-8xl  { font-size: 9rem; }
.text-9xl  { font-size: 12rem; }

.font-300 { font-weight: 300; }
.font-400 { font-weight: 400; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }
.font-900 { font-weight: 900; }

.tracking-tight { letter-spacing: -0.04em; }
.tracking-normal { letter-spacing: -0.02em; }
.tracking-wide { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.2em; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.15; }

.text-muted { color: var(--gray-400); }
.text-gradient {
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

.container-wide {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 60px;
}

.section {
  padding: 140px 0;
  position: relative;
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 60px;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.scrolled {
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* App icon — rounded square, matches ComoCorrectLogo in the app */
.nav-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;   /* iOS-style squircle rounding */
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.footer-logo .nav-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

/* Keep dot hidden — replaced by the icon image */
.nav-logo-dot { display: none; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--white);
}

.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--white); }
.nav-link.active::after { width: 100%; }

/* ============================================
   LIQUID GLASS NAV CTA — Pure CSS frosted glass
   No SVG displacement. Ceiling gradient + blur + specular inset.
   ============================================ */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  position: relative;
  overflow: hidden;
  /* Ceiling gradient (top-bright) + glass tint */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.08) 44%, transparent 100%),
    rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1.4px solid rgba(255, 255, 255, 0.48);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 28px rgba(74, 143, 255, 0.13),
    0 3px 14px rgba(0, 0, 0, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, background 0.3s ease;
}

.nav-cta:hover {
  transform: scale(1.05);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.12) 44%, transparent 100%),
    rgba(255, 255, 255, 0.17);
  box-shadow:
    0 0 40px rgba(74, 143, 255, 0.20),
    0 5px 20px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.70),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* ============================================
   BUTTONS — base
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.35s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

/* ============================================
   BTN-PRIMARY — Pure CSS frosted glass
   Ceiling gradient + backdrop blur + specular inset border.
   No SVG displacement, no z-index pseudo tricks.
   ============================================ */
.btn-primary {
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.08) 44%, transparent 100%),
    rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1.4px solid rgba(255, 255, 255, 0.52);
  border-bottom-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 36px rgba(74, 143, 255, 0.16),
    0 5px 20px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.60),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
  transform: scale(1.04);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.12) 44%, transparent 100%),
    rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 52px rgba(74, 143, 255, 0.26),
    0 8px 28px rgba(0, 0, 0, 0.22),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* ============================================
   BTN-OUTLINE — Pure CSS frosted glass (secondary, darker)
   ============================================ */
.btn-outline {
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.03) 40%, transparent 100%),
    rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1.4px solid rgba(255, 255, 255, 0.26);
  border-bottom-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    0 0 22px rgba(74, 143, 255, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.14),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-outline:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 40%, transparent 100%),
    rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.42);
  border-bottom-color: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
  box-shadow:
    0 0 36px rgba(74, 143, 255, 0.18),
    0 6px 22px rgba(0, 0, 0, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.50),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

/* ============================================
   BTN-BLUE — Pure CSS frosted glass (blue tinted)
   ============================================ */
.btn-blue {
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 44%, transparent 100%),
    rgba(74, 143, 255, 0.22);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1.4px solid rgba(74, 143, 255, 0.55);
  border-bottom-color: rgba(74, 143, 255, 0.22);
  box-shadow:
    0 0 44px rgba(74, 143, 255, 0.30),
    0 5px 20px rgba(0, 0, 0, 0.16),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-blue:hover {
  transform: scale(1.04);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.09) 44%, transparent 100%),
    rgba(74, 143, 255, 0.30);
  box-shadow:
    0 0 60px rgba(74, 143, 255, 0.45),
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.68),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
}

/* ============================================
   LIQUID GLASS BLOB KEYFRAMES
   Lissajous-style drift — organic caustic light
   Three offset timings so blobs never sync
   ============================================ */
@keyframes lg-blob-drift {
  0%   { transform: translate(0%,   0%);   }
  20%  { transform: translate(28%,  12%);  }
  40%  { transform: translate(14%,  34%);  }
  60%  { transform: translate(-12%, 22%);  }
  80%  { transform: translate(-18%, -8%);  }
  100% { transform: translate(0%,   0%);   }
}

.btn-lg {
  padding: 20px 44px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--gray-400);
  transition: all 0.3s ease;
}

.btn-icon:hover {
  border-color: var(--white);
  color: var(--white);
  transform: scale(1.1);
}

/* Magnetic button wrapper */
.magnetic {
  display: inline-block;
  position: relative;
}

/* ============================================
   GLASS CARDS
   ============================================ */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

/* Mouse-tracking radial glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(74, 143, 255, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: inset 0 0 28px -8px rgba(255, 255, 255, 0.12);
}

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

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid rgba(74, 143, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.25rem;
  color: var(--blue);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--gray-400);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   SECTION LABEL
   ============================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.section-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* ============================================
   DIVIDERS & SEPARATORS
   ============================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

.divider-gradient {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ============================================
   MARQUEE / TICKER
   ============================================ */
.marquee-wrapper {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  background: var(--bg-2);
}

.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0 40px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-400);
  white-space: nowrap;
}

.marquee-item strong { color: var(--blue); }

.marquee-sep {
  color: var(--gray-600);
  font-size: 0.5rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

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

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

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Word reveal */
.word-reveal .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-right: 0.1em;
}

.word-reveal .word-inner {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-out-expo);
}

.word-reveal.visible .word-inner { transform: translateY(0); }

.word-reveal .word:nth-child(1) .word-inner { transition-delay: 0s; }
.word-reveal .word:nth-child(2) .word-inner { transition-delay: 0.05s; }
.word-reveal .word:nth-child(3) .word-inner { transition-delay: 0.1s; }
.word-reveal .word:nth-child(4) .word-inner { transition-delay: 0.15s; }
.word-reveal .word:nth-child(5) .word-inner { transition-delay: 0.2s; }
.word-reveal .word:nth-child(6) .word-inner { transition-delay: 0.25s; }
.word-reveal .word:nth-child(7) .word-inner { transition-delay: 0.3s; }
.word-reveal .word:nth-child(8) .word-inner { transition-delay: 0.35s; }
.word-reveal .word:nth-child(9) .word-inner { transition-delay: 0.4s; }
.word-reveal .word:nth-child(10) .word-inner { transition-delay: 0.45s; }

/* Line reveal */
.line-reveal {
  overflow: hidden;
}

.line-reveal-inner {
  transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}

.line-reveal.visible .line-reveal-inner { transform: translateY(0); }

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-blue {
  box-shadow: 0 0 80px var(--blue-glow), 0 0 20px var(--blue-glow);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.glow-orb-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 143, 255, 0.15) 0%, transparent 70%);
}

.glow-orb-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(136, 85, 255, 0.1) 0%, transparent 70%);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
  background: var(--bg);
}

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

.footer-logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-tagline {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  color: var(--gray-600);
  font-size: 0.8rem;
}

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

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--gray-600);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: var(--blue-soft);
  color: var(--blue);
}

/* ============================================
   UTILITIES
   ============================================ */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-12 { gap: 48px; }
.gap-16 { gap: 64px; }

.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mb-16 { margin-bottom: 64px; }

.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mt-16 { margin-top: 64px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.mx-auto { margin-left: auto; margin-right: auto; }

.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 800px; }
.max-w-xl { max-width: 1040px; }

.w-full { width: 100%; }

/* ============================================
   PAGE TRANSITION OVERLAY
   ============================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  pointer-events: none;
  transform: translateY(100%);
}

/* ============================================
   STAT BAR
   ============================================ */
.stat-bar-wrapper {
  margin-bottom: 20px;
}

.stat-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.875rem;
}

.stat-bar-name { color: var(--gray-400); }
.stat-bar-value { font-weight: 700; }

.stat-bar-track {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 1.5s var(--ease-out-expo);
}

.stat-bar-fill.blue { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-bar-fill.dim { background: var(--gray-600); }

/* ============================================
   ANIMATED COUNTER
   ============================================ */
.counter { font-variant-numeric: tabular-nums; }

/* ============================================
   SKELETON NODES (AI Vision Demo)
   ============================================ */
.skeleton-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.skeleton-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue), 0 0 20px var(--blue-glow);
  transform: translate(-50%, -50%) scale(0);
  animation: node-appear 0.4s var(--ease-spring) forwards;
}

@keyframes node-appear {
  to { transform: translate(-50%, -50%) scale(1); }
}

.skeleton-node::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--blue);
  opacity: 0.4;
  animation: node-ring 2s ease-in-out infinite;
}

@keyframes node-ring {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 0; }
}

/* ============================================
   ACCORDION (FAQ)
   ============================================ */
.accordion-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  text-align: left;
  gap: 20px;
}

.accordion-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-size: 1rem;
  color: var(--gray-400);
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}

.accordion-body {
  display: none;
  color: var(--gray-400);
  font-size: 0.95rem;
  line-height: 1.8;
  padding-top: 16px;
  padding-right: 48px;
}

.accordion-item.open .accordion-body { display: block; }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, background 0.25s ease;
  outline: none;
  resize: none;
}

.form-control::placeholder { color: var(--gray-600); }

.form-control:focus {
  border-color: var(--blue);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(74, 143, 255, 0.1);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1200px) {
  .container { padding: 0 32px; }
  .container-wide { padding: 0 40px; }
  .nav { padding: 0 40px; }
  .section { padding: 100px 0; }
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .container-wide { padding: 0 24px; }
  .nav { padding: 0 24px; }
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .card { padding: 28px 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .btn-lg { padding: 16px 32px; }
  /* Show hamburger on mobile */
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .section { padding: 60px 0; }
  /* Hero min-height uses svh on phones so browser chrome doesn't clip */
  .hero { min-height: 100svh; }
  /* Legal pages: reduce top padding */
  .legal-page { padding-top: 100px !important; }
  /* Page hero sections: reduce top padding */
  .page-hero { padding-top: 120px !important; }
}

/* ============================================
   HAMBURGER NAV TOGGLE — Jhey style pill button
   Hidden on desktop, shown at ≤768px
   ============================================ */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  position: relative;
  z-index: 1001;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-spring);
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.28);
  transform: scale(1.08);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.38s var(--ease-out-expo);
  transform-origin: center;
}

/* Morph to X */
.nav-toggle.open { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); }
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 20px; }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); width: 20px; }

/* ============================================
   MOBILE FULL-SCREEN MENU — Jhey clip-path reveal
   Circle expands from the hamburger button (top-right).
   Editorial-style stagger on each link.
   ============================================ */
.nav-mobile-menu {
  position: fixed;
  inset: 0;
  /* Deep noir glass — matches the app's dark aesthetic */
  background:
    radial-gradient(ellipse 80% 60% at 75% -10%, rgba(74,143,255,0.08) 0%, transparent 60%),
    rgba(4, 4, 9, 0.97);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 40px 56px;
  z-index: 990;
  pointer-events: none;
  /* Clip-path circle from hamburger position (top-right, ~52px from right, 40px from top) */
  clip-path: circle(0% at calc(100% - 52px) 40px);
  transition: clip-path 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Noise grain inside menu */
.nav-mobile-menu::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Decorative blue orb — ambient glow */
.nav-mobile-menu::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,143,255,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.nav-mobile-menu.open {
  clip-path: circle(160% at calc(100% - 52px) 40px);
  pointer-events: all;
}

/* ── NAV LINKS — big editorial magazine style ── */
.nav-mobile-menu .nav-link {
  position: relative;
  z-index: 1;
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.05;
  padding: 10px 0;
  color: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: none;
  /* Start off-screen left; JS adds .open class which triggers transition */
  transform: translateX(-40px);
  opacity: 0;
  transition: color 0.3s ease, transform 0.55s var(--ease-out-expo), opacity 0.55s ease;
}

/* Number label before each link */
.nav-mobile-menu .nav-link::before {
  content: attr(data-num);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--blue);
  opacity: 0.7;
  margin-top: 4px;
  font-family: var(--font);
  flex-shrink: 0;
  width: 22px;
}

/* Stagger in when menu opens */
.nav-mobile-menu.open .nav-link {
  transform: translateX(0);
  opacity: 1;
}

.nav-mobile-menu.open .nav-link:nth-child(1) { transition-delay: 0.12s; }
.nav-mobile-menu.open .nav-link:nth-child(2) { transition-delay: 0.19s; }
.nav-mobile-menu.open .nav-link:nth-child(3) { transition-delay: 0.26s; }
.nav-mobile-menu.open .nav-link:nth-child(4) { transition-delay: 0.33s; }
.nav-mobile-menu.open .nav-link:nth-child(5) { transition-delay: 0.40s; }

/* Hover effect — slide right, full white, blue underline */
.nav-mobile-menu .nav-link:hover {
  color: var(--white);
  transform: translateX(10px);
}

/* Blue underline draw on hover */
.nav-mobile-menu .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 38px;  /* after the number */
  right: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out-expo);
}

.nav-mobile-menu .nav-link:hover::after { transform: scaleX(1); }

/* Active link — full white always */
.nav-mobile-menu .nav-link.active { color: var(--white); }

/* ── CTA BUTTON ── */
.nav-mobile-menu .nav-cta-mobile {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding: 16px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 44%, transparent 100%),
    rgba(74, 143, 255, 0.18);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1.4px solid rgba(74, 143, 255, 0.52);
  border-bottom-color: rgba(74, 143, 255, 0.20);
  box-shadow:
    0 0 36px rgba(74, 143, 255, 0.18),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  /* Stagger after links */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease 0.48s, transform 0.55s var(--ease-out-expo) 0.48s, background 0.3s ease, box-shadow 0.3s ease;
}

.nav-mobile-menu.open .nav-cta-mobile {
  opacity: 1;
  transform: translateY(0);
}

.nav-mobile-menu .nav-cta-mobile:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.09) 44%, transparent 100%),
    rgba(74, 143, 255, 0.28);
  box-shadow:
    0 0 52px rgba(74, 143, 255, 0.32),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(0, 0, 0, 0.10);
}

/* Divider between links and CTA */
.nav-mobile-menu-divider {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
  margin: 28px 0 4px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.4s ease 0.44s, transform 0.4s var(--ease-out-expo) 0.44s;
}

.nav-mobile-menu.open .nav-mobile-menu-divider {
  opacity: 1;
  transform: scaleX(1);
}

/* ── GLOBAL MOBILE SECTION PADDING OVERRIDES ── */
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  /* Accuracy section big number */
  .accuracy-big-number { line-height: 0.95; }
  /* Footer tighter on phones */
  .footer { padding: 48px 0 32px; }
  .footer-inner { gap: 32px; }
  /* Vision demo: stacked */
  .vision-demo-wrapper { grid-template-columns: 1fr; gap: 40px; }
  /* Stat cells */
  .stat-cell { padding: 28px 20px; }
  .stat-cell-value { font-size: 2.6rem; }
  /* Testimonial card */
  .testimonial-card { padding: 28px 24px; }
}

/* ============================================
   MOBILE — COMPREHENSIVE OVERFLOW & LAYOUT FIXES
   ============================================ */

/* Prevent any child from causing horizontal scroll */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* ── NAV: mobile-only overrides ── */

  /* Reduce nav height on mobile */
  :root { --nav-height: 64px; }

  /* Always show frosted glass on mobile — don't wait for scroll */
  .nav {
    background: rgba(5, 5, 7, 0.88) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 0 20px !important;
  }

  /* Logo stays compact */
  .nav-logo { font-size: 1.1rem; letter-spacing: -0.04em; }
  .nav-logo-icon { width: 26px; height: 26px; border-radius: 6px; }

  /* Hamburger visible */
  .nav-toggle { display: flex !important; }

  /* Hide desktop links + CTA completely */
  .nav-links { display: none !important; }
  .nav .magnetic { display: none !important; }
  .nav .nav-cta { display: none !important; }

  /* ── Accuracy section: stack vertically ── */
  .accuracy-section .flex {
    flex-direction: column !important;
    gap: 32px !important;
    align-items: flex-start !important;
  }

  /* ── Stats row: 2-col ── */
  .stats-row { grid-template-columns: 1fr 1fr !important; }

  /* ── FAQ inline grid: force 1-col ── */
  #faq .container > div,
  #faq .container > * {
    grid-template-columns: 1fr !important;
  }

  /* ── Memory card: stack ── */
  .memory-card { grid-template-columns: 1fr !important; }
  .memory-content { padding: 40px 28px !important; }

  /* ── Store badges: flex-col ── */
  .store-badges { flex-direction: column; align-items: center; }
  .store-badge { width: 100%; max-width: 280px; justify-content: center; }

  /* ── Hero CTA: stack ── */
  .hero-cta { flex-direction: column !important; align-items: center !important; gap: 12px !important; }
  .hero-cta .btn, .hero-cta .magnetic { width: 100%; max-width: 300px; }
  .hero-cta .btn { text-align: center; justify-content: center; }

  /* ── Mission strip: single col ── */
  .mission-strip-inner { grid-template-columns: 1fr !important; }

  /* ── Story layout: single col ── */
  .story-layout { grid-template-columns: 1fr !important; gap: 40px !important; }
  .story-sidebar { position: static !important; }

  /* ── Vision demo: single col ── */
  .vision-demo-wrapper { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* ── Intel carousel ── */
  .intel-carousel { margin: 0 -16px !important; }

  /* ── Footer: tighter ── */
  .footer-inner { grid-template-columns: 1fr !important; }

  /* ── Keypoint count: allow wrap ── */
  .keypoint-count { flex-wrap: wrap; }

  /* ── Page hero padding on mobile ── */
  .page-hero { padding: 130px 0 70px !important; }

  /* ── FAQ page hero ── */
  .faq-hero { padding: 130px 0 56px !important; }

  /* ── About page future timeline 3-col ── */
  .vision-statement .mission-strip-inner { grid-template-columns: 1fr !important; }

  /* ── Container on very small screens ── */
  .container { padding: 0 18px !important; }
}

@media (max-width: 480px) {
  /* ── Stats row: single col under 480px ── */
  .stats-row { grid-template-columns: 1fr !important; }

  /* ── Hero text ── */
  .hero-title { letter-spacing: -0.03em; }

  /* ── accuracy big number ── */
  .accuracy-big-number { font-size: clamp(4.5rem, 18vw, 8rem) !important; }

  /* ── Testimonials: single column ── */
  .grid-3 { grid-template-columns: 1fr !important; }

  /* ── IntelCarousel track height ── */
  .intel-carousel-track { height: 480px !important; }
  .intel-carousel-track .intel-card { width: 90vw !important; }

  /* ── FAQ CTA box padding ── */
  #faq [style*="padding:56px 48px"] {
    padding: 36px 24px !important;
  }
  /* FAQ answer CTA box */
  div[style*="padding:56px 48px"] {
    padding: 36px 20px !important;
  }

  /* ── Button sizes ── */
  .btn-lg { padding: 16px 28px !important; font-size: 0.95rem !important; }
}
