/* ============================================================
   FUTURES — stylesheet
   Erasmus+ project · static prototype
   ============================================================ */

:root {
  --ink:        #05070F;
  --ink-2:      #0A1022;
  --ink-3:      #101A38;
  --line:       #1A2A50;
  --line-soft:  #121A32;

  --cyan:       #2FE0F0;
  --cyan-soft:  #86F0FA;
  --teal:       #0C5766;
  --violet:     #8B6BFF;

  --paper:      #EDF6F9;
  --muted:      #93A9C6;
  --muted-dim:  #62789C;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;

  --max: 1160px;
  --gutter: 26px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html { background: var(--ink); }
body {
  margin: 0;
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  background: var(--ink);
}
/* Capa fija: los halos de color y un grano muy leve */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -8%, rgba(47,224,240,0.13), transparent 62%),
    radial-gradient(820px 560px at 2% 26%, rgba(139,107,255,0.08), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 2; }
#site-header { z-index: 60; }  /* por encima de <main>, si no los desplegables quedan detrás */

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--cyan);
  color: var(--ink); padding: 10px 16px; z-index: 200; font-weight: 600; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "wdth" 106;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 0.46em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 8.4vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.022em; font-weight: 700; }
h4 { font-size: 0.95rem; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0 0 1.15em; max-width: 66ch; }
.lead { font-size: 1.2rem; color: #BED3E4; max-width: 56ch; line-height: 1.6; }
.dim { color: var(--muted); }
.small { font-size: 0.95rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 68ch; }
.band { padding-block: clamp(44px, 6vw, 76px); }
.rule { border-top: 1px solid var(--line-soft); }
.tint { background: linear-gradient(180deg, #0A1124 0%, #080D1C 100%); }

/* ============================================================
   Header
   ============================================================ */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,7,15,0.78);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(26,42,80,0.7);
}
.site-head__inner { display: flex; align-items: center; gap: 18px; min-height: 70px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 800;
  font-variation-settings: "wdth" 112;
  font-size: 1.18rem; letter-spacing: 0.04em;
  color: var(--paper); margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 31px; height: 31px; flex: none; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav > ul { display: contents; list-style: none; margin: 0; padding: 0; }
.nav__menu { list-style: none; margin: 0; }
.nav__item { position: relative; }
.nav__link {
  display: block; padding: 9px 14px;
  color: #CBDCEA; font-size: 0.93rem; font-weight: 500;
  background: none; border: 0; cursor: pointer;
}
.nav__link:hover { color: var(--cyan); text-decoration: none; }
.nav__item--active > .nav__link { color: var(--cyan); }
.nav__link[aria-expanded]::after {
  content: ""; display: inline-block; margin-left: 7px; width: 5px; height: 5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.nav__menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 224px; padding: 7px; display: none;
  background: #0C1328;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
}
.nav__item[data-open="true"] .nav__menu { display: block; }

.nav__menu a {
  display: block; padding: 9px 13px; color: #CBDCEA; font-size: 0.91rem;
  border-left: 2px solid transparent;
}
.nav__menu a:hover {
  text-decoration: none; color: var(--cyan);
  background: rgba(47,224,240,0.07); border-left-color: var(--cyan);
}

.nav__campus {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 10px; padding: 9px 17px;
  font-size: 0.91rem; font-weight: 600; color: #D6CDFF;
  border: 1px solid rgba(139,107,255,0.55);
  background: rgba(139,107,255,0.12);
}
.nav__campus:hover { text-decoration: none; background: rgba(139,107,255,0.24); color: #fff; }
.nav__campus svg { width: 13px; height: 13px; }

.burger { display: none; width: 42px; height: 42px; background: none;
  border: 1px solid var(--line); color: var(--paper); cursor: pointer;
  align-items: center; justify-content: center; }
.burger i, .burger i::before, .burger i::after {
  display: block; width: 18px; height: 1.5px; background: currentColor; content: ""; }
.burger i { position: relative; }
.burger i::before { position: absolute; top: -6px; }
.burger i::after { position: absolute; top: 6px; }

@media (max-width: 940px) {
  .burger { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px var(--gutter) 22px;
    background: #070B18; border-bottom: 1px solid var(--line);
  }
  .nav[data-open="true"] { display: flex; }
  .nav > ul { display: block; }
  .nav__link { padding: 13px 2px; font-size: 1.02rem; }
  .nav__menu { position: static; display: block; min-width: 0; background: none;
    border: 0; box-shadow: none; padding: 0 0 8px 15px; margin-left: 3px;
    border-left: 1px solid var(--line); }
  .nav__item[data-open="false"] .nav__menu { display: none; }
  .nav__campus { margin: 16px 0 0; justify-content: center; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-block: clamp(30px, 4vw, 52px) clamp(34px, 5vw, 62px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.16fr);
  gap: clamp(28px, 5vw, 68px); align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.kicker {
  display: inline-block; margin-bottom: 22px;
  font-family: var(--display); font-weight: 600; font-size: 0.87rem;
  letter-spacing: 0.02em; color: var(--cyan);
  padding-bottom: 7px; border-bottom: 1px solid rgba(47,224,240,0.35);
}
.hero h1 { margin-bottom: 24px; }
.hero h1 em {
  font-style: normal; color: var(--cyan);
  text-shadow: 0 0 38px rgba(47,224,240,0.45);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* --- Route SVG --- */
.route-art { width: 100%; height: auto; overflow: visible; }
.route-art .silhouette { fill: none; stroke: #24405F; stroke-width: 2; }
.route-art .silhouette-fill { fill: rgba(47,224,240,0.05); }
.route-art .leg {
  fill: none; stroke: var(--cyan); stroke-width: 2.6;
  stroke-linecap: round; opacity: 0.8;
  filter: drop-shadow(0 0 7px rgba(47,224,240,0.5));
}
.route-art .leg--locked {
  stroke: var(--violet); stroke-dasharray: 5 8; opacity: 0.6;
  filter: drop-shadow(0 0 7px rgba(139,107,255,0.4));
}
.route-art .stop circle.halo { fill: var(--cyan); opacity: 0; transition: opacity .2s; }
.route-art .stop circle.dot {
  fill: var(--ink); stroke: var(--cyan); stroke-width: 2.4;
  transition: fill .2s, r .2s;
}
.route-art .stop text {
  font-family: var(--display); font-weight: 700; font-size: 15.5px;
  fill: var(--paper); letter-spacing: -0.02em;
  paint-order: stroke; stroke: #05070F; stroke-width: 3px; stroke-linejoin: round;
}
.route-art .stop tspan.num {
  fill: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
}
.route-art .stop tspan.sub {
  font-family: var(--body); font-weight: 400; font-size: 11.5px; fill: var(--muted);
  stroke-width: 2.2px;
}
.route-art .stop:hover circle.dot, .route-art .stop:focus-visible circle.dot { fill: var(--cyan); r: 9; }
.route-art .stop:hover circle.halo, .route-art .stop:focus-visible circle.halo { opacity: 0.18; }
.route-art .stop:hover text { fill: var(--cyan-soft); }
.route-art .stop--locked circle.dot { stroke: var(--violet); }
.route-art .stop--locked circle.halo { fill: var(--violet); }
.route-art .stop--locked text { fill: var(--muted); }
.route-art .stop--locked tspan.num { fill: var(--violet); }
.route-art .stop--locked:hover circle.dot { fill: var(--violet); }
.route-art .stop--locked:hover text { fill: #C4B4FF; }

/* Dibujado en carga: un solo momento */
.route-art[data-animate="true"] .silhouette,
.route-art[data-animate="true"] .leg {
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: draw 1.05s cubic-bezier(.4,.08,.2,1) forwards; animation-delay: var(--delay, 0s);
}
.route-art[data-animate="true"] .stop {
  opacity: 0; animation: pop .4s ease forwards; animation-delay: var(--delay, 0s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Lista táctil equivalente en móvil */
.route-list { display: none; list-style: none; margin: 26px 0 0; padding: 0; }
.route-list li { position: relative; padding: 0 0 0 40px; }
.route-list li::before {
  content: ""; position: absolute; left: 7px; top: 4px; bottom: -4px;
  width: 1px; background: linear-gradient(180deg, var(--cyan), rgba(47,224,240,0.25));
}
.route-list li:last-child::before { background: linear-gradient(180deg, rgba(139,107,255,0.5), transparent); }
.route-list li::after {
  content: ""; position: absolute; left: 2px; top: 17px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--cyan); background: var(--ink);
}
.route-list li.is-locked::after { border-color: var(--violet); }
.route-list a { display: block; padding: 12px 0 14px; color: var(--paper); }
.route-list a:hover { text-decoration: none; }
.route-list a:hover b { color: var(--cyan); }
.route-list .n { font-size: 0.74rem; letter-spacing: 0.12em; color: var(--cyan); display: block; }
.route-list li.is-locked .n { color: var(--violet); }
.route-list b { font-family: var(--display); font-weight: 700; font-size: 1.06rem; display: block; }
.route-list span.d { font-size: 0.87rem; color: var(--muted); }

@media (max-width: 900px) {
  .route-list { display: block; }
  .route-art { max-width: 340px; margin-inline: auto; }
  .route-art .stop text { display: none; }
  .route-art .stop { pointer-events: none; }
}

/* ============================================================
   Cifras: tipografía grande, sin cajas
   ============================================================ */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.figure b {
  display: block; font-family: var(--display); font-weight: 800;
  font-variation-settings: "wdth" 92;
  font-size: clamp(2.4rem, 4.6vw, 3.4rem); line-height: 0.9;
  letter-spacing: -0.05em; color: var(--paper);
}
.figure span { display: block; margin-top: 8px; font-size: 0.94rem; color: var(--muted); max-width: 24ch; }
.figure--accent b { color: var(--cyan); text-shadow: 0 0 40px rgba(47,224,240,0.35); }

/* ============================================================
   Programa: etapas encadenadas, no tarjetas
   ============================================================ */
.stages { counter-reset: stage; margin-top: 12px; }
.stage {
  position: relative;
  display: grid; grid-template-columns: 88px minmax(0, 1fr);
  gap: 0 30px; padding: 26px 0 28px;
  border-top: 1px solid var(--line-soft);
}
.stage:last-child { border-bottom: 1px solid var(--line-soft); }
.stage__n {
  font-family: var(--display); font-weight: 800;
  font-variation-settings: "wdth" 92;
  font-size: 2.9rem; line-height: 1; letter-spacing: -0.05em;
  color: #2E8CA0;
}
@supports (-webkit-text-stroke: 1px #000) {
  .stage__n { color: transparent; -webkit-text-stroke: 1.6px #2E8CA0; }
  .stage:hover .stage__n { -webkit-text-stroke-color: var(--cyan); }
}
.stage h3 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin-bottom: 10px; }
.stage__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 22px 40px; }
.stage__body p { margin-bottom: 0; }
.stage ul { margin: 0; padding-left: 19px; color: var(--muted); font-size: 0.95rem; }
.stage ul li { margin-bottom: 6px; }
.stage__tag {
  display: inline-block; margin-bottom: 12px; font-size: 0.78rem;
  letter-spacing: 0.09em; color: var(--cyan); font-weight: 600;
}
@media (max-width: 760px) {
  .stage { grid-template-columns: 1fr; gap: 0; padding: 22px 0 24px; }
  .stage__n { font-size: 1.7rem; margin-bottom: 8px; }
  .stage__body { grid-template-columns: 1fr; }
}

/* ============================================================
   Campus bloqueado
   ============================================================ */
.locked {
  --cut: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
  position: relative;
  padding: clamp(30px, 5vw, 56px);
  background: rgba(139,107,255,0.5);
  clip-path: var(--cut);
}
.locked::before {
  content: ""; position: absolute; inset: 1px; z-index: 0;
  clip-path: var(--cut);
  background:
    radial-gradient(560px 300px at 88% 0%, rgba(139,107,255,0.26), transparent 70%),
    linear-gradient(180deg, #14102E 0%, #0A0D1E 100%);
}
.locked > * { position: relative; z-index: 1; }
.locked__badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px;
  font-size: 0.82rem; font-weight: 600; color: #C4B4FF;
}
.locked__badge svg { width: 15px; height: 15px; }
.locked h2, .locked h1 { margin-bottom: 16px; }

.countdown { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 32px; }
.countdown div { min-width: 88px; padding: 14px 16px; border: 1px solid rgba(139,107,255,0.3);
  background: rgba(5,7,15,0.6); }
.countdown b {
  display: block; font-family: var(--display); font-weight: 800;
  font-variation-settings: "wdth" 92;
  font-size: 2.1rem; line-height: 1; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; color: #fff;
}
.countdown span { font-size: 0.74rem; letter-spacing: 0.07em; color: var(--muted); }

/* ============================================================
   Botones y formularios
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; font-weight: 600; font-size: 0.98rem;
  border: 0; cursor: pointer;
}
.btn--primary { background: var(--cyan); color: #04121A; box-shadow: 0 0 34px rgba(47,224,240,0.28); }
.btn--primary:hover { text-decoration: none; background: var(--cyan-soft); }
.btn--ghost { background: rgba(255,255,255,0.02); color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--cyan); color: var(--cyan); }
.btn[disabled] { cursor: not-allowed; opacity: 0.7; }

.form { display: flex; flex-wrap: wrap; gap: 11px; max-width: 580px; }
.form input[type="email"], .form input[type="text"], .form textarea, .form select {
  flex: 1 1 230px; min-width: 0; padding: 13px 15px;
  background: rgba(5,7,15,0.7); color: var(--paper);
  border: 1px solid var(--line); font: inherit; font-size: 0.96rem;
}
.form textarea { flex-basis: 100%; min-height: 150px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted-dim); }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--cyan); }
.form__row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 11px; }
.form__consent { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.86rem; color: var(--muted); }
.form__consent input { margin-top: 4px; accent-color: var(--cyan); }
.form__note { flex-basis: 100%; font-size: 0.85rem; margin: 0; }
.form__note[data-state="ok"] { color: var(--cyan); }
.form__note[data-state="err"] { color: #FF9494; }

/* ============================================================
   Partners — todos con el mismo peso
   ============================================================ */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); }
@media (max-width: 940px) { .partners { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .partners { grid-template-columns: 1fr; } }
.partner {
  background: rgba(10,16,34,0.72); padding: 28px 26px 30px;
  display: flex; flex-direction: column;
}
.partner .partner__mark {
  font-family: var(--display); font-weight: 800; font-size: 1.42rem;
  font-variation-settings: "wdth" 96; letter-spacing: -0.03em;
  color: var(--cyan); margin-bottom: 20px;
}
.partner h3 { font-size: 1.1rem; margin-bottom: 3px; }
.partner .partner__where { font-size: 0.82rem; letter-spacing: 0.05em; color: var(--muted-dim); margin-bottom: 14px; }
.partner p { font-size: 0.93rem; color: var(--muted); margin: 0; }
.partner .partner__role { margin-top: auto; padding-top: 18px; font-size: 0.86rem; color: var(--cyan); }

/* ============================================================
   Cards (uso puntual) y listas
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); }
.tile { background: rgba(10,16,34,0.72); padding: 26px 24px 28px; }
.tile > :last-child { margin-bottom: 0; }
.tile h3 { margin-bottom: 8px; }
.tile p { font-size: 0.95rem; color: var(--muted); }
.tile ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.94rem; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 11px; color: var(--muted); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 11px; height: 6px;
  border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan);
  transform: rotate(-45deg);
}

/* ============================================================
   News
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.filters button { padding: 8px 16px; font-size: 0.88rem; background: none;
  color: var(--muted); border: 1px solid var(--line); cursor: pointer; }
.filters button[aria-pressed="true"] { color: #04121A; background: var(--cyan);
  border-color: var(--cyan); font-weight: 600; }

.post { border-top: 1px solid var(--line-soft); padding: 20px 0;
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 30px; }
.post:last-child { border-bottom: 1px solid var(--line-soft); }
.post__meta { font-size: 0.85rem; color: var(--muted-dim); margin: 0; }
.post__meta b { display: block; color: var(--cyan); font-weight: 500; margin-bottom: 2px; }
.post h3 { margin-bottom: 8px; }
.post h3 a { color: var(--paper); }
.post h3 a:hover { color: var(--cyan); text-decoration: none; }
.post p { color: var(--muted); font-size: 0.97rem; margin: 0; }
.post[hidden] { display: none; }
@media (max-width: 700px) { .post { grid-template-columns: 1fr; } }

/* ============================================================
   Footer
   ============================================================ */
.site-foot { border-top: 1px solid var(--line); background: rgba(7,11,24,0.7);
  padding-block: 42px 26px; font-size: 0.9rem; }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px; margin-bottom: 30px; }
.foot__grid h4 { margin-bottom: 13px; font-size: 0.85rem; }
.foot__grid ul { list-style: none; margin: 0; padding: 0; }
.foot__grid li { margin-bottom: 8px; }
.foot__grid a { color: var(--muted); }
.foot__grid a:hover { color: var(--cyan); }

.eu { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px;
  align-items: start; padding: 22px; margin-bottom: 26px;
  border: 1px solid var(--line-soft); background: rgba(5,7,15,0.55); }
.eu__flag { aspect-ratio: 3/2; background: #003399; display: grid; place-items: center; }
.eu__flag svg { width: 70%; }
.eu p { font-size: 0.79rem; color: var(--muted); margin: 0; max-width: 92ch; line-height: 1.6; }

.foot__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 0.82rem; color: var(--muted-dim); }
.foot__legal a { color: var(--muted-dim); }

/* ---------- Utils ---------- */
.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; }
.page-head { padding-block: clamp(32px, 4.5vw, 54px) 4px; }
.crumb { font-size: 0.84rem; color: var(--muted-dim); margin-bottom: 16px; }
.crumb a { color: var(--muted); }
.head-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: baseline; justify-content: space-between; }
.btn + .btn { margin-left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route-art[data-animate="true"] .silhouette,
  .route-art[data-animate="true"] .leg,
  .route-art[data-animate="true"] .stop {
    animation: none; stroke-dashoffset: 0; opacity: 1;
  }
}

/* ============================================================
   Scroll-linked spine on the module stages
   ============================================================ */
.stages { position: relative; }
.stages__spine {
  position: absolute; left: 21px; top: 26px; bottom: 28px; width: 2px;
  background: rgba(46,140,160,0.22); overflow: hidden;
}
.stages__spine i {
  display: block; width: 100%; height: 100%;
  transform: scaleY(var(--p, 0)); transform-origin: top;
  background: linear-gradient(180deg, var(--cyan), #1FA8C4);
  box-shadow: 0 0 14px rgba(47,224,240,0.55);
  transition: transform .12s linear;
}
.stage { transition: opacity .45s ease; }
.stage__n { transition: color .35s ease, -webkit-text-stroke-color .35s ease; }
.stage[data-reached="true"] .stage__n { -webkit-text-stroke-color: var(--cyan); color: transparent; }
.stage[data-reached="true"] .stage__tag { color: var(--cyan-soft); }
@media (max-width: 760px) { .stages__spine { display: none; } }

/* ============================================================
   Counting figures
   ============================================================ */
.figure b { font-variant-numeric: tabular-nums; }

/* ============================================================
   Campus lock: reacts to hover and focus
   ============================================================ */
.locked { transition: border-color .3s ease; }
.locked::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .35s ease;
  background: linear-gradient(180deg, transparent 0%, rgba(139,107,255,0.16) 48%, transparent 96%);
  background-size: 100% 42%; background-repeat: no-repeat;
  clip-path: var(--cut);
}
.locked:hover::after, .locked:focus-within::after {
  opacity: 1; animation: sweep 2.4s linear infinite;
}
@keyframes sweep { from { background-position: 0 -60%; } to { background-position: 0 160%; } }

.lockmark { display: inline-block; width: 15px; height: 15px; }
.lockmark .shackle { transition: transform .32s cubic-bezier(.3,1.5,.5,1); transform-origin: 12px 12px; }
.locked:hover .lockmark .shackle, .locked:focus-within .lockmark .shackle {
  transform: translateY(-2.5px) rotate(-9deg);
}
.locked:hover .locked__badge, .locked:focus-within .locked__badge { color: #E4DBFF; }

/* ============================================================
   Phishing mini-game
   ============================================================ */
.quiz { max-width: 760px; }
.quiz__scene {
  border: 1px solid var(--line); background: rgba(5,7,15,0.6);
  padding: 18px 20px; margin-bottom: 14px;
}
.quiz__from { font-size: 0.82rem; color: var(--muted-dim); margin: 0 0 6px; }
.quiz__subject { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin: 0 0 10px; }
.quiz__msg { font-size: 0.96rem; color: var(--muted); margin: 0; }
.quiz__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.quiz__verdict[data-shown] + .quiz__actions { margin-top: 18px; }
.quiz__actions button {
  padding: 12px 22px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  background: rgba(255,255,255,0.02); color: var(--paper);
  border: 1px solid var(--line);
}
.quiz__actions button:hover { border-color: var(--cyan); color: var(--cyan); }
.quiz__actions button[disabled] { cursor: default; }
.quiz__verdict {
  margin-top: 18px; padding: 16px 18px; font-size: 0.95rem;
  border-left: 2px solid var(--line); color: var(--muted); display: none;
}
.quiz__verdict[data-shown] { display: block; }
.quiz__verdict[data-right="yes"] { border-left-color: var(--cyan); }
.quiz__verdict[data-right="no"]  { border-left-color: #FF9494; }
.quiz__verdict b { color: var(--paper); display: block; margin-bottom: 4px; }
.quiz__progress { font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted-dim); margin-bottom: 14px; }
.quiz__done { display: none; }
.quiz__done[data-shown] { display: block; }

/* Botones del héroe: caben en una fila también en pantallas medias */
@media (min-width: 901px) and (max-width: 1140px) {
  .btn { padding: 12px 19px; font-size: 0.93rem; }
}

/* ============================================================
   Language picker
   ============================================================ */
.nav__item--lang .nav__link { display: flex; align-items: center; gap: 7px; }
.nav__item--lang svg { width: 15px; height: 15px; flex: none; opacity: 0.75; }
.nav__menu--lang { min-width: 168px; left: auto; right: 0; }
.nav__menu--lang a[aria-current="true"] {
  color: var(--cyan); border-left-color: var(--cyan);
  background: rgba(47,224,240,0.06);
}
@media (max-width: 940px) {
  .nav__menu--lang { right: auto; }
  .nav__item--lang { order: 9; display: block; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 4px; }
}

/* ============================================================
   MOOC status list
   ============================================================ */
.state { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 28px; }
.state div {
  min-width: 148px; padding: 12px 16px;
  border: 1px solid rgba(139,107,255,0.28); background: rgba(5,7,15,0.6);
}
.state dt { font-size: 0.76rem; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 5px; }
.state dd {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: 1.05rem; letter-spacing: -0.02em; color: var(--cyan);
}
.state dd::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); margin-right: 8px; vertical-align: 2px;
}
.state--wait dd { color: #C4B4FF; }
.state--wait dd::before { background: transparent; box-shadow: inset 0 0 0 1.5px #8B6BFF; }

/* ============================================================
   Two ways to take the course
   ============================================================ */
.ways__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 26px; }
.ways__tabs button {
  padding: 11px 24px; font-size: 0.94rem; font-weight: 600; cursor: pointer;
  background: none; color: var(--muted); border: 1px solid var(--line);
}
.ways__tabs button:hover { color: var(--cyan); border-color: var(--cyan); }
.ways__tabs button[aria-pressed="true"] {
  color: #04121A; background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(47,224,240,0.22);
}
.ways__panel[hidden] { display: none; }
.ways__panel { animation: waysIn .28s ease; }
.ways__panel h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin-bottom: 10px; }
.ways__panel p { max-width: 66ch; }
.ways__panel .state { margin: 20px 0 22px; }
.ways__panel .state div { border-color: var(--line); }
@keyframes waysIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ways__panel { animation: none; } }
