/* ============================================================
   AIR SHIELD — HI-FI MODE
   GTA 6-inspired: full-motion, rich animations, immersive effects
   ============================================================ */

:root {
  --red: #cc0001;
  --red-bright: #ff3131;
  --red-deep: #7a0000;
  --red-glow: rgba(255, 49, 49, 0.45);
  --bg: #06060a;
  --bg-2: #0a0a14;
  --panel: #0e0e18;
  --panel-2: #14141f;
  --border: #1a1a28;
  --border-2: #242436;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --text-faint: #505060;
  --accent: var(--red-bright);
  --accent-soft: rgba(204, 0, 1, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  --glow: 0 0 30px var(--red-glow);
}

[data-motion="off"] * { animation: none !important; transition: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.55;
  overflow-x: hidden;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }

/* ============================================================ LOADER */
.loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.8s ease, visibility 0.8s ease; }
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-shards { display: flex; gap: 4px; margin-bottom: 24px; }
.shard { width: 40px; height: 80px; background: var(--red); border-radius: 2px; animation: shardReveal 1.2s ease forwards; opacity: 0; }
.shard.s0 { animation-delay: 0s; } .shard.s1 { animation-delay: 0.1s; }
.shard.s2 { animation-delay: 0.2s; } .shard.s3 { animation-delay: 0.3s; }
.shard.s4 { animation-delay: 0.4s; } .shard.s5 { animation-delay: 0.5s; }
@keyframes shardReveal { 0% { opacity: 0; transform: translateY(20px) skewX(-10deg); } 100% { opacity: 1; transform: translateY(0) skewX(0); } }
.loader-text { font-size: 24px; font-weight: 900; letter-spacing: 8px; margin-bottom: 20px; color: var(--text); animation: fadeIn 0.8s 0.6s ease backwards; }
.loader-bar { width: 240px; height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; }
.loader-bar-fill { height: 100%; width: 0%; background: var(--red); box-shadow: 0 0 12px var(--red); transition: width 1.5s ease; }

/* ============================================================ CUSTOM CURSOR */
.cursor { position: fixed; width: 8px; height: 8px; background: var(--red-bright); border-radius: 50%; pointer-events: none; z-index: 10000; transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, opacity 0.2s; mix-blend-mode: difference; }
.cursor-trail { position: fixed; width: 32px; height: 32px; border: 1px solid var(--red); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width 0.15s, height 0.15s, border-color 0.15s, opacity 0.3s; opacity: 0.5; }
.cursor.hovering { width: 16px; height: 16px; }
.cursor-trail.hovering { width: 48px; height: 48px; border-color: var(--red-bright); opacity: 1; }

/* ============================================================ SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 64px; left: 0; height: 2px; background: linear-gradient(90deg, var(--red-deep), var(--red-bright)); width: 0%; z-index: 1000; box-shadow: 0 0 8px var(--red-glow); transition: width 0.1s; }

/* ============================================================ NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; backdrop-filter: blur(20px); background: rgba(6, 6, 10, 0.7); border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s; }
.nav.scrolled { border-bottom-color: var(--border); background: rgba(6, 6, 10, 0.92); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo { width: 30px; height: 30px; }
.nav-name { font-weight: 800; font-size: 16px; letter-spacing: 1.5px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-dim); transition: color 0.3s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

/* Motion toggle */
.motion-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; transition: transform 0.2s; }
.motion-toggle:hover { transform: scale(1.05); }
.motion-toggle:active { transform: scale(0.95); }
.motion-label { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: var(--accent); font-family: 'JetBrains Mono', monospace; transition: opacity 0.3s; animation: motionLabelPulse 2s ease infinite; }
@keyframes motionLabelPulse { 0%, 100% { opacity: 1; text-shadow: 0 0 4px var(--red-glow); } 50% { opacity: 0.7; text-shadow: 0 0 12px var(--red-glow); } }
.motion-switch { width: 36px; height: 18px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 100px; position: relative; transition: background 0.4s, box-shadow 0.4s; box-shadow: 0 0 0 0 var(--red-glow); }
.motion-toggle.on .motion-switch { background: rgba(204, 0, 1, 0.2); box-shadow: 0 0 12px var(--red-glow); }
.motion-knob { position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; background: var(--accent); border-radius: 50%; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s; box-shadow: 0 0 8px var(--accent); }
.motion-toggle.on .motion-knob { transform: translateX(16px); box-shadow: 0 0 12px var(--accent), 0 0 20px var(--red-glow); }
.motion-toggle.off .motion-knob { transform: translateX(0); box-shadow: 0 0 4px rgba(204,0,1,0.3); }

/* ============================================================ HERO */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 28px 80px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-parallax-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-grid { position: absolute; inset: -50px; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 80px 80px; mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%); opacity: 0.3; }
.hero-content { position: relative; z-index: 2; max-width: 900px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 1px solid var(--border); background: var(--panel); border-radius: 100px; font-size: 10px; letter-spacing: 2px; font-weight: 600; color: var(--text-dim); margin-bottom: 28px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.hero-title { font-size: clamp(36px, 7vw, 80px); font-weight: 900; line-height: 1.05; letter-spacing: -2px; margin-bottom: 24px; }
.hero-sub { font-size: clamp(15px, 1.5vw, 18px); color: var(--text-dim); max-width: 680px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 32px; border-radius: 8px; font-size: 13px; font-weight: 600; letter-spacing: 1px; border: 1px solid var(--border); transition: all 0.3s; position: relative; overflow: hidden; }
.btn-primary { background: var(--red); color: #fff; border-color: var(--red); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--red-bright); border-color: var(--red-bright); transform: translateY(-2px); }
.btn-ghost { background: var(--panel); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-arrow { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scrollPulse 2s infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; height: 40px; } 50% { opacity: 1; height: 60px; } }

/* Glitch effect for 2050 — continuous animation */
.glitch-text { position: relative; display: inline-block; animation: glitchMain 3s infinite; }
.glitch-text::before, .glitch-text::after { content: attr(data-glitch-text); position: absolute; top: 0; left: 0; width: 100%; }
.glitch-text::before { color: var(--red-bright); animation: glitchTop 3s infinite linear; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); }
.glitch-text::after { color: #00e5ff; animation: glitchBottom 3s infinite linear; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); }
@keyframes glitchMain { 0%, 90%, 100% { transform: translateX(0); } 92% { transform: translateX(-2px); } 94% { transform: translateX(2px); } 96% { transform: translateX(-1px); } 98% { transform: translateX(1px); } }
@keyframes glitchTop { 0%, 90%, 100% { transform: translateX(0); opacity: 0; } 92% { transform: translate(-3px, -1px); opacity: 0.8; } 94% { transform: translate(2px, 1px); opacity: 0.6; } 96% { transform: translate(-1px, 0); opacity: 0.4; } }
@keyframes glitchBottom { 0%, 90%, 100% { transform: translateX(0); opacity: 0; } 92% { transform: translate(3px, 1px); opacity: 0.8; } 94% { transform: translate(-2px, -1px); opacity: 0.6; } 96% { transform: translate(1px, 0); opacity: 0.4; } }
[data-motion="off"] .glitch-text { animation: none; }
[data-motion="off"] .glitch-text::before, [data-motion="off"] .glitch-text::after { display: none; }

/* ============================================================ SECTIONS */
.section { padding: 140px 28px; max-width: 1280px; margin: 0 auto; }
.section.alt { background: var(--bg-2); max-width: none; }
.section.alt > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 64px; max-width: 820px; }
.section-tag { font-size: 11px; letter-spacing: 3px; font-weight: 700; color: var(--accent); margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; }
.section-head h2 { font-size: clamp(30px, 5vw, 56px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.05; margin-bottom: 20px; }
.section-lead { font-size: 17px; color: var(--text-dim); max-width: 680px; }

/* ============================================================ REVEAL ANIMATIONS */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
[data-reveal].unloaded { opacity: 0; transform: translateY(-30px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(30px); transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal-stagger].revealed > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].unloaded > * { opacity: 0; transform: translateY(-20px); transition: opacity 0.4s ease, transform 0.4s ease; }
[data-reveal-stagger].revealed > *:nth-child(1) { transition-delay: 0s; }
[data-reveal-stagger].revealed > *:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-stagger].revealed > *:nth-child(3) { transition-delay: 0.2s; }
[data-reveal-stagger].revealed > *:nth-child(4) { transition-delay: 0.3s; }
[data-reveal-stagger].revealed > *:nth-child(5) { transition-delay: 0.4s; }
[data-reveal-stagger].revealed > *:nth-child(6) { transition-delay: 0.5s; }

/* ============================================================ 3D TILT */
[data-tilt] { transition: transform 0.3s ease, box-shadow 0.3s ease; transform-style: preserve-3d; }

/* ============================================================ TIMELINE */
.timeline { position: relative; margin: 56px 0 80px; padding-left: 24px; }
.timeline-line { position: absolute; left: 31px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--red), var(--red-deep), var(--border)); }
.timeline-node { position: relative; padding-left: 56px; margin-bottom: 32px; }
.timeline-node .node-year { position: absolute; left: -44px; top: -4px; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--text-faint); letter-spacing: 1px; }
.node-dot { position: absolute; left: 22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--red), 0 0 16px var(--red-glow); }
.node-dot.danger { background: var(--red-bright); box-shadow: 0 0 0 2px var(--red-bright), 0 0 24px var(--red-bright); }
.node-dot.shield { background: #2ecc71; box-shadow: 0 0 0 2px #2ecc71, 0 0 16px rgba(46,204,113,0.5); }
.node-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px 24px; transition: all 0.3s; }
.node-card h4 { font-size: 17px; margin-bottom: 6px; }
.node-card p { font-size: 14px; color: var(--text-dim); }
.node-card.danger { border-color: var(--red-bright); }
.node-card.shield { border-color: #2ecc71; }

/* ============================================================ THREAT GRID */
.threat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.threat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; transition: all 0.4s; position: relative; overflow: hidden; }
.threat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: 0; transition: opacity 0.4s; }
.threat-card:hover { border-color: var(--accent); transform: translateY(-6px); box-shadow: var(--shadow); }
.threat-card:hover::before { opacity: 1; }
.threat-icon { font-size: 28px; color: var(--accent); margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; }
.threat-card h3 { font-size: 18px; margin-bottom: 10px; }
.threat-card p { font-size: 14px; color: var(--text-dim); }

/* ============================================================ LAYERS */
.layer-stack { display: flex; flex-direction: column; gap: 16px; }
.layer { display: flex; gap: 24px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all 0.4s; position: relative; overflow: hidden; }
.layer::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(to bottom, var(--red-bright), var(--red-deep)); }
.layer:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.layer-num { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; color: var(--accent); min-width: 44px; }
.layer-body h3 { font-size: 20px; margin-bottom: 10px; }
.layer-body p { font-size: 15px; color: var(--text-dim); }

/* ============================================================ FEATURES */
.arch-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; transition: all 0.4s; position: relative; overflow: hidden; }
.feat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: 0; transition: opacity 0.4s; }
.feat:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.feat:hover::before { opacity: 1; }
.feat h4 { font-size: 16px; margin-bottom: 8px; color: var(--accent); }
.feat p { font-size: 14px; color: var(--text-dim); }

/* ============================================================ ROADMAP */
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.road-item { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: all 0.4s; position: relative; overflow: hidden; }
.road-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--red), transparent); }
.road-item:hover { border-color: var(--accent); transform: translateY(-4px); }
.road-year { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.road-item h4 { font-size: 16px; margin-bottom: 10px; }
.road-item p { font-size: 13px; color: var(--text-dim); }

/* ============================================================ FOOTER */
.footer { padding: 60px 28px 40px; background: var(--bg-2); border-top: 1px solid var(--border); }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 36px; height: 36px; }
.footer-name { font-weight: 800; font-size: 15px; letter-spacing: 1.5px; }
.footer-tag { font-size: 11px; color: var(--text-faint); }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { font-size: 13px; color: var(--text-dim); transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-meta div { font-size: 13px; color: var(--text-dim); }
.footer-meta div:last-child { font-size: 12px; color: var(--text-faint); font-style: italic; margin-top: 4px; }

/* ============================================================ RIPPLE */
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.3); pointer-events: none; animation: rippleExpand 0.6s ease-out; }
@keyframes rippleExpand { 0% { width: 0; height: 0; opacity: 1; } 100% { width: 300px; height: 300px; opacity: 0; } }

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-trail { display: none; }
  .nav-links { display: none; }
  .section { padding: 80px 20px; }
  .hero { padding: 100px 20px 60px; }
  .layer { flex-direction: column; gap: 12px; }
}