/* ================================================
   BIXAH — PREMIUM CSS v2
   Apple-caliber design system
   GPU-accelerated, reduced-motion aware
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..900;1,14..32,300..900&display=swap');

/* ─── Layout offset for ticker ─── */
:root {
  --ticker-h: 36px;
}

/* ─── LIVE THREAT FEED TICKER ─── */
.threat-ticker {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,69,58,0.2);
  overflow: hidden;
  contain: strict;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 0 16px;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ff453a;
  border-right: 1px solid rgba(255,255,255,0.06);
  height: 100%;
  background: rgba(255,69,58,0.06);
  text-transform: uppercase;
  z-index: 1;
}

.ticker-live-dot {
  width: 6px; height: 6px;
  background: #ff453a;
  border-radius: 50%;
  box-shadow: 0 0 8px #ff453a;
  animation: blink-live 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.6); }
}

.ticker-track-outer {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 3%, black 97%, transparent 100%);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
  /* animation set dynamically in JS via requestAnimationFrame */
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
  border-right: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  height: var(--ticker-h);
}

.ticker-sev {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.ticker-sev.critical { background: rgba(255,69,58,0.18); color: #ff453a; border: 1px solid rgba(255,69,58,0.3); }
.ticker-sev.high     { background: rgba(255,159,10,0.15); color: #ff9f0a; border: 1px solid rgba(255,159,10,0.3); }
.ticker-sev.medium   { background: rgba(255,214,10,0.1);  color: #ffd60a; border: 1px solid rgba(255,214,10,0.2); }

.ticker-domain {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.67rem;
  color: rgba(255,255,255,0.6);
}

.ticker-type  { color: rgba(255,255,255,0.35); }
.ticker-country { opacity: 0.5; }
.ticker-time  { color: rgba(255,255,255,0.22); font-size: 0.63rem; }
.ticker-sep   { color: rgba(255,255,255,0.08); font-size: 0.9rem; padding: 0; border: none; }

/* ─── Offset navbar & hero to sit below ticker ─── */
.navbar { top: var(--ticker-h); }
.nav-mobile { top: calc(var(--ticker-h) + 52px); }
.hero { padding-top: calc(var(--ticker-h) + 52px + 60px); }

/* ─── Layers ─── */
@layer base, tokens, layout, components, utilities, animations;

@layer tokens {
  :root {
    /* Brand */
    --blue:          #0071e3;
    --blue-light:    #2997ff;
    --blue-glow:     rgba(41, 151, 255, 0.18);
    --blue-subtle:   rgba(41, 151, 255, 0.06);

    /* Backgrounds */
    --bg:       #000;
    --bg-1:     #080808;
    --bg-2:     #111;
    --bg-3:     #1c1c1e;
    --bg-4:     #2c2c2e;
    --bg-glass: rgba(17,17,17,0.7);

    /* Surfaces */
    --surface:        rgba(255,255,255,0.035);
    --surface-hover:  rgba(255,255,255,0.065);
    --surface-active: rgba(255,255,255,0.1);

    /* Borders */
    --border:        rgba(255,255,255,0.07);
    --border-md:     rgba(255,255,255,0.11);
    --border-strong: rgba(255,255,255,0.18);
    --border-blue:   rgba(41,151,255,0.35);

    /* Text */
    --t1: #f5f5f7;
    --t2: #98989d;
    --t3: #6e6e73;
    --t4: #3a3a3c;

    /* Semantic */
    --danger:  #ff453a;
    --success: #32d74b;
    --warning: #ffd60a;
    --info:    var(--blue-light);

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

    /* Motion */
    --dur-fast:   180ms;
    --dur-med:    300ms;
    --dur-slow:   600ms;
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out:   cubic-bezier(0, 0, 0.2, 1);
    --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Radius */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 30px;
    --r-2xl:44px;
    --r-pill: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.4);
    --shadow-blue: 0 0 0 1px var(--border-blue), 0 8px 32px rgba(41,151,255,0.15);
    --shadow-glow: 0 0 60px rgba(41,151,255,0.12);
  }
}

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

  html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

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

  ::selection { background: rgba(41,151,255,0.25); color: var(--t1); }
  :focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }
  a { text-decoration: none; color: inherit; }
  img, svg { display: block; max-width: 100%; }
  button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }

  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: var(--r-pill); }
  ::-webkit-scrollbar-thumb:hover { background: var(--t4); }
}

@layer layout {
  .container        { max-width: 980px;  margin: 0 auto; padding: 0 24px; }
  .container-wide   { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
  .container-narrow { max-width: 680px;  margin: 0 auto; padding: 0 24px; }

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

  .divider { height: 1px; background: var(--border); }
}

/* ─── TYPOGRAPHY ─── */
@layer components {
  .display-1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.04em;
  }
  .display-2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.07;
    letter-spacing: -0.03em;
  }
  .display-3 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
  }
  .headline {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
  }
  .body-lg {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.65;
    color: var(--t2);
    font-weight: 400;
  }
  .body-sm { font-size: 0.9rem; line-height: 1.6; color: var(--t2); }
  .caption  { font-size: 0.75rem; color: var(--t3); }
  .mono     { font-family: 'SF Mono', 'Fira Code', monospace; }

  .eyebrow {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-light);
    margin-bottom: 12px;
  }

  .gradient-text {
    background: linear-gradient(135deg, #fff 0%, #b8d4ff 50%, var(--blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback */
    color: var(--blue-light);
  }
}

/* ─── BUTTONS ─── */
@layer components {
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 26px;
    border-radius: var(--r-pill);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: none;
    transition:
      background var(--dur-fast) var(--ease),
      box-shadow var(--dur-fast) var(--ease),
      transform var(--dur-fast) var(--ease-spring),
      opacity var(--dur-fast) var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  /* Ripple on tap */
  .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--dur-fast);
  }
  .btn:active::after { opacity: 1; }
  .btn:active { transform: scale(0.97); }

  .btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,113,227,0.3);
  }
  .btn-primary:hover {
    background: #0077ed;
    box-shadow: 0 4px 20px rgba(0,113,227,0.4);
    transform: translateY(-1px);
  }

  .btn-ghost {
    background: var(--surface);
    color: var(--t1);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }
  .btn-ghost:hover {
    background: var(--surface-hover);
    border-color: var(--border-md);
    transform: translateY(-1px);
  }

  .btn-text {
    background: none;
    color: var(--blue-light);
    padding: 8px 4px;
    font-size: 0.88rem;
    font-weight: 500;
    gap: 5px;
  }
  .btn-text:hover { color: var(--blue); }
  .btn-text svg { transition: transform var(--dur-fast) var(--ease-spring); }
  .btn-text:hover svg { transform: translateX(3px); }

  .btn-lg { padding: 16px 34px; font-size: 0.95rem; }
  .btn-sm { padding: 9px 18px; font-size: 0.82rem; }
}

/* ─── NAVBAR ─── */
@layer components {
  .navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: 52px;
    display: flex;
    align-items: center;
    transition:
      background var(--dur-med) var(--ease),
      border-color var(--dur-med) var(--ease),
      backdrop-filter var(--dur-med);
    border-bottom: 1px solid transparent;
    will-change: background;
  }
  .navbar.scrolled {
    background: rgba(0,0,0,0.82);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-color: var(--border);
  }
  .nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .nav-logo {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.95rem; font-weight: 700;
    color: var(--t1); letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: opacity var(--dur-fast);
  }
  .nav-logo:hover { opacity: 0.8; }
  .nav-logo img { height: 26px; width: auto; }

  .nav-links { display: flex; align-items: center; list-style: none; gap: 2px; }
  .nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--t2);
    padding: 5px 12px;
    border-radius: var(--r-pill);
    transition: color var(--dur-fast);
  }
  .nav-links a:hover { color: var(--t1); }

  .nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

  .nav-hamburger {
    display: none; flex-direction: column; gap: 4px;
    padding: 8px; cursor: pointer; background: none; border: none;
  }
  .nav-hamburger span {
    display: block; width: 20px; height: 1.5px;
    background: var(--t2); border-radius: 2px;
    transition: transform var(--dur-med) var(--ease), opacity var(--dur-fast);
    transform-origin: center;
  }

  .nav-mobile {
    display: none;
    position: fixed;
    top: 52px; inset: auto 0 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: saturate(180%) blur(24px);
    border-top: 1px solid var(--border);
    padding: 12px 24px 32px;
    z-index: 99;
    flex-direction: column;
    gap: 2px;
    animation: slideDown var(--dur-med) var(--ease-out) both;
  }
  .nav-mobile.open { display: flex; }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-mobile a {
    font-size: 0.95rem; color: var(--t2);
    padding: 13px 8px;
    border-bottom: 1px solid var(--border);
    transition: color var(--dur-fast);
  }
  .nav-mobile a:last-child { border-bottom: none; }
  .nav-mobile a:hover { color: var(--t1); }

  @media (max-width: 768px) {
    .nav-links, .nav-actions .btn-ghost { display: none; }
    .nav-hamburger { display: flex; }
  }
}

/* ─── HERO ─── */
@layer components {
  .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 96px 24px 80px;
    position: relative;
    overflow: hidden;
    contain: layout style;
  }

  /* Canvas sits behind everything */
  #heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
    will-change: transform;
  }

  .hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(41,151,255,0.12) 0%, transparent 70%);
    pointer-events: none;
    will-change: opacity;
  }

  .hero-content { position: relative; z-index: 1; width: 100%; }

  .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(41,151,255,0.08);
    border: 1px solid rgba(41,151,255,0.2);
    border-radius: var(--r-pill);
    padding: 6px 16px 6px 10px;
    font-size: 0.76rem; font-weight: 500;
    color: var(--blue-light);
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
    animation: badge-in 0.8s var(--ease-spring) both;
  }

  .hero-badge-dot {
    width: 6px; height: 6px;
    background: var(--blue-light);
    border-radius: 50%;
    animation: pulse-dot 2.5s ease-in-out infinite;
    flex-shrink: 0;
  }

  .hero-title { max-width: 860px; margin: 0 auto 22px; }
  .hero-body  { max-width: 520px; margin: 0 auto 40px; }
  .hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }

  /* Phone mockup */
  .phone-wrap {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: flex-start;
  }

  .phone-mockup {
    width: 260px; height: 520px;
    background: var(--bg-2);
    border-radius: 40px;
    border: 1px solid var(--border-strong);
    overflow: hidden;
    position: relative;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.04) inset,
      var(--shadow-lg),
      0 0 80px rgba(41,151,255,0.08);
    animation: phone-float 6s ease-in-out infinite;
    will-change: transform;
  }

  .phone-notch {
    position: absolute; top: 10px; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 24px;
    background: var(--bg); border-radius: var(--r-pill);
    z-index: 2;
  }

  .phone-status {
    position: absolute; top: 14px; right: 20px;
    display: flex; gap: 4px; align-items: center;
    z-index: 3;
  }
  .phone-signal {
    display: flex; gap: 1.5px; align-items: flex-end;
  }
  .phone-signal span {
    width: 3px; background: var(--t3); border-radius: 1px;
  }
  .phone-signal span:nth-child(1) { height: 5px; }
  .phone-signal span:nth-child(2) { height: 8px; }
  .phone-signal span:nth-child(3) { height: 11px; }

  .phone-screen {
    position: absolute; inset: 0;
    padding: 52px 14px 14px;
    display: flex; flex-direction: column; gap: 10px;
    overflow: hidden;
  }

  .phone-notification {
    background: var(--bg-3);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    transform-origin: top center;
    animation: notif-slide 0.5s var(--ease-spring) both;
  }

  .phone-notification:nth-child(1) { animation-delay: 0.4s; }
  .phone-notification:nth-child(2) { animation-delay: 1.2s; }
  .phone-notification:nth-child(3) { animation-delay: 2.0s; }
  .phone-notification:nth-child(4) { animation-delay: 2.8s; opacity: 0.4; }

  .notif-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 5px;
  }
  .notif-app-wrap { display: flex; align-items: center; gap: 6px; }
  .notif-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
  .notif-dot.red    { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
  .notif-dot.green  { background: var(--success); box-shadow: 0 0 6px var(--success); }
  .notif-dot.blue   { background: var(--blue-light); box-shadow: 0 0 6px var(--blue-light); }
  .notif-app   { font-size: 0.6rem; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: 0.06em; }
  .notif-time  { font-size: 0.6rem; color: var(--t4); }
  .notif-title { font-size: 0.75rem; font-weight: 600; color: var(--t1); margin-bottom: 2px; }
  .notif-body  { font-size: 0.68rem; color: var(--t2); line-height: 1.4; }

  .hero-scroll-hint {
    position: absolute; bottom: 28px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
  }
  .scroll-line {
    width: 1px; height: 36px;
    background: linear-gradient(to bottom, var(--t3), transparent);
    animation: scroll-breathe 2s ease-in-out infinite;
  }
}

/* ─── STATS STRIP ─── */
@layer components {
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .stats-strip-item {
    padding: 52px 28px;
    text-align: center;
    border-right: 1px solid var(--border);
    transition: background var(--dur-med) var(--ease);
  }
  .stats-strip-item:last-child { border-right: none; }
  .stats-strip-item:hover { background: var(--surface); }

  .stat-number {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--t1);
    font-variant-numeric: tabular-nums;
  }
  .stat-label { font-size: 0.84rem; color: var(--t2); line-height: 1.5; }

  @media (max-width: 768px) {
    .stats-strip { grid-template-columns: 1fr 1fr; }
    .stats-strip-item:nth-child(2) { border-right: none; }
    .stats-strip-item:nth-child(3) { border-top: 1px solid var(--border); }
  }
  @media (max-width: 460px) {
    .stats-strip { grid-template-columns: 1fr; }
    .stats-strip-item { border-right: none !important; border-bottom: 1px solid var(--border); }
    .stats-strip-item:last-child { border-bottom: none; }
  }
}

/* ─── HOW IT WORKS ─── */
@layer components {
  .steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .step {
    padding: 52px 40px;
    text-align: center;
    position: relative;
    transition: background var(--dur-med);
  }
  .step:hover { background: var(--surface); }

  .step-num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--blue-subtle);
    border: 1px solid rgba(41,151,255,0.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700;
    color: var(--blue-light);
    margin: 0 auto 22px;
    transition: background var(--dur-med), box-shadow var(--dur-med);
  }
  .step:hover .step-num {
    background: rgba(41,151,255,0.15);
    box-shadow: 0 0 20px rgba(41,151,255,0.2);
  }
  .step-title { font-size: 1rem; font-weight: 600; color: var(--t1); margin-bottom: 10px; letter-spacing: -0.01em; }
  .step-body  { font-size: 0.86rem; color: var(--t2); line-height: 1.65; }

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

  /* Feature grid */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
  }
  .feature-cell {
    background: var(--bg-1);
    padding: 44px 36px;
    transition: background var(--dur-med) var(--ease);
    position: relative;
    overflow: hidden;
  }
  .feature-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-subtle), transparent 60%);
    opacity: 0;
    transition: opacity var(--dur-med) var(--ease);
  }
  .feature-cell:hover { background: var(--bg-2); }
  .feature-cell:hover::after { opacity: 1; }

  .feature-icon {
    width: 40px; height: 40px;
    color: var(--blue-light);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: transform var(--dur-med) var(--ease-spring);
  }
  .feature-cell:hover .feature-icon { transform: scale(1.1); }

  .feature-title { font-size: 0.98rem; font-weight: 600; color: var(--t1); margin-bottom: 9px; position: relative; z-index: 1; }
  .feature-body  { font-size: 0.86rem; color: var(--t2); line-height: 1.65; position: relative; z-index: 1; }

  @media (max-width: 900px) { .features-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }
}

/* ─── REALITY SECTION ─── */
@layer components {
  .reality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
  }
  @media (max-width: 768px) {
    .reality-grid { grid-template-columns: 1fr; gap: 48px; }
  }

  .stat-card {
    padding: 32px 36px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: border-color var(--dur-med), transform var(--dur-med) var(--ease);
    position: relative;
    overflow: hidden;
  }
  .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(41,151,255,0.4), transparent);
    opacity: 0;
    transition: opacity var(--dur-med);
  }
  .stat-card:hover { border-color: var(--border-md); transform: translateY(-2px); }
  .stat-card:hover::before { opacity: 1; }

  .stat-card .stat-number {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 8px;
  }
  .stat-card .stat-label { font-size: 0.85rem; }
}

/* ─── TRY TOOL ─── */
@layer components {
  .try-tool {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--dur-med);
  }
  .try-tool:focus-within {
    box-shadow: var(--shadow-blue);
  }

  .try-tool-header { padding: 36px 36px 0; }

  .try-input-area { padding: 20px 36px 28px; }

  .url-input-wrap {
    display: flex; gap: 8px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 7px 7px 7px 18px;
    transition: border-color var(--dur-med), box-shadow var(--dur-med);
    align-items: center;
  }
  .url-input-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
  }

  .url-input {
    flex: 1;
    background: none; border: none; outline: none;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.86rem;
    color: var(--t1);
    padding: 8px 0;
    min-width: 0;
  }
  .url-input::placeholder { color: var(--t4); }

  .url-submit {
    padding: 11px 22px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--r-md);
    font-size: 0.84rem; font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
  }
  .url-submit:hover { background: #0077ed; transform: scale(1.02); }
  .url-submit:active { transform: scale(0.97); }
  .url-submit:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }

  /* Scanning animation */
  .scan-ui { padding: 0 36px 28px; }

  .scan-stages {
    display: flex; flex-direction: column; gap: 10px;
  }
  .scan-stage {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.82rem; color: var(--t3);
    transition: color var(--dur-med);
  }
  .scan-stage.active { color: var(--blue-light); }
  .scan-stage.done   { color: var(--success); }

  .scan-stage-icon {
    width: 18px; height: 18px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }

  .scan-bar-wrap {
    margin-top: 20px;
    height: 3px;
    background: var(--bg-4);
    border-radius: var(--r-pill);
    overflow: hidden;
  }
  .scan-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--blue-light), var(--blue));
    background-size: 200% 100%;
    border-radius: var(--r-pill);
    width: 0%;
    transition: width 0.15s linear;
    animation: shimmer 1.5s linear infinite;
  }
  @keyframes shimmer { to { background-position: -200% 0; } }

  /* Result panel */
  .try-result { display: none; padding: 0 36px 36px; }
  .try-result.visible { display: block; animation: result-in 0.4s var(--ease-out) both; }
  @keyframes result-in { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }

  .result-box {
    background: var(--bg-3);
    border-radius: var(--r-lg);
    padding: 24px;
    border: 1px solid var(--border);
    transition: border-color var(--dur-med);
  }

  .result-verdict {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }
  .verdict-indicator {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0; margin-top: 5px;
    animation: pulse-dot 2s ease-in-out infinite;
  }
  .verdict-indicator.safe    { background: var(--success); box-shadow: 0 0 12px rgba(50,215,75,0.5); }
  .verdict-indicator.warning { background: var(--warning); box-shadow: 0 0 12px rgba(255,214,10,0.5); }
  .verdict-indicator.danger  { background: var(--danger);  box-shadow: 0 0 12px rgba(255,69,58,0.5); }

  .verdict-label { font-size: 1rem; font-weight: 600; color: var(--t1); margin-bottom: 3px; }
  .verdict-sub   { font-size: 0.82rem; color: var(--t2); }

  .result-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  .metric-item {
    background: var(--bg-2);
    border-radius: var(--r-sm);
    padding: 13px;
    border: 1px solid var(--border);
  }
  .metric-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t3); margin-bottom: 5px; }
  .metric-value { font-size: 0.88rem; font-weight: 600; color: var(--t1); font-family: 'SF Mono', monospace; }

  .result-findings { margin-top: 16px; }
  .finding-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem; color: var(--t2);
    animation: finding-in 0.3s var(--ease-out) both;
  }
  .finding-row:last-child { border-bottom: none; }
  @keyframes finding-in { from { opacity:0; transform:translateX(-4px); } to { opacity:1; transform:translateX(0); } }

  .finding-icon { flex-shrink: 0; margin-top: 1px; font-size: 0.7rem; }

  .result-cta-box {
    margin-top: 16px;
    padding: 18px 20px;
    background: var(--bg-2);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .result-cta-box p { font-size: 0.85rem; color: var(--t2); }

  .result-used-msg {
    text-align: center;
    padding: 40px 36px;
  }

  .disclaimer {
    padding: 14px 36px 20px;
    font-size: 0.72rem;
    color: var(--t4);
    border-top: 1px solid var(--border);
    line-height: 1.5;
  }

  @media (max-width: 580px) {
    .try-tool-header, .try-input-area, .scan-ui, .try-result { padding-left: 20px; padding-right: 20px; }
    .result-metrics { grid-template-columns: 1fr 1fr; }
    .url-input-wrap { flex-direction: column; padding: 10px; }
    .url-submit { width: 100%; justify-content: center; }
    .result-cta-box { flex-direction: column; text-align: center; }
  }
}

/* ─── PRICING ─── */
@layer components {
  .pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    max-width: 760px;
    margin: 0 auto;
  }
  .pricing-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 36px;
    transition: transform var(--dur-med) var(--ease), border-color var(--dur-med), box-shadow var(--dur-med);
    position: relative;
    overflow: hidden;
    contain: layout style;
  }
  .pricing-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-md);
    box-shadow: var(--shadow-md);
  }
  .pricing-card.featured {
    border-color: var(--blue);
    background: linear-gradient(160deg, rgba(41,151,255,0.07) 0%, var(--bg-2) 55%);
  }
  .pricing-card.featured:hover {
    box-shadow: var(--shadow-blue);
    border-color: var(--blue-light);
  }

  .pricing-badge {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    margin-bottom: 20px;
  }
  .pricing-plan {
    font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--t3); margin-bottom: 8px;
  }
  .pricing-price {
    font-size: 3.4rem; font-weight: 700;
    letter-spacing: -0.05em; color: var(--t1);
    line-height: 1; margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
  }
  .pricing-price sup { font-size: 1.3rem; font-weight: 600; vertical-align: top; margin-top: 10px; margin-right: 2px; color: var(--t2); }
  .pricing-price sub { font-size: 0.95rem; font-weight: 400; color: var(--t3); }

  .pricing-desc { font-size: 0.85rem; color: var(--t2); margin-bottom: 28px; line-height: 1.55; }

  .pricing-features {
    list-style: none;
    display: flex; flex-direction: column;
    gap: 12px; margin-bottom: 32px;
  }
  .pricing-features li {
    display: flex; align-items: flex-start;
    gap: 11px; font-size: 0.88rem; color: var(--t2);
  }
  .check-icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--success); margin-top: 2px; }

  .pricing-divider { height: 1px; background: var(--border); margin: 0 -36px 28px; }

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

/* ─── FAQ ─── */
@layer components {
  .faq-item { border-bottom: 1px solid var(--border); }
  .faq-item:first-child { border-top: 1px solid var(--border); }

  .faq-question {
    width: 100%; background: none; border: none;
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0; cursor: pointer; text-align: left; gap: 20px;
    -webkit-tap-highlight-color: transparent;
  }
  .faq-q-text {
    font-size: 0.96rem; font-weight: 500; color: var(--t1);
    letter-spacing: -0.01em;
    transition: color var(--dur-fast);
  }
  .faq-question:hover .faq-q-text { color: var(--blue-light); }

  .faq-toggle {
    width: 22px; height: 22px; flex-shrink: 0;
    position: relative;
    transition: transform var(--dur-med) var(--ease-spring);
  }
  .faq-toggle::before,
  .faq-toggle::after {
    content: '';
    position: absolute;
    background: var(--t3);
    border-radius: var(--r-pill);
    transition: background var(--dur-fast), transform var(--dur-med) var(--ease-spring), opacity var(--dur-med);
  }
  .faq-toggle::before { /* horizontal */ width: 14px; height: 1.5px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .faq-toggle::after  { /* vertical   */ width: 1.5px; height: 14px; top: 50%; left: 50%; transform: translate(-50%, -50%); }

  .faq-item.open .faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
  .faq-item.open .faq-toggle::before { background: var(--blue-light); }
  .faq-item.open .faq-q-text { color: var(--blue-light); }

  .faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
  }
  .faq-item.open .faq-answer { max-height: 500px; padding-bottom: 20px; }
  .faq-answer p { font-size: 0.9rem; color: var(--t2); line-height: 1.78; }
}

/* ─── CTA ─── */
@layer components {
  .cta-section {
    text-align: center;
    padding: 120px 24px;
    position: relative;
    overflow: hidden;
  }
  .cta-glow {
    position: absolute;
    bottom: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(41,151,255,0.1) 0%, transparent 70%);
    pointer-events: none;
  }
}

/* ─── FOOTER ─── */
@layer components {
  .footer {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
  }
  .footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
  }
  .footer-logo {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.9rem; font-weight: 700; color: var(--t1);
    margin-bottom: 12px;
  }
  .footer-logo img { height: 24px; }
  .footer-tagline { font-size: 0.82rem; color: var(--t3); line-height: 1.6; max-width: 240px; }
  .footer-col-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); margin-bottom: 14px; }
  .footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
  .footer-links a { font-size: 0.84rem; color: var(--t2); transition: color var(--dur-fast); }
  .footer-links a:hover { color: var(--t1); }
  .footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
  .footer-copy  { font-size: 0.76rem; color: var(--t4); }
  .footer-legal { display: flex; gap: 18px; }
  .footer-legal a { font-size: 0.76rem; color: var(--t4); transition: color var(--dur-fast); }
  .footer-legal a:hover { color: var(--t2); }

  @media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; text-align: center; } }
}

/* ─── TOAST ─── */
@layer components {
  .toast {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: var(--bg-3);
    border: 1px solid var(--border-md);
    border-radius: var(--r-pill);
    padding: 13px 22px;
    font-size: 0.84rem; color: var(--t1);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.4s var(--ease-spring), opacity 0.3s var(--ease);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: var(--shadow-md);
  }
  .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ─── SCROLL PROGRESS ─── */
@layer components {
  #scrollProgress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    z-index: 200;
    transition: width 0.1s linear;
    transform-origin: left;
  }
}

/* ─── ANIMATIONS ─── */
@layer animations {
  .fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  .fade-up.visible { opacity: 1; transform: translateY(0); }

  .fade-in {
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
  }
  .fade-in.visible { opacity: 1; }

  @keyframes badge-in {
    from { opacity:0; transform:translateY(-10px) scale(0.95); }
    to   { opacity:1; transform:translateY(0) scale(1); }
  }

  @keyframes phone-float {
    0%, 100% { transform: translateY(0) rotate(0.3deg); }
    50%       { transform: translateY(-12px) rotate(-0.3deg); }
  }

  @keyframes notif-slide {
    from { opacity:0; transform:translateX(16px) scale(0.97); }
    to   { opacity:1; transform:translateX(0) scale(1); }
  }

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

  @keyframes scroll-breathe {
    0%, 100% { opacity:0.3; transform:scaleY(0.8); }
    50%       { opacity:0.8; transform:scaleY(1); }
  }

  /* Reduced motion — kill all animations */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    .phone-mockup { animation: none; }
    html { scroll-behavior: auto; }
    .fade-up, .fade-in { opacity: 1; transform: none; transition: none; }
  }
}
