/* ═══════════════════════════════════════════════════════════════
   SNOW LEOPARD — CINEMATIC SCROLL EXPERIENCE
   Design System & Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Palette — cold, icy, cinematic */
  --color-bg: #0a0a0f;
  --color-bg-deep: #050508;
  --color-bg-card: rgba(15, 20, 30, 0.65);
  --color-bg-card-alt: rgba(20, 28, 42, 0.50);
  --color-surface: #111520;
  --color-surface-alt: #161b28;

  --color-text: #e8ecf4;
  --color-text-dim: #8a92a6;
  --color-text-muted: #505a70;

  --color-accent: #6ec8e4;
  --color-accent-glow: rgba(110, 200, 228, 0.25);
  --color-accent-deep: #3a8aaa;
  --color-ice: #a5e0f0;
  --color-frost: #cdf0fa;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::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-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  line-height: 1.65;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-ice);
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ── Cinematic Loading Screen ──────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease-out, visibility 1s ease-out;
}

#loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

#loading-counter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 80px rgba(110, 200, 228, 0.15);
}

#loading-counter::after {
  content: '%';
  font-size: 0.4em;
  color: var(--color-accent);
  vertical-align: super;
  margin-left: 0.1em;
  opacity: 0.7;
}

#loading-message {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  color: rgba(165, 224, 240, 0.7);
  letter-spacing: 0.04em;
  min-height: 2em;
  transition: opacity 0.5s ease;
}

#loading-message.changing {
  opacity: 0;
}

/* Thin accent progress bar at bottom */
#loading-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
}

#loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent), var(--color-frost));
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--color-accent-glow);
}

/* ── Scroll Progress Bar ────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.05);
}

#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent), var(--color-frost));
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--color-accent-glow);
}

/* ── Navigation ─────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  z-index: 1000;
  background: transparent;
  transition: background 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

#main-nav.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-icon {
  font-size: 1.1rem;
  color: var(--color-accent);
  filter: drop-shadow(0 0 6px var(--color-accent-glow));
}

.nav-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--color-text);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ── HERO Section ───────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%;
  /* 27 frames — ~30vh per frame for snappy, responsive scroll animation */
  height: 800vh;
}

/* Frame canvas — sticky, fills viewport */
#frame-canvas {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
  background: var(--color-bg-deep);
}

/* Snow particle canvas — on top of frame */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  pointer-events: none;
  opacity: 0.7;
}

/* Hero overlay text */
#hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 4;
  pointer-events: none;
}

.hero-text {
  position: absolute;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--color-accent-glow);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 1.1;
  color: var(--color-frost);
  text-shadow: 0 0 60px rgba(110, 200, 228, 0.2), 0 2px 40px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-style: italic;
  color: var(--color-ice);
  text-shadow: 0 0 30px rgba(110, 200, 228, 0.15);
  max-width: 600px;
}

/* Scroll cue */
#scroll-cue {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 1;
  transition: opacity 0.6s var(--ease-out-expo);
}

#scroll-cue.hidden {
  opacity: 0;
  pointer-events: none;
}

#scroll-cue span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.scroll-arrow {
  color: var(--color-accent);
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* ── Transition Spacer ──────────────────────────────────────── */
#transition-spacer {
  height: 40vh;
  background: linear-gradient(to bottom, var(--color-bg-deep), var(--color-bg));
  position: relative;
}

/* ── Content Sections ───────────────────────────────────────── */
.content-section {
  position: relative;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-bg);
  overflow: hidden;
}

.content-section.alt {
  background: var(--color-surface);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-number {
  display: block;
  font-family: var(--font-body);
  font-weight: 200;
  font-size: 5rem;
  color: rgba(110, 200, 228, 0.06);
  line-height: 1;
  margin-bottom: -1rem;
  user-select: none;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--color-frost);
  margin-bottom: var(--space-lg);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  margin-top: var(--space-sm);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.section-grid.reverse {
  direction: rtl;
}

.section-grid.reverse>* {
  direction: ltr;
}

.section-text p {
  color: var(--color-text-dim);
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.section-text p em {
  color: var(--color-ice);
  font-style: italic;
}

/* Stat cards */
.section-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(110, 200, 228, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  backdrop-filter: blur(10px);
  transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.stat-card:hover {
  border-color: rgba(110, 200, 228, 0.2);
  transform: translateY(-4px);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* Range bars */
.section-visual {
  padding-top: var(--space-sm);
}

.range-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.range-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-country {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  min-width: 110px;
  text-align: right;
  letter-spacing: 0.04em;
}

.range-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent));
  border-radius: 3px;
  width: var(--bar-width);
  min-width: 20px;
  box-shadow: 0 0 12px var(--color-accent-glow);
  transition: width 1s var(--ease-out-expo);
}

/* Threat cards */
.threat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.threat-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(110, 200, 228, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  backdrop-filter: blur(10px);
  transition: border-color 0.4s, transform 0.5s var(--ease-out-expo), box-shadow 0.4s;
}

.threat-card:hover {
  border-color: rgba(110, 200, 228, 0.18);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.threat-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.threat-card h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--color-text);
  margin-bottom: 0.6rem;
}

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

/* CTA */
.cta-block {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid rgba(110, 200, 228, 0.1);
  border-radius: var(--radius-md);
}

.cta-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-ice) !important;
  font-style: italic;
  margin-bottom: var(--space-sm) !important;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-accent-deep), var(--color-accent));
  color: var(--color-bg) !important;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 40px var(--color-accent-glow);
  color: var(--color-bg) !important;
}

/* ── Section Reveal Animation ───────────────────────────────── */
.content-section .section-inner {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.content-section.in-view .section-inner {
  opacity: 1;
  transform: translateY(0);
}





/* ── Scroll-to-Top Button ───────────────────────────────────── */
#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 20, 30, 0.85);
  border: 1px solid rgba(110, 200, 228, 0.15);
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--color-accent-glow);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.4s var(--ease-out-expo),
    transform 0.4s var(--ease-out-expo),
    background 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  pointer-events: none;
}

#scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#scroll-to-top:hover {
  background: rgba(110, 200, 228, 0.15);
  border-color: var(--color-accent);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 25px var(--color-accent-glow);
  transform: translateY(-2px) scale(1.05);
}

#scroll-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* ── Interactive Particle Section ───────────────────────────── */
#particle-section {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--color-bg-deep);
  overflow: hidden;
  cursor: none;
}

#particle-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#particle-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0 2rem;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  background: linear-gradient(to top, rgba(5, 5, 8, 0.9) 0%, rgba(5, 5, 8, 0.5) 40%, transparent 100%);
}

.particle-eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
  text-shadow: 0 0 20px var(--color-accent-glow);
  opacity: 0.7;
}

.particle-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  color: var(--color-frost);
  text-shadow: 0 0 40px rgba(110, 200, 228, 0.15);
  margin-bottom: 0.5rem;
}

.particle-hint {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  animation: pulse-hint 3s ease-in-out infinite;
}

@keyframes pulse-hint {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.8;
  }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #main-nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.7rem;
  }

  .content-section {
    padding: var(--space-xl) var(--space-md);
  }

  .section-grid,
  .section-grid.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .section-number {
    font-size: 3.5rem;
  }
}

@media (max-width: 600px) {
  #main-nav {
    padding: 0.8rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .content-section {
    padding: var(--space-lg) var(--space-sm);
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .threat-cards {
    grid-template-columns: 1fr;
  }
}