/* =====================================================================
   Aula Interactiva — página de presentación (/conoce).
   Misma identidad del sitio: Fredoka + Nunito, violeta, crema y botones 3D.
   Un solo tema claro a propósito (igual que la plataforma).
   ===================================================================== */

:root {
  --bg: #FFF8EE;
  --paper: #FFFFFF;
  --tint: #F5F2FF;
  --line: #E6DFF7;
  --ink: #2B2350;
  --muted: #6F6892;
  --accent: #6C47FF;
  --accent-dark: #4E2FD9;
  --wa: #1FAF5A;
  --wa-dark: #138A44;
  --amber: #FFB02E;
  --coral: #FF6B6B;
  --hl: #FFE07A;
  --night: #221A45;
  --night-ink: #F3EFFF;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(60, 40, 140, .14);
  --shadow-sm: 0 4px 14px rgba(60, 40, 140, .08);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
::selection { background: var(--hl); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }
.eyebrow { font-weight: 800; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.sub { color: var(--muted); max-width: 62ch; margin-top: 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 58ch; margin-top: 18px; }
.note { color: var(--muted); font-size: .92rem; margin-top: 16px; }
.hl { background: linear-gradient(transparent 58%, var(--hl) 58%); padding: 0 .1em; }

/* ---------- botones 3D ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 800 1rem var(--font); padding: 12px 20px; border-radius: 16px; transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.btn:active { transform: translateY(3px); }
.btn-lg { padding: 16px 26px; font-size: 1.08rem; border-radius: 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 5px 0 var(--accent-dark); }
.btn-primary:active { box-shadow: 0 2px 0 var(--accent-dark); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 5px 0 var(--wa-dark); }
.btn-wa:active { box-shadow: 0 2px 0 var(--wa-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- navegación ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255, 248, 238, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.2rem var(--display); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: flex; gap: 10px; }
.nav-cta .btn { padding: 10px 16px; font-size: .92rem; }
@media (max-width: 980px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 520px) { .brand span { display: none; } .nav-cta .btn { padding: 9px 12px; font-size: .88rem; } }

/* ---------- portada ---------- */
.hero { padding-block: 56px 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 71, 255, .16), transparent 65%); pointer-events: none; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.center-row { justify-content: center; }
.hero-facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 28px; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font: 700 2rem var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-facts span { color: var(--muted); font-size: .9rem; font-weight: 700; }
.hero-visual { position: relative; min-width: 0; padding-bottom: 40px; }
.shot { margin: 0; border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line); }
.shot-main { transform: rotate(-1.5deg); }
.shot-phone { position: absolute; right: -6px; bottom: -6px; width: 30%; border-radius: 22px; border: 6px solid var(--night); transform: rotate(4deg); }
.pin-card { position: absolute; left: -14px; bottom: 6px; background: var(--paper); border-radius: 18px; padding: 12px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border: 2px solid var(--line); transform: rotate(-3deg); }
.pin-card small { font-weight: 800; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.pin-card b { font: 700 1.9rem var(--display); letter-spacing: .08em; color: var(--accent); font-variant-numeric: tabular-nums; }
.pin-card span { font-size: .78rem; color: var(--muted); }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-block: 36px 56px; }
  .pin-card { left: 0; }
}

/* ---------- pasos ---------- */
.steps { padding-block: 24px 64px; }
.step-list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step-list li { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.step-list p { color: var(--muted); margin-top: 8px; }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--hl); font: 700 1.3rem var(--display); margin-bottom: 12px; }
.step-list li:nth-child(2) .step-n { background: #C9F2DF; }
.step-list li:nth-child(3) .step-n { background: #D9E6FF; }
@media (max-width: 760px) { .step-list { grid-template-columns: 1fr; } }

/* ---------- secciones ---------- */
.section { padding-block: 80px; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-ia { background: var(--night); color: var(--night-ink); }
.section-ia .eyebrow { color: var(--amber); }
.section-ia .note { color: #BDB3E8; }
.section-ia .checks li::before { background: var(--amber); color: var(--night); }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split > * { min-width: 0; }
.split h2 { margin-bottom: 18px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .section { padding-block: 60px; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 38px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 900; font-size: .85rem; }

/* categorías */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.cat { background: var(--paper); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); border-top: 6px solid var(--c); box-shadow: var(--shadow-sm); min-width: 0; }
.cat h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; color: var(--ink); }
.cat p { color: var(--muted); font-size: .93rem; line-height: 1.55; }
@media (max-width: 1000px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.gallery figure, .phones figure { margin: 0; min-width: 0; }
.gallery img, .phones img { border-radius: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: var(--paper); }
figcaption { font-weight: 800; font-size: .9rem; color: var(--muted); margin-top: 8px; text-align: center; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* modos */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.modes article { background: var(--paper); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.modes p { color: var(--muted); margin-top: 8px; font-size: .95rem; }
@media (max-width: 900px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }
.phones { display: grid; grid-template-columns: 1fr 1fr 2.6fr; gap: 22px; margin-top: 44px; align-items: end; }
@media (max-width: 760px) { .phones { grid-template-columns: 1fr 1fr; } .phones figure:last-child { grid-column: 1 / -1; } }

/* planes */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; align-items: stretch; }
.plan { background: var(--paper); border-radius: var(--radius); padding: 26px 22px; border: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; position: relative; min-width: 0; }
.plan ul { padding-left: 18px; margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.plan li + li { margin-top: 6px; }
.price { font-weight: 800; color: var(--accent); }
.plan-star { border-color: var(--accent); box-shadow: var(--shadow); }
.badge { position: absolute; top: -14px; left: 22px; background: var(--amber); color: var(--night); font-weight: 900; font-size: .78rem; padding: 4px 12px; border-radius: 99px; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); row-gap: 28px; } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

/* preguntas */
details { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-top: 12px; }
details:first-of-type { margin-top: 30px; }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 700 1.4rem/1 var(--display); color: var(--accent); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin-top: 10px; }

/* cierre */
.final { padding-block: 80px; }
.final-in { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--paper); border-radius: 32px;
  padding: 48px 24px; border: 2px solid var(--line); box-shadow: var(--shadow); }
.final-in p { color: var(--muted); }
.final-owl { width: 110px; }

.foot { padding-block: 28px 100px; color: var(--muted); font-size: .92rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(19, 138, 68, .35); }

/* ---------- formulario demo ---------- */
.demo-back { position: fixed; inset: 0; z-index: 50; background: rgba(34, 26, 69, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.demo-box { position: relative; background: var(--paper); border-radius: 26px; padding: 30px; width: 100%; max-width: 620px; box-shadow: var(--shadow); animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.demo-box h2 { font-size: 1.7rem; padding-right: 36px; }
.demo-x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--tint); cursor: pointer; font-size: 1rem; color: var(--ink); }
#demo-form { display: grid; gap: 14px; margin-top: 20px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .f2 { grid-template-columns: 1fr; } .demo-box { padding: 24px 18px; } }
#demo-form label { display: grid; gap: 6px; font-weight: 800; font-size: .9rem; min-width: 0; }
#demo-form input:not([type=checkbox]), #demo-form select { font: 600 1rem var(--font); color: var(--ink); padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); width: 100%; }
#demo-form input:focus, #demo-form select:focus { border-color: var(--accent); outline: none; }
#demo-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; color: var(--muted); font-size: .85rem; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #FFE8EB; color: #A3142A; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: .92rem; }
.creds { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; background: var(--tint); border-radius: 16px; padding: 18px; margin: 18px 0 22px; }
.creds dt { font-weight: 800; color: var(--muted); }
.creds dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#demo-step-ok p { color: var(--muted); margin-top: 8px; }

/* aparición suave al hacer scroll (solo si el usuario no pidió menos movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .demo-box { transition: none; animation: none; } }

/* franja de estudiantes (PIN) sobre el menú */
.student-bar { background: var(--night); color: var(--night-ink); }
.student-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding-block: 8px; }
.student-in label { font-weight: 800; font-size: .95rem; }
.student-row { display: flex; gap: 8px; }
.student-in input { width: 130px; font: 700 1.05rem var(--display); letter-spacing: .14em; text-align: center; padding: 8px 10px; border-radius: 12px;
  border: 2px solid transparent; background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.student-in input:focus { border-color: var(--amber); outline: none; }
.student-in .btn { padding: 8px 16px; font-size: .95rem; }
.pin-err { flex-basis: 100%; text-align: center; color: #FFD0D6; font-weight: 800; font-size: .9rem; }
