/* =========================================================
   GEMINI ACADEMY UNSA · Hoja de estilos
   Identidad: sillar + tinta + bermellón agustino
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --sillar:       #E7E7E7;
  --paper:        #ffffff;
  --ink:          #051F43;
  --ink-raised:   #1b1e22;
  --line:         #e3dfd7;
  --line-dark:    rgba(243, 241, 236, .12);
  --muted:        #6c6862;
  --muted-dark:   rgba(243, 241, 236, .62);

  --accent:       #990537;  /* bermellón agustino (AA con texto blanco) */
  --accent-hover: #D90B4F;
  --accent-ink:   #a8361e;  /* para texto pequeño sobre fondos claros */
  --accent-light: #F40252;  /* para usar sobre tinta */
  --accent-soft:  #E6E9EC;

  /* Superficie de tarjetas: cambia según el fondo de la sección */
  --surface: var(--paper);

  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --font-body:    'Geist', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-md: 0 2px 4px rgba(17, 19, 22, .04), 0 12px 32px rgba(54, 40, 28, .08);
  --shadow-lg: 0 4px 10px rgba(17, 19, 22, .05), 0 28px 60px rgba(54, 40, 28, .14);

  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --z-nav:    40;
  --z-header: 50;
  --z-skip:   70;

  --container: 1240px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sillar);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p { text-wrap: pretty; }
strong { font-weight: 600; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
main:focus { outline: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: var(--z-skip);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .2s var(--ease-out);
}
.btn--sm { padding: 9px 16px; font-size: 14.5px; }
.btn--lg { padding: 16px 26px; font-size: 16.5px; }
.btn:active { transform: scale(.98); }

.btn__arrow {
  font-size: 20px;
  transition: transform .25s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }

.btn--outline-light {
  color: var(--sillar);
  border: 1px solid rgba(243, 241, 236, .28);
}
.btn--outline-light:hover {
  background: rgba(243, 241, 236, .08);
  border-color: rgba(243, 241, 236, .5);
}
.btn--outline-light:focus-visible { outline-color: var(--accent-light); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(243, 241, 236, .86);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
  transition: height .3s var(--ease-out);
}
.header.is-scrolled .header__inner { height: 64px; }
.header__logo-unsa { height: 50px; }
.header__logo-gemini { height: 45px; }

.header__menu { display: flex; gap: 2px; }
.header__link {
  display: inline-block;
  position: relative;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  transition: color .2s ease;
}
.header__link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.header__link:hover { color: var(--ink); }
.header__link[aria-current="true"] { color: var(--ink); }
.header__link[aria-current="true"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 16px; }
.header__burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  transition: background-color .2s ease;
}
.header__burger:hover { background: rgba(17, 19, 22, .06); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 104px 0 0;
  background: var(--ink);
  color: var(--sillar);
  overflow: hidden;
  isolation: isolate;
}
.hero__dots {
  position: absolute;
  inset: -56px;
  z-index: -1;
  background-image: radial-gradient(rgba(243, 241, 236, .16) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 80% at 75% 35%, #000 0%, transparent 75%);
          mask-image: radial-gradient(70% 80% at 75% 35%, #000 0%, transparent 75%);
  animation: dots-drift 40s linear infinite;
}
.hero::after {
  /* Brasa cálida, muy tenue, detrás de la tarjeta */
  content: '';
  position: absolute;
  z-index: -1;
  right: -10%;
  top: 10%;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(207, 67, 39, .16), transparent);
  pointer-events: none;
}
@keyframes dots-drift {
  to { transform: translate3d(28px, 28px, 0); }
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-dark);
  margin-bottom: 32px;
}
.hero__pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
}
.hero__pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-light);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: .6; }
  to   { transform: scale(3); opacity: 0; }
}

.hero__title {
  font-size: clamp(2.9rem, 6.4vw, 5.9rem);
  font-weight: 700;
  font-variation-settings: 'opsz' 96;
  line-height: .98;
  letter-spacing: -0.045em;
  margin-bottom: 32px;
}
.word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
.word > span {
  display: inline-block;
  transform: translateY(105%);
  animation: word-up .8s var(--ease-out) forwards;
}
.word:nth-child(1) > span { animation-delay: .05s; }
.word:nth-child(2) > span { animation-delay: .1s; }
.word:nth-child(3) > span { animation-delay: .15s; }
.word:nth-child(4) > span { animation-delay: .2s; }
.word:nth-child(5) > span { animation-delay: .25s; }
.word:nth-child(6) > span { animation-delay: .3s; }
.word:nth-child(7) > span { animation-delay: .35s; }
.word:nth-child(8) > span { animation-delay: .4s; }
.word--accent { color: var(--accent-light); }
@keyframes word-up { to { transform: none; } }

.hero__subtitle {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  max-width: 52ch;
  margin-bottom: 40px;
  color: var(--muted-dark);
  animation: fade-up .8s var(--ease-out) .45s backwards;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fade-up .8s var(--ease-out) .55s backwards;
}
.hero__aside { animation: fade-up 1s var(--ease-out) .5s backwards; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Tarjeta tipo prompt */
.prompt {
  background: var(--ink-raised);
  border: 1px solid rgba(243, 241, 236, .1);
  border-radius: var(--radius-md);
  box-shadow:
    inset 0 1px 0 rgba(243, 241, 236, .06),
    0 40px 80px rgba(0, 0, 0, .45);
  overflow: hidden;
  transition: transform .6s var(--ease-out);
  will-change: transform;
}
.prompt__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(243, 241, 236, .08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-dark);
}
.prompt__dots { display: inline-flex; gap: 6px; }
.prompt__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(243, 241, 236, .16);
}
.prompt__body { padding: 22px 24px 24px; }
.prompt__role {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted-dark);
  margin-bottom: 6px;
}
.prompt__role--ai { color: var(--accent-light); margin-top: 22px; }
.prompt__input {
  min-height: 3.2em;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--sillar);
}
.prompt__caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent-light);
  opacity: 0;
}
.prompt.is-typing .prompt__caret { opacity: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.prompt__out { display: grid; gap: 2px; }
.prompt__out li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: rgba(243, 241, 236, .04);
  font-size: .93rem;
  color: rgba(243, 241, 236, .86);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.prompt__w {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--accent-light);
  font-variant-numeric: tabular-nums;
}
.prompt__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(243, 241, 236, .14);
  font-size: .85rem;
  color: var(--muted-dark);
  transition: opacity .5s var(--ease-out);
}
.prompt__chip .material-symbols-rounded { font-size: 18px; }

/* Mientras se escribe, la respuesta espera */
.prompt.is-typing .prompt__out li,
.prompt.is-typing .prompt__chip { opacity: 0; transform: translateY(6px); }
.prompt__out li:nth-child(2) { transition-delay: .08s; }
.prompt__out li:nth-child(3) { transition-delay: .16s; }
.prompt__out li:nth-child(4) { transition-delay: .24s; }
.prompt__chip { transition-delay: .36s; }

/* Franja de datos */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 96px;
  border-top: 1px solid var(--line-dark);
}
.hero__facts div {
  padding: 24px 24px 32px 0;
}
.hero__facts div + div { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.hero__facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-dark);
  margin-bottom: 6px;
}
.hero__facts dd { font-weight: 500; font-size: .98rem; }

/* ---------- Secciones ---------- */
.section { padding: 128px 0 144px; }
.section--paper { --surface: var(--sillar); background: var(--paper); }

.section__header {
  max-width: 640px;
  margin-bottom: 64px;
}
.section__header--wide { max-width: 820px; }
.section__header--right { margin-left: auto; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow span {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--accent-ink);
}
.eyebrow span::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: currentColor;
}

.section__title {
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.section__title em { font-style: normal; color: var(--accent); }
.section__lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 60ch;
}
.section__lead strong { color: var(--ink); }

.subsection__title {
  font-size: 1.5rem;
  margin: 104px 0 32px;
}

.section__cta { margin-top: 64px; }
.section__cta--right { display: flex; justify-content: flex-end; }

/* ---------- Split (programa / FAQ) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 96px;
  align-items: start;
}
.split .section__header { margin-bottom: 0; position: sticky; top: 120px; }
.split--faq { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }

.value-list { counter-reset: value; }
.value-list__item {
  counter-increment: value;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 4px 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.value-list__item:last-child { border-bottom: 1px solid var(--line); }
.value-list__item::before {
  content: counter(value, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: .9;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.value-list__title { font-size: 1.6rem; }
.value-list__text { color: var(--muted); max-width: 44ch; }

/* ---------- Rutas ---------- */
.routes {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}
.route {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 40px;
  border-radius: var(--radius-lg);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s ease;
}
.route:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.route--docente { background: var(--ink); color: var(--sillar); }
.route--estudiante {
  margin-top: 64px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.route--estudiante:hover { border-color: var(--accent); }

.route__tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(243, 241, 236, .08);
  color: var(--muted-dark);
}
.route--estudiante .route__tag { background: var(--accent-soft); color: var(--accent-ink); }

.route__stat {
  margin: 40px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 8rem);
  font-weight: 700;
  line-height: .85;
  letter-spacing: -0.06em;
  color: var(--accent-light);
}
.route--estudiante .route__stat { color: var(--accent); }
.route__stat small { font-size: .4em; letter-spacing: 0; margin-left: 4px; }

.route__title { font-size: 1.9rem; margin: 16px 0 20px; }
.route__list { display: grid; gap: 10px; margin-bottom: 40px; }
.route__list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted-dark);
}
.route--estudiante .route__list li { color: var(--muted); }
.route__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--accent-light);
}
.route--estudiante .route__list li::before { color: var(--accent); }

.route__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.route__cta .material-symbols-rounded { transition: transform .3s var(--ease-out); }
.route:hover .route__cta .material-symbols-rounded { transform: translateX(4px); }
.route--docente:focus-visible { outline-color: var(--accent-light); }

/* ---------- Antes / Con Gemini ---------- */
.contrast {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
  align-items: center;
}
.contrast--mirror { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.contrast--mirror .contrast__before { order: 2; }

.contrast__before {
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px dashed #cbc5ba;
}
.contrast__after {
  padding: 48px 44px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--sillar);
}
.contrast__label {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 8px;
}
.contrast__after .contrast__label { color: var(--accent-light); }
.contrast__heading { font-size: 1.3rem; margin-bottom: 20px; }
.contrast__list { display: grid; gap: 12px; }
.contrast__list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}
.contrast__list li::before {
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
}
.contrast__before .contrast__list li::before { content: '×'; color: var(--muted); }
.contrast__after .contrast__list li { color: var(--muted-dark); }
.contrast__after .contrast__list li::before { content: '→'; color: var(--accent-light); }
.contrast__after strong { color: var(--sillar); }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s ease;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(207, 67, 39, .45);
}
.tile--lg { grid-row: span 2; }
.tile--wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.tile__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 24px;
  margin-bottom: 28px;
}
.tile--wide .tile__icon { margin-bottom: 0; }
.tile__title { font-size: 1.25rem; margin-bottom: 8px; }
.tile--lg .tile__title { font-size: 1.8rem; }
.tile__text { color: var(--muted); font-size: .97rem; }

.parts {
  margin-top: auto;
  padding-top: 40px;
  display: grid;
  gap: 2px;
}
.parts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--muted);
}
.parts b {
  width: 44px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

/* ---------- Stepper ---------- */
.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.stepper::before,
.stepper::after {
  content: '';
  position: absolute;
  left: 0;
  right: calc((100% - 96px) / 5 - 13px);
  top: 6px;
  height: 1px;
  background: var(--line);
}
.stepper::after {
  height: 2px;
  top: 5.5px;
  background: var(--accent);
  transform: scaleX(var(--progress, 1));
  transform-origin: left;
  transition: transform 1.1s var(--ease-out);
}
.stepper.is-pending { --progress: 0; }

.step { position: relative; padding-top: 36px; }
.step::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--sillar);
  border: 2px solid var(--accent);
  z-index: 1;
}
.step__date {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.step__text { font-weight: 500; line-height: 1.45; }
.step--goal::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.step--goal .step__text { color: var(--accent-ink); }

/* ---------- Meta (turnos / entregable) ---------- */
.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.meta dt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.meta dd { font-weight: 500; max-width: 44ch; }

/* ---------- Herramientas (estudiantes) ---------- */
.tool-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
}
.tool {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 2px 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.tool__icon {
  grid-row: span 2;
  font-size: 28px;
  color: var(--accent);
  transition: transform .3s var(--ease-out);
}
.tool:hover .tool__icon { transform: translateY(-2px); }
.tool__title { font-size: 1.25rem; }
.tool__text { color: var(--muted); }

/* ---------- Fases ---------- */
.phases {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px;
}
.phase {
  padding: 36px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.phase--onsite { background: var(--ink); border-color: var(--ink); color: var(--sillar); }
.phase__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  margin-bottom: 20px;
}
.phase--onsite .phase__label { color: var(--accent-light); }
.phase__list { display: grid; gap: 12px; }
.phase__list li { position: relative; padding-left: 22px; color: var(--muted); }
.phase--onsite .phase__list li { color: var(--muted-dark); }
.phase__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--accent);
}
.phase--onsite .phase__list li::before { color: var(--accent-light); }

/* ---------- Banda oscura (comunidad) ---------- */
.band { background: var(--ink); color: var(--sillar); }
.band .eyebrow { color: var(--muted-dark); }
.band .eyebrow span { color: var(--accent-light); }
.band :focus-visible { outline-color: var(--accent-light); }

.statements { counter-reset: stmt; }
.statement {
  counter-increment: stmt;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: baseline;
  padding: 40px 0;
  border-top: 1px solid var(--line-dark);
}
.statement:nth-child(2) { margin-left: 6%; }
.statement:nth-child(3) { margin-left: 12%; }
.statement::before {
  content: counter(stmt, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-light);
}
.statement__title {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.statement__text { color: var(--muted-dark); max-width: 46ch; }
.statement__text strong { color: var(--sillar); }

/* ---------- Agenda / tabs ---------- */
.agenda-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.agenda-head .section__header { margin-bottom: 0; }

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  color: var(--muted);
  transition: color .2s ease, background-color .2s ease;
}
.tab:hover { color: var(--ink); }
.tab--active, .tab--active:hover { background: var(--ink); color: var(--sillar); }

.tab-panel { display: none; }
.tab-panel--active { display: block; animation: fade-up .5s var(--ease-out); }

.agenda {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px;
  align-items: start;
}
.agenda__day {
  font-family: var(--font-display);
  font-size: clamp(7rem, 15vw, 12rem);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -0.06em;
  color: var(--accent);
}
.agenda__day span {
  display: block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}
.agenda__item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.agenda__item:last-child { border-bottom: 1px solid var(--line); }
.agenda__time {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--accent-ink);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.agenda__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.agenda__item p { color: var(--muted); }

.facilitators { margin-top: 48px; color: var(--muted); font-size: .95rem; }
.facilitators strong { color: var(--ink); }

/* ---------- Escalera de certificación ---------- */
.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.rung {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.rung:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rung--mid { min-height: 360px; border-top: 3px solid var(--accent); }
.rung--top {
  min-height: 420px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.rung__level {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.rung--top .rung__level { color: rgba(255, 255, 255, .78); }
.rung__tag {
  align-self: flex-start;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: .82rem;
  font-weight: 500;
}
.rung--top .rung__tag { background: rgba(255, 255, 255, .14); border-color: transparent; }
.rung__title {
  margin-top: auto;
  padding-top: 32px;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}
.rung__text { margin-top: 8px; color: var(--muted); }
.rung--top .rung__text { color: rgba(255, 255, 255, .85); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer;
  padding: 24px 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color .2s ease;
}
.faq__item summary:hover { color: var(--accent-ink); }
.faq__item summary::after {
  content: 'add';
  font-family: 'Material Symbols Rounded';
  font-size: 22px;
  color: var(--muted);
  transition: transform .3s var(--ease-out), color .2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item p {
  padding: 0 48px 26px 4px;
  color: var(--muted);
  max-width: 62ch;
}
.faq__item p strong { color: var(--ink); }
.faq__item[open] p { animation: fade-up .35s var(--ease-out); }

/* ---------- Registro ---------- */
.register {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 72px;
  align-items: start;
}
.register__intro { position: sticky; top: 120px; }
.register .section__header { margin-bottom: 40px; }

.checklist { display: grid; gap: 4px; margin-bottom: 32px; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist .material-symbols-rounded { color: var(--accent); font-size: 22px; }

.form-wrapper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.form-wrapper iframe { display: block; width: 100%; }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .9rem;
  color: var(--muted);
}
.privacy-note .material-symbols-rounded {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 2px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--muted-dark);
  padding: 96px 0 36px;
  overflow: hidden;
}
.footer__wordmark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 7.4rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -0.05em;
  color: rgba(243, 241, 236, .09);
  margin-bottom: 72px;
  white-space: nowrap;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px 48px;
  align-items: end;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.footer__logo { height: 36px; filter: brightness(0) invert(1); opacity: .85; }
.footer__text { font-size: .92rem; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a {
  font-size: .92rem;
  transition: color .2s ease;
}
.footer__links a:hover { color: var(--accent-light); }
.footer :focus-visible { outline-color: var(--accent-light); }
.footer__copy {
  grid-column: 1 / -1;
  font-size: .82rem;
  color: rgba(243, 241, 236, .42);
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity .6s var(--ease-out) var(--reveal-delay, 0ms),
    transform .6s var(--ease-out) var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .hero__dots, .hero__pulse::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .header__link { padding: 8px 10px; }
  .header__link::after { left: 10px; right: 10px; }
  .hero__inner { grid-template-columns: 1fr; gap: 56px; }
  .hero__aside { max-width: 560px; }
  .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 72px; }
  .hero__facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__facts div:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .section { padding: 104px 0 120px; }
  .split, .split--faq, .register { grid-template-columns: 1fr; gap: 48px; }
  .split .section__header, .register__intro { position: static; }
  .stepper { grid-template-columns: 1fr; gap: 0; padding-left: 36px; }
  .stepper::before, .stepper::after { display: none; }
  .step { padding: 0 0 32px; }
  .step:last-child { padding-bottom: 0; }
  /* En vertical, un segmento por paso para que la línea termine en el último nodo */
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -30.5px;
    top: 17px;
    bottom: -4px;
    width: 2px;
    background: var(--accent);
    transform: scaleY(var(--progress, 1));
    transform-origin: top;
    transition: transform .35s var(--ease-out);
  }
  .step:nth-child(2)::after { transition-delay: .3s; }
  .step:nth-child(3)::after { transition-delay: .6s; }
  .step:nth-child(4)::after { transition-delay: .9s; }
  .step::before { left: -36px; top: 4px; }
  .agenda { grid-template-columns: 1fr; gap: 24px; }
  .agenda__day { display: flex; align-items: baseline; gap: 20px; font-size: 6rem; }
  .agenda__day span { margin-top: 0; }
}

@media (max-width: 860px) {
  .routes, .contrast, .contrast--mirror, .phases, .meta, .tool-list { grid-template-columns: 1fr; }
  .contrast--mirror .contrast__before { order: 0; }
  .route--estudiante { margin-top: 0; }
  .route { min-height: 0; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--lg { grid-column: span 2; grid-row: auto; }
  .ladder { grid-template-columns: 1fr; }
  .rung, .rung--mid, .rung--top { min-height: 0; }
  .statement { grid-template-columns: 40px 1fr; }
  .statement:nth-child(n) { margin-left: 0; }
  .statement__text { grid-column: 2; }
  .section__cta--right { justify-content: flex-start; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }

  .header__inner, .header.is-scrolled .header__inner { height: 64px; }
  .header__logo-unsa { height: 36px; }
  .header__logo-gemini { display: none; }
  .header__nav {
    position: fixed;
    inset: 64px 0 auto 0;
    z-index: var(--z-nav);
    background: var(--sillar);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .3s var(--ease-out), opacity .2s ease, visibility 0s linear .3s;
  }
  .header__nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: transform .3s var(--ease-out), opacity .2s ease, visibility 0s;
  }
  .header__menu { flex-direction: column; padding: 12px 8px 20px; gap: 0; }
  .header__link { display: block; padding: 14px 12px; font-size: 17px; }
  .header__link::after { display: none; }
  .header__link[aria-current="true"] { color: var(--accent-ink); }
  .header__burger { display: inline-grid; place-items: center; }
  .header__actions .btn { display: none; }

  .hero { padding-top: 64px; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { justify-content: center; }
  .hero__facts { grid-template-columns: 1fr; margin-top: 56px; }
  .hero__facts div, .hero__facts div + div { padding: 16px 0; border-left: 0; }
  .hero__facts div + div { border-top: 1px solid var(--line-dark); }

  .section { padding: 80px 0 96px; }
  .section__header { margin-bottom: 48px; }
  .subsection__title { margin-top: 72px; }
  .section__cta .btn { width: 100%; justify-content: center; }

  .value-list__item { grid-template-columns: 72px 1fr; padding: 32px 0; }
  .value-list__item::before { font-size: 2.6rem; }

  .route { padding: 32px 24px; }
  .contrast__after { padding: 32px 24px; }
  .bento { grid-template-columns: 1fr; }
  .tile--lg, .tile--wide { grid-column: auto; }
  .tile--wide { flex-direction: column; align-items: flex-start; }
  .tile--wide .tile__icon { margin-bottom: 4px; }

  .tabs { width: 100%; }
  .tab { flex: 1; padding: 10px 8px; font-size: 14px; }
  .agenda__item { grid-template-columns: 1fr; gap: 6px; }

  .form-wrapper iframe { height: 1800px; }

  .footer { padding: 72px 0 28px; }
  .footer__wordmark { white-space: normal; margin-bottom: 48px; }
  .footer__inner { grid-template-columns: 1fr; }
}
