/* =========================================================
   II Reto Agrotech Startup 2026 · Hoja de estilos principal
   Modo claro: paleta de fondo_agrotech (crema, hoja, ola)
   Modo oscuro: paleta del cartel oficial (noche, lima, eléctrico)
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --alt: #EEF6E6;
  --surface: #FFFFFF;
  --ink: #0D3B4C;
  --ink-2: #3D5F66;
  --line: rgba(13, 59, 76, .14);
  --leaf: #5FA832;
  --leaf-ink: #3B7A1A;
  --volt: #0B7A6E;
  --lime: #A6D63A;
  --soft: #DDEFC4;
  --btn-bg: #0D3B4C;
  --btn-ink: #FFFFFF;
  --header-bg: rgba(255, 255, 255, .84);
  --shadow: 0 22px 44px -22px rgba(13, 59, 76, .55);
  --hard: #0D3B4C;
  --band: #0D3B4C;
  --band-2: #072A36;
  --footer: #0D3B4C;

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-wide: "Lexend Exa", "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;
  --fade: clamp(90px, 13vw, 200px); /* altura de los fundidos entre bloques */
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #061A1F;
  --alt: #0B262C;
  --surface: #0C2A30;
  --ink: #E8F5E0;
  --ink-2: #A8C4BB;
  --line: rgba(232, 245, 224, .13);
  --leaf: #B8F03C;
  --leaf-ink: #B8F03C;
  --volt: #3AB0FF;
  --lime: #D4FF5C;
  --soft: #12404A;
  --btn-bg: #B8F03C;
  --btn-ink: #061A1F;
  --header-bg: rgba(6, 26, 31, .8);
  --shadow: 0 24px 48px -20px rgba(0, 0, 0, .8);
  --hard: #B8F03C;
  --band: #04141A;
  --band-2: #020C10;
  --footer: #031015;
  color-scheme: dark;
}

/* Sin JavaScript: respeta la preferencia del sistema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #061A1F; --alt: #0B262C; --surface: #0C2A30; --ink: #E8F5E0; --ink-2: #A8C4BB;
    --line: rgba(232, 245, 224, .13); --leaf: #B8F03C; --leaf-ink: #B8F03C; --volt: #3AB0FF;
    --lime: #D4FF5C; --soft: #12404A; --btn-bg: #B8F03C; --btn-ink: #061A1F;
    --header-bg: rgba(6, 26, 31, .8); --shadow: 0 24px 48px -20px rgba(0, 0, 0, .8);
    --hard: #B8F03C; --band: #04141A; --band-2: #020C10; --footer: #031015;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); }

.section-title {
  font-family: var(--font-wide);
  font-weight: 800;
  font-size: clamp(1.65rem, 1.1rem + 2.6vw, 3.1rem);
  letter-spacing: -.03em;
  line-height: 1.08;
  max-width: 22ch;
  text-wrap: balance;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.4em; border-radius: 999px;
  font: 600 1rem/1 var(--font); text-decoration: none; letter-spacing: .01em;
  border: 2px solid transparent;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: 4px 4px 0 var(--leaf); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--leaf); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* =========================================================
   NAVEGACIÓN
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  height: var(--nav-h);
  width: min(1400px, 100%); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.brand-mark {
  width: 50px; height: 50px; flex: none; border-radius: 12px; background: #fff;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(13, 59, 76, .5);
}
.brand-mark img { width: 44px; height: auto; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a, .sub-toggle {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  font: 500 .98rem/1 var(--font); color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
/* Subrayado tipo pista de circuito: línea con nodo final */
.nav-list > li > a::after, .sub-toggle::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px;
  background: linear-gradient(90deg, var(--leaf), var(--volt));
  border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-list > li > a:hover::after, .nav-list > li > a[aria-current="page"]::after,
.sub-toggle:hover::after, .has-sub.open .sub-toggle::after { transform: scaleX(1); }
.nav-list > li > a[aria-current="page"] { font-weight: 700; }
.chev { width: 12px; height: 12px; transition: transform .2s ease; }
.has-sub { position: relative; }
.has-sub.open .chev { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% + 8px); left: 50%; min-width: 200px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.submenu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; } /* puente para el hover */
.has-sub.open .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.submenu a { display: flex; width: 100%; border-radius: 10px; padding: 0 14px; }
.submenu a:hover { background: var(--soft); }

@media (hover: hover) and (min-width: 901px) {
  .has-sub:hover .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .has-sub:hover .chev { transform: rotate(180deg); }
}

.nav-tools { display: flex; align-items: center; gap: 8px; justify-self: end; }
.theme-toggle, .menu-toggle {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.theme-toggle:hover { transform: rotate(-15deg); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: opacity .25s, transform .35s; }
.theme-toggle .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .theme-toggle .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; transform: none; fill: currentColor; }

.menu-toggle { display: none; gap: 4px; align-content: center; justify-items: center; }
.menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav-bar { grid-template-columns: 1fr auto; }
  .menu-toggle { display: grid; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .3s ease, visibility .3s;
  }
  .main-nav.open { clip-path: inset(0 0 -40px 0); visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list a, .sub-toggle { width: 100%; min-height: 56px; padding: 0 4px; font-size: 1.1rem; border-radius: 0; justify-content: flex-start; }
  .nav-list > li > a::after, .sub-toggle::after { left: 4px; right: auto; width: 32px; bottom: 10px; }
  .sub-toggle .chev { margin-left: auto; width: 16px; height: 16px; }
  .submenu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: 0; background: transparent; padding: 0 0 8px 16px;
    display: none;
  }
  .has-sub.open .submenu { display: block; transform: none; }
  .submenu a { min-height: 48px; font-size: 1rem; color: var(--ink-2); }
}

/* =========================================================
   HERO (componente de agrotech-hero.html)
   ========================================================= */
.agro-hero {
  position: relative; isolation: isolate; width: 100%;
  aspect-ratio: 1600 / 887; max-height: none; overflow: hidden;
  background: #faf1e4;
  container-type: inline-size;
}
.agro-art { display: block; width: 100%; height: 100%; position: absolute; inset: 0; pointer-events: none; }
.agro-content { position: relative; z-index: 2; width: 100%; height: 100%; }
.pulse { fill: none; stroke: #edffd4; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 9 91; filter: url(#agro-glow); opacity: 0; animation: agro-flow var(--duration) linear var(--delay) infinite; }
.node { fill: #f4ffe0; filter: url(#agro-glow); transform-box: fill-box; transform-origin: center; animation: agro-node 4.5s ease-in-out var(--delay) infinite; }
.ambient { animation: agro-breathe 11s ease-in-out infinite; opacity: .08; }
.spark { fill: #efffd4; animation: agro-drift var(--duration) ease-in-out var(--delay) infinite; opacity: 0; }
.agro-hero[data-paused="true"] .agro-art * { animation-play-state: paused !important; }
@keyframes agro-flow { 0% { stroke-dashoffset: 110; opacity: 0 } 12% { opacity: .1 } 25%, 68% { opacity: .85 } 88%, 100% { stroke-dashoffset: 0; opacity: 0 } }
@keyframes agro-node { 0%, 100% { opacity: .08; transform: scale(.65) } 48% { opacity: .7; transform: scale(1.35) } }
@keyframes agro-breathe { 0%, 100% { opacity: .04 } 50% { opacity: .18 } }
@keyframes agro-drift { 0%, 100% { opacity: 0; transform: translateY(8px) } 35%, 65% { opacity: .5 } 90% { transform: translateY(-25px); opacity: 0 } }


/* Fundido inferior del hero hacia el bloque siguiente */
.fade-a { stop-color: var(--bg); stop-opacity: 0; }
.fade-b { stop-color: var(--bg); stop-opacity: .4; }
.fade-c { stop-color: var(--bg); stop-opacity: 1; }

/* Versión nocturna del fondo en modo oscuro: invertida y teñida hacia el petróleo */
.agro-tint { fill: #062530; mix-blend-mode: lighten; opacity: 0; }
[data-theme="dark"] .agro-tint { opacity: 1; }
[data-theme="dark"] .agro-hero { background: #061A1F; }
[data-theme="dark"] .agro-img { filter: invert(1) hue-rotate(180deg) saturate(1.1) brightness(.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .agro-hero { background: #061A1F; }
  :root:not([data-theme]) .agro-tint { opacity: 1; }
  :root:not([data-theme]) .agro-img { filter: invert(1) hue-rotate(180deg) saturate(1.1) brightness(.95); }
}

/* Título sobre la zona libre de la ilustración (entre la planta y el logo) */
.hero-copy {
  position: absolute; left: 28.5cqw; top: 6.2cqw; width: 34cqw;
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero-title { display: flex; flex-direction: column; font-family: var(--font-wide); line-height: .92; }
.ht-pre { font-weight: 700; font-size: 2.3cqw; letter-spacing: .16em; color: var(--ink-2); margin-bottom: .45em; }
.ht-main { font-weight: 800; font-size: 5.1cqw; letter-spacing: -.045em; color: var(--ink); }
.ht-year {
  font-weight: 800; font-size: 10.4cqw; letter-spacing: -.05em; line-height: .95;
  color: transparent;
  padding-bottom: .04em;
  background:
    linear-gradient(90deg, var(--leaf), var(--volt)) no-repeat 0 0 / 0% 100%,
    linear-gradient(color-mix(in srgb, var(--ink) 14%, transparent), color-mix(in srgb, var(--ink) 14%, transparent));
  -webkit-background-clip: text; background-clip: text;
}
@keyframes year-fill { to { background-size: 100% 100%, auto; } }
.hero-sub { margin-top: 1.1cqw; font-size: max(.95rem, 1.22cqw); font-weight: 500; color: var(--ink-2); max-width: 36ch; line-height: 1.45; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8cqw; }

/* Secuencia de entrada única */
.hero-title > span, .hero-sub, .hero-cta { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-title > .ht-pre { animation-delay: .05s; }
.hero-title > .ht-main { animation-delay: .15s; }
.hero-title > .ht-year { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .25s both, year-fill 1.4s cubic-bezier(.7, 0, .2, 1) .7s forwards; }
.hero-sub { animation-delay: .4s; }
.hero-cta { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* En pantallas grandes los botones no deben crecer con la imagen */
@container (min-width: 1500px) { .hero-cta .btn { font-size: 1.1rem; min-height: 54px; } }

/* Móvil: la ilustración conserva su proporción y el texto pasa debajo */
@media (max-width: 900px) {
  .agro-hero { aspect-ratio: auto; background: var(--bg); }
  .agro-art { position: relative; height: auto; aspect-ratio: 1600 / 887; }
  .agro-content { height: auto; }
  .hero-copy { position: static; width: auto; padding: 28px var(--gutter) 48px; }
  .ht-pre { font-size: clamp(.8rem, 3.6vw, 1.1rem); }
  .ht-main { font-size: clamp(2.3rem, 12.5vw, 4.2rem); }
  .ht-year { font-size: clamp(4.4rem, 25vw, 8rem); }
  .hero-sub { margin-top: 14px; font-size: 1rem; }
  .hero-cta { margin-top: 22px; }
  .pulse { stroke-width: 3; }
}

/* =========================================================
   QUÉ ES EL RETO + DIORAMA
   ========================================================= */
.about .section-title { margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }

/* Diorama en el centro; las tarjetas montan levemente sobre sus esquinas inferiores
   y el botón queda entre ellas */
.about-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "dio dio dio" "intro cta final";
  column-gap: clamp(16px, 2.5vw, 32px);
  align-items: start;
}
.diorama-frame {
  grid-area: dio; justify-self: center; width: min(880px, 100%); margin: 0;
  position: relative; z-index: 1;
  padding: 10px; border-radius: 16px; background: #1b1e52;
  border: 3px solid var(--hard);
  box-shadow: 10px 10px 0 var(--leaf);
}
.diorama-frame iframe { border-radius: 6px; background: #1b1e52; }

.about-card { margin-top: clamp(-64px, -4.5vw, -36px); max-width: 420px; }
.about-card--intro { grid-area: intro; justify-self: start; --tilt: -3deg; --panel-accent: #B8F03C; }
.about-card--final { grid-area: final; justify-self: end; --tilt: 2.5deg; --panel-accent: #3AB0FF; }
.about-card--final .panel-icon svg { stroke: #fff; }
.about-stage .cta-wrap { grid-area: cta; align-self: center; margin-top: 48px; }

/* Sombra pensada para fondo claro */
.about .panel { box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .5), 0 6px 14px -8px rgba(13, 59, 76, .3), 0 0 0 1px var(--line); }
.about .panel:hover, .about .panel:focus-within { box-shadow: 0 36px 56px -26px rgba(13, 59, 76, .55), 0 0 0 3px var(--panel-accent); }
[data-theme="dark"] .about .panel { box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(232, 245, 224, .12); }
[data-theme="dark"] .about .panel:hover { box-shadow: 0 36px 56px -24px #000, 0 0 0 3px var(--panel-accent); }

@media (max-width: 1100px) {
  .about-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "dio dio" "intro final" "cta cta"; }
  .about-card { margin-top: -36px; max-width: none; }
  .about-stage .cta-wrap { margin-top: 48px; }
}
@media (max-width: 640px) {
  .about-stage { grid-template-columns: 1fr; grid-template-areas: "dio" "intro" "final" "cta"; row-gap: 22px; }
  .diorama-frame { box-shadow: 7px 7px 0 var(--leaf); padding: 6px; }
  .about-card--intro { margin-top: -24px; --tilt: -1.2deg; }
  .about-card--final { margin-top: 0; --tilt: 1.2deg; }
  .about-stage .cta-wrap { margin-top: 20px; }
}

/* =========================================================
   CARTEL + PANELES (zona gancho)
   ========================================================= */
.poster-zone, .band-tech {
  position: relative; overflow: hidden; color: #EAF6E3;
  padding-block: calc(var(--fade) + clamp(16px, 3vw, 40px));
  /* Fundido con curva suavizada: evita el corte y los tonos intermedios sucios */
  --e: color-mix(in srgb, var(--bg) 100%, transparent) 0,
       color-mix(in srgb, var(--bg) 91%, transparent) calc(var(--fade) * .14),
       color-mix(in srgb, var(--bg) 73%, transparent) calc(var(--fade) * .32),
       color-mix(in srgb, var(--bg) 48%, transparent) calc(var(--fade) * .52),
       color-mix(in srgb, var(--bg) 24%, transparent) calc(var(--fade) * .72),
       color-mix(in srgb, var(--bg) 7%, transparent) calc(var(--fade) * .88),
       transparent var(--fade);
  background:
    linear-gradient(to bottom, var(--e)),
    linear-gradient(to top, var(--e)),
    radial-gradient(60% 50% at 15% 20%, rgba(184, 240, 60, .14), transparent 70%),
    radial-gradient(55% 50% at 85% 75%, rgba(58, 176, 255, .16), transparent 70%),
    linear-gradient(180deg, var(--band), var(--band-2));
}
/* Trama de circuito */
.poster-zone::before, .band-tech::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%23B8F03C' stroke-width='1.2'%3E%3Cpath d='M0 30h40l15 15h30M60 0v20l20 20v40M120 90H80l-10 10v20M20 120V90l15-15h20'/%3E%3Ccircle cx='85' cy='45' r='3'/%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='55' cy='75' r='3'/%3E%3C/svg%3E");
}
.poster-zone .wrap, .band-tech .wrap { position: relative; }
/* Banda tech como última sección: sin fundido inferior, continúa en el color del footer */
.band-tech.band-to-footer {
  padding-bottom: clamp(72px, 10vw, 128px);
  background:
    linear-gradient(to bottom, var(--e)),
    radial-gradient(60% 50% at 15% 20%, rgba(184, 240, 60, .14), transparent 70%),
    radial-gradient(55% 50% at 85% 75%, rgba(58, 176, 255, .16), transparent 70%),
    linear-gradient(180deg, var(--band), var(--footer));
}
.band-tech.band-to-footer::before {
  -webkit-mask-image: linear-gradient(transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.poster-zone .section-title { margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; color: #fff; }
/* Portada más compacta: fundido más corto en la banda del cartel y poco aire antes de «Código que hace crecer el campo» */
.poster-zone { --fade: clamp(64px, 8vw, 120px); padding-block: calc(var(--fade) + 8px); }
.poster-zone + .about { padding-top: clamp(24px, 3vw, 40px); }
.poster-zone ~ .about { padding-bottom: clamp(24px, 3vw, 40px); }
.about + .program { padding-block: clamp(24px, 3vw, 40px); }
/* La banda verde de entidades empieza con su fundido; el título entra en la segunda mitad del fundido */
.program + .partners {
  --fade-b: clamp(64px, 8vw, 120px); /* fundido inferior más corto: el footer queda más cerca de los logos */
  padding-top: calc(var(--fade) * .35 + 8px);
  padding-bottom: calc(var(--fade-b) + 8px);
  background: linear-gradient(to bottom,
    var(--bg) 0,
    color-mix(in oklch, var(--alt) 50%, var(--bg)) calc(var(--fade) * .35),
    var(--alt) calc(var(--fade) * .7),
    var(--alt) calc(100% - var(--fade-b)),
    color-mix(in oklch, var(--alt) 78%, var(--footer)) calc(100% - var(--fade-b) * .62),
    color-mix(in oklch, var(--alt) 45%, var(--footer)) calc(100% - var(--fade-b) * .34),
    color-mix(in oklch, var(--alt) 15%, var(--footer)) calc(100% - var(--fade-b) * .12),
    var(--footer) 100%);
}

.poster-stage {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 400px) 1fr;
  grid-template-areas: "why poster what" "who poster info";
  align-items: center; gap: 28px 0;
}
.poster {
  grid-area: poster; margin: 0; position: relative; z-index: 1;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(184, 240, 60, .55), 0 0 60px -10px rgba(184, 240, 60, .45), 0 40px 80px -30px #000;
}
.poster img { width: 100%; height: auto; }
/* Al pinchar, el cartel pasa por delante de los paneles; vuelve atrás al salir el ratón (main.js) */
.poster { cursor: zoom-in; transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), box-shadow .35s ease; }
.poster.is-front {
  z-index: 5; cursor: zoom-out; transform: scale(1.05);
  box-shadow: 0 0 0 3px #B8F03C, 0 0 80px -6px rgba(184, 240, 60, .6), 0 50px 90px -30px #000;
}
.poster:focus-visible { outline: 3px solid #B8F03C; outline-offset: 4px; }

.panel {
  position: relative; z-index: 2;
  background: #FFFFFF; color: #0D3B4C;
  border-radius: var(--radius); padding: 26px 26px 24px;
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .75), 0 8px 18px -10px rgba(0, 0, 0, .5);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), box-shadow .35s ease;
}
.panel:hover, .panel:focus-within { transform: rotate(0deg) translateY(-6px); box-shadow: 0 40px 60px -26px rgba(0, 0, 0, .8), 0 0 0 3px var(--panel-accent); z-index: 3; }
.panel--why  { grid-area: why;  --tilt: -4deg;  --panel-accent: #B8F03C; margin-right: -36px; }
.panel--what { grid-area: what; --tilt: 3deg;   --panel-accent: #3AB0FF; margin-left: -36px; }
.panel--who  { grid-area: who;  --tilt: 2.5deg; --panel-accent: #5FA832; margin-right: -36px; }
.panel--info { grid-area: info; --tilt: -3.5deg; --panel-accent: #0B7A6E; margin-left: -36px; }

.panel-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--panel-accent); margin-bottom: 16px;
  box-shadow: 4px 4px 0 #0D3B4C;
}
.panel-icon svg { width: 32px; height: 32px; fill: none; stroke: #0D3B4C; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.panel--what .panel-icon svg, .panel--info .panel-icon svg { stroke: #fff; }
.panel--what .panel-icon svg path:last-child { fill: #B8F03C; stroke: #fff; }
.panel h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 12px; }
.panel p { font-size: .97rem; line-height: 1.55; color: #3D5F66; }
.panel p + p { margin-top: 10px; }
.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .96rem; color: #3D5F66; }
.panel li { position: relative; padding-left: 20px; line-height: 1.45; }
.panel li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 2px; background: var(--panel-accent); transform: rotate(45deg); }

.facts { margin: 0; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 5.6em 1fr; gap: 8px; align-items: baseline; }
.facts dt { font-size: .82rem; font-weight: 600; color: #0B7A6E; }
.facts dd { margin: 0; font-size: .96rem; font-weight: 500; }

[data-theme="dark"] .panel { background: #0C2A30; color: #E8F5E0; box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(232, 245, 224, .12); }
[data-theme="dark"] .panel ul, [data-theme="dark"] .panel p { color: #A8C4BB; }
[data-theme="dark"] .facts dt { color: #3AB0FF; }

/* Lugar del evento: icono de mapa y foto pequeña que enlazan a Google Maps */
.venue-map { display: flex; align-items: center; gap: 10px; width: fit-content; margin-top: 8px; padding: 6px; border-radius: 12px; text-decoration: none; background: rgba(11, 122, 110, .08); box-shadow: inset 0 0 0 1px rgba(11, 122, 110, .22); transition: background .25s, box-shadow .25s; }
.venue-map-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #0B7A6E; }
.venue-map-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.venue-pin { fill: #B8F03C; transform-box: fill-box; transform-origin: 50% 100%; }
.venue-photo { display: block; width: 96px; height: auto; aspect-ratio: 580 / 390; object-fit: cover; border-radius: 8px; transition: transform .3s ease; }
.venue-map:hover, .venue-map:focus-visible { background: rgba(11, 122, 110, .16); box-shadow: inset 0 0 0 1px #0B7A6E; }
.venue-map:hover .venue-photo, .venue-map:focus-visible .venue-photo { transform: scale(1.06); }
.venue-map:hover .venue-pin, .venue-map:focus-visible .venue-pin { animation: venue-pin-drop .8s ease; }
@keyframes venue-pin-drop { 0% { transform: translateY(0); } 35% { transform: translateY(-5px); } 60% { transform: translateY(0); } 78% { transform: translateY(-2px); } 100% { transform: translateY(0); } }
[data-theme="dark"] .venue-map { background: rgba(58, 176, 255, .08); box-shadow: inset 0 0 0 1px rgba(58, 176, 255, .25); }
[data-theme="dark"] .venue-map:hover, [data-theme="dark"] .venue-map:focus-visible { background: rgba(58, 176, 255, .16); box-shadow: inset 0 0 0 1px #3AB0FF; }
[data-theme="dark"] .venue-map-icon { background: #3AB0FF; }
[data-theme="dark"] .venue-map-icon svg { stroke: #061A1F; }
@media (prefers-reduced-motion: reduce) { .venue-map .venue-pin { animation: none !important; } .venue-photo { transition: none; } }

.cta-wrap { display: flex; justify-content: center; margin-top: clamp(48px, 7vw, 88px); }
.btn-mega {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .7em 1.6em; min-height: 72px;
  font: 800 clamp(1.3rem, 1rem + 1.6vw, 2.2rem)/1 var(--font-wide); letter-spacing: .08em;
  color: #061A1F; background: #B8F03C; text-decoration: none;
  border-radius: 14px; border: 3px solid #E8FF9A;
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  padding-inline: 2.2em;
  box-shadow: 0 0 40px rgba(184, 240, 60, .55);
  transition: transform .2s ease, background-color .2s ease, filter .2s ease;
}
.about .cta-wrap { filter: drop-shadow(6px 6px 0 #0D3B4C); }
[data-theme="dark"] .about .cta-wrap { filter: none; }
.btn-mega:hover { transform: scale(1.04); background: #D4FF5C; filter: drop-shadow(0 0 22px rgba(184, 240, 60, .8)); }
.btn-mega:focus-visible { outline: 4px solid #fff; outline-offset: 6px; }
.chevs { font-size: 1.15em; transition: transform .25s ease; }
.btn-mega:hover .chevs--l { transform: translateX(6px); }
.btn-mega:hover .chevs--r { transform: translateX(-6px); }

@media (max-width: 1100px) {
  .poster-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "poster poster" "why what" "who info";
    gap: 28px 24px;
  }
  .poster { width: min(420px, 100%); justify-self: center; margin-bottom: 12px; }
  .poster-stage .panel { margin: 0; }
  .panel--why { --tilt: -2.5deg; } .panel--what { --tilt: 2deg; }
  .panel--who { --tilt: 1.5deg; } .panel--info { --tilt: -2deg; }
  .poster-stage .panel { align-self: stretch; }
}
@media (max-width: 640px) {
  .poster-stage { grid-template-columns: 1fr; grid-template-areas: "poster" "why" "what" "who" "info"; gap: 22px; }
  .panel--why, .panel--info { --tilt: -1.2deg; } .panel--what, .panel--who { --tilt: 1.2deg; }
  .btn-mega { width: 100%; justify-content: center; padding-inline: 1em; }
}

/* =========================================================
   PROGRAMA (línea de tiempo)
   ========================================================= */
.program { background: var(--bg); }
.program-head .section-title { margin-inline: auto; }
.program-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; margin-bottom: clamp(36px, 5vw, 60px); }
/* ---------- Letrero de neón con la fecha ---------- */
.neon-wrap { position: relative; padding-top: 30px; margin: 4px 0 8px; max-width: 100%; }
/* Cables de los que cuelga */
.neon-wrap::before, .neon-wrap::after {
  content: ""; position: absolute; top: 0; height: 32px; width: 2px; border-radius: 2px;
  background: linear-gradient(#8FA3A8, #4E6267);
}
.neon-wrap::before { left: 18%; transform: rotate(-8deg); transform-origin: bottom; }
.neon-wrap::after  { right: 18%; transform: rotate(8deg); transform-origin: bottom; }
[data-theme="dark"] .neon-wrap::before, [data-theme="dark"] .neon-wrap::after { background: linear-gradient(#3E5A60, #6F8A90); }

.neon-sign {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: clamp(20px, 3vw, 30px) clamp(26px, 5vw, 60px);
  border-radius: 18px;
  background: radial-gradient(120% 150% at 50% 0%, #10303A, #04141A 70%);
  box-shadow: 0 34px 50px -26px rgba(13, 59, 76, .7), 0 10px 18px -12px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .06);
  font-family: var(--font-wide); text-transform: uppercase; text-align: center; line-height: 1.1;
}
[data-theme="dark"] .neon-sign { box-shadow: 0 34px 50px -26px #000, 0 0 0 1px rgba(184, 240, 60, .12), inset 0 0 0 1px rgba(255, 255, 255, .06); }
/* Tubo del marco */
.neon-sign::before {
  content: ""; position: absolute; inset: 9px; border-radius: 12px; pointer-events: none;
  border: 2px solid #E9FFC2;
  box-shadow: 0 0 4px #B8F03C, 0 0 12px #B8F03C, 0 0 26px rgba(184, 240, 60, .55), inset 0 0 6px #B8F03C, inset 0 0 16px rgba(184, 240, 60, .35);
}
.neon-line { display: block; transition: opacity .2s; }
.neon-top {
  font-weight: 400; font-size: clamp(.78rem, .65rem + .7vw, 1.08rem); letter-spacing: .42em; margin-right: -.42em;
  color: #F3FFE0;
  text-shadow: 0 0 2px #fff, 0 0 6px #B8F03C, 0 0 14px #B8F03C, 0 0 30px rgba(184, 240, 60, .7);
}
.neon-date {
  margin-top: .4em;
  font-weight: 400; font-size: clamp(1.25rem, .7rem + 3.4vw, 3rem); letter-spacing: .07em; margin-right: -.07em;
  color: #EAF7FF;
  text-shadow: 0 0 2px #fff, 0 0 8px #3AB0FF, 0 0 18px #3AB0FF, 0 0 42px rgba(58, 176, 255, .75);
  text-wrap: balance;
}
/* Apagado hasta que entra en pantalla; luego se enciende con un parpadeo */
.neon-sign.is-waiting .neon-line { opacity: .14; text-shadow: none; }
.neon-sign.is-waiting::before { opacity: .12; box-shadow: none; }
.neon-sign.is-on::before { animation: neon-on 1.1s steps(1) both; }
.neon-sign.is-on .neon-top { animation: neon-on 1.1s steps(1) .25s both; }
.neon-sign.is-on .neon-date { animation: neon-on 1.3s steps(1) .6s both; }
@keyframes neon-on {
  0% { opacity: .14 } 10% { opacity: 1 } 16% { opacity: .2 } 24% { opacity: 1 }
  30% { opacity: .35 } 46% { opacity: 1 } 52% { opacity: .55 } 60%, 100% { opacity: 1 }
}

.program-note {
  display: inline-flex; gap: 10px; align-items: center; max-width: 60ch; text-align: left;
  font-size: .92rem; color: var(--ink-2);
  padding: 10px 16px; border: 1.5px dashed var(--volt); border-radius: 12px;
}
.program-note::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px color-mix(in srgb, var(--leaf) 30%, transparent); }

/* ---------- Tarjeta del presentador ---------- */
.host-card {
  --tilt: -1.5deg;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(20px, 3vw, 36px);
  width: min(720px, 100%); margin-top: 18px; padding: clamp(20px, 3vw, 28px) clamp(22px, 3.4vw, 36px);
  text-align: left; color: #EAF6E3; border-radius: 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%233AB0FF' stroke-opacity='.14' stroke-width='1.2'%3E%3Cpath d='M0 30h40l15 15h30M60 0v20l20 20v40M120 90H80l-10 10v20M20 120V90l15-15h20'/%3E%3Ccircle cx='85' cy='45' r='3'/%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='55' cy='75' r='3'/%3E%3C/svg%3E"),
    radial-gradient(120% 160% at 0% 0%, #12404A, #04141A 65%);
  box-shadow: 8px 8px 0 #B8F03C, 0 30px 46px -24px rgba(13, 59, 76, .7);
  transform: rotate(var(--tilt));
  transition: transform .3s ease;
}
.host-card:hover { transform: rotate(0deg); }
[data-theme="dark"] .host-card { box-shadow: 8px 8px 0 #B8F03C, 0 0 40px rgba(184, 240, 60, .18), inset 0 0 0 1px rgba(232, 245, 224, .1); }

/* Foto recortada que sobresale por arriba del círculo */
.host-photo { position: relative; width: clamp(130px, 16vw, 168px); aspect-ratio: 1; margin-top: 30px; }
.host-photo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #D4FF5C, #5FA832 55%, #0B7A6E);
  box-shadow: 0 0 0 4px #04141A, 0 0 0 6px rgba(58, 176, 255, .6);
}
.host-photo-clip { position: absolute; left: 0; right: 0; bottom: 0; top: -30%; overflow: hidden; border-radius: 0 0 999px 999px; }
/* Foto recortada (fondo transparente) de proporción 1175 × 1339: a este ancho cabe la cabeza entera dentro del recorte */
.host-photo-clip img { position: absolute; left: -5%; bottom: 0; width: 110%; height: auto; max-width: none; }
.host-mic {
  position: absolute; right: -4px; bottom: 6px; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; background: #3AB0FF; box-shadow: 0 0 0 4px #04141A;
}
.host-mic svg { width: 22px; height: 22px; fill: none; stroke: #04141A; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.host-role { display: inline-block; margin: 0 0 8px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #04141A; background: #B8F03C; }
.host-name { margin: 0 0 8px; font: 800 clamp(1.3rem, 1rem + 1.2vw, 1.9rem)/1.1 var(--font-wide); color: #fff; }
.host-text p:last-child { margin: 0; color: #A8C4BB; line-height: 1.5; text-wrap: pretty; }
.host-text a { color: #B8F03C; font-weight: 600; text-underline-offset: 3px; }
.host-text a:hover { color: #D4FF5C; }

@media (max-width: 560px) {
  .host-card { grid-template-columns: 1fr; justify-items: center; text-align: center; --tilt: -1deg; }
}

.timeline { --tcol: 10.5rem; list-style: none; margin: 0; padding: 0; position: relative; }
/* Raíl */
.timeline::before {
  content: ""; position: absolute; top: 12px; bottom: 12px; left: calc(var(--tcol) + 22px); width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--leaf), var(--volt));
}
.tl-row { display: grid; grid-template-columns: var(--tcol) 1fr; gap: 0 64px; position: relative; padding-bottom: 22px; }
.tl-row:last-child { padding-bottom: 0; }
/* Nodo */
.tl-row::before {
  content: ""; position: absolute; left: calc(var(--tcol) + 14px); top: 26px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--leaf);
  box-shadow: 0 0 0 5px var(--bg);
  transition: background-color .25s, transform .25s;
}
.tl-row:hover::before { background: var(--leaf); transform: scale(1.2); }
.tl-time { text-align: right; padding-top: 16px; font-size: .95rem; color: var(--ink-2); font-weight: 500; }
.tl-time time { display: inline; font: 800 clamp(1.4rem, 1.1rem + .9vw, 1.9rem)/1 var(--font-wide); letter-spacing: -.04em; color: var(--ink); }
.tl-parallel {
  display: block; width: fit-content; margin: 10px 0 0 auto; font-size: .78rem; font-weight: 600; color: var(--btn-ink);
  background: var(--volt); padding: 4px 10px; border-radius: 999px;
}
[data-theme="dark"] .tl-parallel { color: #061A1F; }

.tl-items { display: grid; gap: 18px; }
.tl-row--parallel .tl-items { grid-template-columns: 1fr 1fr; align-items: start; }
.tl-card {
  display: grid; grid-template-columns: 76px 1fr; gap: 20px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.tl-card:hover { border-color: var(--leaf); box-shadow: var(--shadow); transform: translateX(4px); }
.tl-card--star { border-width: 2px; border-color: color-mix(in srgb, var(--leaf) 55%, transparent); }
.tl-body h3 { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.tl-body p { color: var(--ink-2); font-size: .97rem; }
.tl-tbc { font-size: .85rem !important; font-weight: 600; color: var(--volt) !important; margin: -2px 0 8px; }

/* ---------- Iconos ilustrados animados ---------- */
.tl-icon {
  width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--leaf) 16%, var(--surface));
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tl-card:hover .tl-icon, .tl-card.play .tl-icon { transform: translate(-2px, -2px) rotate(-3deg); box-shadow: 6px 6px 0 var(--leaf); }
.tl-icon svg { width: 54px; height: 54px; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tl-icon svg * { transform-box: view-box; }
.tl-icon .fill-soft { fill: var(--surface); }
.tl-icon .fill-accent { fill: var(--leaf); }
.tl-icon .accent { stroke: var(--volt); }
.tl-icon .no-stroke { stroke: none; }
.tl-icon .clip { fill: var(--volt); }
[data-theme="dark"] .tl-icon .fill-accent { fill: var(--leaf); }

/* 1 · Acreditación: se balancea */
.ic-badge .swing { transform-origin: 32px 4px; }
.tl-card:hover .ic-badge .swing, .tl-card.play .ic-badge .swing { animation: swing 1.4s ease-in-out; }
@keyframes swing { 0% { transform: rotate(0) } 20% { transform: rotate(14deg) } 45% { transform: rotate(-10deg) } 65% { transform: rotate(6deg) } 85% { transform: rotate(-3deg) } 100% { transform: rotate(0) } }

/* 2 · Micrófono: ondas de sonido */
.ic-mic .wave { stroke: var(--volt); opacity: .35; }
.ic-mic .mic { transform-origin: 32px 56px; }
.tl-card:hover .ic-mic .wave, .tl-card.play .ic-mic .wave { animation: wave 1s ease-out infinite; }
.tl-card:hover .ic-mic .w2, .tl-card.play .ic-mic .w2 { animation-delay: .2s; }
.tl-card:hover .ic-mic .mic, .tl-card.play .ic-mic .mic { animation: talk .5s ease-in-out infinite alternate; }
@keyframes wave { 0% { opacity: 0 } 40% { opacity: 1 } 100% { opacity: 0 } }
@keyframes talk { to { transform: rotate(-4deg) } }

/* 3 · Pantalla: el código se escribe */
.ic-screen .code { stroke-dasharray: 30; stroke-dashoffset: 0; }
.ic-screen .cursor { fill: var(--ink); stroke: none; opacity: 0; }
.ic-screen .leaf-sprout { transform-origin: 46px 36px; }
.tl-card:hover .ic-screen .code, .tl-card.play .ic-screen .code { animation: type 1.6s steps(8) both; }
.tl-card:hover .ic-screen .c2, .tl-card.play .ic-screen .c2 { animation-delay: .35s; }
.tl-card:hover .ic-screen .c3, .tl-card.play .ic-screen .c3 { animation-delay: .7s; }
.tl-card:hover .ic-screen .cursor, .tl-card.play .ic-screen .cursor { animation: blink .5s steps(1) 1.4s infinite; }
.tl-card:hover .ic-screen .leaf-sprout, .tl-card.play .ic-screen .leaf-sprout { animation: sprout .7s cubic-bezier(.3, 1.6, .5, 1) 1s both; }
@keyframes type { from { stroke-dashoffset: 30 } to { stroke-dashoffset: 0 } }
@keyframes blink { 50% { opacity: 1 } }
@keyframes sprout { from { transform: scale(0) } to { transform: scale(1) } }

/* 4 · Jurado: los checks se dibujan */
.ic-jury .tick { stroke-dasharray: 20; stroke-dashoffset: 0; stroke-width: 3.2; }
.tl-card:hover .ic-jury .tick, .tl-card.play .ic-jury .tick { animation: draw .5s ease-out both; }
.tl-card:hover .ic-jury .t1, .tl-card.play .ic-jury .t1 { animation-delay: .1s; }
.tl-card:hover .ic-jury .t2, .tl-card.play .ic-jury .t2 { animation-delay: .55s; }
@keyframes draw { from { stroke-dashoffset: 20 } to { stroke-dashoffset: 0 } }

/* 5 · Chip IA: pulsos por las pistas */
.ic-chip .pin-pulse { stroke: var(--leaf); stroke-width: 3.2; stroke-dasharray: 3 7; opacity: 0; }
.ic-chip .spark { transform-origin: 32px 31px; }
.tl-card:hover .ic-chip .pin-pulse, .tl-card.play .ic-chip .pin-pulse { opacity: 1; animation: flow .6s linear infinite; }
.tl-card:hover .ic-chip .spark, .tl-card.play .ic-chip .spark { animation: spin 1.6s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes flow { to { stroke-dashoffset: -10 } }
@keyframes spin { 0% { transform: rotate(0) scale(1) } 50% { transform: rotate(90deg) scale(1.2) } 100% { transform: rotate(180deg) scale(1) } }

/* 6 · Trofeo: salta y destellan estrellas */
.ic-trophy .cup { transform-origin: 32px 56px; }
.ic-trophy .star { stroke-width: 1.8; fill: var(--lime); }
.tl-card:hover .ic-trophy .cup, .tl-card.play .ic-trophy .cup { animation: hop .9s cubic-bezier(.3, 1.5, .5, 1); }
.tl-card:hover .ic-trophy .star, .tl-card.play .ic-trophy .star { animation: twinkle .9s ease-in-out infinite; }
.tl-card:hover .ic-trophy .s1, .tl-card.play .ic-trophy .s1 { transform-origin: 9px 39px; }
.tl-card:hover .ic-trophy .s2, .tl-card.play .ic-trophy .s2 { transform-origin: 55px 35px; animation-delay: .3s; }
.tl-card:hover .ic-trophy .s3, .tl-card.play .ic-trophy .s3 { transform-origin: 52px 7.5px; animation-delay: .55s; }
@keyframes hop { 0% { transform: none } 35% { transform: translateY(-8px) rotate(-6deg) } 60% { transform: translateY(0) rotate(4deg) scale(1.04, .96) } 100% { transform: none } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(.4) rotate(45deg); opacity: .4 } }

/* 7 · Bandera de meta ondeando */
.ic-flag .flag { transform-origin: 14px 21px; }
.tl-card:hover .ic-flag .flag, .tl-card.play .ic-flag .flag { animation: flutter .45s ease-in-out infinite alternate; }
@keyframes flutter { from { transform: skewY(0) scaleX(1) } to { transform: skewY(-6deg) scaleX(.92) } }

@media (max-width: 860px) {
  .timeline::before { left: 9px; }
  .tl-row { grid-template-columns: 1fr; padding-left: 40px; }
  .tl-row::before { left: 1px; top: 4px; }
  .tl-time { text-align: left; padding: 0 0 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .tl-parallel { display: inline-block; margin: 0 0 0 4px; }
  .tl-row--parallel .tl-items { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tl-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .tl-icon { width: 64px; height: 64px; border-radius: 16px; }
  .tl-icon svg { width: 46px; height: 46px; }
}

/* =========================================================
   ORGANIZA · FINANCIA · PATROCINA
   ========================================================= */
.partners, .band-alt {
  padding-top: calc(var(--fade) * .6 + clamp(8px, 2vw, 24px));
  padding-bottom: calc(var(--fade) + clamp(24px, 4vw, 56px));
  background: linear-gradient(to bottom,
    var(--bg) 0,
    color-mix(in oklch, var(--alt) 50%, var(--bg)) calc(var(--fade) * .35),
    var(--alt) calc(var(--fade) * .7),
    var(--alt) calc(100% - var(--fade)),
    color-mix(in oklch, var(--alt) 78%, var(--footer)) calc(100% - var(--fade) * .62),
    color-mix(in oklch, var(--alt) 45%, var(--footer)) calc(100% - var(--fade) * .34),
    color-mix(in oklch, var(--alt) 15%, var(--footer)) calc(100% - var(--fade) * .12),
    var(--footer) 100%);
}
.partners .section-title { margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.partners-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
/* Organiza y Financia van centrados en la primera fila; «Patrocina» ocupa la fila entera debajo,
   con sus logos del mismo tamaño que los de arriba */
.partners-grid > .partner:first-child { grid-column: 2; }
.partner--wide { grid-column: 1 / -1; }
.partner-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.partner { display: flex; flex-direction: column; gap: 14px; }
.partner-role {
  display: flex; align-items: center; gap: 12px;
  font: 700 1rem/1 var(--font-wide); letter-spacing: .02em; color: var(--ink-2);
}
.partner-role { justify-content: center; }
.partner-role::before, .partner-role::after { content: ""; flex: 1; height: 2px; border-radius: 2px; }
.partner-role::before { background: linear-gradient(270deg, var(--leaf), transparent); }
.partner-role::after { background: linear-gradient(90deg, var(--leaf), transparent); }
.partner-logo {
  position: relative; display: block; aspect-ratio: 5 / 4;
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  padding: 4px; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.partner-logo img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.partner-logo:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--leaf), var(--shadow); }

@media (max-width: 1000px) {
  .partners-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners-grid > .partner:first-child { grid-column: auto; }
  .partner-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* En móvil siguen en dos columnas: los seis logos del mismo tamaño */
  .partners-grid { max-width: 420px; margin-inline: auto; gap: 20px 16px; }
  .partner-logos { gap: 16px; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--footer); color: #D9EBDD; padding-block: 8px 32px; }
.footer-row { display: flex; justify-content: center; text-align: center; align-items: center; gap: 12px 32px; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 560px) {
  .footer-row { flex-direction: column; align-items: center; }
}
/* Logos de las entidades en miniatura, encima del copyright (en todas las páginas menos la portada y las de 2025) */
.footer-logos { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; padding-block: 24px 20px; }
.footer-logos .partner-logo { width: 104px; border-radius: 10px; border-color: transparent; }
.footer-logos .partner-logo img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.footer-logos .partner-logo:hover, .footer-logos .partner-logo:focus-visible { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--leaf); }
@media (max-width: 560px) {
  .footer-logos { display: grid; grid-template-columns: repeat(2, 104px); }
}

/* =========================================================
   INSCRIPCIÓN
   ========================================================= */
.page-intro { position: relative; overflow: hidden; text-align: center; padding-bottom: clamp(56px, 8vw, 104px); }
/* Trama de circuito que se desvanece hacia los bordes */
.page-intro::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%230B7A6E' stroke-width='1.2'%3E%3Cpath d='M0 30h40l15 15h30M60 0v20l20 20v40M120 90H80l-10 10v20M20 120V90l15-15h20'/%3E%3Ccircle cx='85' cy='45' r='3'/%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='55' cy='75' r='3'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent);
  mask-image: radial-gradient(60% 70% at 50% 40%, #000, transparent);
}
[data-theme="dark"] .page-intro::before { opacity: .14; }
.page-intro .wrap { position: relative; }
.page-title {
  font-family: var(--font-wide); font-weight: 800; line-height: .95; letter-spacing: -.045em;
  font-size: clamp(2.5rem, 1.2rem + 6.2vw, 6rem);
  background: linear-gradient(90deg, var(--leaf), var(--volt));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.page-lead { max-width: 54ch; margin: 18px auto 0; color: var(--ink-2); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); text-wrap: balance; }

/* ---------- Botones de elección ---------- */
.choices {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  max-width: 1060px; margin: clamp(40px, 6vw, 64px) auto 0;
}
.choice { --cut: 22px; display: block; text-decoration: none; transition: transform .25s ease, filter .25s ease; }
.choice:hover { transform: translateY(-4px) scale(1.015); }
.choice:focus-visible { outline: 3px solid var(--volt); outline-offset: 6px; border-radius: 8px; }
.choice-shape { display: block; clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%); }
.choice-laser { padding: 3px; }
.choice-inner {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  min-height: 136px; padding: 24px calc(var(--cut) + 26px); text-align: left;
  transition: background-color .25s ease;
}
.choice-icon { width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; }
.choice-icon svg { width: 32px; height: 32px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.choice-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.choice-title { font: 800 clamp(1.6rem, 1rem + 2.2vw, 2.7rem)/1 var(--font-wide); letter-spacing: .1em; }
.choice-sub { font-size: .95rem; font-weight: 500; line-height: 1.35; }
.choice-chev { font: 800 2rem/1 var(--font-wide); transform: rotate(90deg); transition: transform .25s ease; }
.choice:hover .choice-chev { transform: rotate(90deg) translateX(5px); }

/* EQUIPOS: placa tech con un láser que recorre el borde sin parar */
@property --laser { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes laser-spin { to { --laser: 360deg; } }
.choice--teams { filter: drop-shadow(0 0 16px rgba(58, 176, 255, .45)) drop-shadow(0 22px 26px rgba(4, 20, 26, .45)); }
.choice--teams:hover { filter: drop-shadow(0 0 26px rgba(58, 176, 255, .7)) drop-shadow(0 26px 30px rgba(4, 20, 26, .5)); }
.choice--teams .choice-laser {
  background: conic-gradient(from var(--laser),
    #124452 0 14%, #3AB0FF 24%, #fff 27%, #B8F03C 32%, #124452 42% 64%,
    #3AB0FF 74%, #fff 77%, #B8F03C 82%, #124452 92%);
  animation: laser-spin 3.2s linear infinite;
}
.choice--teams .choice-inner {
  color: #EAF7FF;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%233AB0FF' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M0 30h40l15 15h30M60 0v20l20 20v40M120 90H80l-10 10v20M20 120V90l15-15h20'/%3E%3Ccircle cx='85' cy='45' r='3'/%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='55' cy='75' r='3'/%3E%3C/svg%3E"),
    radial-gradient(120% 160% at 0% 0%, #12404A, #04141A 65%);
}
/* Esquinas de visor */
.choice--teams .choice-inner::before, .choice--teams .choice-inner::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid #B8F03C; pointer-events: none;
}
.choice--teams .choice-inner::before { top: 10px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.choice--teams .choice-inner::after { bottom: 10px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.choice--teams .choice-icon { border: 2px solid #3AB0FF; background: rgba(58, 176, 255, .12); box-shadow: 0 0 14px rgba(58, 176, 255, .35); }
.choice--teams .choice-icon svg { stroke: #B8F03C; }
.choice--teams .choice-title { text-shadow: 0 0 2px #fff, 0 0 12px #3AB0FF, 0 0 30px rgba(58, 176, 255, .6); }
.choice--teams .choice-sub { color: #A8C4BB; }
.choice--teams .choice-chev { color: #3AB0FF; text-shadow: 0 0 10px #3AB0FF; }

/* EQUIPOS cerrado: placa apagada y pegatina «CERRADO» encima */
.choice.is-closed { position: relative; }
.choice--teams.is-closed, .choice--teams.is-closed:hover { transform: none; filter: drop-shadow(0 22px 26px rgba(4, 20, 26, .35)); }
.choice--teams.is-closed .choice-shape { filter: grayscale(.85) brightness(.85); }
.choice--teams.is-closed .choice-laser { animation: none; }
.choice--teams.is-closed:hover .choice-chev { transform: rotate(90deg); }
.closed-sticker {
  position: absolute; z-index: 2; top: -18px; right: 4%;
  padding: .32em .8em .36em;
  font: 800 clamp(1rem, .8rem + .9vw, 1.45rem)/1 var(--font-wide); letter-spacing: .06em; white-space: nowrap;
  color: #fff; background: #E0261B;
  border: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 0 0 2px #E0261B, 0 14px 22px -8px rgba(0, 0, 0, .55);
  transform: rotate(7deg);
  pointer-events: none;
}

/* Aviso que sustituye al formulario de equipos cuando se cierra el plazo */
.closed-note {
  max-width: 640px; margin: clamp(24px, 4vw, 40px) auto 0; padding: clamp(26px, 4vw, 40px);
  text-align: center; color: #A8C4BB;
  background: #04141A; border: 2px solid #E0261B; border-radius: 16px;
  box-shadow: 8px 8px 0 #E0261B, 0 0 40px rgba(224, 38, 27, .25);
}
.closed-note-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: #E0261B; margin-bottom: 16px; }
.closed-note-icon svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.closed-note-title { margin: 0 0 10px; font: 700 clamp(1.15rem, 1rem + .7vw, 1.5rem)/1.25 var(--font-wide); color: #fff; text-wrap: balance; }
.closed-note p:last-child { margin: 0; text-wrap: pretty; }
.closed-note a { color: #B8F03C; font-weight: 600; text-underline-offset: 3px; }

/* PÚBLICO: color sólido, como los botones de la portada */
.choice--public { filter: drop-shadow(6px 6px 0 #0D3B4C); }
[data-theme="dark"] .choice--public { filter: drop-shadow(0 0 22px rgba(184, 240, 60, .4)); }
/* Sobre la banda oscura de la portada la sombra oscura no se ve: brillo lima, como en modo oscuro */
.poster-zone .choice--public { filter: drop-shadow(0 0 22px rgba(184, 240, 60, .4)); }
.choice--public .choice-laser { background: #E8FF9A; }
.choice--public .choice-inner { background: #B8F03C; color: #061A1F; }
.choice--public:hover .choice-inner { background: #D4FF5C; }
.choice--public .choice-icon { background: #0D3B4C; }
.choice--public .choice-icon svg { stroke: #B8F03C; }
.choice--public .choice-sub { color: #12404A; }

/* ---------- Bloques con formulario ---------- */
.insc-block .section-title { margin: 0 auto 14px; text-align: center; }
.band-tech .section-title { color: #fff; }
.insc-block-lead { max-width: 56ch; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; color: var(--ink-2); text-wrap: balance; }
.band-tech .insc-block-lead { color: #A8C4BB; }

.form-frame { position: relative; margin: 0 auto; width: min(780px, 100%); padding: 10px; border-radius: 16px; }
.form-embed { display: block; width: 100%; border: 0; border-radius: 6px; background: #fff; }
/* Altos medidos con el aviso de «Iniciar sesión en Google» visible, para que el botón Enviar no quede cortado */
.form-embed--teams { height: 2100px; }
.form-embed--public { height: 1200px; }

/* Marco de equipos: borde degradado tech, sombra dura azul y esquinas de visor */
.form-frame--teams {
  border: 3px solid transparent;
  background: linear-gradient(#04141A, #04141A) padding-box, linear-gradient(135deg, #3AB0FF, #B8F03C 50%, #3AB0FF) border-box;
  box-shadow: 10px 10px 0 #3AB0FF, 0 0 46px rgba(58, 176, 255, .3);
}
.form-frame--teams::before, .form-frame--teams::after {
  content: ""; position: absolute; width: 30px; height: 30px; border: 0 solid #B8F03C; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(184, 240, 60, .8));
}
.form-frame--teams::before { top: -14px; left: -14px; border-top-width: 3px; border-left-width: 3px; }
.form-frame--teams::after { bottom: -14px; right: -14px; border-bottom-width: 3px; border-right-width: 3px; }

/* Marco de público: lima sólido como su botón */
.form-frame--public { background: #B8F03C; border: 3px solid #0D3B4C; box-shadow: 10px 10px 0 #0D3B4C; }
[data-theme="dark"] .form-frame--public { border-color: #E8FF9A; box-shadow: 10px 10px 0 #12404A, 0 0 40px rgba(184, 240, 60, .25); }

.form-fallback { margin-top: 30px; text-align: center; font-size: .92rem; color: var(--ink-2); }
.form-fallback a { color: var(--volt); font-weight: 600; text-underline-offset: 3px; }
.band-tech .form-fallback { color: #A8C4BB; }
.band-tech .form-fallback a { color: #B8F03C; }

@media (max-width: 860px) {
  .choices { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 700px) {
  .form-frame { padding: 6px; }
  .form-frame--teams { box-shadow: 6px 6px 0 #3AB0FF, 0 0 30px rgba(58, 176, 255, .3); }
  .form-frame--public { box-shadow: 6px 6px 0 #0D3B4C; }
  .form-frame--teams::before, .form-frame--teams::after { width: 22px; height: 22px; }
  .form-frame--teams::before { top: -10px; left: -10px; }
  .form-frame--teams::after { bottom: -10px; right: -10px; }
  .form-embed--teams { height: 2320px; }
  .form-embed--public { height: 1370px; }
}
@media (max-width: 480px) {
  .choice { --cut: 14px; }
  .choice-inner { min-height: 112px; gap: 14px; padding: 18px calc(var(--cut) + 16px); }
  .choice-icon { width: 46px; height: 46px; border-radius: 12px; }
  .choice-icon svg { width: 26px; height: 26px; }
  .choice-chev { font-size: 1.5rem; }
}

/* =========================================================
   PÁGINAS DE LA EDICIÓN 2025
   ========================================================= */
/* Sección "2025" del menú marcada cuando se está en una de sus páginas */
.has-sub.is-current .sub-toggle { font-weight: 700; }
.has-sub.is-current .sub-toggle::after { transform: scaleX(1); }
.submenu a[aria-current="page"] { font-weight: 700; background: var(--soft); }

/* Bloque verde suave en mitad de página: se funde con el blanco arriba y abajo */
.band-soft {
  padding-block: calc(var(--fade) * .7 + clamp(24px, 4vw, 48px));
  background: linear-gradient(to bottom,
    var(--bg) 0,
    color-mix(in oklch, var(--alt) 50%, var(--bg)) calc(var(--fade) * .35),
    var(--alt) calc(var(--fade) * .7),
    var(--alt) calc(100% - var(--fade) * .7),
    color-mix(in oklch, var(--alt) 50%, var(--bg)) calc(100% - var(--fade) * .35),
    var(--bg) 100%);
}
/* Último bloque de la página: se funde con el footer */
.band-end {
  padding-bottom: calc(var(--fade) + clamp(24px, 4vw, 56px));
  background: linear-gradient(to bottom,
    var(--bg) 0, var(--bg) calc(100% - var(--fade)),
    color-mix(in oklch, var(--bg) 70%, var(--footer)) calc(100% - var(--fade) * .55),
    color-mix(in oklch, var(--bg) 30%, var(--footer)) calc(100% - var(--fade) * .22),
    var(--footer) 100%);
}

.center-title { margin: 0 auto clamp(14px, 2vw, 20px); text-align: center; }
.center-lead { max-width: 60ch; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; color: var(--ink-2); text-wrap: balance; }
.band-tech .center-lead { color: #A8C4BB; }
.kicker { display: block; margin-bottom: 10px; font-weight: 600; color: var(--leaf-ink); }
.band-tech .kicker { color: #B8F03C; }

/* Marco tipo diorama para imágenes */
.img-frame {
  margin: 0; padding: 8px; border-radius: 16px; background: #0D3B4C;
  border: 3px solid var(--hard); box-shadow: 10px 10px 0 var(--leaf);
}
.img-frame img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* ---------- Sobre el Foro ---------- */
.about-forum { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.about-forum-text h2 { margin-bottom: 18px; }
.about-forum-text p { color: var(--ink-2); max-width: 60ch; }
.about-forum-text .btn { margin-top: 26px; }
.forum-collage { position: relative; min-height: 460px; }
.forum-collage .collage-poster { position: relative; z-index: 2; width: 62%; margin-left: auto; transform: rotate(3deg); }
.forum-collage .collage-art {
  position: absolute; left: 0; bottom: -10px; z-index: 1; width: 46%;
  border-radius: 16px; overflow: hidden; transform: rotate(-4deg);
  box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .55);
}
.forum-collage .collage-art img { display: block; width: 100%; height: auto; }
.forum-collage .collage-poster img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* ---------- Bloques temáticos ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.theme-grid .panel:nth-child(1) { --tilt: -2deg; --panel-accent: #5FA832; }
.theme-grid .panel:nth-child(2) { --tilt: 1.5deg; --panel-accent: #3AB0FF; }
.theme-grid .panel:nth-child(3) { --tilt: -1.5deg; --panel-accent: #B8F03C; }
.theme-grid .panel:nth-child(2) .panel-icon svg { stroke: #fff; }
.soft-panels .panel { box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .45), 0 0 0 1px var(--line); }
[data-theme="dark"] .soft-panels .panel { box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(232, 245, 224, .12); }

/* ---------- Programa por días ---------- */
.day-head { text-align: center; margin-bottom: clamp(32px, 5vw, 52px); }
.day-date {
  display: inline-block; margin-bottom: 14px; padding: 6px 16px; border-radius: 999px;
  font: 700 .95rem/1.2 var(--font-wide); letter-spacing: .04em;
  background: var(--ink); color: var(--bg);
}
.day-meta { margin-top: 14px; display: grid; gap: 6px; color: var(--ink-2); }
.day-meta strong { color: var(--ink); }
.tl-card--plain { grid-template-columns: 1fr; padding: 18px 22px; }
.tl-card--plain ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .97rem; }
.tl-card--plain li + li { margin-top: 4px; }
.tl-card--break { background: color-mix(in srgb, var(--leaf) 10%, var(--surface)); border-style: dashed; }
/* Separador de bloque temático dentro de la línea de tiempo */
.tl-row--block::before { border-radius: 4px; transform: rotate(45deg); background: var(--leaf); }
.tl-row--block:hover::before { transform: rotate(45deg) scale(1.2); }
.tl-block {
  padding: 16px 22px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
}
.tl-block .tl-block-label { display: block; font-size: .85rem; font-weight: 600; color: var(--lime); }
[data-theme="dark"] .tl-block .tl-block-label { color: #0B7A6E; }
.tl-block h3 { font: 800 clamp(1.05rem, 1rem + .4vw, 1.3rem)/1.2 var(--font-wide); letter-spacing: -.02em; margin: 4px 0 0; }
.tl-block p { margin-top: 6px; font-size: .92rem; opacity: .9; }
.tl-block a { color: inherit; font-weight: 600; text-underline-offset: 3px; }

.notice {
  max-width: 820px; margin: 0 auto clamp(32px, 5vw, 48px);
  padding: 20px 24px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--lime) 22%, var(--surface));
  border: 2px solid var(--leaf);
}
.notice h3 { font-size: 1.12rem; margin-bottom: 6px; }
.notice p { color: var(--ink-2); }

.day-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.day-split .timeline { --tcol: 8.5rem; }
.day-split .img-frame { position: sticky; top: calc(var(--nav-h) + 24px); }

/* ---------- Ponentes ---------- */
.speakers { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.speaker {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px 18px 24px; border-radius: var(--radius);
  background: #0C2A30; border: 1px solid rgba(232, 245, 224, .1);
  transition: transform .25s ease, border-color .25s ease;
}
.speaker:hover { transform: translateY(-4px) rotate(-1deg); border-color: #B8F03C; }
.speaker-photo {
  width: 132px; height: 132px; border-radius: 50%; overflow: hidden; margin-bottom: 16px;
  background: radial-gradient(circle at 30% 25%, #D4FF5C, #5FA832 55%, #0B7A6E);
  box-shadow: 0 0 0 4px #04141A, 0 0 0 6px rgba(58, 176, 255, .55);
}
.speaker-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.speaker h3 { font-size: 1.04rem; color: #fff; margin-bottom: 6px; }
.speaker p { font-size: .9rem; line-height: 1.45; color: #A8C4BB; }

/* ---------- Visita de campo ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.visit-text h2 { margin-bottom: 18px; }
.visit-text p { color: var(--ink-2); max-width: 58ch; }
.visit-text p + p { margin-top: 12px; }
.visit-tag {
  display: inline-block; margin-top: 22px; padding: 8px 16px; border-radius: 999px;
  font-weight: 700; background: #B8F03C; color: #061A1F;
}

/* ---------- Organizan y colaboran ---------- */
.org-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.collab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.org-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.org-card .partner-logo { width: 100%; }
.org-name { font-weight: 600; font-size: .98rem; }
.org-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.org-links a {
  font-size: .82rem; font-weight: 600; text-decoration: none;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
  background: var(--surface); transition: border-color .2s, color .2s;
}
.org-links a:hover { border-color: var(--leaf); color: var(--leaf-ink); }
.sub-title { font: 800 clamp(1.3rem, 1rem + 1.2vw, 1.9rem)/1.15 var(--font-wide); letter-spacing: -.03em; text-align: center; margin: clamp(48px, 7vw, 80px) 0 10px; }

/* ---------- Reto 2025: bases ---------- */
.reto-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; text-align: left; }
.reto-intro .page-lead { margin-left: 0; }
.reto-icon { width: min(260px, 70%); justify-self: center; border-radius: 28px; overflow: hidden; box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .5), 0 0 0 1px var(--line); transform: rotate(-3deg); }
.reto-icon img { display: block; width: 100%; height: auto; }
.reto-banner { width: min(980px, 100%); margin: clamp(40px, 6vw, 64px) auto 0; }

.rules { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.rules-toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.rules-toc p { font-weight: 700; margin-bottom: 10px; }
.rules-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.rules-toc a {
  display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: .9rem; color: var(--ink-2); text-decoration: none; transition: color .2s, border-color .2s;
}
.rules-toc a:hover { color: var(--ink); border-left-color: var(--leaf); }
.rules-body { display: grid; gap: clamp(18px, 2.4vw, 26px); min-width: 0; }
.rule-card {
  min-width: 0; /* deja que los bloques de código hagan scroll en vez de ensanchar la tarjeta */
  padding: clamp(22px, 2.6vw, 32px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 36px -26px rgba(13, 59, 76, .45);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.rule-card h3 { font: 800 clamp(1.1rem, 1rem + .5vw, 1.4rem)/1.2 var(--font-wide); letter-spacing: -.02em; margin-bottom: 14px; }
.rule-card p, .rule-card li, .rule-card dd { color: var(--ink-2); }
.rule-card p + p { margin-top: 10px; }
.rule-card strong { color: var(--ink); font-weight: 600; }
.rule-card ul, .rule-card ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.rule-card dl { margin: 0; display: grid; gap: 10px; }
.rule-card dt { font-weight: 700; }
.rule-card dd { margin: 2px 0 0; }
.rule-card code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--volt) 12%, transparent); color: var(--ink); }
.code-block {
  margin: 16px 0 0; padding: 18px 20px; border-radius: 12px; overflow-x: auto;
  background: #04141A; color: #D9F0E6; border: 1px solid rgba(58, 176, 255, .25);
  font: .86rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code-block code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code-block b { color: #B8F03C; font-weight: 700; }
.code-block i { color: #8FD3FF; font-style: normal; }

.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.stat { padding: 14px 20px; border-radius: 14px; background: var(--ink); color: var(--bg); }
.stat b { display: block; font: 800 2rem/1 var(--font-wide); color: var(--lime); }
[data-theme="dark"] .stat b { color: #0B7A6E; }
.stat span { font-size: .9rem; font-weight: 600; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 6px 0 16px; align-items: end; }
.podium-step { border-radius: 14px; padding: 18px 12px; text-align: center; color: #061A1F; }
.podium-step b { display: block; font: 800 clamp(1.4rem, 1rem + 1.6vw, 2.2rem)/1 var(--font-wide); }
.podium-step span { display: block; margin-top: 6px; font-size: .88rem; font-weight: 600; }
.podium-step--1 { background: #B8F03C; padding-block: 30px; }
.podium-step--2 { background: #8FD3FF; padding-block: 22px; }
.podium-step--3 { background: #DDEFC4; }

.weeks { list-style: none; padding: 0 !important; counter-reset: wk; }
.weeks li { position: relative; padding: 12px 14px 12px 56px; border-radius: 12px; background: color-mix(in srgb, var(--leaf) 8%, transparent); }
.weeks li::before {
  counter-increment: wk; content: counter(wk);
  position: absolute; left: 12px; top: 10px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font: 800 1rem/1 var(--font-wide); background: var(--ink); color: var(--bg);
}
.points { list-style: none; padding: 0 !important; }
.points li { display: grid; grid-template-columns: 4.2rem 1fr; gap: 14px; align-items: baseline; }
.points b { font: 800 1.15rem/1 var(--font-wide); color: var(--leaf-ink); text-align: right; }

@media (max-width: 1000px) {
  .rules { grid-template-columns: 1fr; }
  .rules-toc { position: static; }
  .rules-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day-split { grid-template-columns: 1fr; }
  .day-split .img-frame { position: static; width: min(420px, 100%); margin: 0 auto; }
  .collab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .about-forum, .visit, .reto-intro { grid-template-columns: 1fr; }
  .forum-collage { min-height: 0; max-width: 520px; margin: 0 auto; width: 100%; }
  .theme-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .org-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .reto-intro { text-align: center; }
  .reto-intro .page-lead { margin-left: auto; }
}
@media (max-width: 560px) {
  .collab-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .rules-toc ol { grid-template-columns: 1fr; }
  .podium { gap: 8px; }
  .points li { grid-template-columns: 3.4rem 1fr; gap: 10px; }
  .img-frame { box-shadow: 6px 6px 0 var(--leaf); padding: 5px; }
}

/* =========================================================
   CONTACTO
   ========================================================= */
/* La página es corta: el bloque ocupa la pantalla y se funde con el footer */
.contact-page {
  min-height: calc(100dvh - var(--nav-h) - 60px);
  padding-bottom: calc(var(--fade) + clamp(40px, 6vw, 80px));
  background: linear-gradient(to bottom,
    var(--bg) 0, var(--bg) calc(100% - var(--fade)),
    color-mix(in oklch, var(--bg) 70%, var(--footer)) calc(100% - var(--fade) * .55),
    color-mix(in oklch, var(--bg) 30%, var(--footer)) calc(100% - var(--fade) * .22),
    var(--footer) 100%);
}
.contact-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px);
  max-width: 900px; margin: clamp(44px, 6vw, 72px) auto 0;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: clamp(30px, 4vw, 44px) clamp(22px, 3vw, 32px);
  text-decoration: none; color: #0D3B4C;
  box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .5), 0 6px 14px -8px rgba(13, 59, 76, .3), 0 0 0 1px var(--line);
}
.contact-card--mail { --tilt: -2.5deg; --panel-accent: #B8F03C; }
.contact-card--phone { --tilt: 2deg; --panel-accent: #3AB0FF; }
.contact-card:hover, .contact-card:focus-visible { box-shadow: 0 36px 56px -26px rgba(13, 59, 76, .55), 0 0 0 3px var(--panel-accent); }
[data-theme="dark"] .contact-card { color: #E8F5E0; box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(232, 245, 224, .12); }
[data-theme="dark"] .contact-card:hover, [data-theme="dark"] .contact-card:focus-visible { box-shadow: 0 36px 56px -24px #000, 0 0 0 3px var(--panel-accent); }
.contact-card:focus-visible { outline: none; }

.contact-icon {
  width: 104px; height: 104px; margin-bottom: 18px; border-radius: 28px;
  display: grid; place-items: center;
  background: var(--panel-accent); border: 2.5px solid #0D3B4C; box-shadow: 6px 6px 0 #0D3B4C;
  transition: transform .3s ease, box-shadow .3s ease;
}
.contact-card:hover .contact-icon, .contact-card:focus-visible .contact-icon { transform: translate(-3px, -3px) rotate(-4deg); box-shadow: 9px 9px 0 #0D3B4C; }
.contact-icon svg { width: 66px; height: 66px; overflow: visible; fill: none; stroke: #0D3B4C; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-icon svg * { transform-box: view-box; }
.contact-label { font-size: .95rem; font-weight: 600; color: #3D5F66; }
[data-theme="dark"] .contact-label { color: #A8C4BB; }
.contact-value { font: 800 clamp(1.1rem, .8rem + 1.1vw, 1.5rem)/1.25 var(--font-wide); letter-spacing: -.03em; }
.contact-action {
  margin-top: 16px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 600; background: #0D3B4C; color: #fff; transition: background-color .25s ease, color .25s ease;
}
[data-theme="dark"] .contact-action { background: var(--panel-accent); color: #061A1F; }
.contact-card:hover .contact-action { background: var(--panel-accent); color: #061A1F; }
[data-theme="dark"] .contact-card:hover .contact-action { background: #fff; }

/* Email: se abre la solapa y sale la carta */
.contact-card--mail .letter { fill: #fff; transform: translateY(14px); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1) .1s; }
.contact-card--mail .letter-lines { stroke: #0B7A6E; stroke-width: 2.4; opacity: 0; transform: translateY(14px); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1) .1s, opacity .2s .25s; }
.contact-card--mail .env-back { fill: #fff; }
.contact-card--mail .env-flap { fill: #fff; transform-origin: 32px 26px; transition: transform .35s ease; }
.contact-card--mail:hover .env-flap, .contact-card--mail:focus-visible .env-flap { transform: scaleY(-1); }
.contact-card--mail:hover .letter, .contact-card--mail:focus-visible .letter,
.contact-card--mail:hover .letter-lines, .contact-card--mail:focus-visible .letter-lines { transform: translateY(-6px); opacity: 1; }

/* Teléfono: el auricular vibra y salen ondas */
.contact-card--phone .handset { fill: #fff; transform-origin: 32px 32px; }
.contact-card--phone .ring { stroke: #0D3B4C; opacity: 0; }
.contact-card--phone:hover .handset, .contact-card--phone:focus-visible .handset { animation: phone-ring .9s ease-in-out infinite; }
.contact-card--phone:hover .ring, .contact-card--phone:focus-visible .ring { animation: phone-wave .9s ease-out infinite; }
.contact-card--phone:hover .r2, .contact-card--phone:focus-visible .r2 { animation-delay: .18s; }
@keyframes phone-ring {
  0%, 50%, 100% { transform: rotate(0) }
  5%, 15%, 25% { transform: rotate(-12deg) }
  10%, 20%, 30% { transform: rotate(12deg) }
  35% { transform: rotate(0) }
}
@keyframes phone-wave { 0% { opacity: 0 } 25% { opacity: 1 } 70%, 100% { opacity: 0 } }

@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; max-width: 440px; }
  .contact-card--mail { --tilt: -1.2deg; }
  .contact-card--phone { --tilt: 1.2deg; }
  .contact-icon { width: 88px; height: 88px; border-radius: 24px; }
  .contact-icon svg { width: 56px; height: 56px; }
}

/* =========================================================
   EL RETO: HOJA DE RUTA
   ========================================================= */
.roadmap-section { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 72px); }
.roadmap-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='none' stroke='%230B7A6E' stroke-width='1.2'%3E%3Cpath d='M0 30h40l15 15h30M60 0v20l20 20v40M120 90H80l-10 10v20M20 120V90l15-15h20'/%3E%3Ccircle cx='85' cy='45' r='3'/%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='55' cy='75' r='3'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(#000, transparent 60%); mask-image: linear-gradient(#000, transparent 60%);
}
[data-theme="dark"] .roadmap-section::before { opacity: .12; }
.roadmap-section .wrap { position: relative; }
.roadmap-title, .roadmap-lead { text-align: center; }
.roadmap-lead { margin-bottom: clamp(48px, 7vw, 88px); }

.roadmap { position: relative; }
/* Camino de puntos que une los nodos (lo dibuja main.js) */
.road-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.road-base { fill: none; stroke: color-mix(in srgb, var(--leaf) 18%, transparent); stroke-width: 14; stroke-linecap: round; }
.road-line {
  fill: none; stroke: url(#road-grad); stroke-width: 4.5; stroke-linecap: round;
  stroke-dasharray: 2 16; animation: road-flow 1.2s linear infinite;
}
@keyframes road-flow { to { stroke-dashoffset: -18; } }

.stops { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; display: grid; gap: clamp(56px, 8vw, 104px); }
.stop { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; column-gap: clamp(16px, 2vw, 28px); }
.stop--left .stop-card { grid-column: 1 / span 6; grid-row: 1; --tilt: -1.6deg; }
.stop--left .stop-aside { grid-column: 7 / span 6; grid-row: 1; }
.stop--right .stop-card { grid-column: 7 / span 6; grid-row: 1; --tilt: 1.6deg; }
.stop--right .stop-aside { grid-column: 1 / span 6; grid-row: 1; }

.stop-card { padding: clamp(26px, 3vw, 36px); padding-top: clamp(30px, 3.4vw, 40px); }
.roadmap .panel { box-shadow: 0 28px 48px -24px rgba(13, 59, 76, .5), 0 6px 14px -8px rgba(13, 59, 76, .3), 0 0 0 1px var(--line); }
.roadmap .panel:hover, .roadmap .panel:focus-within { box-shadow: 0 36px 56px -26px rgba(13, 59, 76, .55), 0 0 0 3px var(--panel-accent); }
[data-theme="dark"] .roadmap .panel { box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(232, 245, 224, .12); }
[data-theme="dark"] .roadmap .panel:hover, [data-theme="dark"] .roadmap .panel:focus-within { box-shadow: 0 36px 56px -24px #000, 0 0 0 3px var(--panel-accent); }
.stop-card .panel-icon svg { stroke: #0D3B4C; }
.stop-card h3 { font: 800 clamp(1.4rem, 1rem + 1.4vw, 2rem)/1.1 var(--font-wide); letter-spacing: -.035em; margin-bottom: 12px; }
.stop-phase { font-size: .85rem; font-weight: 600; color: #0B7A6E; margin-bottom: 4px; }
[data-theme="dark"] .stop-phase { color: #8FD3FF; }
.stop-card > p:not(.stop-phase):not(.stop-note) { font-size: 1.02rem; }

/* Nodo numerado en la esquina exterior de cada tarjeta */
.stop-node {
  position: absolute; top: -26px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font: 800 1.5rem/1 var(--font-wide);
  background: #0D3B4C; color: #fff; border: 4px solid var(--panel-accent);
  box-shadow: 0 0 0 6px var(--bg), 0 10px 20px -8px rgba(13, 59, 76, .6);
}
.stop--left .stop-node { left: -22px; }
.stop--right .stop-node { right: -22px; }
[data-theme="dark"] .stop-node { background: #04141A; box-shadow: 0 0 0 6px var(--bg), 0 0 18px color-mix(in srgb, var(--panel-accent) 60%, transparent); }

.stop-extra { margin-top: 22px; display: flex; }
.stop-note {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  font-size: .94rem; font-weight: 500; color: #0D3B4C !important;
  background: color-mix(in srgb, #5FA832 14%, #fff); border: 1.5px dashed #5FA832;
}
[data-theme="dark"] .stop-note { color: #E8F5E0 !important; background: rgba(95, 168, 50, .14); }
.stop-note svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
/* Fase 3: aviso de bases disponibles y botón destacado */
.stop-note--ok { background: color-mix(in srgb, #B8F03C 28%, #fff); border-style: solid; border-color: #5FA832; font-weight: 600; }
[data-theme="dark"] .stop-note--ok { background: rgba(184, 240, 60, .16); }
.stop-cta { margin-top: 20px; display: flex; }
.stop-cta .choice--sm { width: 100%; }
.stop-cta .choice--sm .choice-inner { min-height: 104px; }
.stop-cta .choice--sm .choice-title { font-size: clamp(1.05rem, .7rem + 1.3vw, 1.6rem); letter-spacing: .06em; }
.stop-card .podium { margin: 18px 0 0; }
.stop-card .podium-step b { font-size: clamp(1.15rem, .85rem + 1vw, 1.65rem); white-space: nowrap; }

/* Diorama de la Gran Final, entre las fases 6 y 7 */
.road-diorama {
  position: relative; z-index: 1; width: min(1120px, 100%); margin: clamp(56px, 8vw, 104px) auto;
  padding: 10px 10px 0; border-radius: 16px;
  border: 3px solid transparent;
  background: linear-gradient(#07060f, #07060f) padding-box, linear-gradient(135deg, #B8F03C, #3AB0FF) border-box;
  box-shadow: 10px 10px 0 #3AB0FF, 0 0 50px rgba(58, 176, 255, .25), 0 0 0 10px var(--bg);
}
.road-diorama iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; background: #07060f; }
.road-diorama figcaption { padding: 12px 8px 14px; text-align: center; font-size: .9rem; font-weight: 500; color: #A8C4BB; }

/* Neón pequeño para fases y fechas */
.neon-sign--sm { padding: 16px 26px; border-radius: 14px; display: inline-flex; }
.neon-sign--sm::before { inset: 6px; border-radius: 9px; }
.neon-sign--sm .neon-top { font-size: clamp(.7rem, .6rem + .35vw, .86rem); letter-spacing: .3em; margin-right: -.3em; }
.neon-sign--sm .neon-date { font-size: clamp(1.05rem, .8rem + 1.1vw, 1.6rem); margin-top: .35em; }

/* Elementos superpuestos junto a la tarjeta */
.stop-float { display: flex; justify-content: center; position: relative; z-index: 2; }
.stop--left .stop-float { margin-left: clamp(-80px, -5vw, -40px); justify-content: flex-start; }
.stop--right .stop-float { margin-right: clamp(-80px, -5vw, -40px); justify-content: flex-end; }
.choice--sm { --cut: 16px; width: min(380px, 100%); }
.choice--sm .choice-inner { min-height: 92px; padding: 16px calc(var(--cut) + 18px); gap: 14px; }
.choice--sm .choice-icon { width: 46px; height: 46px; border-radius: 12px; }
.choice--sm .choice-icon svg { width: 26px; height: 26px; }
.choice--sm .choice-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); }
.choice--sm .choice-sub { font-size: .88rem; }
.choice--sm .choice-chev { font-size: 1.5rem; transform: none; }
.choice--sm:hover .choice-chev { transform: translateX(5px); }
.stop-float .neon-sign--sm { transform: rotate(3deg); }
.choice--sm.is-closed:hover .choice-chev { transform: none; }
.choice--sm .closed-sticker { top: -14px; font-size: clamp(.85rem, .7rem + .5vw, 1.1rem); border-width: 2px; }
.stop--left .stop-float .neon-sign--sm { transform: rotate(-3deg); }

/* Fotos de la edición anterior superpuestas */
.snaps { display: grid; position: relative; padding-block: 24px; }
.snap {
  grid-area: 1 / 1; margin: 0; width: 68%; justify-self: center; align-self: center;
  padding: 8px 8px 0; background: #fff; border-radius: 10px;
  box-shadow: 0 22px 36px -18px rgba(13, 59, 76, .55), 0 0 0 1px rgba(13, 59, 76, .08);
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1.2), box-shadow .35s ease;
}
.snap img { display: block; width: 100%; height: auto; border-radius: 5px; aspect-ratio: 16 / 9; object-fit: cover; }
.snap figcaption { padding: 6px 2px 8px; font-size: .74rem; font-weight: 600; color: #3D5F66; text-align: center; }
.snap:hover { z-index: 5; transform: translate(var(--x, 0), calc(var(--y, 0) - 8px)) rotate(0deg) scale(1.06); box-shadow: 0 30px 46px -18px rgba(13, 59, 76, .65), 0 0 0 3px var(--panel-accent); }
.snaps--1 .snap { --r: 4deg; width: 78%; }
.stop--left .snaps--1 .snap { margin-left: clamp(-60px, -4vw, -30px); }
.snaps--2 .snap:nth-child(1) { --x: -14%; --y: -26%; --r: -5deg; }
.snaps--2 .snap:nth-child(2) { --x: 12%; --y: 26%; --r: 4deg; }
.snaps--2 { padding-block: 70px; }
.snaps--3 { padding-block: 92px; }
.snaps--3 .snap { width: 58%; }
.snaps--3 .snap:nth-child(1) { --x: -22%; --y: -44%; --r: -6deg; }
.snaps--3 .snap:nth-child(2) { --x: 24%; --y: -4%; --r: 5deg; }
.snaps--3 .snap:nth-child(3) { --x: -10%; --y: 44%; --r: -2deg; }
[data-theme="dark"] .snap { background: #E8F5E0; box-shadow: 0 22px 36px -18px #000; }

/* =========================================================
   EL RETO: MÁS ALLÁ DEL RETO
   ========================================================= */
.beyond-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr);
  grid-template-areas: "talent dio corner" "grow grow grow";
  align-items: center;
}
.beyond-frame {
  grid-area: dio; margin: 0; position: relative; z-index: 1;
  padding: 10px; border-radius: 16px; background: #102d30;
  border: 3px solid transparent;
  background: linear-gradient(#102d30, #102d30) padding-box, linear-gradient(135deg, #B8F03C, #3AB0FF) border-box;
  box-shadow: 10px 10px 0 #3AB0FF, 0 0 50px rgba(58, 176, 255, .25);
}
.beyond-frame iframe { display: block; width: 100%; aspect-ratio: 720 / 500; border: 0; border-radius: 6px; background: #102d30; }
.beyond-card { position: relative; z-index: 2; padding: 26px; }
.beyond-card h3 { font-size: 1.18rem; }
.beyond-card p { font-size: .95rem; }
.beyond-card ul { margin-top: 12px; }
.beyond-card .panel-icon svg { stroke: #0D3B4C; }
.beyond-card--talent { grid-area: talent; --tilt: -3deg; margin-right: -32px; align-self: start; margin-top: 24px; }
.beyond-card--corner { grid-area: corner; --tilt: 3deg; margin-left: -32px; align-self: start; margin-top: 64px; }
.beyond-card--grow { grid-area: grow; --tilt: -1.2deg; justify-self: center; width: min(560px, 100%); margin-top: -48px; }
.pilot-tag { display: inline-block; margin-bottom: 8px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #3AB0FF; color: #04141A; }


@media (max-width: 1100px) {
  .beyond-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "dio dio" "talent corner" "grow grow"; gap: 0 24px; }
  .beyond-card--talent, .beyond-card--corner { margin: -40px 0 0; align-self: start; }
  .beyond-card--grow { margin-top: 28px; }
}
@media (max-width: 900px) {
  .stop { grid-template-columns: 1fr; row-gap: 18px; }
  .stop--left .stop-card, .stop--right .stop-card,
  .stop--left .stop-aside, .stop--right .stop-aside { grid-column: 1; grid-row: auto; }
  .stop-card { margin-left: 26px; }
  .stop--right .stop-node, .stop--left .stop-node { left: -26px; right: auto; }
  .stop--left .stop-card { --tilt: -1deg; }
  .stop--right .stop-card { --tilt: 1deg; }
  .stop-aside:empty { display: none; }
  .stop-aside { margin-left: 26px; }
  .stop--left .stop-float, .stop--right .stop-float { margin: -36px 0 0; justify-content: center; }
  /* Con la pegatina «CERRADO» el botón baja un poco para no tapar el texto de la tarjeta */
  .stop--left .stop-float:has(.is-closed), .stop--right .stop-float:has(.is-closed) { margin-top: 4px; }
  .snaps { margin-top: -10px; }
  .stop--left .snaps--1 .snap { margin-left: 0; }
  .snap { width: 72%; }
  .snaps--3 .snap { width: 60%; }
}
@media (max-width: 640px) {
  .beyond-stage { grid-template-columns: 1fr; grid-template-areas: "dio" "talent" "corner" "grow"; gap: 20px; }
  .beyond-card--talent { margin-top: -28px; --tilt: -1.2deg; }
  .beyond-card--corner { margin: 0; --tilt: 1.2deg; }
  .beyond-card--grow { margin: 0; --tilt: -1deg; }
  .beyond-frame { padding: 6px; box-shadow: 6px 6px 0 #3AB0FF; }
  .stop-card { margin-left: 18px; }
  .stop-aside { margin-left: 18px; }
  .stop-node { width: 48px; height: 48px; font-size: 1.25rem; top: -22px; }
  .stop--right .stop-node, .stop--left .stop-node { left: -20px; }
  .snaps--2 { padding-block: 56px; }
  .snaps--3 { padding-block: 76px; }
  .road-diorama { padding: 6px 6px 0; box-shadow: 6px 6px 0 #3AB0FF, 0 0 0 8px var(--bg); }
  .road-diorama figcaption { font-size: .82rem; padding: 10px 6px 12px; }
}

/* =========================================================
   BASES TÉCNICAS (figuras de @lucasmarkes/hairline)
   ========================================================= */
/* Colores de las figuras: --hairline-plate debe ser el fondo sobre el que se dibujan */
.spec-fig {
  --plano: #FFFFFF;
  --hairline-plate: var(--plano);
  --hairline-hi: #3B7A1A;
  --hairline-edge: #0D3B4C;
  --hairline-mid: #8AA5AC;
  --hairline-lo: #D5E3E0;
  --hairline-stroke: 1;
}
[data-theme="dark"] .spec-fig {
  --plano: #04141A;
  --hairline-hi: #B8F03C;
  --hairline-edge: #E8F5E0;
  --hairline-mid: #4E7A80;
  --hairline-lo: #1B3B42;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .spec-fig { --plano: #04141A; --hairline-hi: #B8F03C; --hairline-edge: #E8F5E0; --hairline-mid: #4E7A80; --hairline-lo: #1B3B42; }
}

/* Lámina de plano: cuadrícula fina sobre el color de la placa */
.spec-fig {
  position: relative; margin: 0; padding: clamp(12px, 2vw, 22px) clamp(12px, 2vw, 22px) 10px;
  border-radius: 18px; border: 1px solid var(--line);
  background:
    linear-gradient(color-mix(in srgb, var(--hairline-mid) 22%, transparent) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, color-mix(in srgb, var(--hairline-mid) 22%, transparent) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--plano);
  box-shadow: 0 22px 40px -28px rgba(13, 59, 76, .45);
}
[data-theme="dark"] .spec-fig { box-shadow: 0 22px 40px -24px #000, 0 0 0 1px rgba(184, 240, 60, .12); }
/* El dibujo deja mucho aire alrededor: se amplía y la lámina recorta los márgenes */
.spec-fig { overflow: hidden; }
.spec-fig .hl { width: 120%; aspect-ratio: 5 / 4; margin: -6% -10% -8%; }
.fig-read {
  min-height: 1.6em; padding-top: 6px; text-align: right;
  font: 500 .8rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--hairline-mid);
}

/* Cabecera */
.bases-intro { padding-bottom: clamp(32px, 5vw, 56px); }
.bases-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.draft-note { margin-top: 24px; display: grid; gap: 14px; justify-items: center; max-width: 52ch; }
.bases-hero-fig { width: min(640px, 100%); margin-top: clamp(36px, 5vw, 56px); }
/* La figura de la cabecera se dibuja en la parte baja: se recorta el aire de arriba (lámina apaisada) */
.bases-hero-fig .hl { margin: -34% -10% -8%; }
.draft-note > p:last-child { color: var(--ink-2); font-size: .95rem; }

/* Índice */
.spec-index { margin-bottom: clamp(48px, 7vw, 88px); }
.spec-index ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.spec-index a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 6px; border-radius: 999px;
  font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease;
}
.spec-index a:hover { border-color: var(--leaf); transform: translateY(-2px); }
/* «Ayuda técnica»: misma pastilla, con el láser del botón EQUIPOS recorriendo el borde */
.spec-index a.index-laser {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--laser), var(--line) 0 14%, #3AB0FF 24%, #fff 27%, #B8F03C 32%, var(--line) 42% 64%, #3AB0FF 74%, #fff 77%, #B8F03C 82%, var(--line) 92%) border-box;
  box-shadow: 0 0 14px rgba(58, 176, 255, .35);
  animation: laser-spin 3.2s linear infinite;
}
.spec-index a.index-laser:hover { border-color: transparent; box-shadow: 0 0 22px rgba(58, 176, 255, .55); }
.spec-index a.index-laser b { background: #04141A; color: #B8F03C; }
.spec-index b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 800 .85rem/1 var(--font-wide); background: var(--ink); color: var(--bg); }

/* Apartados: figura y texto alternados */
.spec-list { display: grid; gap: clamp(56px, 8vw, 104px); }
.spec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: calc(var(--nav-h) + 24px); }
.spec:nth-child(even) { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.spec:nth-child(even) .spec-fig { order: 2; }
.spec-num { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; font-weight: 600; font-size: .9rem; color: var(--leaf-ink); }
.spec-body h2 { font: 800 clamp(1.6rem, 1.1rem + 2vw, 2.5rem)/1.08 var(--font-wide); letter-spacing: -.035em; margin-bottom: 16px; }
.spec-body p { color: var(--ink-2); max-width: 60ch; }
.spec-body p + p { margin-top: 12px; }
.spec-body ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 60ch; }
.spec-body li { position: relative; padding-left: 26px; color: var(--ink-2); }
.spec-body li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--leaf); transform: rotate(45deg); }
.spec-body strong { color: var(--ink); font-weight: 600; }
.spec-body ul.crit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.spec-body .neon-sign--sm { margin-top: 22px; }

.tech-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; max-width: 520px; }
.tech-logo {
  display: flex; align-items: center; justify-content: center; height: 96px; padding: 18px 22px;
  border-radius: 16px; background: #fff; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 2px 6px -4px rgba(13, 59, 76, .3);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1.2), box-shadow .3s ease, border-color .3s ease;
}
.tech-logo:hover, .tech-logo:focus-visible { transform: translateY(-6px) rotate(-1.5deg); border-color: var(--leaf); box-shadow: 0 22px 34px -18px rgba(13, 59, 76, .55), 0 8px 14px -10px rgba(13, 59, 76, .35); }
[data-theme="dark"] .tech-logo:hover, [data-theme="dark"] .tech-logo:focus-visible { box-shadow: 0 22px 34px -16px #000, 0 0 0 2px #B8F03C; }
/* Límites máximos fijos: cada logo cabe entero dentro de su tarjeta */
.tech-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 54px; }

.bases-help { margin-top: clamp(64px, 9vw, 112px); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.bases-help p { font: 700 clamp(1.1rem, 1rem + .6vw, 1.4rem)/1.3 var(--font-wide); letter-spacing: -.02em; }

@media (max-width: 900px) {
  .spec, .spec:nth-child(even) { grid-template-columns: 1fr; }
  .spec .spec-fig, .spec:nth-child(even) .spec-fig { order: 0; width: min(520px, 100%); justify-self: center; }
}
@media (max-width: 560px) {
  .spec-body ul.crit { grid-template-columns: 1fr; }
  .spec-index a { font-size: .85rem; padding-right: 12px; }
  .tech-logo { height: 80px; padding: 14px 16px; }
  .tech-logo img { max-height: 44px; }
}

/* =========================================================
   BASES TÉCNICAS: AYUDA TÉCNICA (tarjetas de código)
   ========================================================= */
.tech-help { margin-top: clamp(80px, 11vw, 140px); scroll-margin-top: calc(var(--nav-h) + 24px); }
.help-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(32px, 5vw, 48px); }
.help-card {
  padding: clamp(24px, 3vw, 36px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 22px 40px -28px rgba(13, 59, 76, .45);
}
.help-card h3 { font: 800 clamp(1.4rem, 1rem + 1.4vw, 2rem)/1.1 var(--font-wide); letter-spacing: -.035em; margin-bottom: 14px; }
.help-card ul, .db-chips { margin: 0; padding: 0; list-style: none; }
.help-card ul { display: grid; gap: 10px; }
.help-card li { position: relative; padding-left: 26px; color: var(--ink-2); }
.help-card li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--leaf); transform: rotate(45deg); }
.help-card strong { color: var(--ink); font-weight: 600; }
.help-fig { width: min(440px, 100%); justify-self: center; }

.help-sub { font: 800 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1.15 var(--font-wide); letter-spacing: -.03em; margin: clamp(48px, 7vw, 72px) 0 14px; }
.help-text { color: var(--ink-2); max-width: 70ch; margin-bottom: 14px; }
.help-text code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--volt) 12%, transparent); color: var(--ink); }
.help-code--narrow { max-width: 620px; }
.db-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.db-chips li { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; background: var(--ink); color: var(--bg); }

/* Tarjeta de código: ventana de editor oscura en los dos temas */
.code-card {
  margin: 0; min-width: 0; border-radius: 14px; overflow: hidden;
  background: #04141A; border: 1px solid rgba(58, 176, 255, .28);
  box-shadow: 0 24px 44px -26px rgba(4, 20, 26, .75);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.code-card:hover { transform: translateY(-3px); border-color: rgba(184, 240, 60, .55); box-shadow: 0 30px 50px -26px rgba(4, 20, 26, .85), 0 0 0 1px rgba(184, 240, 60, .25); }
.code-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #0A2A33; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.code-dots { display: inline-flex; gap: 6px; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.code-dots i:nth-child(2) { background: #FEBC2E; }
.code-dots i:nth-child(3) { background: #28C840; }
.code-name { font: 600 .82rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #D9F0E6; }
.code-lang { margin-left: auto; font: 700 .7rem/1 var(--font); letter-spacing: .06em; padding: 4px 8px; border-radius: 6px; color: #04141A; background: #B8F03C; }
.code-card pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-card code { font: .88rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #D9F0E6; white-space: pre; }
/* Colores de sintaxis */
.code-card .k { color: #8FD3FF; }
.code-card .s { color: #B8F03C; }
.code-card .n { color: #FFB86B; }
.code-card .pu { color: #7F9AA0; }
.code-card .c { color: #6F8F8A; font-style: italic; }
.code-card .f { color: #E8F5E0; font-weight: 600; }
.code-card .t { color: #8FD3FF; }
.code-card .v { color: #FFB86B; }
.code-card .p { color: #E8F5E0; }
/* Endpoints: método en etiqueta de color */
.code-card--api code { display: grid; gap: 4px; }
.ep { display: grid; grid-template-columns: 4.4em minmax(0, 1fr); gap: 0 12px; align-items: baseline; }
.ep .r { white-space: pre-wrap; overflow-wrap: anywhere; }
.m { display: inline-block; min-width: 4.4em; text-align: center; padding: 1px 0; border-radius: 5px; font-weight: 700; font-size: .78rem; }
.m-get { background: rgba(58, 176, 255, .18); color: #8FD3FF; }
.m-post { background: rgba(184, 240, 60, .18); color: #B8F03C; }
.m-ws { background: rgba(255, 184, 107, .18); color: #FFB86B; }

.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; align-items: start; }
.code-card--table .code-lang { background: #3AB0FF; }
/* En las tablas, los comentarios largos se parten dentro de la tarjeta con sangría */
.code-card--table code { display: block; white-space: normal; }
.code-card--table code > span.f { display: inline; }
.code-card--table .row { display: block; padding-left: 2ch; text-indent: -2ch; }

@media (max-width: 900px) {
  .help-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .code-card pre { padding: 14px 14px; }
  .code-card code { font-size: .8rem; }
}

/* =========================================================
   EQUIPOS: centros (pegatinas) y su árbol de equipos
   ========================================================= */
/* Intro y banda más juntas que en otras páginas: fundido más corto y menos aire entre ellas */
.teams-intro { padding-bottom: clamp(16px, 2.5vw, 32px); }
.teams-zone { --fade: clamp(64px, 8vw, 120px); padding-top: calc(var(--fade) + 8px); overflow: visible; } /* sin recorte: la tarjeta de un equipo puede asomar por encima de la banda */
.school-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(72px, 9vw, 112px) clamp(32px, 5vw, 72px);
}
.school { display: flex; flex-direction: column; align-items: center; text-align: center; }
.school--efa   { --tilt: -4deg; }
.school--fjb   { --tilt: 3deg; }
.school--zafra { --tilt: 2.5deg; }
.school--zv    { --tilt: -3deg; }

/* Pegatina: troquel blanco, sombra proyectada y un brillo en diagonal */
.school-sticker {
  position: relative; display: block; overflow: hidden;
  width: clamp(190px, 22vw, 240px); aspect-ratio: 5 / 4; padding: 14px;
  background: #fff; border: 6px solid #fff; border-radius: 26px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 22px 30px -14px rgba(0, 0, 0, .75), 0 0 0 1px rgba(0, 0, 0, .08);
  transform: rotate(var(--tilt));
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), box-shadow .3s ease;
}
.school-sticker::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, .55) 0 12%, transparent 30% 70%, rgba(0, 0, 0, .06));
}
.school-sticker img { width: 100%; height: 100%; object-fit: contain; }
.school-sticker:hover, .school-sticker:focus-visible {
  transform: rotate(0deg) translateY(-6px) scale(1.04);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .12), 0 30px 36px -14px rgba(0, 0, 0, .8), 0 0 0 4px #B8F03C;
}
.school-sticker:focus-visible { outline: none; }
/* El logo del Francisco Javier de Burgos es blanco: va sobre fondo oscuro dentro del troquel */
.school--fjb .school-sticker { background: #0D3B4C; padding: 18px 16px; }
/* Algunos logos traen mucho margen en la imagen: se amplían dentro de la pegatina */
.school--efa .school-sticker img { transform: scale(1.4); }
.school--zafra .school-sticker img { transform: scale(1.3) translateY(2%); }
.school--zv .school-sticker img { transform: scale(1.3) translateY(4%); }

.school-name { margin: 26px 0 4px; font: 700 clamp(1.05rem, .95rem + .5vw, 1.3rem)/1.25 var(--font-wide); color: #fff; text-wrap: balance; }
.school-place { margin: 0; font-size: .92rem; color: #A8C4BB; }

/* Cableado de red: del puerto del centro sale un cable que se reparte hasta el puerto de cada equipo.
   Todo va en píxeles reales (sin SVG estirado) para que las piezas encajen con cualquier número de equipos. */
.teams-zone { --cable-w: 7px; --cable-v: linear-gradient(90deg, #134E78, #5CC4FF 42%, #2A8FD6 62%, #134E78); --cable-h: linear-gradient(180deg, #134E78, #5CC4FF 42%, #2A8FD6 62%, #134E78); }

/* Puerto RJ45: carcasa oscura, boca del conector y dos leds (enlace y actividad) */
.net-port {
  position: relative; z-index: 1; display: block; width: 40px; height: 26px;
  border-radius: 5px; background: linear-gradient(#1B3138, #0B1A1F);
  box-shadow: inset 0 0 0 2px #2E4D55, 0 6px 12px -6px rgba(0, 0, 0, .8);
}
/* Boca del puerto, con la muesca del RJ45 */
.net-port::before {
  content: ""; position: absolute; left: 50%; top: 9px; width: 16px; height: 11px; margin-left: -8px; background: #020708;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 72% 70%, 72% 100%, 28% 100%, 28% 70%, 0 70%);
}
.net-port--switch { margin-top: 18px; }
.net-port--switch::before { top: 6px; clip-path: polygon(28% 0, 72% 0, 72% 30%, 100% 30%, 100% 100%, 0 100%, 0 30%, 28% 30%); }
/* Clavija transparente del cable, enchufada en el puerto */
.net-port::after {
  content: ""; position: absolute; left: 50%; top: -9px; width: 14px; height: 12px; margin-left: -7px;
  border-radius: 2px 2px 1px 1px; background: rgba(214, 238, 255, .35); box-shadow: inset 0 0 0 1px rgba(214, 238, 255, .6);
}
.net-port--switch::after { top: auto; bottom: -9px; border-radius: 1px 1px 2px 2px; }

.net-led { position: absolute; top: 4px; width: 7px; height: 4px; border-radius: 1px; background: #16343B; }
.net-port--switch .net-led { top: auto; bottom: 4px; }
/* Ámbar fijo; el verde parpadea de forma irregular, como un puerto con tráfico */
.net-led--act { right: 4px; background: #FFB23E; box-shadow: 0 0 6px #FFB23E; }
.net-led--link { left: 4px; animation: led-blink 1.5s steps(1) infinite; }
@keyframes led-blink {
  0%, 30%, 52%, 70% { background: #B8F03C; box-shadow: 0 0 6px #B8F03C; }
  10%, 38%, 60%, 84% { background: #16343B; box-shadow: none; }
}
/* Cada puerto parpadea a su ritmo para que no vayan sincronizados */
.team:nth-child(2) .net-led--link { animation-duration: 1.1s; animation-delay: -.4s; }
.team:nth-child(3) .net-led--link { animation-duration: 1.9s; animation-delay: -.9s; }
.school:nth-child(2) .net-led--link { animation-delay: -.7s; }
.school:nth-child(3) .net-led--link { animation-duration: 1.3s; }
.school:nth-child(4) .net-led--link { animation-delay: -1.2s; }

/* Tramo vertical desde el puerto del centro */
.net-trunk { display: block; width: var(--cable-w); height: clamp(30px, 3.5vw, 44px); margin-top: 8px; background: var(--cable-v); }

/* Equipos: el reparto horizontal va arriba de cada columna y de él baja un tramo hasta el puerto */
.team-row {
  list-style: none; margin: 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
}
.team { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: clamp(30px, 3.5vw, 44px); }
.team::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--cable-w); background: var(--cable-h);
}
.team:first-child::before { left: 50%; margin-left: calc(var(--cable-w) / -2); border-top-left-radius: 4px; }
.team:last-child::before { right: 50%; margin-right: calc(var(--cable-w) / -2); border-top-right-radius: 4px; }
.team::after {
  content: ""; position: absolute; top: 0; left: 50%; width: var(--cable-w); margin-left: calc(var(--cable-w) / -2);
  height: calc(clamp(30px, 3.5vw, 44px) - 9px); background: var(--cable-v);
}
.team .net-port { margin-bottom: 10px; }

/* Unos y ceros que recorren el cable al pasar por el logo del centro (los crea js/main.js) */
.school { position: relative; }
.net-bits { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.net-bits span {
  position: absolute; top: 0; left: 0; offset-rotate: 0deg; offset-anchor: 50% 50%;
  font: 800 12px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #B8F03C;
  text-shadow: 0 0 6px rgba(184, 240, 60, .9), 0 0 2px #04141A, 0 1px 0 #04141A;
}
/* Mientras transmite, los leds verdes del centro parpadean más deprisa */
.school.is-sending .net-led--link { animation-duration: .35s; }

.team-dot {
  display: grid; place-items: center; width: clamp(92px, 9vw, 116px); aspect-ratio: 1; padding: 10px; border-radius: 50%; overflow: hidden;
  font: 700 clamp(.74rem, .68rem + .25vw, .86rem)/1.2 var(--font-wide); color: #fff; text-wrap: balance; overflow-wrap: anywhere;
  --dot-bg: radial-gradient(circle at 35% 30%, #1A5866, #04141A 75%); background: var(--dot-bg);
  border: 3px solid #B8F03C;
  box-shadow: 0 14px 22px -12px rgba(0, 0, 0, .7);
}
.team--tbd .team-dot { border: 2px dashed rgba(58, 176, 255, .7); color: #A8C4BB; font-weight: 600; background: rgba(4, 20, 26, .7); }
/* Equipo con logo: el logo llena el círculo y el nombre va debajo */
/* --dot-bg siempre es un degradado: un color liso no puede ir debajo del láser como capa del fondo */
.team--logo .team-dot { padding: 0; --dot-bg: linear-gradient(#fff, #fff); background: var(--dot-bg); }
.team--logo .team-dot img { width: 100%; height: 100%; object-fit: cover; }
/* AGRONOVA tiene un logo horizontal: en el círculo se muestra solo su dibujo, ampliado y centrado */
.team--agronova .team-dot img { object-position: 0 50%; transform-origin: 41% 50%; transform: translateX(9%) scale(2.2); }
/* SQL GANG: logo ya circular; se amplía un poco para que no asomen las esquinas blancas */
.team--sqlgang .team-dot img { transform: scale(1.03); }
/* Who is JSON?: pegatina sobre fondo morado; se reduce un poco para que el círculo no corte las letras */
.team--whoisjson .team-dot { --dot-bg: linear-gradient(#4A1844, #4A1844); background: var(--dot-bg); }
.team--whoisjson .team-dot img { transform: scale(.9); }
/* Los Minions: el dibujo y el rótulo quedan algo altos en la imagen; se bajan un poco para centrarlos en el círculo */
.team--losminions .team-dot img { transform: translateY(4%); }
/* SQLito: logo apaisado entero dentro del círculo */
.team--sqlito .team-dot img { width: 90%; height: auto; object-fit: contain; }
.team-name { margin-top: 12px; max-width: 14ch; font: 700 clamp(.82rem, .74rem + .3vw, .95rem)/1.25 var(--font-wide); color: #fff; text-wrap: balance; }
.team-name--tbd { font: 500 .82rem/1.3 var(--font); color: #A8C4BB; }

/* Tarjeta identificativa del equipo: aparece encima del logo al pasar el ratón, con el foco o al tocarlo */
.has-card .team-dot { cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
/* Al pasar el ratón, el borde se convierte en el láser del botón EQUIPOS: un destello de neón que recorre el círculo */
.has-card:hover .team-dot, .has-card:focus-within .team-dot {
  transform: scale(1.06); border: 4px solid transparent;
  background:
    var(--dot-bg) padding-box,
    conic-gradient(from var(--laser),
      #124452 0 14%, #3AB0FF 24%, #fff 27%, #B8F03C 32%, #124452 42% 64%,
      #3AB0FF 74%, #fff 77%, #B8F03C 82%, #124452 92%) border-box;
  box-shadow: 0 0 18px rgba(58, 176, 255, .6), 0 0 40px rgba(58, 176, 255, .25), 0 14px 22px -12px rgba(0, 0, 0, .7);
  animation: laser-spin 1.6s linear infinite;
}
.has-card .team-dot:focus-visible { outline: 3px solid #3AB0FF; outline-offset: 4px; }
.team-card {
  position: absolute; z-index: 20; left: 50%; bottom: calc(100% - 14px);
  width: min(310px, calc(100vw - 32px)); padding: 0 18px 18px; text-align: left;
  color: #0D3B4C; background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 6px 6px 0 #B8F03C, 0 30px 50px -18px rgba(0, 0, 0, .8);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, 10px) rotate(-1.5deg);
  transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
}
/* En los extremos de la fila la tarjeta se ancla al borde para no salirse de la pantalla */
.team-row > .team:first-child:not(:last-child) .team-card { left: 0; transform: translate(0, 10px) rotate(-1.5deg); }
.team-row > .team:last-child:not(:first-child) .team-card { left: auto; right: 0; transform: translate(0, 10px) rotate(-1.5deg); }
.has-card:hover .team-card, .has-card:focus-within .team-card {
  opacity: 1; visibility: visible; transform: translate(-50%, 0) rotate(-1.5deg);
  transition: opacity .2s ease, transform .25s ease, visibility 0s;
}
.team-row > .has-card:first-child:not(:last-child):hover .team-card, .team-row > .has-card:first-child:not(:last-child):focus-within .team-card,
.team-row > .has-card:last-child:not(:first-child):hover .team-card, .team-row > .has-card:last-child:not(:first-child):focus-within .team-card { transform: translate(0, 0) rotate(-1.5deg); }

/* Cabecera de credencial con la ranura para la cinta */
.team-card-head {
  display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 -18px 16px; padding: 12px 18px 10px;
  font: 700 .72rem/1 var(--font-wide); letter-spacing: .06em; color: #B8F03C; background: #0D3B4C;
}
.team-card-slot { width: 46px; height: 8px; border-radius: 8px; background: #fff; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.team-card-logo { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 6px; margin-bottom: 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #DCE7E4; }
/* El logo se encaja en el panel sin estirarlo, sea apaisado o cuadrado */
.team-card-logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
/* Equipo sin logo: el panel muestra su nombre con el estilo de su círculo */
.team-card-logo--text {
  font: 800 1.7rem/1.1 var(--font-wide); letter-spacing: .04em; text-align: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #1A5866, #04141A 75%); box-shadow: inset 0 0 0 3px #B8F03C;
}
.team-card-name { margin: 0; text-align: center; font: 800 1.25rem/1.1 var(--font-wide); color: #0D3B4C; }
.team-card-school { margin: 4px 0 12px; text-align: center; font-size: .85rem; color: #4A6670; }
.team-card-count {
  display: flex; width: fit-content; align-items: center; gap: 6px; margin: 0 auto 12px; padding: 5px 12px 5px 9px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: #04141A; background: #B8F03C;
}
.team-card-count svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* Participantes en dos columnas centradas; si son impares, el último va centrado debajo */
.team-card-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 8px 22px; }
.team-card-members li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }
.team-card-members li { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .86rem; font-weight: 600; color: #0D3B4C; white-space: nowrap; }
.team-card-members span {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font: 800 .78rem/1 var(--font-wide); color: var(--m1-ink, #fff); background: var(--m1, #0B7A6E);
}
.team-card-members li:nth-child(even) span { color: var(--m2-ink, #fff); background: var(--m2, #2A8FD6); }
/* Colores de las iniciales sacados del logo de cada equipo: --m1 columna izquierda, --m2 derecha.
   En los colores claros la inicial va en oscuro (--m*-ink) para que se lea. */
#card-agronova       { --m1: #2B763D; --m2: #EE932E; }
#card-sqlito         { --m1: #1F80E8; --m2: #FEC813; --m2-ink: #04141A; }
#card-sqlgang        { --m1: #0A3955; --m2: #5090B3; }
#card-pythonmolinazea { --m1: #CC8CB7; --m1-ink: #371827; --m2: #FDD608; --m2-ink: #371827; }
#card-pokerde5       { --m1: #D0141C; --m2: #121318; }
#card-whoisjson      { --m1: #120F18; --m2: #7A4BE2; }
#card-losminions      { --m1: #FBD750; --m1-ink: #070606; --m2: #2E2E2E; }

@media (max-width: 760px) {
  .school-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .team-dot { width: clamp(88px, 26vw, 108px); }
}
@media (prefers-reduced-motion: reduce) {
  .net-led--link { animation: none; background: #B8F03C; }
  .team-card, .has-card .team-dot { transition: none; animation: none !important; }
  .school-sticker { transition: none; }
}

/* =========================================================
   Movimiento reducido
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .agro-art * { animation: none !important; }
  .road-line { animation: none !important; }
  .pulse, .spark, .node { opacity: 0; }
  .ambient { opacity: .04; }
  .hero-title > span, .hero-sub, .hero-cta { animation: none !important; }
  .hero-title > .ht-year { background-size: 100% 100%, auto; }
}
