/* ============================================================
   TOB MEXICO — Preservacion Linguistica con IA
   Stylesheet v1.0
   Paleta: Negro profundo + Ambar/Dorado + Turquesa + Terracota
   ============================================================ */

/* ---------------------------------------------------------
   0. CUSTOM PROPERTIES
   --------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #1a1a2e;
  --bg-tertiary:   #16213e;
  --bg-footer:     #050505;
  --bg-glass:      rgba(255, 255, 255, 0.03);
  --bg-glass-hover:rgba(255, 255, 255, 0.06);

  /* Accents */
  --amber:         #e6a817;
  --amber-light:   #f0c040;
  --amber-dim:     rgba(230, 168, 23, 0.15);
  --turquoise:     #00b4d8;
  --turquoise-dim: rgba(0, 180, 216, 0.15);
  --terracotta:    #c2452d;
  --terracotta-dim:rgba(194, 69, 45, 0.15);

  /* Risk palette */
  --risk-critical: #ef4444;
  --risk-high:     #f97316;
  --risk-medium:   #eab308;
  --risk-low:      #22c55e;

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: #a0aec0;
  --text-tertiary:  #718096;

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-medium:  rgba(255, 255, 255, 0.10);

  /* Misc */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:  0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow-amber: 0 0 30px rgba(230, 168, 23, 0.25);
  --shadow-glow-turquoise: 0 0 30px rgba(0, 180, 216, 0.25);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-base: 0.35s var(--ease-out-expo);
  --transition-slow: 0.6s var(--ease-out-expo);

  /* Layout */
  --container-max: 1320px;
  --nav-height: 72px;
}

/* ---------------------------------------------------------
   1. RESET & BASE
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: rgba(230, 168, 23, 0.4) rgba(255, 255, 255, 0.03);
  scrollbar-width: thin;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(230, 168, 23, 0.35);
  color: #fff;
}

::-moz-selection {
  background: rgba(230, 168, 23, 0.35);
  color: #fff;
}

/* Custom scrollbar — Webkit */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  background: rgba(230, 168, 23, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 168, 23, 0.6);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------------------------------------------------------
   2. TYPOGRAPHY
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  max-width: 72ch;
}

.text-amber  { color: var(--amber); }
.text-turquoise { color: var(--turquoise); }
.text-terracotta { color: var(--terracotta); }
.text-gradient {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-number {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--amber);
}

.section-subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------
   3. LAYOUT UTILITIES
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

section:nth-child(even) {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-header p {
  margin: 1rem auto 0;
}

/* ---------------------------------------------------------
   4. NAVIGATION
   --------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled,
.nav.nav-scrolled {
  background: rgba(10, 10, 10, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  flex-shrink: 0;
}

.nav__logo img,
.nav__logo svg {
  height: 36px;
  width: auto;
}

.nav__logo span {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  padding: 0.25rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav__hamburger.open span:nth-child(1),
.nav__hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2),
.nav__hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3),
.nav__hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.nav__mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav__mobile-menu.open,
.nav__mobile-menu.is-open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav__mobile-menu a:hover {
  color: var(--amber);
}

/* ---------------------------------------------------------
   5. LANGUAGE TOGGLE
   --------------------------------------------------------- */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  padding: 3px;
  position: relative;
  overflow: hidden;
}

.lang-toggle__btn {
  position: relative;
  z-index: 2;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  border-radius: 50px;
  transition: color var(--transition-fast);
  user-select: none;
}

.lang-toggle__btn.active {
  color: var(--bg-primary);
}

.lang-toggle__slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  border-radius: 50px;
  transition: transform var(--transition-base);
  z-index: 1;
}

.lang-toggle[data-lang="en"] .lang-toggle__slider {
  transform: translateX(100%);
}

/* ---------------------------------------------------------
   6. HERO
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 4rem;
  overflow: hidden;
  background: radial-gradient(
    ellipse 60% 50% at 50% 45%,
    rgba(230, 168, 23, 0.06) 0%,
    transparent 70%
  ),
  linear-gradient(180deg, #0a0a0a 0%, #0d1117 100%);
}

/* Grain texture overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--amber-dim);
  border: 1px solid rgba(230, 168, 23, 0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber-light);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero__title {
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* Hero stats row */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: var(--amber);
  display: block;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  display: block;
}

/* Slot machine counter animation */
.counter-animate {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.counter-animate .digit {
  display: inline-block;
  animation: slot-roll 1.2s var(--ease-out-expo) forwards;
  opacity: 0;
}

.counter-animate .digit:nth-child(2) { animation-delay: 0.1s; }
.counter-animate .digit:nth-child(3) { animation-delay: 0.2s; }
.counter-animate .digit:nth-child(4) { animation-delay: 0.3s; }

@keyframes slot-roll {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------------------------------------------------------
   7. BUTTONS
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

/* Ripple effect */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
    rgba(255, 255, 255, 0.3) 0%,
    transparent 60%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.5s;
  pointer-events: none;
}

.btn:active::before {
  opacity: 1;
  transform: scale(2.5);
  transition: opacity 0s, transform 0s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: #0a0a0a;
  box-shadow: 0 4px 15px rgba(230, 168, 23, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 168, 23, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
  transform: translateY(-2px);
}

.btn-turquoise {
  background: linear-gradient(135deg, var(--turquoise), #0096c7);
  color: #0a0a0a;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-turquoise:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------------------------------------------------
   8. CARDS (generic)
   --------------------------------------------------------- */
.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.card__icon--amber {
  background: var(--amber-dim);
  color: var(--amber);
}

.card__icon--turquoise {
  background: var(--turquoise-dim);
  color: var(--turquoise);
}

.card__icon--terracotta {
  background: var(--terracotta-dim);
  color: var(--terracotta);
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Glass card variant */
.card--glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card--glass:hover {
  background: var(--bg-glass-hover);
}

/* ---------------------------------------------------------
   9. CRISIS SECTION
   --------------------------------------------------------- */
.crisis {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Progress bars */
.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 1.5s var(--ease-out-expo);
}

.progress-bar__fill--critical { background: linear-gradient(90deg, var(--risk-critical), #dc2626); }
.progress-bar__fill--high     { background: linear-gradient(90deg, var(--risk-high), #ea580c); }
.progress-bar__fill--medium   { background: linear-gradient(90deg, var(--risk-medium), #ca8a04); }
.progress-bar__fill--low      { background: linear-gradient(90deg, var(--risk-low), #16a34a); }

.progress-bar.in-view .progress-bar__fill {
  width: var(--progress-value, 0%);
}

/* Risk stat cards */
.risk-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.risk-stat {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
}

.risk-stat__number {
  font-size: 3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.risk-stat__number--critical { color: var(--risk-critical); }
.risk-stat__number--high     { color: var(--risk-high); }
.risk-stat__number--medium   { color: var(--risk-medium); }
.risk-stat__number--low      { color: var(--risk-low); }

.risk-stat__label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* Danger pulsing card */
.card--danger {
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse-danger 3s ease-in-out infinite;
}

@keyframes pulse-danger {
  0%, 100% {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
  50% {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
  }
}

/* Crisis language cards */
.crisis-languages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.crisis-lang-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.crisis-lang-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.crisis-lang-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.crisis-lang-card__name {
  font-weight: 600;
  font-size: 1.05rem;
}

.crisis-lang-card__speakers {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ---------------------------------------------------------
   10. MAP SECTION
   --------------------------------------------------------- */
.map-section {
  padding: 6rem 0;
  overflow: hidden;
}

.map-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.map-svg {
  width: 100%;
  height: auto;
}

.map-svg .state {
  fill: var(--bg-tertiary);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.5;
  transition: all var(--transition-base);
  cursor: pointer;
}

.map-svg .state:hover {
  fill: rgba(230, 168, 23, 0.2);
  filter: drop-shadow(0 0 12px rgba(230, 168, 23, 0.3));
}

.map-svg .state.active {
  fill: rgba(230, 168, 23, 0.25);
  stroke: var(--amber);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 16px rgba(230, 168, 23, 0.4));
}

/* Brightness by language count */
.map-svg .state[data-langs="high"]  { fill: rgba(230, 168, 23, 0.18); }
.map-svg .state[data-langs="mid"]   { fill: rgba(230, 168, 23, 0.10); }
.map-svg .state[data-langs="low"]   { fill: rgba(230, 168, 23, 0.05); }

/* Tooltip */
.map-tooltip {
  position: absolute;
  padding: 0.75rem 1.25rem;
  background: rgba(22, 33, 62, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 50;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.map-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.map-tooltip__title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.map-tooltip__count {
  color: var(--amber);
  font-weight: 700;
}

/* Map legend */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.map-legend__swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   11. PROYECTO PILOTO CARD
   --------------------------------------------------------- */
.pilot-card {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem;
  border-radius: var(--radius-xl);
  background: var(--bg-tertiary);
  overflow: hidden;
  isolation: isolate;
}

/* Gradient border */
.pilot-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(135deg, var(--amber), var(--turquoise));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Shimmer hover effect */
.pilot-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(230, 168, 23, 0.04) 45%,
    rgba(230, 168, 23, 0.08) 50%,
    rgba(230, 168, 23, 0.04) 55%,
    transparent 60%
  );
  transform: rotate(0deg);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.pilot-card:hover::after {
  opacity: 1;
  animation: shimmer 2.5s linear infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* Active badge */
.pilot-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.pilot-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s ease-in-out infinite;
}

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

.pilot-card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.pilot-card__desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Pilot progress bars */
.pilot-progress {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.pilot-progress__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pilot-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pilot-progress__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pilot-progress__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.pilot-progress__bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.pilot-progress__fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--amber), var(--amber-light));
  width: 0;
  transition: width 1.8s var(--ease-out-expo);
}

.pilot-progress__fill--turquoise {
  background: linear-gradient(90deg, var(--turquoise), #48cae4);
}

.in-view .pilot-progress__fill {
  width: var(--progress-value, 0%);
}

/* ---------------------------------------------------------
   12. CATALOGO GRID
   --------------------------------------------------------- */
.catalog {
  padding: 6rem 0;
}

/* Search input */
.catalog-search {
  position: relative;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.catalog-search__input {
  width: 100%;
  padding: 0.9rem 1.25rem 0.9rem 3rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.catalog-search__input::placeholder {
  color: var(--text-tertiary);
}

.catalog-search__input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}

.catalog-search__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

/* Filter pills */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.filter-pill {
  padding: 0.45rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--border-medium);
  color: var(--text-secondary);
  background: var(--bg-glass-hover);
}

.filter-pill.active {
  background: var(--amber-dim);
  border-color: rgba(230, 168, 23, 0.3);
  color: var(--amber);
}

/* Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Catalog card (JS generates .lengua-card) */
.catalog-card,
.lengua-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top border color-coded by risk */
.catalog-card::before,
.lengua-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.catalog-card--critical::before { background: var(--risk-critical); }
.catalog-card--high::before     { background: var(--risk-high); }
.catalog-card--medium::before   { background: var(--risk-medium); }
.catalog-card--low::before      { background: var(--risk-low); }

.catalog-card:hover,
.lengua-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.catalog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.catalog-card__name {
  font-size: 1.1rem;
  font-weight: 700;
}

.catalog-card__family {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.catalog-card__speakers {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.catalog-card__region {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

/* Lengua card aliases (JS-generated) */
.lengua-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.lengua-card__name { font-size: 1.15rem; font-weight: 700; }
.lengua-card__native { font-size: 0.85rem; color: var(--amber); display: block; margin-top: 0.15rem; }
.lengua-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.lengua-card__familia { font-size: 0.8rem; color: var(--text-tertiary); }
.lengua-card__risk { font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.05em; }
.lengua-card__risk.risk-critical { background: rgba(239,68,68,0.12); color: var(--risk-critical); border: 1px solid rgba(239,68,68,0.25); }
.lengua-card__risk.risk-high { background: rgba(249,115,22,0.12); color: var(--risk-high); border: 1px solid rgba(249,115,22,0.25); }
.lengua-card__risk.risk-medium { background: rgba(234,179,8,0.12); color: var(--risk-medium); border: 1px solid rgba(234,179,8,0.25); }
.lengua-card__risk.risk-low { background: rgba(34,197,94,0.12); color: var(--risk-low); border: 1px solid rgba(34,197,94,0.25); }
.lengua-card__speakers { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.lengua-card__speakers strong { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.lengua-card__desc { font-size: 0.8rem; color: var(--text-tertiary); line-height: 1.6; margin-bottom: 0.75rem; flex-grow: 1; }
.lengua-card__states { font-size: 0.8rem; color: var(--text-tertiary); margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.lengua-card__states-label { font-weight: 600; margin-right: 0.25rem; }
.state-tag { padding: 0.15rem 0.5rem; background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: 4px; font-size: 0.7rem; }
.lengua-card__badge { position: absolute; top: 0.75rem; right: 0.75rem; font-size: 0.65rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 50px; background: var(--amber-dim); border: 1px solid rgba(230,168,23,0.3); color: var(--amber); text-transform: uppercase; letter-spacing: 0.05em; }
.lengua-card--active { border-color: rgba(230,168,23,0.25); }
.catalogo-empty { text-align: center; padding: 3rem; grid-column: 1 / -1; }
.catalogo-empty p { color: var(--text-tertiary); margin-bottom: 1rem; }
.catalogo-empty button { padding: 0.5rem 1.25rem; background: var(--amber-dim); border: 1px solid rgba(230,168,23,0.3); border-radius: 50px; color: var(--amber); cursor: pointer; font-size: 0.85rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge--coming-soon {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.badge--active {
  background: var(--amber-dim);
  border: 1px solid rgba(230, 168, 23, 0.25);
  color: var(--amber);
}

.badge--isolated {
  background: var(--turquoise-dim);
  border: 1px solid rgba(0, 180, 216, 0.25);
  color: var(--turquoise);
}

.badge--critical {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--risk-critical);
}

.badge--high {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--risk-high);
}

/* ---------------------------------------------------------
   13. TECHNOLOGY SECTION
   --------------------------------------------------------- */
.tech-section {
  overflow: hidden;
}

/* Pipeline timeline — horizontal */
.pipeline {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
}

/* Connecting line */
.pipeline::before {
  content: '';
  position: absolute;
  top: 56px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg,
    var(--amber) 0%,
    var(--turquoise) 50%,
    var(--amber-light) 100%);
  z-index: 0;
}

/* Animated glow on the line */
.pipeline::after {
  content: '';
  position: absolute;
  top: 54px;
  left: 60px;
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: var(--amber);
  filter: blur(4px);
  opacity: 0.6;
  z-index: 1;
  animation: pipeline-glow 4s linear infinite;
}

@keyframes pipeline-glow {
  0%   { left: 60px; opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { left: calc(100% - 120px); opacity: 0; }
}

.pipeline__step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

.pipeline__dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.2rem;
  transition: all var(--transition-base);
}

.pipeline__step:hover .pipeline__dot {
  background: var(--amber-dim);
  box-shadow: var(--shadow-glow-amber);
  transform: scale(1.1);
}

.pipeline__step-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pipeline__step-desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  max-width: 180px;
  margin: 0 auto;
}

/* Tech cards */
.tech-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.tech-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-base);
}

.tech-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.tech-card:hover .tech-card__icon {
  transform: rotateY(15deg) rotateX(-5deg);
}

.tech-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform var(--transition-base);
  perspective: 400px;
}

.tech-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tech-card__desc {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

/* Before vs After comparison table */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.5rem;
  text-align: left;
}

.comparison-table thead th {
  background: var(--bg-tertiary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table thead th:nth-child(2) {
  color: var(--risk-critical);
}

.comparison-table thead th:nth-child(3) {
  color: var(--amber);
}

.comparison-table tbody tr {
  transition: background var(--transition-fast);
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table tbody td {
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table .td-before {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
}

.comparison-table .td-after {
  color: var(--amber);
  font-weight: 600;
}

/* ---------------------------------------------------------
   14. SOBERANIA DE DATOS
   --------------------------------------------------------- */
.sovereignty {
  background: linear-gradient(180deg, #060610 0%, var(--bg-primary) 100%);
  position: relative;
}

.sovereignty__block {
  border-left: 4px solid var(--amber);
  padding-left: 2rem;
  margin-bottom: 3rem;
}

.sovereignty__block h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.sovereignty__block p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 70ch;
}

/* Three pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pillar {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-base);
}

.pillar:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(230, 168, 23, 0.1);
}

.pillar__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--amber-dim);
  border-radius: 50%;
  color: var(--amber);
}

.pillar__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pillar__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------------------------------------------------------
   15. ORGANIZATIONS
   --------------------------------------------------------- */
.orgs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
  margin-top: 3rem;
}

.org-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  width: 100%;
  aspect-ratio: 16 / 9;
}

.org-logo img {
  max-height: 48px;
  width: auto;
  filter: grayscale(100%) brightness(0.6);
  opacity: 0.5;
  transition: all var(--transition-base);
}

.org-logo:hover {
  border-color: var(--border-medium);
  background: var(--bg-glass-hover);
}

.org-logo:hover img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* ---------------------------------------------------------
   16. PARTICIPAR SECTION
   --------------------------------------------------------- */
.participate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.participate-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-base);
}

.participate-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg);
}

.participate-card__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--amber-dim);
  border-radius: var(--radius-lg);
  color: var(--amber);
  transition: transform var(--transition-base);
}

.participate-card:hover .participate-card__icon {
  transform: scale(1.1);
}

.participate-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.participate-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.participate-card .btn {
  width: 100%;
}

/* ---------------------------------------------------------
   17. FOOTER
   --------------------------------------------------------- */
.footer {
  background: var(--bg-footer);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 1rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer__col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--amber);
}

.footer__divider {
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: 2rem;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   18. SCROLL REVEAL ANIMATIONS
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible,
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-stagger.visible > *,
.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible > *:nth-child(1)  { transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2)  { transition-delay: 0.10s; }
.reveal-stagger.visible > *:nth-child(3)  { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(4)  { transition-delay: 0.20s; }
.reveal-stagger.visible > *:nth-child(5)  { transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(6)  { transition-delay: 0.30s; }
.reveal-stagger.visible > *:nth-child(7)  { transition-delay: 0.35s; }
.reveal-stagger.visible > *:nth-child(8)  { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(9)  { transition-delay: 0.45s; }
.reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.50s; }
.reveal-stagger.visible > *:nth-child(11) { transition-delay: 0.55s; }
.reveal-stagger.visible > *:nth-child(12) { transition-delay: 0.60s; }

/* Reveal children (used by JS with data-stagger) */
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-child.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in from left / right */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------------------------------------------------------
   19. LINK ANIMATIONS
   --------------------------------------------------------- */
.link-animated {
  position: relative;
  display: inline-block;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width var(--transition-base);
}

.link-animated:hover::after {
  width: 100%;
}

/* Underline from center */
.link-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------
   20. ACCESSIBILITY
   --------------------------------------------------------- */

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--amber);
  color: var(--bg-primary);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger > *,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .progress-bar__fill,
  .pilot-progress__fill {
    transition: none;
  }
}

/* Ensure text contrast WCAG AA */
/* var(--text-secondary) #a0aec0 on #0a0a0a = ratio 8.1:1 */
/* var(--text-tertiary)  #718096 on #0a0a0a = ratio 4.7:1 (AA pass) */
/* var(--amber) #e6a817 on #0a0a0a = ratio 7.8:1 */

/* ---------------------------------------------------------
   21. RESPONSIVE — MOBILE < 768px
   --------------------------------------------------------- */
@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
  }

  section {
    padding: 4rem 0;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  /* Nav */
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + 2rem);
  }

  .hero__stats {
    gap: 1.5rem;
  }

  .hero__stat-number {
    font-size: 2.5rem;
  }

  /* Cards / grids go single column */
  .catalog-grid,
  .crisis-languages,
  .tech-cards,
  .pillars,
  .participate-grid,
  .risk-stats {
    grid-template-columns: 1fr;
  }

  /* Pipeline vertical */
  .pipeline {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .pipeline::before {
    top: 24px;
    bottom: 24px;
    left: 50%;
    right: auto;
    width: 2px;
    height: calc(100% - 48px);
  }

  .pipeline::after {
    top: 24px;
    left: calc(50% - 3px);
    width: 6px;
    height: 60px;
    animation: pipeline-glow-v 4s linear infinite;
  }

  @keyframes pipeline-glow-v {
    0%   { top: 24px; opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.6; }
    100% { top: calc(100% - 84px); opacity: 0; }
  }

  .pipeline__step {
    width: 100%;
    max-width: 280px;
  }

  /* Map */
  .map-container {
    max-width: 100%;
    overflow-x: auto;
  }

  .map-svg {
    min-width: 500px;
  }

  /* Pilot card */
  .pilot-card {
    padding: 2rem 1.5rem;
  }

  .pilot-card__grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Comparison table scroll */
  .comparison-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 560px;
  }

  /* Org logos */
  .orgs-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
  }

  .org-logo {
    padding: 1rem;
  }

  .org-logo img {
    max-height: 36px;
  }

  /* Lang toggle in nav */
  .lang-toggle {
    display: none;
  }

  .nav__mobile-menu .lang-toggle {
    display: flex;
    margin-top: 1rem;
  }
}

/* ---------------------------------------------------------
   22. RESPONSIVE — TABLET 768-1024px
   --------------------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
  .catalog-grid,
  .crisis-languages,
  .tech-cards,
  .pillars,
  .participate-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .pipeline {
    gap: 1rem;
  }

  .pipeline__step-desc {
    font-size: 0.75rem;
    max-width: 140px;
  }
}

/* ---------------------------------------------------------
   23. RESPONSIVE — WIDE > 1440px
   --------------------------------------------------------- */
@media (min-width: 1441px) {
  .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .container {
    max-width: var(--container-max);
  }
}

/* ---------------------------------------------------------
   24. EXTRA UI COMPONENTS
   --------------------------------------------------------- */

/* Divider with text */
.divider-text {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.divider-text span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Tag/chip */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--bg-glass);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

/* Tooltip generic */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Notification / alert strip */
.alert-strip {
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--amber-dim);
  color: var(--amber);
  border-bottom: 1px solid rgba(230, 168, 23, 0.15);
}

.alert-strip a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Modal / overlay backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-base);
}

.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-glass);
  color: var(--text-tertiary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

/* ---------------------------------------------------------
   25. UTILITY HELPERS
   --------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mb-8 { margin-bottom: 4rem; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.w-full { width: 100%; }
.max-w-sm  { max-width: 480px; }
.max-w-md  { max-width: 640px; }
.max-w-lg  { max-width: 800px; }
.max-w-xl  { max-width: 1024px; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.overflow-hidden { overflow: hidden; }
.relative { position: relative; }

/* Gradient text utility */
.gradient-amber {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-turquoise {
  background: linear-gradient(135deg, var(--turquoise), #48cae4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow effect utility */
.glow-amber {
  box-shadow: var(--shadow-glow-amber);
}

.glow-turquoise {
  box-shadow: var(--shadow-glow-turquoise);
}

/* Backdrop blur utility */
.backdrop-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------------------------------------------------------
   26. PRINT STYLES
   --------------------------------------------------------- */
@media print {
  .nav,
  .footer,
  .hero::after,
  .nav__hamburger,
  .lang-toggle,
  .btn,
  .modal-backdrop {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .catalog-card,
  .tech-card,
  .pillar,
  .participate-card {
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
  }

  h1, h2, h3, h4 {
    color: #000;
  }

  p, .card__text, .pillar__text, .participate-card__text {
    color: #333;
  }

  a {
    text-decoration: underline;
    color: #1a0dab;
  }
}
