/* ==========================================================
   Aula17 · Landing nivelación gratuita PUCP 2027
   Tema: 4A "Cuaderno + ámbar"
   Todos los colores y fuentes salen de los tokens de :root.
   Para cambiar de paleta solo se reemplaza este bloque.
   ========================================================== */
:root {
  /* --- TOKENS DE TEMA (inicio) --- */
  --paper: #FFFFFF;
  --bg-image: linear-gradient(#E6EBF2 1px, transparent 1px), linear-gradient(90deg, #E6EBF2 1px, transparent 1px);
  --bg-size: 24px 24px;
  --surface: #FFFFFF;
  --surface-2: #F6F8FB;
  --ink: #1A2238;
  --ink-2: #384057;
  --muted: #5A6275;
  --line: #1A2238;
  --line-soft: #D5DBE5;
  --cta: #FFB31A;
  --cta-hover: #F0A000;
  --cta-ink: #1A2238;
  --mark: #FFE3A3;
  --accent: #1F7A74;
  --accent-soft: #DDF1EE;
  --card-border: #1A2238;
  --trust-bg: #1A2238;
  --trust-fg: #FFFFFF;
  --hero-bg: transparent;
  --hero-fg: #1A2238;
  --hero-muted: #384057;
  --hero-eyebrow: #1F7A74;
  --hero-mark: linear-gradient(transparent 58%, #FFE3A3 58%);
  --hero-link: #1A2238;
  --logo-17-bg: #FFB31A;
  --logo-17-fg: #1A2238;
  --radius: 8px;
  --border-w: 1.5px;
  --f-display: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.02em;
  /* --- TOKENS DE TEMA (fin) --- */

  --danger: #B42318;
  --ok: #1F7A74;
  --maxw: 1240px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--bg-image);
  background-size: var(--bg-size);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
}

[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); }
h3 { font-size: 1.2rem; line-height: 1.25; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.mark { background: var(--hero-mark); padding: 0 0.08em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  border-radius: var(--radius);
  font-family: var(--f-body); font-weight: 700; font-size: 1.06rem;
  text-decoration: none; cursor: pointer; border: 0;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-cta { background: var(--cta); color: var(--cta-ink); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn-cta:hover { background: var(--cta-hover); color: var(--cta-ink); transform: translateY(-1px); }
.btn-outline { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-outline:hover { background: var(--surface-2); color: var(--ink); }
.btn-block { width: 100%; }
.link-quiet { color: var(--hero-link); font-weight: 600; font-size: 0.98rem; text-underline-offset: 3px; }
.link-quiet:hover { color: var(--accent); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: var(--border-w) solid var(--line-soft);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo span { background: var(--logo-17-bg); color: var(--logo-17-fg); padding: 0 5px; margin-left: 2px; border-radius: 3px; }
.header-cta { min-height: 44px; padding: 10px 16px; font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-fg); padding-block: 44px 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } .hero { padding-block: 72px 84px; } }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero .eyebrow { color: var(--hero-eyebrow); }
.hero .lead { color: var(--hero-muted); }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.bonus {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.98rem; color: var(--hero-muted);
}
.bonus strong { color: var(--hero-fg); }
.bonus-icon {
  flex: 0 0 auto; width: 34px; height: 42px; border-radius: 4px;
  background: var(--surface); border: 2px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 0.6rem; color: var(--ink);
}

/* Portada del PDF dibujada con CSS */
.pdf-card {
  justify-self: center; width: min(340px, 100%);
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: 10px;
  box-shadow: 10px 10px 0 var(--mark);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 14px;
  transform: rotate(-2deg);
}
.pdf-card .tag { align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 99px; }
.pdf-card h3 { font-size: 1.5rem; }
.pdf-card .formula { font-family: 'Cambria Math', 'Times New Roman', serif; font-size: 1.25rem; color: var(--ink-2); border-top: 1.5px dashed var(--line-soft); border-bottom: 1.5px dashed var(--line-soft); padding: 10px 0; text-align: center; }
.pdf-card .meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }

/* ---------- Franja de confianza ---------- */
.trust { background: var(--trust-bg); color: var(--trust-fg); }
.trust ul { list-style: none; margin: 0 auto; padding-block: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; font-weight: 700; font-size: 0.98rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--cta); }

/* ---------- Secciones ---------- */
.section { padding-block: 64px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; max-width: 760px; }
.band { background: var(--surface); border-block: var(--border-w) solid var(--line-soft); }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: var(--surface); border: var(--border-w) solid var(--card-border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.card p { color: var(--ink-2); }
.card .kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: var(--ink-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}
.checklist li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.35em + 3px); width: 5px; height: 9px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.note { margin-top: 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--mark); color: var(--ink); font-weight: 600; }

/* ---------- Testimonios en video ---------- */
.reels { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .reels { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 480px) { .play-btn::before { width: 54px; height: 54px; margin: -27px 0 0 -27px; } .reel-card figcaption span { font-size: .85rem; } }
.reel-card { margin: 0; display: grid; gap: 12px; min-width: 0; align-content: start; }
.reel {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 9 / 16;
  border-radius: 14px; overflow: hidden; background: var(--ink);
  box-shadow: 6px 6px 0 var(--mark);
}
.reel img, .reel video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ink); }
.play-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.35)); cursor: pointer; }
.play-btn::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px;
  border-radius: 50%; background: var(--cta); box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .2s ease;
}
.play-btn::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -12px 0 0 -6px;
  border-left: 20px solid var(--cta-ink); border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.play-btn:hover::before, .play-btn:focus-visible::before { transform: scale(1.08); }
.play-btn:focus-visible { outline-offset: -4px; }
.reel .dur { position: absolute; right: 10px; bottom: 10px; font-size: .8rem; font-weight: 700; color: #FFFFFF; background: rgba(0,0,0,.6); padding: 3px 9px; border-radius: 99px; pointer-events: none; }
.reel-card figcaption { display: grid; gap: 2px; }
.reel-card figcaption strong { font-family: var(--f-display); font-size: 1.15rem; }
.reel-card figcaption span { color: var(--muted); font-size: .95rem; }

/* ---------- El día de resultados (capturas) ---------- */
.results { background: var(--trust-bg); color: var(--trust-fg); }
.results .eyebrow { color: var(--cta); }
.results .lead { color: color-mix(in srgb, var(--trust-fg) 80%, transparent); }
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 290px); gap: 16px; align-items: start;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; scrollbar-width: thin;
}
.shot { margin: 0; scroll-snap-align: start; display: grid; gap: 8px; min-width: 0; }
.shot img { width: 100%; height: auto; border-radius: 12px; background: #EFE7DE; box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.shot figcaption { font-size: .9rem; font-weight: 700; color: color-mix(in srgb, var(--trust-fg) 85%, transparent); }
.shots-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 18px; }
.shots-foot p { font-size: .92rem; color: color-mix(in srgb, var(--trust-fg) 75%, transparent); }

/* ---------- Plana docente ---------- */
.teacher { align-items: flex-start; }
.teacher .avatar {
  width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line);
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; color: var(--muted); font-size: 0.85rem;
  overflow: hidden;
}
.teacher .course { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.teacher h3 { font-size: 1.15rem; }

/* ---------- Ciclo ---------- */
.cycle { display: grid; gap: 24px; }
@media (min-width: 900px) { .cycle { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.dates { display: grid; gap: 12px; }
.date-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1.5px dashed var(--line-soft); }
.date-row span { color: var(--muted); }
.date-row strong { font-family: var(--f-display); font-size: 1.1rem; text-align: right; }

/* ---------- Examen ---------- */
.exam-facts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.fact { background: var(--surface); border: var(--border-w) solid var(--card-border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.fact .big { font-family: var(--f-display); font-weight: 800; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact p { color: var(--ink-2); font-size: 0.97rem; }
.source { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--surface); border: var(--border-w) solid var(--card-border); border-radius: var(--radius); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; position: relative;
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 6px; background: var(--mark); display: grid; place-items: center;
  font-size: 1.2rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 20px; color: var(--ink-2); display: grid; gap: 10px; }

/* ---------- Formulario ---------- */
.signup { display: grid; gap: 28px; }
@media (min-width: 900px) { .signup { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; } }
.form-card { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 26px 22px; box-shadow: 8px 8px 0 var(--mark); }
@media (min-width: 640px) { .form-card { padding: 32px; } }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: 0.97rem; }
.field .hint { font-size: 0.88rem; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--muted); border-radius: var(--radius);
}
.field input:focus, .field select:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: 0.88rem; font-weight: 600; min-height: 0; }
.phone { display: flex; gap: 8px; }
.phone .prefix { flex: 0 0 auto; display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--muted); border-radius: var(--radius); background: var(--surface-2); font-weight: 700; }
.choice-row { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line-soft); border-radius: var(--radius); cursor: pointer; min-height: 48px; }
.choice input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.93rem; color: var(--ink-2); }
.consent input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 600; }
.form-status.is-error { color: var(--danger); }
.ts-box { min-height: 0; }

.thanks { display: grid; gap: 16px; text-align: left; }
.thanks h3 { font-size: 1.6rem; }
.thanks .step { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.thanks .step b { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--cta); color: var(--cta-ink); display: grid; place-items: center; font-family: var(--f-display); }
.demo-flag { font-size: 0.85rem; color: var(--muted); border-top: 1px dashed var(--line-soft); padding-top: 10px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #E8EBF2; padding-block: 40px; margin-top: 24px; }
.site-footer .wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }
.site-footer a { color: #FFFFFF; }
.site-footer .logo { color: #FFFFFF; }
.site-footer small { color: #B9C0CF; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Página legal ---------- */
.legal { max-width: 780px; padding-block: 48px 64px; }
.legal-card { background: var(--surface); border: var(--border-w) solid var(--line-soft); border-radius: 12px; padding: 28px 22px; display: grid; gap: 18px; }
@media (min-width: 640px) { .legal-card { padding: 40px; } }
.legal-card h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal-card h2 { font-size: 1.25rem; margin-top: 10px; }
.legal-card p, .legal-card li { color: var(--ink-2); }
.legal-card ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.placeholder { background: var(--mark); padding: 0 4px; border-radius: 3px; }

/* ==========================================================
   ANIMACIONES
   Con "reducir movimiento" activado, la regla global de arriba
   las apaga y todo se muestra quieto y completo.
   ========================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) rotate(-7deg); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes draw-mark { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes cta-pulse {
  0%, 78%, 100% { box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 0 0 0 color-mix(in srgb, var(--cta) 60%, transparent); }
  92% { box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 0 0 14px color-mix(in srgb, var(--cta) 0%, transparent); }
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--x), var(--fall)) rotate(var(--rot)); opacity: 0; }
}

/* 1. Entrada del inicio */
.hero-copy > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .3s; }
.hero-copy > :nth-child(4) { animation-delay: .42s; }
.hero-copy > :nth-child(5) { animation-delay: .54s; }
.pdf-card { animation: card-in .8s .35s cubic-bezier(.2,.7,.2,1) both; }

/* 2. Resaltador que se dibuja */
.mark { background: none; background-image: var(--hero-mark); background-repeat: no-repeat; background-size: 100% 100%; }
.hero .mark { animation: draw-mark .9s .8s cubic-bezier(.3,.7,.3,1) both; }

/* 3. Fórmula que se resuelve */
.pdf-card .formula { display: grid; gap: 6px; justify-items: center; font-size: 1.1rem; }
.pdf-card .formula .step { display: block; }
.pdf-card .formula .s3 {
  font-weight: 700; color: var(--ink); padding: 0 6px;
  background-image: linear-gradient(transparent 58%, var(--mark) 58%);
  background-repeat: no-repeat; background-size: 100% 100%;
}
.pdf-card.solving .s1 { animation: rise .5s 1s both; }
.pdf-card.solving .s2 { animation: rise .5s 2s both; }
.pdf-card.solving .s3 { animation: rise .5s 3s both, draw-mark .7s 3.4s both; }

/* 4. Cuenta regresiva */
.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cd-label { font-weight: 700; font-size: .95rem; color: var(--hero-muted); }
.cd-boxes { display: flex; gap: 8px; }
.cd-box {
  display: grid; justify-items: center; min-width: 64px; padding: 8px 10px;
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
  border: var(--border-w) solid var(--line);
}
.cd-box b { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-box small { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }

/* 5. Números que cuentan */
.fact .big span { font-variant-numeric: tabular-nums; }

/* 6. Secciones que aparecen al bajar */
html.anim .reveal { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.anim .reveal:not(.in) { opacity: 0; transform: translateY(18px); }

/* 7. Checks que se marcan uno tras otro */
html.anim .reveal .checklist li::before { background: var(--surface); transition: background-color .3s; transition-delay: calc(var(--d, 0ms) + 250ms + var(--i, 0) * 140ms); }
html.anim .reveal.in .checklist li::before { background: var(--accent-soft); }
html.anim .reveal .checklist li::after {
  transform: rotate(45deg) scale(0);
  transition: transform .35s cubic-bezier(.3,1.6,.5,1);
  transition-delay: calc(var(--d, 0ms) + 250ms + var(--i, 0) * 140ms);
}
html.anim .reveal.in .checklist li::after { transform: rotate(45deg) scale(1); }

/* 8. Pulso suave del botón principal */
.hero .btn-cta { animation: cta-pulse 5s 2.4s infinite; }

/* 9. Barra fija en celular */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-top: var(--border-w) solid var(--line-soft);
  box-shadow: 0 -6px 20px rgba(20, 26, 46, .12);
  padding-top: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  transform: translateY(110%); transition: transform .3s ease;
}
.sticky-cta.show { transform: none; }
.sticky-cta p { margin: 0; flex: 1 1 auto; min-width: 0; font-size: .9rem; line-height: 1.25; color: var(--ink-2); }
.sticky-cta p strong { color: var(--ink); }
.sticky-cta .btn { flex: 0 0 auto; min-height: 46px; padding: 10px 18px; font-size: .98rem; }
@media (min-width: 900px) { .sticky-cta { display: none; } }
@media (max-width: 899px) { .header-cta { display: none; } }

/* 10. Formulario: validación en vivo y celebración */
.field input, .field select { transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.field.is-valid input, .field.is-valid select { border-color: var(--accent); }
.field.is-valid > label::after, .field.is-valid > legend::after {
  content: "✓"; display: inline-grid; place-items: center; vertical-align: middle;
  width: 20px; height: 20px; margin-left: 8px; border-radius: 50%;
  background: var(--accent); color: var(--surface); font-size: .75rem; font-weight: 800;
  animation: pop .3s cubic-bezier(.3,1.6,.5,1) both;
}
.form-card { position: relative; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }
.confetti span { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation-name: confetti-fall; animation-timing-function: ease-in; animation-fill-mode: both; }
.thanks:not([hidden]) h3 { animation: pop .45s cubic-bezier(.3,1.6,.5,1) both; }
.thanks:not([hidden]) .step { animation: rise .45s .2s ease-out both; }
.thanks:not([hidden]) .step + .step { animation-delay: .35s; }
.thanks:not([hidden]) .btn-cta { animation: rise .45s .5s ease-out both; }

/* Que el encabezado fijo no tape el destino de los enlaces internos */
[id], .thanks { scroll-margin-top: 84px; }

/* Plana docente con fotos */
.teacher { align-items: center; text-align: center; gap: 6px; }
.teacher .avatar {
  width: 120px; height: 120px; margin-bottom: 8px;
  border: 3px solid var(--line); box-shadow: 4px 4px 0 var(--mark);
  background: var(--mark); color: var(--ink); font-size: 2.4rem;
}
.teacher .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher .degree { color: var(--ink-2); font-size: .97rem; }
.teacher .xp { margin-top: 6px; display: inline-block; font-weight: 700; font-size: .88rem; padding: 4px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* Flechas del carrusel de capturas */
.shots-wrap { position: relative; }
.shots { scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots-nav {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--cta); color: var(--cta-ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: opacity .2s ease, transform .2s ease;
}
.shots-nav svg { width: 24px; height: 24px; }
.shots-nav.next { right: 6px; }
.shots-nav.prev { left: 6px; }
.shots-nav:hover { transform: translateY(-50%) scale(1.06); }
.shots-nav:focus-visible { outline: 3px solid var(--trust-fg); outline-offset: 3px; }
.shots-nav[disabled] { opacity: 0; pointer-events: none; }
@media (min-width: 900px) { .shots-nav.next { right: -8px; } .shots-nav.prev { left: -8px; } }

/* Más ingresantes (fotos) */
.alumni { margin-top: 44px; display: grid; gap: 18px; }
.alumni-title { font-size: 1.3rem; }
.alumni-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .alumni-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .alumni-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.alum { margin: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: var(--border-w) solid var(--card-border); border-radius: var(--radius); }
.alum img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--surface-2); }
.alum figcaption { padding: 10px 12px 12px; display: grid; gap: 2px; }
.alum figcaption strong { font-family: var(--f-display); font-size: 1.05rem; }
.alum figcaption span { font-size: .92rem; line-height: 1.3; color: var(--ink-2); }
.alum figcaption small { font-size: .8rem; font-weight: 700; color: var(--accent); }
.alum-cta { justify-content: center; gap: 8px; padding: 18px 16px; text-decoration: none; background: var(--cta); color: var(--cta-ink); border-color: var(--line); }
.alum-cta strong { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.2; }
.alum-cta span { font-size: .92rem; line-height: 1.35; }
.alum-cta b { align-self: flex-start; margin-top: 6px; padding: 8px 14px; border-radius: var(--radius); background: var(--ink); color: var(--surface); font-size: .92rem; }
.alum-cta:hover { background: var(--cta-hover); color: var(--cta-ink); }


/* ---------- Ingresantes: carrusel con foto + comentario ---------- */
.carousel-wrap { position: relative; }
.alumni-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 540px); gap: 16px; align-items: stretch;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 4px 4px 18px; scrollbar-width: none;
}
.alumni-track::-webkit-scrollbar { display: none; }
.alumni-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.carousel-wrap .shots-nav { top: 46%; }
.alum-card {
  margin: 0; min-width: 0; scroll-snap-align: start; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
  background: var(--surface); border: var(--border-w) solid var(--card-border); border-radius: var(--radius);
}
.alum-card img { width: 100%; height: 100%; min-height: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--surface-2); }
.alum-card figcaption { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alum-card blockquote { margin: 0 0 12px; flex: 1; position: relative; padding-top: 26px; }
.alum-card blockquote::before {
  content: "\201C"; position: absolute; top: -6px; left: -2px;
  font-family: var(--f-display); font-size: 3rem; line-height: 1; color: var(--cta);
}
.alum-card blockquote p { font-size: 1rem; line-height: 1.5; color: var(--ink); }
.alum-card strong { font-family: var(--f-display); font-size: 1.05rem; }
.alum-card span { font-size: .92rem; line-height: 1.3; color: var(--ink-2); }
.alum-card small { font-size: .8rem; font-weight: 700; color: var(--accent); }
.quote-pending { background: var(--mark); padding: 0 4px; border-radius: 3px; font-style: italic; }
.alumni-foot { margin-top: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.alumni-foot p { font-size: 1.02rem; color: var(--ink-2); max-width: 52ch; }
.alumni-foot p strong { display: block; font-family: var(--f-display); font-size: 1.25rem; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 420px) {
  .alum-card { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); }
  .alum-card figcaption { padding: 12px 12px 10px; }
  .alum-card blockquote p { font-size: .94rem; }
}
@media (max-width: 639.98px) {
  .carousel-wrap { padding-bottom: 52px; }
  .carousel-wrap .shots-nav { top: auto; bottom: 0; transform: none; width: 44px; height: 44px; }
  .carousel-wrap .shots-nav:hover { transform: scale(1.06); }
  .carousel-wrap .shots-nav.prev { left: auto; right: 58px; }
  .carousel-wrap .shots-nav.next { right: 4px; }
  .carousel-wrap .shots-nav[disabled] { opacity: .35; }
}
@media (min-width: 640px) {
  .carousel-wrap { padding-inline: 40px; }
  .carousel-wrap .shots-nav { width: 48px; height: 48px; }
  .carousel-wrap .shots-nav.prev { left: 0; }
  .carousel-wrap .shots-nav.next { right: 0; }
}
@media (min-width: 900px) {
  .alumni-track { grid-auto-columns: calc((100% - 16px) / 2); }
}
.alumni-track, .shots { scroll-padding-inline: 4px; }

/* Franja de confianza alineada con el contenido */
@media (min-width: 760px) { .trust ul { justify-content: space-between; } }
/* Pantallas anchas: hero con más presencia */
@media (min-width: 1400px) {
  .hero .wrap { gap: 64px; }
  .hero h1 { font-size: clamp(3.2rem, 3.6vw, 4rem); }
}

/* ---------- Botón cohete: volver arriba ---------- */
.to-top {
  position: fixed; z-index: 29;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--ink); color: var(--cta); border: 2px solid var(--cta);
  box-shadow: 0 8px 22px rgba(20, 26, 46, .28);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, bottom .3s ease;
}
.to-top svg { width: 24px; height: 24px; transform: rotate(-45deg); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.to-top.launch svg { animation: rocket-launch .7s ease-in forwards; }
@keyframes rocket-launch {
  0% { transform: rotate(-45deg) translate(0, 0); }
  30% { transform: rotate(-45deg) translate(-2px, 2px); }
  100% { transform: rotate(-45deg) translate(28px, -28px); opacity: 0; }
}
/* En celular, sube cuando aparece la barra fija de registro */
@media (max-width: 899.98px) {
  body.sticky-on .to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .to-top, .to-top.launch svg { transition: none; animation: none; }
}
