/* ==========================================================================
   aprendedrones.cl — Design System
   Hermana tecnológica de academiadronchile.cl (HDRONES®)
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --font-logo: "Archivo Black", "Arial Black", "Helvetica Neue", Impact, sans-serif;

  /* Brand — logo registrado INAPI: azul #3a7dc4 + gris #3a3a3a */
  --logo-blue: #3a7dc4;
  --logo-ink: #3a3a3a;
  --brand-300: #a8cdf5;
  --brand-400: #6aa9e6;
  --brand-500: #3a7dc4;
  --brand-600: #2e66a4;
  --brand-700: #1f4a7a;
  --indigo-500: #2f6fb5;
  --indigo-600: #26558c;
  /* Cian de la hermana academiadronchile.cl, reservado para acentos */
  --cyan: #00a8e3;
  --amber: #ffc24b;
  --mint: #34e3b0;
  --rose: #ff6b8b;

  /* Surfaces (dark por defecto) */
  --bg: #050912;
  --bg-2: #070d1a;
  --elev-1: #0a1020;
  --elev-2: #0e1628;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hi: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.16);

  /* Texto */
  --text: #e8eef7;
  --text-dim: #a3b3c9;
  --text-mute: #718099;
  --on-brand: #ffffff;

  /* Efectos */
  --glow-brand: 0 0 0 1px rgba(58, 125, 196, 0.35), 0 18px 48px -18px rgba(58, 125, 196, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 32px 80px -32px rgba(0, 0, 0, 0.85);
  --grad-brand: linear-gradient(115deg, #26558c, #3572b4);
  --grad-accent: linear-gradient(115deg, var(--logo-blue), var(--cyan));
  --grad-text: linear-gradient(100deg, #ffffff 10%, var(--brand-300) 52%, var(--cyan) 100%);

  /* Geometría */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --maxw: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
  --nav-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.16s;
  --t: 0.3s;
  --t-slow: 0.6s;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-2: #eef3fa;
  --elev-1: #ffffff;
  --elev-2: #ffffff;
  --surface: rgba(6, 22, 43, 0.035);
  --surface-hi: rgba(6, 22, 43, 0.06);
  --line: rgba(6, 22, 43, 0.1);
  --line-hi: rgba(6, 22, 43, 0.2);
  --text: #0a1626;
  --text-dim: #44576f;
  --text-mute: #5a6e86;
  /* Sobre fondo claro los azules se oscurecen para cumplir AA en texto pequeño */
  --brand-300: #1f4a7a;
  --brand-400: #2e66a4;
  --grad-accent: linear-gradient(115deg, #2e66a4, #0b87bc);
  --grad-text: linear-gradient(100deg, #0a1626 10%, var(--brand-700) 55%, var(--brand-500) 100%);
  --shadow-md: 0 12px 32px -14px rgba(10, 34, 66, 0.28);
  --shadow-lg: 0 34px 70px -30px rgba(10, 34, 66, 0.3);
  --on-brand: #ffffff;
  color-scheme: light;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand-500); color: var(--on-brand); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: var(--line-hi);
  border-radius: var(--r-pill);
  border: 3px solid var(--bg-2);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-600); }

/* ---------- 3. Tipografía ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { text-wrap: pretty; }

.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--text-dim);
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--font-cond);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-400);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.82em;
  letter-spacing: 0.02em;
}

/* ---------- 4. Layout ---------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
}
.container--wide { --maxw: 1360px; }

.section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section-head { max-width: 72ch; margin-bottom: clamp(32px, 5vw, 60px); }
.section-head .lead { margin-top: 16px; }
.section-head h2 { margin-top: 14px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }

.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
/* 300px fuerza 3 columnas en el contenedor de 1200px: evita filas huérfanas
   y da más área a las ilustraciones de los cursos */
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }

.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--brand-500);
  color: var(--on-brand);
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 5. Botones ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid var(--line);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease), background var(--t) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--line-hi); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-fg: var(--on-brand);
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 14px 36px -16px rgba(58, 125, 196, 0.85);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, var(--indigo-500), var(--brand-400));
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}
.btn--primary:hover::after { opacity: 1; }
.btn--primary:hover { box-shadow: 0 20px 48px -16px rgba(47, 111, 181, 0.9); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface); }

.btn--outline {
  background: transparent;
  border-color: var(--brand-600);
  color: var(--brand-300);
}
.btn--outline:hover { background: rgba(58, 125, 196, 0.1); }

.btn--lg { padding: 17px 34px; font-size: 1rem; }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn .ico { width: 18px; height: 18px; flex: none; }
.btn--primary:hover .ico--arrow { transform: translateX(3px); }
.ico--arrow { transition: transform var(--t) var(--ease); }

/* ---------- 6. Chips / badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.badge--brand {
  background: rgba(58, 125, 196, 0.12);
  border-color: rgba(58, 125, 196, 0.32);
  color: var(--brand-300);
}
.badge--amber {
  background: rgba(255, 194, 75, 0.12);
  border-color: rgba(255, 194, 75, 0.3);
  color: var(--amber);
}
.badge--mint {
  background: rgba(52, 227, 176, 0.12);
  border-color: rgba(52, 227, 176, 0.28);
  color: var(--mint);
}
.badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.badge--live .dot { animation: pulse-dot 2s var(--ease-in-out) infinite; }
/* Dentro de tarjetas en columna flex el badge se estiraría a todo el ancho */
.course > .badge,
.track > .badge,
.plan > .badge { align-self: flex-start; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ---------- 7. Card base ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), transparent 70%), var(--elev-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.6vw, 30px);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(58, 125, 196, 0.55), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ---------- 8. Topbar + Header ---------- */
.topbar {
  background: linear-gradient(90deg, var(--brand-700), var(--indigo-600));
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 9px 0;
  text-align: center;
}
.topbar a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.topbar .sep { opacity: 0.45; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
    backdrop-filter var(--t) var(--ease);
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--nav-h);
}

/* Logo — reproduce el lockup registrado en INAPI */
.logo { display: inline-flex; align-items: center; flex: none; }
.logo__lockup {
  display: flex;
  flex-direction: column;
  font-family: var(--font-logo);
  font-weight: 400;
  line-height: 0.92;
  text-transform: uppercase;
  font-size: var(--logo-size, 1.06rem);
}
.logo__word { display: flex; align-items: center; white-space: nowrap; }
.logo__word--top {
  color: var(--logo-blue);
  letter-spacing: 0.137em;
  /* compensa el espacio final del tracking para que ambas líneas queden a ras */
  margin-right: -0.137em;
}
.logo__word--bottom {
  /* el gris del logo se invierte a blanco sobre fondo oscuro (versión reverse) */
  color: var(--logo-word, #ffffff);
  letter-spacing: 0.012em;
}
[data-theme="light"] .logo__word--bottom { --logo-word: var(--logo-ink); }
.logo__glyph {
  width: 1.12em;
  height: 1.12em;
  margin: 0 -0.055em;
  flex: none;
  transform: translateY(0.015em);
}
.logo__glyph .glyph-ring,
.logo__glyph .glyph-blade { stroke: var(--logo-blue); }
.logo__glyph .glyph-blade { fill: var(--logo-blue); }
.logo__glyph .glyph-dot { fill: var(--logo-blue); }
.logo__glyph .glyph-cut { stroke: var(--bg); }
.logo:hover .logo__glyph .glyph-rotor { animation: glyph-spin 2.4s linear infinite; }
@keyframes glyph-spin { to { transform: rotate(326deg); } }
.logo__glyph .glyph-rotor { transform-origin: 50px 50px; transform: rotate(-34deg); }
.site-footer .logo { --logo-size: 1.12rem; }
.drawer__head .logo { --logo-size: 1rem; }

/* Menú */
.nav__menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  position: relative;
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 16px; height: 2px;
  border-radius: 2px;
  background: var(--brand-500);
}
.nav__actions { display: flex; align-items: center; gap: 10px; flex: none; }

.icon-btn {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.icon-btn:hover { color: var(--brand-400); border-color: var(--line-hi); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun { display: none; }

.nav__burger { display: none; }

/* Drawer móvil */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--ease), visibility var(--t-slow);
  overflow-y: auto;
}
.drawer.is-open { transform: translateY(0); visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer__link {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease), padding-left var(--t) var(--ease);
}
.drawer__link:hover { color: var(--brand-400); padding-left: 12px; }
.drawer__link span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-mute); }
.drawer__cta { margin-top: 26px; display: grid; gap: 12px; }

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: flex;
  align-items: center;
  padding-block: clamp(56px, 8vw, 110px);
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.hero__glow {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  will-change: transform;
}
.hero__glow--a {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(58, 125, 196, 0.4), transparent 68%);
  top: -22%; right: -12%;
  animation: float-a 17s var(--ease-in-out) infinite;
}
.hero__glow--b {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(47, 111, 181, 0.34), transparent 68%);
  bottom: -26%; left: -14%;
  animation: float-b 21s var(--ease-in-out) infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 50px) scale(1.12); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, -40px) scale(1.08); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__content { max-width: 40rem; }
.hero h1 { margin: 20px 0 22px; }
.hero h1 em { font-style: normal; display: block; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero__trust {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
}
.hero__trust div strong {
  display: block;
  font-family: var(--font-cond);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero__trust div span { font-size: 0.8rem; color: var(--text-mute); letter-spacing: 0.02em; }

/* Panel visual del hero */
.hero__panel {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface-hi), transparent 60%), var(--elev-1);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}
.hero__panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.hero__panel-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-hi);
  flex: none;
}
.hero__panel-bar i:first-child { background: var(--rose); }
.hero__panel-bar i:nth-child(2) { background: var(--amber); }
.hero__panel-bar i:nth-child(3) { background: var(--mint); }
.hero__panel-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-mute);
}
.hud { display: grid; gap: 12px; }
.hud__row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}
.hud__row svg { width: 18px; height: 18px; color: var(--brand-400); }
.hud__row b { font-weight: 600; }
.hud__row small { display: block; color: var(--text-mute); font-size: 0.76rem; }
.hud__val { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brand-300); }
.hud__bar {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--surface-hi);
  overflow: hidden;
}
.hud__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--grad-accent);
  width: var(--w, 60%);
  animation: grow 1.6s var(--ease) both;
}
@keyframes grow { from { width: 0; } }

/* Dron flotante */
.drone-float {
  position: absolute;
  right: -6%;
  top: -12%;
  width: clamp(120px, 16vw, 190px);
  animation: hover-drone 6s var(--ease-in-out) infinite;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
@keyframes hover-drone {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-18px) rotate(2deg); }
}
.prop { transform-box: fill-box; transform-origin: center; animation: spin 0.18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 10. Marquee de confianza ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding: 20px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: slide 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-cond);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.marquee__item svg { width: 18px; height: 18px; color: var(--brand-600); }

/* ---------- 11. Feature cards ---------- */
.feature { display: grid; gap: 16px; }
.feature__ico {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(58, 125, 196, 0.12);
  border: 1px solid rgba(58, 125, 196, 0.26);
  color: var(--brand-400);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.card:hover .feature__ico { transform: scale(1.06) rotate(-4deg); background: rgba(58, 125, 196, 0.2); }
.feature__ico svg { width: 24px; height: 24px; }
.feature p { color: var(--text-dim); font-size: 0.94rem; }
.feature__link {
  margin-top: 4px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-400);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.feature__link svg { width: 15px; height: 15px; transition: transform var(--t) var(--ease); }
.feature__link:hover svg { transform: translateX(4px); }

/* Índice numerado */
.card--num { padding-top: 34px; }
.card__num {
  position: absolute;
  top: 16px; right: 20px;
  font-family: var(--font-cond);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--line-hi);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- 12. Rutas de aprendizaje ---------- */
.track {
  display: grid;
  gap: 18px;
  position: relative;
}
.track__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.track__level {
  font-family: var(--font-cond);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.track ul { display: grid; gap: 10px; margin-top: 4px; }
.track li {
  display: flex;
  gap: 11px;
  font-size: 0.92rem;
  color: var(--text-dim);
  align-items: flex-start;
}
.track li svg { width: 17px; height: 17px; color: var(--mint); flex: none; margin-top: 4px; }
.track__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price { display: flex; align-items: baseline; gap: 7px; }
.price b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.price s { color: var(--text-mute); font-size: 0.86rem; }
.price small { color: var(--text-mute); font-size: 0.76rem; }
.card--highlight {
  border-color: rgba(58, 125, 196, 0.4);
  background: linear-gradient(180deg, rgba(58, 125, 196, 0.09), transparent 58%), var(--elev-1);
}
.card--highlight::after {
  content: "Más elegido";
  position: absolute;
  top: 18px; right: -34px;
  transform: rotate(38deg);
  background: var(--grad-brand);
  color: var(--on-brand);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 40px;
}

/* ---------- 13. Catálogo de cursos ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.chip {
  padding: 9px 17px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--line-hi); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--grad-brand);
  color: var(--on-brand);
  border-color: transparent;
  font-weight: 600;
}
.search {
  margin-left: auto;
  position: relative;
  min-width: 232px;
  flex: 1 1 232px;
  max-width: 330px;
}
.search svg {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-mute);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--t-fast) var(--ease);
}
.search input::placeholder { color: var(--text-mute); }
.search input:focus { border-color: var(--brand-600); outline: none; }

.course { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.course__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-700), var(--indigo-600));
  display: grid;
  place-items: center;
  margin: calc(clamp(22px, 2.6vw, 30px) * -1) calc(clamp(22px, 2.6vw, 30px) * -1) 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.course__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.16), transparent 58%);
}
/* Ilustración técnica del curso: ocupa toda la portada de la tarjeta */
.course__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform var(--t-slow) var(--ease), opacity var(--t) var(--ease);
  opacity: 0.95;
}
.card:hover .course__art { transform: scale(1.035); opacity: 1; }
.course__media svg { width: 58px; height: 58px; color: rgba(255, 255, 255, 0.92); z-index: 1; }

/* Cada familia de cursos cambia de fondo dentro de la paleta de marca */
[data-cat~="vuelo"] .course__media { background: linear-gradient(135deg, #1f4a7a, #2e86b4); }
[data-cat~="credencial"] .course__media { background: linear-gradient(135deg, #1b3f68, #2f6fb5); }
[data-cat~="industria"] .course__media { background: linear-gradient(140deg, #15304e, #2e66a4); }
[data-cat~="tecnico"] .course__media { background: linear-gradient(140deg, #14304f, #0f6d92); }
[data-cat~="empresa"] .course__media { background: linear-gradient(145deg, #101f33, #1f4a7a); }
.course__tag {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  background: rgba(3, 12, 24, 0.66);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}
.course__date {
  position: absolute;
  bottom: 12px; right: 12px;
  z-index: 2;
  text-align: center;
  background: rgba(3, 12, 24, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  color: #fff;
  line-height: 1.05;
}
.course__date b { font-family: var(--font-cond); font-size: 1.3rem; display: block; }
.course__date span { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.course h3 { font-size: 1.12rem; line-height: 1.25; }
.course__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-mute);
}
.course__meta span { display: inline-flex; align-items: center; gap: 6px; }
.course__meta svg { width: 14px; height: 14px; }
.course__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.is-hidden { display: none !important; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}

/* ---------- 14. Split / showcase ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.split--reverse > *:first-child { order: 2; }
.checklist { display: grid; gap: 14px; margin-top: 26px; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; }
.checklist .tick {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(52, 227, 176, 0.14);
  border: 1px solid rgba(52, 227, 176, 0.32);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}
.checklist .tick svg { width: 13px; height: 13px; color: var(--mint); }
.checklist b { display: block; font-size: 0.97rem; }
.checklist p { color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }

.visual-frame {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--elev-1);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.visual-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-brand);
  opacity: 0.13;
  z-index: -1;
  filter: blur(22px);
}

/* Mapa / radar */
.radar {
  aspect-ratio: 1;
  max-width: 400px;
  margin-inline: auto;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 125, 196, 0.1), transparent 70%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.radar::before, .radar::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.radar::before { inset: 16%; }
.radar::after { inset: 33%; }
.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 168, 227, 0.36), transparent 28%);
  animation: sweep 4s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar__blip {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--brand-400);
  box-shadow: 0 0 0 5px rgba(58, 125, 196, 0.18);
  animation: blink 3s var(--ease-in-out) infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 55% { opacity: 0.2; } }

/* ---------- 15. Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat { background: var(--elev-1); padding: clamp(24px, 3vw, 36px); text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-cond);
  font-size: clamp(2.4rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { display: block; margin-top: 8px; font-size: 0.86rem; color: var(--text-dim); }

/* ---------- 16. Quiz / recomendador ---------- */
.quiz {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--surface-hi), transparent 55%), var(--elev-1);
  padding: clamp(24px, 4vw, 46px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.quiz::before {
  content: "";
  position: absolute;
  width: 400px; height: 400px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(47, 111, 181, 0.28), transparent 68%);
  filter: blur(50px);
  pointer-events: none;
}
.quiz__progress {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-hi);
  overflow: hidden;
  margin-bottom: 26px;
}
.quiz__progress i {
  display: block;
  height: 100%;
  background: var(--grad-brand);
  border-radius: inherit;
  width: 33%;
  transition: width var(--t-slow) var(--ease);
}
.quiz__step { display: none; }
.quiz__step.is-active { display: block; animation: fade-up var(--t-slow) var(--ease) both; }
.quiz__q { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 8px; }
.quiz__hint { color: var(--text-mute); font-size: 0.88rem; margin-bottom: 24px; }
.quiz__opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.opt {
  text-align: left;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 6px;
  transition: all var(--t-fast) var(--ease);
}
.opt:hover { border-color: var(--brand-600); transform: translateY(-3px); background: var(--surface-hi); }
.opt b { font-size: 0.98rem; font-weight: 600; }
.opt span { font-size: 0.83rem; color: var(--text-mute); }
.quiz__result { display: none; }
.quiz__result.is-active { display: block; animation: fade-up var(--t-slow) var(--ease) both; }
.quiz__result-card {
  display: grid;
  gap: 18px;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(58, 125, 196, 0.34);
  background: rgba(58, 125, 196, 0.07);
}
.quiz__back {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-mute);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.quiz__back:hover { color: var(--brand-400); }

/* ---------- 17. Testimonios ---------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.quote { display: grid; gap: 18px; }
.quote__stars { display: flex; gap: 3px; color: var(--amber); }
.quote__stars svg { width: 15px; height: 15px; }
.quote p { font-size: 0.97rem; color: var(--text-dim); }
.quote__who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--on-brand);
  flex: none;
}
.quote__who b { display: block; font-size: 0.9rem; }
.quote__who span { font-size: 0.78rem; color: var(--text-mute); }
.rail-nav { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }

/* ---------- 18. FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t) var(--ease);
}
.faq__item:has(.faq__q[aria-expanded="true"]) { border-color: rgba(58, 125, 196, 0.36); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-display);
}
.faq__q svg {
  width: 19px; height: 19px;
  flex: none;
  color: var(--brand-400);
  transition: transform var(--t) var(--ease);
}
.faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow) var(--ease);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { padding: 0 22px 22px; color: var(--text-dim); font-size: 0.93rem; }

/* ---------- 19. CTA final ---------- */
.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(36px, 6vw, 72px);
  background: linear-gradient(125deg, var(--brand-700), var(--indigo-600) 70%, #1b2a6b);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.2), transparent 45%),
    repeating-linear-gradient(60deg, transparent 0 30px, rgba(255, 255, 255, 0.045) 30px 31px);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-inline: auto; margin-top: 14px; }
.cta-band .row { justify-content: center; margin-top: 30px; }
.cta-band .btn--primary { background: #fff; color: var(--brand-700); box-shadow: none; }
.cta-band .btn--primary::after { display: none; }
.cta-band .btn--primary:hover { background: #eaf7ff; }
.cta-band .btn--ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- 20. Formularios ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
.field label .req { color: var(--rose); }
.field input,
.field select,
.field textarea {
  padding: 13px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.94rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(58, 125, 196, 0.16);
}
.field .err { font-size: 0.78rem; color: var(--rose); min-height: 1em; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: var(--rose); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.consent-row { display: grid; gap: 6px; }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 0.83rem; color: var(--text-mute); }
.consent-row[data-invalid="true"] .consent { color: var(--rose); }
.consent-row[data-invalid="true"] input {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 3px;
}
.consent input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--brand-500); flex: none; }
.form__ok,
.form__err {
  display: none;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  line-height: 1.6;
}
.form__ok {
  background: rgba(52, 227, 176, 0.1);
  border: 1px solid rgba(52, 227, 176, 0.32);
  color: var(--mint);
}
.form__err {
  background: rgba(255, 107, 139, 0.1);
  border: 1px solid rgba(255, 107, 139, 0.34);
  color: var(--rose);
}
.form__err a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.form__ok.is-visible,
.form__err.is-visible { display: block; animation: fade-up var(--t) var(--ease) both; }

/* Trampa antispam: fuera de pantalla pero sin display:none, para que los bots la rellenen */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 21. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(48px, 7vw, 84px);
  margin-top: clamp(40px, 6vw, 80px);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(min(240px, 100%), 1.4fr) repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: clamp(28px, 4vw, 52px);
  padding-bottom: 46px;
}
.footer__about p { color: var(--text-mute); font-size: 0.89rem; margin-top: 16px; max-width: 34ch; }
.footer__col h4 {
  font-family: var(--font-cond);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 16px;
}
.footer__col ul { display: grid; gap: 10px; }
.footer__col a { font-size: 0.9rem; color: var(--text-dim); transition: color var(--t-fast) var(--ease); }
.footer__col a:hover { color: var(--brand-400); }
.socials { display: flex; gap: 9px; margin-top: 20px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-mute);
  transition: all var(--t-fast) var(--ease);
}
.socials a:hover { color: var(--brand-400); border-color: var(--brand-600); transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 22px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-mute);
}
.footer__bottom a:hover { color: var(--brand-400); }
.sister-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 20px;
  transition: border-color var(--t-fast) var(--ease);
}
.sister-badge:hover { border-color: var(--brand-600); color: var(--text); }
.sister-badge svg { width: 15px; height: 15px; color: var(--brand-400); }

/* ---------- 22. Page hero (subpáginas) ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(50px, 7vw, 96px) clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  width: 700px; height: 420px;
  top: -220px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(58, 125, 196, 0.22), transparent 66%);
  filter: blur(60px);
  pointer-events: none;
}
.breadcrumb { display: flex; gap: 9px; font-size: 0.8rem; color: var(--text-mute); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--brand-400); }

/* ---------- 23. Animaciones de scroll ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Barra de progreso de lectura */
.progress-top {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad-accent);
  z-index: 120;
  pointer-events: none;
}

/* Botón volver arriba */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--elev-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t) var(--ease);
  box-shadow: var(--shadow-md);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand-400); border-color: var(--brand-600); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 24. Responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__panel { max-width: 560px; }
  .drone-float { right: 2%; top: -16%; }
  .split--reverse > *:first-child { order: 0; }
}

@media (max-width: 860px) {
  :root { --nav-h: 66px; }
  .nav__menu { display: none; }
  .nav__actions .btn--primary { display: none; }
  .nav__burger { display: grid; margin-left: auto; }
  .search { margin-left: 0; max-width: none; }
  .footer__grid { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
  .footer__about { grid-column: 1 / -1; }
  .card--highlight::after { display: none; }
}

@media (max-width: 560px) {
  /* los rótulos largos dejan de forzar scroll horizontal en pantallas de 320 px */
  .btn { white-space: normal; text-align: center; }
  .hero__cta .btn { width: 100%; }
  .topbar__inner { font-size: 0.75rem; }
  .topbar .hide-xs { display: none; }
  .course__foot, .track__foot { flex-direction: column; align-items: stretch; }
  .course__foot .btn, .track__foot .btn { width: 100%; }
}

@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .topbar, .to-top, .progress-top, .drawer, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- 25. Timeline de rutas ---------- */
.route { scroll-margin-top: calc(var(--nav-h) + 32px); }
.route + .route { margin-top: clamp(48px, 7vw, 92px); }
.route__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.route__index {
  font-family: var(--font-cond);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 0.85;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.route__head .price { justify-self: end; }

.timeline { display: grid; gap: 0; position: relative; }
.timeline__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 18px;
  padding-bottom: 26px;
  position: relative;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 30px;
  bottom: -4px;
  width: 1px;
  background: linear-gradient(var(--line-hi), transparent);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--elev-2);
  border: 1px solid var(--line-hi);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brand-400);
  z-index: 1;
}
.timeline__body h4 { font-size: 1.02rem; margin-bottom: 5px; }
.timeline__body p { color: var(--text-dim); font-size: 0.91rem; }
.timeline__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 0.76rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
}

.outcome {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(58, 125, 196, 0.28);
  background: rgba(58, 125, 196, 0.06);
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.outcome h4 {
  font-family: var(--font-cond);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-300);
}
.outcome ul { display: grid; gap: 11px; }
.outcome li { display: flex; gap: 10px; font-size: 0.89rem; color: var(--text-dim); }
.outcome li svg { width: 16px; height: 16px; color: var(--mint); flex: none; margin-top: 3px; }
.route__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(min(250px, 100%), 0.85fr); gap: clamp(24px, 4vw, 52px); }

/* ---------- 26. Equipo ---------- */
.person { text-align: center; display: grid; gap: 12px; }
.person__photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin-inline: auto;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--on-brand);
  box-shadow: 0 14px 32px -16px rgba(58, 125, 196, 0.9);
}
.person h3 { font-size: 1.05rem; }
.person__role {
  font-family: var(--font-cond);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-400);
}
.person p { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- 27. Planes ---------- */
.plan { display: grid; gap: 18px; }
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.plan__price b { font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.03em; }
.plan__price span { color: var(--text-mute); font-size: 0.82rem; }
.plan ul { display: grid; gap: 11px; }
.plan li { display: flex; gap: 10px; font-size: 0.9rem; color: var(--text-dim); }
.plan li svg { width: 16px; height: 16px; color: var(--brand-400); flex: none; margin-top: 3px; }
.plan .btn { margin-top: auto; }

/* ---------- 28. Info cards de contacto ---------- */
.info { display: grid; gap: 10px; }
.info__ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(58, 125, 196, 0.12);
  border: 1px solid rgba(58, 125, 196, 0.26);
  color: var(--brand-400);
}
.info__ico svg { width: 20px; height: 20px; }
.info h3 { font-size: 0.95rem; }
.info a, .info p { font-size: 0.9rem; color: var(--text-dim); }
.info__list { display: grid; gap: 5px; }
.info a:hover { color: var(--brand-400); }

/* ---------- 29. Error 404 ---------- */
.err-page {
  min-height: 74svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 60px;
}
.err-code {
  font-family: var(--font-cond);
  font-size: clamp(6rem, 22vw, 14rem);
  font-weight: 700;
  line-height: 0.82;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 30. Prosa legal ---------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-top: 44px; }
.prose h3 { font-size: 1.05rem; margin-top: 26px; }
.prose p, .prose li { color: var(--text-dim); font-size: 0.95rem; margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose a { color: var(--brand-400); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .route__grid { grid-template-columns: 1fr; }
  .outcome { position: static; }
  .route__head { grid-template-columns: auto 1fr; }
  .route__head .price { grid-column: 2; justify-self: start; }
}

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