/* Ruta de Profesionalización — Propuesta web */

:root {
  --blue: #0a4596;
  --blue-deep: #061f47;
  --blue-ink: #0b2a5b;
  --river: #3b95d4;
  --green: #087040;
  --yellow: #f8b400;
  --gold: #c08a00;
  --red: #d63a1c;
  --cream: #f6efe0;
  --paper: #fffaf0;

  --bg: var(--cream);
  --ink: var(--blue-ink);
  --muted: rgba(11, 42, 91, .72);
  --line: rgba(11, 42, 91, .16);

  --f-display: "Fraunces", Georgia, serif;
  --f-sans: "Outfit", system-ui, sans-serif;

  --gutter: clamp(18px, 4vw, 56px);
  --wrap: 1140px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
  transition: background-color .8s var(--ease), color .8s var(--ease);
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--blue-deep); }

/* Cada sección define su propio color de texto; el fondo del body la acompaña. */
[data-theme="dark"] { --bg: var(--blue-deep); --ink: var(--cream); --muted: rgba(246, 239, 224, .78); --line: rgba(246, 239, 224, .2); }
[data-theme="yellow"] { --bg: var(--yellow); --ink: var(--blue-deep); --muted: rgba(6, 31, 71, .8); --line: rgba(6, 31, 71, .25); }
[data-theme="cream"] { --bg: var(--cream); --ink: var(--blue-ink); --muted: rgba(11, 42, 91, .72); --line: rgba(11, 42, 91, .16); }
main > section[data-theme] { color: var(--ink); background: var(--bg); }

/* ---------------- Intro: logo original por capas ---------------- */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.intro__panel { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--cream); }
.intro__panel--top { top: 0; }
.intro__panel--bot { bottom: 0; }
.intro__stage { position: relative; width: min(56vw, 300px); aspect-ratio: 590 / 535; }
.intro__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro__skip {
  position: absolute; right: var(--gutter); bottom: 26px;
  font: 500 15px/1 var(--f-sans);
  background: none; border: 1px solid rgba(10, 69, 150, .3); color: var(--blue);
  padding: 10px 16px; border-radius: 99px; cursor: pointer;
}
.intro__ripple { position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--red); opacity: 0; }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  background: rgba(246, 239, 224, .82);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(11, 42, 91, .08);
}
.nav__logo img { height: 54px; width: auto; }
@media (max-width: 640px) { .nav__logo img { height: 44px; } }
.nav__links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__links { gap: 26px; }
.nav__links a {
  position: relative; text-decoration: none; font-size: 16px; font-weight: 500; color: var(--blue-ink); padding: 6px 0;
}
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--river); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.progress {
  position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 90;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--green), var(--river), var(--yellow), var(--red));
}
@media (max-width: 900px) { .nav__links { display: none; } }

/* ---------------- La ruta global ---------------- */
main { position: relative; }
.route { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.route__casing { fill: none; stroke: var(--paper); stroke-linecap: round; stroke-linejoin: round; }
.route__line { fill: none; stroke: var(--river); stroke-linecap: round; stroke-linejoin: round; }


/* ---------------- Base ---------------- */
.section { position: relative; z-index: 2; overflow-x: clip; padding: clamp(100px, 15vh, 170px) var(--gutter); }
.wrap { max-width: var(--wrap); margin: 0 auto; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  opacity: .85; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.h-xl, .h-lg { font-family: var(--f-display); font-weight: 500; letter-spacing: -.015em; margin: 0; }
.h-xl { font-size: clamp(40px, 6.2vw, 84px); line-height: 1.08; }
.h-lg { font-size: clamp(36px, 5vw, 68px); line-height: 1.08; }
.h-xl em, .h-lg em { font-style: italic; color: var(--blue); }
main > section[data-theme="dark"] .h-lg em { color: var(--yellow); }
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--muted); max-width: 36ch; margin: 26px 0 0; }
.rv { opacity: 0; transform: translateY(36px); }

/* ---------------- Hero ---------------- */
.hero { min-height: 92svh; display: flex; align-items: center; padding-top: 120px; padding-bottom: 40px; overflow: hidden; }
.hero .wrap { width: 100%; }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 50px; align-items: center; }
.hero__title { margin-top: 26px; max-width: 15ch; }
.hero__title .w { display: inline-block; }
.chip { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; color: var(--muted); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.hero__art { position: relative; aspect-ratio: 590 / 535; }
.hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__topo { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .hero__art { width: min(64%, 340px); margin: 0 auto; }
}

/* ---------------- Cómo funciona: estaciones sobre el río ---------------- */
.how { position: relative; z-index: 5; padding: 0; overflow: hidden; background: var(--bg); }
.how__pin { height: 100svh; display: flex; flex-direction: column; justify-content: flex-start; position: relative; padding-top: clamp(96px, 13vh, 130px); }
.how__head {
  position: relative; width: calc(100% - 2 * var(--gutter)); max-width: var(--wrap); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: end; gap: 24px; z-index: 3;
}
.how__count { font-size: 20px; font-weight: 500; color: var(--muted); }
.how__count b { font-family: var(--f-display); font-weight: 500; font-size: 46px; color: var(--red); }
.how__track {
  display: flex; align-items: flex-start; width: max-content; position: relative;
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  padding-right: 34vw; margin-top: 56px; min-height: 380px;
}
.how__vriver { display: none; }
.how__river { position: absolute; left: 0; top: 0; height: 100%; overflow: visible; z-index: 0; }
.station { position: relative; z-index: 1; width: min(76vw, 380px); margin-right: clamp(60px, 9vw, 150px); }
.station:nth-of-type(even) { margin-top: 96px; }
.station__dot {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff; font-family: var(--f-display); font-size: 36px; font-weight: 500;
  border: 6px solid var(--paper); box-shadow: 0 10px 30px -12px rgba(6, 31, 71, .5);
}
.station__text { margin-top: 22px; transition: opacity .5s var(--ease); }
@media (min-width: 0px) {
  .station .station__dot { transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
  .station .station__text { opacity: .25; }
  .station:first-of-type .station__text { opacity: 1; }
  .station.is-on .station__dot { transform: scale(1); }
  .station.is-on .station__text { opacity: 1; }
}
.station h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; margin: 0 0 10px; }
.station p { margin: 0; font-size: 19px; color: var(--muted); max-width: 32ch; }
@media (max-width: 760px) {
  .how__pin { height: auto; padding: 110px 0 60px; }
  .how__head { display: block; width: auto; padding: 0 var(--gutter); }
  .how__count { display: none; }
  .how__track { flex-direction: column; width: auto; min-height: 0; padding: 0 var(--gutter); margin-top: 40px; gap: 34px; }
  .how__vriver { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; pointer-events: none; }
  .how__river { display: none; }
  .station { width: auto; margin: 0 !important; display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start; }
  .station__dot { width: 76px; height: 76px; font-size: 30px; }
  .station__text { margin-top: 6px; }
}

/* ---------------- Plataforma ---------------- */
#plataforma { padding-top: clamp(200px, 24vh, 240px); }
.profiles {
  position: sticky; top: 78px; z-index: 5;
  margin: 28px calc(-1 * var(--gutter)) 0; padding: 14px var(--gutter) 12px;
  background: rgba(6, 31, 71, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.profiles__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; font-family: var(--f-display); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; }
.profiles__lead { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-sans); font-size: 17px; font-weight: 500; color: var(--muted); align-self: center; }
.hint-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); animation: hint 1.8s infinite; }
@keyframes hint { 0% { box-shadow: 0 0 0 0 rgba(248, 180, 0, .6); } 80%, 100% { box-shadow: 0 0 0 12px rgba(248, 180, 0, 0); } }
.profile {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: rgba(246, 239, 224, .45); transition: color .35s;
}
.profile:hover { color: rgba(246, 239, 224, .85); }
.profile.is-active { color: var(--yellow); }
.profile:focus-visible { outline: 2px solid var(--yellow); outline-offset: 6px; border-radius: 4px; }
.profile .short { display: none; }
.profiles__desc { margin: 8px 0 0; font-size: 17px; color: var(--muted); }

.app {
  margin-top: 14px; border-radius: 24px; overflow: hidden;
  background: var(--paper); color: var(--blue-ink);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6);
}
.app__top { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid rgba(11, 42, 91, .1); }
.app__top img { height: 30px; width: auto; }
.app__url { font-size: 15px; color: rgba(11, 42, 91, .55); }
.app__who { margin-left: auto; font-size: 15px; font-weight: 600; }
.app__body { padding: 26px 28px 30px; }
.app__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.app__head h4 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: 30px; line-height: 1.12; }
.app__head p { margin: 6px 0 0; font-size: 16px; color: rgba(11, 42, 91, .65); }
.app__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--green); }
.sync i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.app__btn { border: 0; cursor: pointer; font: 600 15px var(--f-sans); padding: 11px 16px; border-radius: 12px; background: var(--blue); color: #fff; }
.app__ro { font-size: 15px; font-weight: 600; color: #8a6100; }
.app [data-only] { display: none; }
.app[data-role="normal"] [data-only~="normal"],
.app[data-role="empresa"] [data-only~="empresa"],
.app[data-role="cecar"] [data-only~="cecar"] { display: inline-flex; }

/* El mapa de la ruta: estaciones con su conteo */
.map { position: relative; margin: 34px 0 6px; }
.map__river { position: absolute; left: 0; right: 0; top: 58px; width: 100%; height: 40px; }
.map__stops { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.map__stop { position: relative; text-align: center; }
.map__stop b { display: block; font-family: var(--f-display); font-weight: 500; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; color: var(--blue); }
.map__stop span { display: block; margin-top: 54px; font-size: 16px; font-weight: 500; }
.map__stop::after {
  content: ""; position: absolute; left: 50%; top: 64px; width: 26px; height: 26px; margin-left: -13px;
  border-radius: 50%; background: var(--paper); border: 5px solid var(--river);
}
.map__stop.is-goal::after { border-color: var(--green); background: var(--green); }
.map__stop.is-goal b { color: var(--green); }

/* Cada estudiante con su mini ruta */
.trips { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid rgba(11, 42, 91, .1); }
.trip { display: grid; grid-template-columns: 1.1fr 1.5fr 120px; gap: 20px; align-items: center; padding: 14px 4px; border-bottom: 1px solid rgba(11, 42, 91, .08); }
.trip__who b { display: block; font-size: 17px; }
.trip__who span { font-size: 15px; color: rgba(11, 42, 91, .6); }
.trip__route { position: relative; height: 36px; margin: 0 14px; }
.trip__route::before { content: ""; position: absolute; left: 0; right: 0; top: 60%; height: 4px; margin-top: -2px; border-radius: 4px; background: rgba(11, 42, 91, .12); }
.trip__fill { position: absolute; left: 0; top: 60%; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--river); transition: width .9s var(--ease); }
.trip__node { position: absolute; top: 60%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--paper); border: 3px solid rgba(11, 42, 91, .2); transition: border-color .5s, background .5s; }
.trip__node.is-on { border-color: var(--river); background: var(--river); }
.trip__node.is-goal.is-on { border-color: var(--green); background: var(--green); }
.trip__pin { position: absolute; top: -6px; width: 18px; height: auto; margin-left: -9px; transition: left .9s var(--ease); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.trip__state { font-size: 15px; font-weight: 600; text-align: right; color: rgba(11, 42, 91, .7); }
.trip__state.s-mat { color: var(--green); }
.trip.flash { animation: flash 2s ease; }
@keyframes flash { 0% { background: rgba(248, 180, 0, .35); } 100% { background: transparent; } }
.platform__note { margin-top: 18px; font-size: 16px; color: var(--muted); text-align: center; }

@media (max-width: 640px) {
  .profiles { top: 68px; padding-top: 12px; }
  .profiles__line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 0; font-family: var(--f-sans); font-size: 18px; font-weight: 600; text-align: center; }
  .profiles__lead { grid-column: 1 / -1; justify-content: flex-start; font-size: 15px; margin-bottom: 6px; }
  .profile { padding: 10px 4px; border-radius: 0; }
  .profile + .profile { border-left: 1px solid rgba(246, 239, 224, .18); }
  .profile .full { display: none; }
  .profile .short { display: inline; }
  .profiles__desc { font-size: 15px; }
  .app__body { padding: 20px 16px 22px; }
  .app__url { display: none; }
  .app__head h4 { font-size: 24px; }
  .map__stop span { font-size: 13px; }
  .trip { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .trip__route { grid-column: 1 / -1; grid-row: 2; margin: 4px 10px 0; }
  .trip__state { grid-row: 1; grid-column: 2; }
}

/* ---------------- Garantías ---------------- */
.checks { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 0 56px; border-top: 2px solid var(--blue-ink); }
.check { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.check b { font-family: var(--f-display); font-weight: 500; font-size: 32px; color: var(--red); }
.check p { margin: 0; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.4; }
@media (max-width: 800px) { .checks { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; } }

/* ---------------- Implementación ---------------- */
.phases { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 64px; }
.phases__line { position: absolute; left: 34px; right: 12%; top: 34px; height: 4px; border-radius: 4px; background: rgba(6, 31, 71, .18); }
.phases__line i { position: absolute; inset: 0; background: var(--blue-deep); transform-origin: 0 50%; transform: scaleX(0); border-radius: 4px; }
.phase { position: relative; }
.phase__dot {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 28px; font-weight: 500;
  background: var(--yellow); color: var(--blue-deep); border: 3px solid var(--blue-deep);
  position: relative; z-index: 1; transition: background .4s, color .4s;
}
.phase.is-on .phase__dot { background: var(--blue-deep); color: var(--yellow); }
.phase h3 { margin: 22px 0 8px; font-family: var(--f-display); font-weight: 500; font-size: 30px; line-height: 1.12; }
.phase p { margin: 0; font-size: 18px; color: var(--muted); }
.needs { margin-top: 72px; padding-top: 28px; border-top: 2px solid var(--blue-deep); display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.needs h3 { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: 30px; line-height: 1.15; }
.needs ul { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 20px; }
.needs li::marker { color: var(--red); }
@media (max-width: 860px) {
  .phases { grid-template-columns: 1fr; gap: 28px; }
  .phases__line { left: 32px; right: auto; top: 34px; bottom: 34px; width: 4px; height: auto; }
  .phases__line i { transform-origin: 50% 0; transform: scaleY(0); }
  .phase { display: grid; grid-template-columns: 68px 1fr; column-gap: 20px; }
  .phase h3 { margin: 6px 0 4px; grid-column: 2; }
  .phase p { grid-column: 2; }
  .phase__dot { grid-row: span 2; }
  .needs { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------------- Cierre ---------------- */
.end { display: grid; place-items: center; text-align: center; padding-top: clamp(150px, 22vh, 220px); padding-bottom: clamp(70px, 10vh, 110px); }
/* el cierre va por encima del río: el pin tapa el final del camino */
main > section#fin { z-index: 4; background: transparent; }
.end__pin { position: relative; }
.end__pin { width: 64px; height: auto; margin: 0 auto 26px; }
.end__logo { width: min(80%, 420px); margin: 0 auto; }
.end__meta { margin-top: 24px; font-size: 18px; font-weight: 500; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  .intro { display: none; }
}
@media (max-width: 760px) { #plataforma { padding-top: 100px; } }

/* Celular: el resumen va solo con números y etiquetas (sin río ni círculos) */
@media (max-width: 640px) {
  .map__river { display: none; }
  .map__stop::after { display: none; }
  .map__stop span { margin-top: 6px; font-size: 13px; color: rgba(11, 42, 91, .7); }
  .map { margin: 24px 0 4px; }
}
