/* ======================================================
   ZIMA BLUE — Design System v2
   Navy + Glassmorphism + Gradient Accent
   Fonts: Inter (primary) + Orbitron (logo & hero only)
   ====================================================== */

:root {
  --zima-blue: #00F0FF;
  --zima-blue-dim: rgba(0, 240, 255, 0.08);
  --zima-blue-glow: rgba(0, 240, 255, 0.35);
  --zima-purple: #667eea;
  --zima-pink: #764ba2;
  --deep-navy: #050816;
  --panel-bg: rgba(10, 14, 39, 0.65);
  --panel-border: rgba(0, 240, 255, 0.08);
  --panel-border-hover: rgba(0, 240, 255, 0.25);
  --void-black: #000000;
  --text-main: #e0e4f0;
  --text-dim: #5a6294;
  --text-bright: #ffffff;
  --grid-line: rgba(255, 255, 255, 0.03);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Comfortaa', cursive, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--deep-navy);
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0.5px;
  color: var(--text-bright);
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
  color: var(--zima-blue);
  text-shadow: 0 0 12px var(--zima-blue-glow);
}

::selection {
  background: rgba(0, 240, 255, 0.2);
  color: var(--text-bright);
}

/* === Utilities === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.text-zima {
  color: var(--zima-blue);
}

/* === Background Grid === */
.bg-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -1;
  pointer-events: none;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border: 1px solid var(--zima-blue);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(0, 240, 255, 0.04));
  color: var(--zima-blue);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--zima-blue), rgba(102, 126, 234, 0.8));
  opacity: 0;
  transition: opacity 250ms ease-out;
  z-index: -1;
}

.btn:hover {
  color: var(--deep-navy);
  border-color: var(--zima-blue);
  box-shadow:
    0 0 20px var(--zima-blue-glow),
    0 0 40px rgba(0, 240, 255, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
  text-shadow: none;
}

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

.btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 10px var(--zima-blue-glow);
  transition: transform 100ms ease-out, box-shadow 100ms ease-out;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--panel-border-hover);
  color: var(--zima-blue);
}

.btn-ghost:hover {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--zima-blue);
  color: var(--zima-blue);
  box-shadow: 0 0 20px var(--zima-blue-glow);
}

.btn-ghost:hover::before {
  opacity: 0;
}

.btn-ghost:active {
  transform: scale(0.97);
  transition: transform 100ms ease-out;
}

/* === Header === */
header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

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

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 4px;
}

.logo-icon {
  width: 14px;
  height: 14px;
  background: var(--zima-blue);
  display: inline-block;
  box-shadow: 0 0 12px var(--zima-blue-glow);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 12px var(--zima-blue-glow); }
  50% { box-shadow: 0 0 20px var(--zima-blue-glow), 0 0 4px var(--zima-blue); }
}

.nav-links {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.82rem;
  white-space: nowrap;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  color: var(--text-dim);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--zima-blue);
  background: rgba(0, 240, 255, 0.06);
  text-shadow: none;
}

.nav-cta {
  background: var(--zima-blue) !important;
  color: var(--deep-navy) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.5px;
  transition: all 0.3s ease !important;
}

.nav-cta:hover {
  box-shadow: 0 0 20px var(--zima-blue-glow) !important;
  background: var(--zima-blue) !important;
  color: var(--deep-navy) !important;
  transform: translateY(-1px);
  text-shadow: none !important;
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 6rem;
  overflow: hidden;
}

/* Radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-content h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--zima-blue) 50%, var(--text-bright) 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerTitle 1.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  letter-spacing: 8px;
}

@keyframes shimmerTitle {
  0%   { background-position: 0% center;   opacity: 0; }
  30%  { opacity: 1; }
  100% { background-position: 100% center; opacity: 1; }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 580px;
  margin: 0 auto 2rem;
  font-weight: 400;
  line-height: 1.8;
}

/* Blue Square — the brand icon */
.blue-square {
  width: 80px;
  height: 80px;
  background: var(--zima-blue);
  margin: 0 auto 2.5rem;
  box-shadow:
    0 0 40px var(--zima-blue-glow),
    0 0 80px rgba(0, 240, 255, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.1);
  animation: squarePulse 5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  position: relative;
}

.blue-square::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  animation: squareRing 4s ease-in-out infinite;
}

@keyframes squarePulse {
  0%, 100% {
    transform: scaleX(1) scaleY(1);
    box-shadow: 0 0 40px var(--zima-blue-glow), 0 0 80px rgba(0, 240, 255, 0.15);
  }
  25% { transform: scaleX(0.97) scaleY(1.04); }
  50% {
    transform: scaleX(1.05) scaleY(0.97);
    box-shadow: 0 0 60px var(--zima-blue-glow), 0 0 120px rgba(0, 240, 255, 0.2);
  }
  75% { transform: scaleX(0.98) scaleY(1.03); }
}

@keyframes squareRing {
  0%, 100% { inset: -4px; opacity: 0.5; }
  50% { inset: -12px; opacity: 0.15; }
}

/* Hero Tagline with Typing */
.hero-tagline {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 1px;
  margin: 1rem 0 1.5rem;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-main);
}

#typing-effect {
  color: var(--zima-blue);
  font-weight: 600;
  display: inline-block;
  min-width: 180px;
  text-align: left;
}

#typing-effect::after {
  content: '|';
  animation: blink 0.7s infinite;
  color: var(--zima-blue);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Hero CTA Group */
.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* Trust Badges */
.trust-badges {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(10px);
  animation: badgeFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.trust-badge:nth-child(1) { animation-delay: 1s; }
.trust-badge:nth-child(2) { animation-delay: 1.2s; }
.trust-badge:nth-child(3) { animation-delay: 1.4s; }

@keyframes badgeFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.trust-dot {
  width: 6px;
  height: 6px;
  background: var(--zima-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--zima-blue-glow);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* === Vision Box === */
.hero-vision {
  margin-top: 3rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.9;
  font-style: italic;
  position: relative;
  padding: 1.5rem 2rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-vision::before {
  content: 'WHAT IS ZIMA BLUE?';
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--deep-navy);
  padding: 0 10px;
  font-size: 0.65rem;
  font-family: var(--font-display);
  color: var(--zima-blue);
  letter-spacing: 3px;
  font-style: normal;
}

/* === Sections === */
section {
  padding: 6rem 0 5rem;
  position: relative;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--zima-blue);
  text-transform: uppercase;
  letter-spacing: 4px;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.25rem;
  text-align: center;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.section-desc {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
}

/* Section gradient dividers */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--panel-border-hover), transparent);
  margin: 0;
}

/* Sub-page sections get reduced vertical padding */
.sub-page-main section {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.sub-page-main section:first-of-type {
  padding-top: 1.5rem;
}

/* === Cards === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 2rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 250ms ease-out, border-color 250ms ease-out, box-shadow 250ms ease-out, background 250ms ease-out;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--zima-blue), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--panel-border-hover);
  background: rgba(10, 14, 39, 0.8);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.06),
    0 0 20px rgba(0, 240, 255, 0.05);
}

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

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--zima-blue);
  font-size: 1.05rem;
  letter-spacing: 0;
  font-weight: 600;
}

.card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--zima-blue);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.card:hover .card-icon {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--panel-border-hover);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}

.card-subtitle {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* === Milestone Card === */
.milestone-card {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(102, 126, 234, 0.04));
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.milestone-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--zima-blue), var(--zima-purple), transparent);
}

.milestone-counter-box {
  display: inline-block;
  background: rgba(0, 240, 255, 0.08);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 240, 255, 0.12);
  margin-top: 1.5rem;
}

.milestone-counter-box .counter-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--zima-blue);
  font-family: var(--font-body);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.milestone-counter-box .counter-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.milestone-unlocks {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 1.5rem;
}

.milestone-unlocks strong {
  color: var(--text-main);
}

/* === Pricing Chart === */
.chart-container {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  backdrop-filter: blur(12px);
}

/* === Roadmap === */
.roadmap-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roadmap-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  backdrop-filter: blur(12px);
  transition: border-color 200ms ease-out, background 200ms ease-out;
  position: relative;
  overflow: hidden;
}

.roadmap-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--text-dim);
  border-radius: 0 2px 2px 0;
}

.roadmap-item.active {
  border-color: rgba(0, 240, 255, 0.2);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(102, 126, 234, 0.03));
}

.roadmap-item.active::before {
  background: linear-gradient(to bottom, var(--zima-blue), var(--zima-purple));
}

.roadmap-item h4 {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0;
  font-weight: 600;
}

.roadmap-item.active h4 {
  color: var(--zima-blue);
}

.roadmap-item p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

.roadmap-item.active p {
  color: var(--text-main);
}

/* === Final CTA === */
.final-cta {
  text-align: center;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  margin-top: 3rem;
}

.final-cta-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 2rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* === Footer === */
footer {
  padding: 3rem 0;
  text-align: center;
  color: var(--text-dim);
  border-top: 1px solid var(--panel-border);
  background: rgba(5, 8, 22, 0.6);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  transition: transform 200ms ease-out, border-color 200ms ease-out, background 200ms ease-out, box-shadow 200ms ease-out;
}

.social-links a:hover {
  border-color: var(--zima-blue);
  background: rgba(0, 240, 255, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.15);
  text-shadow: none;
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: var(--text-dim);
  transition: fill 0.3s ease;
}

.social-links a:hover svg {
  fill: var(--zima-blue);
}

footer p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* === Stars & Meteors (kept from v1) === */
.stars-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  contain: paint;
}

.meteor-stars, .background-stars {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.meteor {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--zima-blue);
  border-radius: 50%;
  top: -50px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
}

.meteor:nth-child(1) { animation: meteorFall1 7s linear infinite; animation-delay: 0s; }
.meteor:nth-child(2) { animation: meteorFall2 5s linear infinite; animation-delay: 2s; }
.meteor:nth-child(3) { animation: meteorFall3 3s linear infinite; animation-delay: 4s; }
.meteor:nth-child(4) { animation: meteorFall4 6s linear infinite; animation-delay: 6s; }
.meteor:nth-child(5) { animation: meteorFall5 3s linear infinite; animation-delay: 8s; }

.meteor::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0.8), transparent);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
  border-radius: 50%;
  filter: blur(0.5px);
}

.meteor::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 1px;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 240, 255, 0.8), transparent);
  transform-origin: bottom center;
  transform: translateX(-50%);
  margin-top: -3px;
}

.meteor:nth-child(1)::after { transform: translateX(-50%) rotate(-45deg); }
.meteor:nth-child(2)::after { transform: translateX(-50%) rotate(35deg); }
.meteor:nth-child(3)::after { transform: translateX(-50%) rotate(-15deg); }
.meteor:nth-child(4)::after { transform: translateX(-50%) rotate(-28deg); }
.meteor:nth-child(5)::after { transform: translateX(-50%) rotate(32deg); }

@keyframes meteorFall1 {
  0% { top: 0%; left: 5%; opacity: 1; }
  21% { top: 100vh; left: 85%; opacity: 0; }
  21.1% { top: 0%; left: 5%; opacity: 0; }
  100% { top: 0%; left: 5%; opacity: 0; }
}

@keyframes meteorFall2 {
  0% { top: -5%; left: 95%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100vh; left: 15%; opacity: 0; }
}

@keyframes meteorFall3 {
  0% { top: 0%; left: 50%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100vh; left: 70%; opacity: 0; }
}

@keyframes meteorFall4 {
  0% { top: -3%; left: 20%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100vh; left: 75%; opacity: 0; }
}

@keyframes meteorFall5 {
  0% { top: 0%; left: 80%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100vh; left: 25%; opacity: 0; }
}

.star {
  position: absolute;
  width: 1.5px;
  height: 1.5px;
  background: var(--zima-blue);
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0, 240, 255, 0.8);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; box-shadow: 0 0 3px rgba(0, 240, 255, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(0, 240, 255, 1); }
}

/* === Globe Animations === */
@keyframes spinGlobe {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes territoryPulse {
  0%, 100% { r: 6px; opacity: 0.3; }
  50% { r: 12px; opacity: 0.7; }
}

@keyframes pinDrop {
  0% { transform: translateY(-20px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes pinRing {
  0% { r: 8px; opacity: 0.8; }
  100% { r: 20px; opacity: 0; }
}

@keyframes lineGrow {
  0% { stroke-dasharray: 0, 1000; opacity: 0; }
  50% { opacity: 0.6; }
  100% { stroke-dasharray: 1000, 1000; opacity: 0; }
}

@keyframes chartRise {
  0%   { transform: translateY(0);     opacity: 0.5; }
  50%  { transform: translateY(-12px); opacity: 1;   }
  100% { transform: translateY(0);     opacity: 0.5; }
}

/* === Scroll Animations === */
.animate-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-title.visible {
  opacity: 1;
  transform: translateX(0);
  text-wrap: balance;
}

.section-label {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1), transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-label.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered card delays — max 50ms per item (userinterface-wiki: physics-no-excessive-stagger) */
.grid-3 .card:nth-child(1) { transition-delay: 0s; }
.grid-3 .card:nth-child(2) { transition-delay: 0.03s; }
.grid-3 .card:nth-child(3) { transition-delay: 0.06s; }

/* === Globe Background Elements === */
.globe-bg {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

/* === Hamburger Menu === */
.menu-toggle {
  display: none;
  width: 28px;
  height: 18px;
  position: relative;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--zima-blue);
  position: absolute;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 8px; }
.menu-toggle span:nth-child(3) { top: 16px; }

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* === Glitch Effect === */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--zima-blue) 50%, var(--text-bright) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glitch::before {
  left: 2px;
  text-shadow: -1px 0 rgba(0, 240, 255, 0.5);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -1px 0 rgba(102, 126, 234, 0.5);
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip: rect(30px, 9999px, 10px, 0); }
  20% { clip: rect(50px, 9999px, 60px, 0); }
  40% { clip: rect(10px, 9999px, 80px, 0); }
  60% { clip: rect(80px, 9999px, 20px, 0); }
  80% { clip: rect(40px, 9999px, 90px, 0); }
  100% { clip: rect(70px, 9999px, 30px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(10px, 9999px, 80px, 0); }
  20% { clip: rect(80px, 9999px, 10px, 0); }
  40% { clip: rect(30px, 9999px, 40px, 0); }
  60% { clip: rect(60px, 9999px, 70px, 0); }
  80% { clip: rect(20px, 9999px, 50px, 0); }
  100% { clip: rect(90px, 9999px, 90px, 0); }
}

/* === Parallax Globe Wrapper === */
.parallax-globe {
  transition: transform 0.1s linear;
  will-change: transform;
}

/* === Sub-page base === */
.sub-page-main {
  padding-top: 8rem;
  padding-bottom: 5rem;
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 22, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    gap: 0.5rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-main);
  }

  .menu-toggle {
    display: block !important;
    z-index: 3000;
  }

  .hero {
    min-height: 90vh;
    padding-top: 4rem;
  }

  .hero-content h1 {
    letter-spacing: 4px;
  }

  section {
    padding: 4rem 0 3rem;
  }

  .sub-page-main section {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
  }

  .sub-page-main section:first-of-type {
    padding-top: 1rem;
  }

  .section-title {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
  }

  .hero-vision {
    font-size: 0.88rem;
    padding: 1.2rem;
    margin-top: 2rem;
  }

  .container {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-tagline {
    flex-direction: column;
    gap: 0.25rem;
  }

  .trust-badges {
    gap: 1rem;
  }

  .blue-square {
    width: 60px;
    height: 60px;
  }

  .milestone-card {
    padding: 2rem 1.5rem;
  }

  .roadmap-item {
    padding: 1.2rem 1.5rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.78rem;
    width: 100%;
    justify-content: center;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .sub-page-main {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .stars-container {
    height: 100%;
  }
}

/* === Sub-page Utilities === */
.narrative-box {
  background: var(--panel-bg);
  border-left: 2px solid var(--zima-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(8px);
}

.narrative-box p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Sub-page hero (smaller) */
.sub-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 3rem;
  position: relative;
}

.sub-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin-bottom: 1rem;
  font-weight: 600;
}

.sub-hero p {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* FAQ card styling */
.faq-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.faq-card:hover {
  border-color: var(--panel-border-hover);
  background: rgba(10, 14, 39, 0.8);
}

.faq-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--text-bright);
}

.faq-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* Stats table (sub-page) */
.stats-container {
  max-width: 900px;
  margin: 2rem auto;
}

.table-scroll-wrapper {
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
}

.table-scroll-wrapper::-webkit-scrollbar { width: 6px; }
.table-scroll-wrapper::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
.table-scroll-wrapper::-webkit-scrollbar-thumb { background: var(--zima-blue); border-radius: 3px; }

.stats-container table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-main);
}

.stats-container th,
.stats-container td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--panel-border);
}

.stats-container th {
  color: var(--zima-blue);
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  background: var(--deep-navy);
  z-index: 1;
}

.stats-container tr:hover {
  background: rgba(0, 240, 255, 0.04);
}

/* Creator hero map background */
.creator-map-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Animated icon helpers (guide page) */
.animated-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  flex-shrink: 0;
  color: var(--zima-blue);
}

.icon-pulse { animation: pulse-glow 2s ease-in-out infinite; }
.icon-bounce { animation: bounce-icon 1.5s ease-in-out infinite; }
.icon-rotate { animation: rotate-icon 3s linear infinite; }
.icon-slide { animation: slide-icon 2s ease-in-out infinite; }

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes bounce-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes rotate-icon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes slide-icon {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* Creator map network animation */
@keyframes networkNodePulse {
  0%, 100% { r: 4px; opacity: 0.5; }
  50% { r: 7px; opacity: 1; }
}

@keyframes networkLineFlow {
  0% { stroke-dashoffset: 200; opacity: 0.2; }
  50% { opacity: 0.6; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

/* Two-column guide layout */
.guide-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

  .sub-hero {
    min-height: 40vh;
    padding-top: 1rem;
  }

  .stats-container table { font-size: 0.8rem; min-width: 450px; }
  .stats-container th, .stats-container td { padding: 0.5rem; }
  .table-scroll-wrapper { max-height: 60vh; }
}

/* === Global overflow protection === */
html, body {
  max-width: 100vw;
}

* {
  max-width: 100%;
}

/* === Hover guard: only apply hover transforms on devices with a real pointer === */
@media (hover: none) or (pointer: coarse) {
  .card:hover { transform: none; }
  .btn:hover  { transform: none; }
  .social-links a:hover { transform: none; }
}

/* === Accessibility: reduce motion === */
@media (prefers-reduced-motion: reduce) {
  /* Keep opacity fades — they aid comprehension. Remove movement. */
  .animate-in,
  .section-title,
  .section-label {
    transform: none !important;
    transition: opacity 0.3s ease !important;
  }

  .blue-square,
  .logo-icon,
  .trust-badge,
  .trust-dot {
    animation: none !important;
  }

  /* Freeze background animations */
  .meteor,
  .star,
  .globe-bg svg,
  .stars-container * {
    animation: none !important;
    opacity: 0.3;
  }

  /* Keep shimmer but as static gradient — no movement */
  .hero-content h1 {
    animation: none !important;
    background-position: 50% center;
    opacity: 1;
  }

  /* No chart animation */
  .chart-container rect,
  .chart-container g {
    animation: none !important;
  }

  /* No button movement */
  .btn:active,
  .btn-ghost:active {
    transform: none;
  }
}
