﻿/* ============================================
   NexGuard Landing â€” Design System
   ============================================ */

:root {
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222222;

  --accent-blue: #1E4D8C;
  --accent-blue-light: #2B6CB0;
  --accent-blue-dark: #0D2847;
  --accent-safe: #3D7A5C;
  --accent-danger: #B83B3B;
  --accent-warning: #A67C00;

  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #707070;

  --gradient-main: linear-gradient(135deg, #2B6CB0, #1E4D8C);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(43, 108, 176, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --nav-height: 64px;
  --transition: 0.25s ease;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.hero, .story, .features, .trust, .download, .footer {
  position: relative;
  z-index: 1;
}

.nav, .mobile-menu {
  z-index: 1000;
}

.story-spine {
  z-index: 50;
}

/* Solid content sections â€” no background bleed */
.section-surface {
  background: #0E0E0E;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 2;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left, 16px)) 48px;
}

.section-divider__num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent-blue-light);
  flex-shrink: 0;
}

.section-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(43, 108, 176, 0.4), rgba(255, 255, 255, 0.06));
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ============================================
   Volumetric 3D Icons
   ============================================ */

.icon-3d {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-3d--xs { width: 18px; height: 18px; }
.icon-3d--sm { width: 28px; height: 28px; }
.icon-3d--md { width: 40px; height: 40px; }
.icon-3d--lg { width: 52px; height: 52px; }
.icon-3d--xl { width: 120px; height: 120px; opacity: 0.08; }

.download__info-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__made {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-ui__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.trust-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.chapter-bg__warning {
  position: absolute;
  top: 8%;
  right: 8%;
  pointer-events: none;
}

.threat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.scan-log-line--ok::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  vertical-align: middle;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='18' fill='%233D7A5C'/%3E%3Cpath d='M15 24l6 6 12-14' stroke='%23fff' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Accent text */
.accent-text,
.gradient-text {
  color: var(--accent-blue-light);
}

/* Section tags */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue-light);
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  background: rgba(30, 77, 140, 0.1);
}

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(30, 77, 140, 0.3);
}

.btn--primary:hover {
  background: var(--accent-blue-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30, 77, 140, 0.4);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-accent);
}

.btn--large {
  padding: 18px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid;
}

.tag--danger {
  color: var(--accent-danger);
  border-color: rgba(184, 59, 59, 0.3);
  background: rgba(184, 59, 59, 0.08);
}

.tag--warning {
  color: var(--accent-warning);
  border-color: rgba(166, 124, 0, 0.3);
  background: rgba(166, 124, 0, 0.08);
}

/* ============================================
   Global Effects
   ============================================ */

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.012;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: all var(--transition);
}

.nav--scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-blue-light);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__cta {
  padding: 10px 22px !important;
  background: var(--accent-blue) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  padding: 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
}

.mobile-menu__cta {
  color: var(--accent-blue-light) !important;
  font-weight: 600 !important;
}

/* Language selector */
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 32px 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B0B0B0' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-height: 40px;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--border-accent);
  outline: none;
}

.lang-select--mobile {
  width: 100%;
  margin-bottom: 8px;
}

[dir="rtl"] .trust-pillar {
  border-left: none;
  border-right: 2px solid var(--accent-blue-light);
  background: linear-gradient(270deg, rgba(43, 108, 176, 0.03), transparent);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43, 108, 176, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 108, 176, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 8s ease-in-out infinite;
}

.hero__orb--1 {
  width: 400px;
  height: 400px;
  background: rgba(30, 77, 140, 0.06);
  top: -10%;
  left: -10%;
}

.hero__orb--2 {
  width: 300px;
  height: 300px;
  background: rgba(30, 77, 140, 0.04);
  top: 30%;
  right: -5%;
  animation-delay: -3s;
}

.hero__orb--3 {
  display: none;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 60px 24px 60px;
  max-width: 600px;
  margin-left: max(24px, calc((100vw - 1200px) / 2 + 24px));
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding: 8px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-safe);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(43, 108, 176, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(43, 108, 176, 0); }
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero__stat {
  display: flex;
  flex-direction: column;
}

.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-blue-light);
}

.hero__stat-suffix {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-blue-light);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* Phone Mockup */
.hero__phone {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.phone-mockup {
  position: relative;
}

.phone-mockup__frame {
  width: 280px;
  height: 580px;
  background: linear-gradient(145deg, #1a1f2e, #0d1117);
  border-radius: 40px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  border-radius: 30px;
  overflow: hidden;
}

.phone-mockup__glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse, rgba(43, 108, 176, 0.15) 0%, transparent 70%);
  z-index: 1;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* App UI inside phone */
.app-ui {
  padding: 24px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app-ui__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.app-ui__shield svg {
  width: 40px;
  height: 40px;
}

.app-ui__status-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.app-ui__status-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-safe);
}

.app-ui__scan-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
}

.scan-ring-svg {
  width: 100%;
  height: 100%;
  animation: ringRotate 8s linear infinite;
}

.scan-ring-progress {
  animation: ringProgress 3s ease-in-out infinite;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ringProgress {
  0%, 100% { stroke-dashoffset: 85; }
  50% { stroke-dashoffset: 20; }
}

.app-ui__scan-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-ui__scan-percent {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue-light);
}

.app-ui__scan-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.app-ui__cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-ui__card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.app-ui__card--safe {
  border-color: rgba(43, 108, 176, 0.2);
  background: rgba(43, 108, 176, 0.06);
}

.app-ui__card--clean {
  border-color: rgba(43, 108, 176, 0.15);
  background: rgba(43, 108, 176, 0.04);
}

.app-ui__card-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
}

.app-ui__card-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-blue-light), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Story styles â†’ css/story-scrolly.css */

   ============================================ */

.features {
  padding: 80px 0 120px;
  position: relative;
}

.features__header {
  text-align: center;
  margin-bottom: 64px;
}

.features__header .section-subtitle {
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  padding: 32px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.feature-card:hover {
  border-color: rgba(43, 108, 176, 0.4);
}

.feature-card--accent {
  border-color: rgba(43, 108, 176, 0.25);
  background: #181818;
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(43, 108, 176, 0.08);
  color: var(--accent-blue-light);
  margin-bottom: 20px;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Trust Section
   ============================================ */

.trust {
  padding: 80px 0 120px;
  position: relative;
}

.trust__header {
  text-align: center;
  margin-bottom: 56px;
}

.trust__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.trust-metric {
  text-align: center;
  padding: 36px 24px;
  background: #1A1A1A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.trust-metric__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 20px;
  color: var(--accent-blue-light);
}

.trust-metric__icon svg {
  width: 100%;
  height: 100%;
}

.trust-metric__value {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  line-height: 1.1;
}

.trust-metric__label {
  font-size: 0.875rem;
  color: #B8B8B8;
  line-height: 1.4;
}

.trust__pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.trust-pillar {
  padding: 28px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--accent-blue-light);
  border-radius: var(--radius-md);
  opacity: 1;
}

.trust-pillar__number {
  font-size: 0.8rem;
  color: var(--accent-blue-light);
  margin-bottom: 12px;
}

.trust-pillar__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.trust-pillar__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.trust__badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 28px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  min-width: 140px;
  opacity: 1;
}

.trust-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.trust-badge__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.trust-badge__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Testimonials */
.testimonials {
  overflow: hidden;
}

.testimonials__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 40px;
}

.testimonials__track {
  display: flex;
  gap: 24px;
  animation: testimonialScroll 30s linear infinite;
  width: max-content;
}

.testimonials__track:hover {
  animation-play-state: paused;
}

@keyframes testimonialScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-card {
  flex-shrink: 0;
  width: 360px;
  padding: 28px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

.testimonial-card__stars {
  color: var(--accent-warning);
  font-size: 0.9rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.testimonial-card__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.testimonial-card__name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonial-card__device {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   Download CTA
   ============================================ */

.download {
  padding: 80px 0 120px;
  position: relative;
}

.download__content {
  text-align: center;
}

.download__shield {
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
  animation: shieldFloat 4s ease-in-out infinite;
}

.download__shield svg {
  width: 100%;
  height: 100%;
}

@keyframes shieldFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.download__title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.download__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.download__actions {
  margin-bottom: 24px;
}

.download__info {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 64px 0 32px;
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer__logo svg {
  width: 28px;
  height: 28px;
  color: var(--accent-blue-light);
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer__col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color var(--transition);
}

.footer__col a:hover {
  color: var(--accent-blue-light);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero__content {
    margin: 0 auto;
    padding: 80px 24px 40px;
    max-width: 100%;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__phone {
    padding: 20px;
  }

  .phone-mockup__frame {
    width: 240px;
    height: 500px;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .hero__stats {
    flex-direction: column;
    gap: 16px;
  }

  .hero__stat-divider {
    width: 40px;
    height: 1px;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .trust__metrics {
    grid-template-columns: 1fr;
  }

  .trust__badges {
    gap: 12px;
  }

  .trust-badge {
    min-width: 120px;
    padding: 16px 20px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .testimonial-card {
    width: min(300px, 85vw);
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 56px;
  }

  .hero__content {
    padding: 48px 16px 24px;
  }

  .hero__phone {
    padding: 12px;
  }

  .phone-mockup__frame {
    width: min(220px, 75vw);
    height: auto;
    aspect-ratio: 280 / 580;
    border-radius: 32px;
    padding: 8px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .trust-metric {
    padding: 24px 16px;
  }

  .trust-badge {
    min-width: calc(50% - 8px);
    flex: 1 1 calc(50% - 8px);
    padding: 16px 12px;
  }

  .download__title {
    font-size: 1.5rem;
  }

  .hero__scroll-hint {
    display: none;
  }
}

@media (max-width: 360px) {
  .hero__stats {
    gap: 12px;
  }

  .hero__stat-value {
    font-size: 1.4rem;
  }

  .phone-mockup__frame {
    width: min(200px, 80vw);
  }

  .result-card {
    min-width: calc(50% - 8px);
    flex: 1;
  }

  .story__results {
    justify-content: center;
  }

  .story-spine {
    display: none;
  }

  .story-bg__codes {
    display: none;
  }
}

/* ============================================
   Story-driven global background
   ============================================ */

.story-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.story-bg__base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(30, 77, 140, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(30, 77, 140, 0.06) 0%, transparent 50%),
    var(--bg-primary);
}

.story-bg__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.story-bg__layer.is-active {
  opacity: 1;
}

.story-bg__layer--calm {
  background: #0A0A0A;
}

.story-bg__layer--hero {
  background:
    radial-gradient(ellipse 60% 40% at 40% 15%, rgba(30, 77, 140, 0.1) 0%, transparent 55%);
}

.story-bg__layer--threat {
  background:
    radial-gradient(ellipse 50% 35% at 60% 40%, rgba(184, 59, 59, 0.07) 0%, transparent 55%);
}

.story-bg__layer--scan {
  background:
    radial-gradient(ellipse 45% 40% at 50% 45%, rgba(30, 77, 140, 0.09) 0%, transparent 55%);
}

.story-bg__layer--clean {
  background:
    radial-gradient(ellipse 50% 35% at 50% 50%, rgba(30, 77, 140, 0.08) 0%, transparent 55%);
}

.story-bg__hex {
  position: absolute;
  inset: -20%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0L56 16v32L28 64 0 48V16z M28 36l28 16v32L28 100 0 84V52z' fill='none' stroke='%232B6CB0' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 56px 100px;
}

.story-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43, 108, 176, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 108, 176, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black 20%, transparent 75%);
}

.story-bg__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.story-bg__scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(43, 108, 176, 0.08), rgba(43, 108, 176, 0.15), rgba(43, 108, 176, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.8s;
}

[data-phase="scan"] .story-bg__scan-beam {
  opacity: 1;
}

.story-bg__shields {
  position: absolute;
  inset: 0;
}

.story-bg__shield {
  position: absolute;
  color: rgba(43, 108, 176, 0.12);
  width: 48px;
  height: 48px;
}

.story-bg__shield--1 { top: 12%; left: 8%; width: 64px; height: 64px; }
.story-bg__shield--2 { top: 55%; right: 6%; width: 40px; height: 40px; color: rgba(43, 108, 176, 0.08); }
.story-bg__shield--3 { bottom: 20%; left: 15%; width: 56px; height: 56px; color: rgba(43, 108, 176, 0.1); }
.story-bg__shield--4 { top: 30%; right: 18%; width: 32px; height: 32px; color: rgba(43, 108, 176, 0.06); }

[data-phase="threat"] .story-bg__shield { color: rgba(184, 59, 59, 0.1); }
[data-phase="clean"] .story-bg__shield { color: rgba(61, 122, 92, 0.12); }

.story-bg__codes {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 80px;
  padding: 10%;
  align-content: space-between;
  justify-content: space-around;
  opacity: 0.06;
  font-size: 0.7rem;
  color: var(--accent-blue-light);
  letter-spacing: 0.1em;
  font-weight: 500;
}

.story-bg__codes span {
  white-space: nowrap;
}

/* Story spine */
.story-spine {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 60vh;
  z-index: 50;
  pointer-events: none;
}

.story-spine__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
  transform: translateX(-50%);
}

.story-spine__fill {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0%;
  background: var(--accent-blue-light);
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(43, 108, 176, 0.5);
  transition: height 0.1s linear;
}

.story-spine__dot {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transform: translateX(-50%);
  transition: all 0.4s ease;
}

.story-spine__dot[data-spine="hero"]      { top: 0%; }
.story-spine__dot[data-spine="threat"]    { top: 16%; }
.story-spine__dot[data-spine="scan"]      { top: 32%; }
.story-spine__dot[data-spine="clean"]     { top: 48%; }
.story-spine__dot[data-spine="features"]  { top: 62%; }
.story-spine__dot[data-spine="trust"]     { top: 76%; }
.story-spine__dot[data-spine="download"]  { top: 92%; }

.story-spine__dot.is-lit,
.story-spine__dot.is-active {
  background: var(--accent-blue-light);
  border-color: var(--accent-blue-light);
  transform: translateX(-50%) scale(1.2);
}


/* Chapter backgrounds */
.chapter-bg {
  position: absolute;
  inset: -10% -5%;
  pointer-events: none;
  z-index: 0;
}

.chapter-bg--threat {
  background:
    radial-gradient(ellipse 50% 40% at 70% 50%, rgba(184, 59, 59, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 30% 25% at 20% 60%, rgba(166, 124, 0, 0.05) 0%, transparent 50%);
}

.chapter-bg--scan {
  background:
    radial-gradient(ellipse 45% 45% at 30% 50%, rgba(43, 108, 176, 0.1) 0%, transparent 60%);
}

.chapter-bg--scan::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(43, 108, 176, 0.02) 80px,
    rgba(43, 108, 176, 0.02) 81px
  );
}

.chapter-bg--clean {
  background:
    radial-gradient(ellipse 55% 45% at 60% 40%, rgba(61, 122, 92, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 25% 65%, rgba(43, 108, 176, 0.08) 0%, transparent 50%);
}

.ambient-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(80px);
}

.ambient-glow--left {
  left: -10%;
  top: 20%;
  background: rgba(184, 59, 59, 0.06);
}

.ambient-glow--right {
  right: -10%;
  bottom: 20%;
  background: rgba(43, 108, 176, 0.08);
}

.features__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43, 108, 176, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 108, 176, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.features__orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(43, 108, 176, 0.08);
}

.features__orbit--1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -15%;
  animation: ringExpand 12s ease-in-out infinite;
}

.features__orbit--2 {
  width: 350px;
  height: 350px;
  bottom: -5%;
  left: -10%;
  animation: ringExpand 10s ease-in-out infinite reverse;
}

.trust__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(43, 108, 176, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.trust__locks {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  padding: 5%;
  justify-content: space-around;
  align-content: space-around;
}

.download__rays {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(43, 108, 176, 0.03) 10deg, transparent 20deg);
  animation: bgRadarSpin 20s linear infinite;
}

.download__pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(43, 108, 176, 0.1);
  animation: downloadPulse 4s ease-out infinite;
}

@keyframes downloadPulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}


.story-scrolly__stage {
  position: relative;
  z-index: 1;
}

.story__header,
.features .container,
.trust .container,
.download .container {
  position: relative;
  z-index: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .testimonials__track {
    animation: none;
  }

  .device-scene__term-line {
    opacity: 1;
    transform: none;
  }
}
