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

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

:root {
  /* Brand — derived from logo */
  --brand: #4B7BF5;
  --brand-light: #7BA0FF;
  --brand-glow: rgba(75, 123, 245, 0.25);
  --brand-deep: #3461D9;
  --brand-subtle: rgba(75, 123, 245, 0.08);

  /* B2B accent */
  --b2b: #9B7AFF;
  --b2b-glow: rgba(155, 122, 255, 0.2);
  --b2b-subtle: rgba(155, 122, 255, 0.08);

  /* Surfaces */
  --bg-void: #060A14;
  --bg-primary: #0B1120;
  --bg-elevated: #131B30;
  --bg-glass: rgba(11, 17, 32, 0.7);

  /* Semantic */
  --safe: #34D399;
  --risk: #EF4444;
  --warn: #F59E0B;

  /* Text */
  --text-1: #E8ECF4;
  --text-2: #8899B4;
  --text-3: #4A5A78;

  /* Borders */
  --border: rgba(75, 123, 245, 0.08);
  --border-hover: rgba(75, 123, 245, 0.2);

  /* Spacing scale (8px base) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px;
  --s6: 48px; --s8: 64px; --s12: 96px; --s16: 128px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 100px;

  /* Fonts */
  --font: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}
a:hover { color: var(--brand-light); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

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

/* ===== GRID BG ===== */
.grid-bg {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(75, 123, 245, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 123, 245, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ===== 3D BACKGROUND ===== */
#bg3d {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 80%);
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

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

.nav-brand {
  font-size: 1.25rem; font-weight: 800; color: var(--text-1);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.02em; text-decoration: none;
}

.nav-brand img, .nav-brand svg { width: 36px; height: 36px; }

.nav-links { display: flex; gap: 8px; list-style: none; }

.nav-links a {
  color: var(--text-2); font-size: 0.875rem; font-weight: 500;
  padding: var(--s1) var(--s2); border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s; cursor: pointer;
}
.nav-links a:hover { color: var(--brand); background: var(--brand-subtle); }

/* Mobile nav */
.nav-toggle-input { display: none; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--s1); z-index: 1001; position: relative;
  width: 44px; height: 44px; /* UUPM: 44px touch target */
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-1);
  margin: 5px auto; border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.nav-toggle-input:checked ~ .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle-input:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-toggle-input:checked ~ .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO (Cold Open) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: var(--s16) var(--s3) var(--s8);
  overflow: hidden;
}

.hero-video-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.hero-video-bg video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.25; filter: blur(1px);
}

.hero-glow {
  position: absolute; z-index: 1; pointer-events: none;
  width: 700px; height: 700px; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(75, 123, 245, 0.1) 0%, transparent 70%);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
}

/* Inline SVG radar in hero */
.hero-radar {
  width: 220px; height: 220px;
  margin: 0 auto var(--s6);
}
.hero-radar svg { width: 100%; height: 100%; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900; line-height: 1.15;
  margin-bottom: var(--s3);
  letter-spacing: -0.04em;
}

.hero .counter {
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 700;
}

.hero-sub {
  font-size: 1.15rem; color: var(--text-2);
  max-width: 540px; margin: 0 auto var(--s6);
  font-weight: 300; line-height: 1.7;
}

.hero-cta { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; bottom: var(--s4); left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--text-3);
  animation: float 2s ease-in-out infinite;
}
.scroll-hint svg { width: 24px; height: 24px; stroke: var(--text-3); }

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: 14px var(--s4); border-radius: var(--r-sm);
  font-size: 0.9375rem; font-weight: 600; font-family: var(--font);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer; border: none; position: relative;
  min-height: 44px; /* UUPM: touch target */
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: var(--bg-primary);
  box-shadow: 0 4px 20px var(--brand-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--brand-glow), 0 0 0 3px rgba(75, 123, 245, 0.12);
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--bg-elevated); color: var(--text-1);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  border-color: var(--brand); background: var(--brand-subtle);
  transform: translateY(-2px); color: var(--text-1);
}

.btn-b2b {
  background: linear-gradient(135deg, var(--b2b), #7C5CFF);
  color: white; box-shadow: 0 4px 20px var(--b2b-glow);
}
.btn-b2b:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--b2b-glow), 0 0 0 3px rgba(155, 122, 255, 0.12);
  color: white;
}

/* ===== SECTIONS ===== */
section { padding: var(--s12) 0; position: relative; scroll-margin-top: 80px; }

.section-label {
  text-transform: uppercase; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; color: var(--brand); margin-bottom: var(--s2);
  font-family: var(--font);
}
.section-label.b2b { color: var(--b2b); }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800; margin-bottom: var(--s2);
  letter-spacing: -0.03em; line-height: 1.15;
}

.section-sub {
  color: var(--text-2); font-size: 1.1rem;
  max-width: 560px; font-weight: 300; line-height: 1.7;
}

.section-header { text-align: center; margin-bottom: var(--s8); }
.section-header .section-sub { margin: 0 auto; }

.section-glow {
  background:
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(75, 123, 245, 0.04), transparent),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(155, 122, 255, 0.03), transparent);
}

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

/* ===== THE REVEAL (network map) ===== */
.reveal-section {
  padding: var(--s16) 0;
  position: relative;
}

.reveal-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s8); align-items: center;
}

.network-map {
  position: relative;
  width: 100%; max-width: 480px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.network-map svg { width: 100%; height: 100%; }

.reveal-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800; margin-bottom: var(--s2);
  letter-spacing: -0.03em; line-height: 1.2;
}

.reveal-text p {
  color: var(--text-2); font-size: 1.05rem;
  line-height: 1.7; margin-bottom: var(--s4);
}

/* ===== THE PRODUCT (sticky phone mockup) ===== */
.product-section { padding: var(--s16) 0; }

.product-sticky-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s8); align-items: start;
}

.phone-sticky {
  position: sticky; top: 120px;
  display: flex; justify-content: center;
}

.phone-frame {
  width: 260px; position: relative;
  border-radius: 36px;
  background: var(--bg-elevated);
  border: 2px solid rgba(42, 58, 92, 0.6);
  overflow: hidden;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.3),
    0 16px 32px rgba(0,0,0,0.2),
    0 32px 64px rgba(0,0,0,0.15);
}

.phone-screen {
  aspect-ratio: 9/19.5;
  background: var(--bg-primary);
  margin: 8px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.phone-screen-content {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; padding: var(--s3);
  color: var(--text-2); font-size: 0.8rem;
  text-align: center;
}

.phone-notch {
  width: 72px; height: 22px;
  background: var(--bg-elevated);
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
  position: relative; z-index: 2;
}

.product-steps { padding-top: var(--s4); }

.product-step {
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--border);
}
.product-step:last-child { border: none; }

.product-step .step-number {
  font-family: var(--font); font-size: 0.7rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--brand);
  margin-bottom: var(--s1);
}

.product-step h3 {
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: var(--s1); letter-spacing: -0.02em;
}

.product-step p {
  color: var(--text-2); font-size: 1rem; line-height: 1.7;
}

/* ===== WHO IT'S FOR (side by side) ===== */
.audience-section {
  padding: var(--s16) 0;
  background: linear-gradient(180deg, var(--bg-void) 0%, var(--bg-primary) 50%, var(--bg-void) 100%);
}

.audience-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}

.audience-card {
  padding: var(--s6) var(--s4);
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
  transition: transform 0.3s;
}
.audience-card:hover { transform: translateY(-4px); }

.audience-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}

.audience-card.b2c {
  background: linear-gradient(135deg, rgba(75, 123, 245, 0.06), rgba(11, 17, 32, 0.8));
  border: 1px solid rgba(75, 123, 245, 0.15);
}
.audience-card.b2c::before { background: linear-gradient(90deg, var(--brand), transparent); }

.audience-card.b2b {
  background: linear-gradient(135deg, rgba(155, 122, 255, 0.06), rgba(11, 17, 32, 0.8));
  border: 1px solid rgba(155, 122, 255, 0.15);
}
.audience-card.b2b::before { background: linear-gradient(90deg, var(--b2b), transparent); }

.audience-card .card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s3);
}
.audience-card .card-icon svg { width: 28px; height: 28px; }

.b2c .card-icon { background: var(--brand-subtle); color: var(--brand); }
.b2c .card-icon svg { stroke: var(--brand); }
.b2b .card-icon { background: var(--b2b-subtle); color: var(--b2b); }
.b2b .card-icon svg { stroke: var(--b2b); }

.audience-card h3 {
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: var(--s1); letter-spacing: -0.02em;
}

.audience-card .tag {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  margin-bottom: var(--s2); display: block;
}
.b2c .tag { color: var(--brand); }
.b2b .tag { color: var(--b2b); }

.audience-card p {
  color: var(--text-2); font-size: 1rem;
  line-height: 1.7; margin-bottom: var(--s4);
}

.audience-features { list-style: none; margin-bottom: var(--s4); }
.audience-features li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; color: var(--text-2); font-size: 0.9375rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.audience-features li:last-child { border: none; }

.check-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.check-icon svg { width: 12px; height: 12px; }
.b2c .check-icon { background: rgba(75, 123, 245, 0.12); }
.b2c .check-icon svg { stroke: var(--brand); }
.b2b .check-icon { background: rgba(155, 122, 255, 0.12); }
.b2b .check-icon svg { stroke: var(--b2b); }

/* ===== TRUST STRIP ===== */
.trust-strip {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-content {
  display: flex; align-items: center; justify-content: center;
  gap: var(--s6); flex-wrap: wrap;
}

.trust-item {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-2); font-size: 0.9375rem; font-weight: 500;
}
.trust-item svg { width: 24px; height: 24px; stroke: var(--safe); flex-shrink: 0; }

/* ===== DEMO VIDEO ===== */
.demo-section { padding: var(--s16) 0; }

.demo-container {
  max-width: 100%; margin: 0 auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 32px 64px rgba(0,0,0,0.4);
  background: var(--bg-primary);
  aspect-ratio: 16/9;
  position: relative;
}

.demo-container video {
  width: 100%; height: 100%; object-fit: contain;
}

.demo-poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  cursor: pointer;
}
.demo-poster .play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand); color: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 20px var(--brand-glow);
}
.demo-poster:hover .play-btn {
  transform: scale(1.1);
  box-shadow: 0 8px 30px var(--brand-glow);
}
.demo-poster .play-btn svg { width: 28px; height: 28px; margin-left: 4px; }

/* ===== DOWNLOAD / CTA ===== */
.download-section {
  padding: var(--s12) 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.download-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}

.download-card {
  background: rgba(19, 27, 48, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s6) var(--s3);
  text-align: center;
  transition: border-color 0.25s, transform 0.25s;
}
.download-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.download-card .dl-icon {
  width: 48px; height: 48px; margin: 0 auto var(--s2);
  display: flex; align-items: center; justify-content: center;
}
.download-card .dl-icon svg { width: 32px; height: 32px; stroke: var(--brand); }

.download-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: var(--s1); }
.download-card p { color: var(--text-2); font-size: 0.875rem; margin-bottom: var(--s3); }

.badge-soon {
  display: inline-block; padding: 10px var(--s3);
  background: var(--brand-subtle); border: 1px solid var(--border-hover);
  border-radius: var(--r-sm); color: var(--text-3);
  font-size: 0.8125rem; font-weight: 500;
}

/* ===== FOOTER ===== */
footer {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
}

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

.footer-brand {
  font-weight: 700; font-size: 1rem; margin-bottom: var(--s1);
  display: flex; align-items: center; gap: var(--s1);
}
.footer-brand svg { width: 24px; height: 24px; }

footer p { color: var(--text-3); font-size: 0.8rem; }

.footer-links { display: flex; gap: var(--s3); list-style: none; }
.footer-links a {
  color: var(--text-3); font-size: 0.8125rem; font-weight: 500;
  cursor: pointer;
}
.footer-links a:hover { color: var(--brand); }

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
html.js-ready .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
html.js-ready .reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ===== RADAR ANIMATION (CSS fallback) ===== */
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes pulse-ring {
  0% { r: 8; opacity: 0.6; }
  100% { r: 40; opacity: 0; }
}

#radar-sweep { animation: sweep 4s linear infinite; transform-origin: 100px 100px; }
#radar-dots circle[id^="dot-"] { animation: pulse-dot 3s ease-in-out infinite; }
#dot-2 { animation-delay: 0.5s; }
#dot-3 { animation-delay: 1s; }
#dot-4 { animation-delay: 1.5s; }
#dot-5 { animation-delay: 2s; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  html.js-ready .reveal { opacity: 1; transform: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none !important;
    position: absolute; top: 72px; left: 0; right: 0; z-index: 9999;
    background: rgba(6, 10, 20, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--s2) var(--s3) var(--s3);
    gap: 4px;
    border-bottom: 1px solid var(--border-hover);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  }
  .nav-toggle-input:checked ~ .nav-links { display: flex !important; }

  .nav-links a {
    padding: 14px var(--s2); font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-links li:last-child a { border-bottom: none; }

  .hero { min-height: auto; padding: 140px var(--s3) var(--s8); }
  .hero h1 { font-size: 1.8rem; }
  .hero-radar { width: 180px; height: 180px; margin-bottom: var(--s4); }

  .reveal-layout,
  .product-sticky-wrap,
  .audience-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .phone-sticky { position: relative; top: auto; margin-bottom: var(--s4); }

  section { padding: var(--s8) 0; }
  .audience-card { padding: var(--s4) var(--s3); }

  .trust-content { flex-direction: column; gap: var(--s3); }

  .footer-content {
    flex-direction: column; text-align: center; gap: var(--s3);
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { gap: var(--s3); }
}

/* ===== PRIVACY PAGE ===== */
.privacy-page {
  padding: 120px var(--s3) var(--s12);
  max-width: 720px; margin: 0 auto;
}
.privacy-page h1 { font-size: 2rem; margin-bottom: var(--s1); }
.privacy-page .updated { color: var(--text-3); font-size: 0.875rem; margin-bottom: var(--s6); }
.privacy-page h2 { font-size: 1.25rem; margin-top: 36px; margin-bottom: 12px; color: var(--brand); }
.privacy-page p, .privacy-page li { color: var(--text-2); font-size: 0.9375rem; line-height: 1.7; }
.privacy-page ul { margin: 12px 0; padding-left: var(--s3); }
.privacy-page li { margin-bottom: 6px; }
.privacy-page strong { color: var(--text-1); }
