/* Aula: portada. Colores como variables, con modo claro y oscuro; cada texto sobre su fondo cumple AA (4,5:1),
   salvo el degradado del título, que es texto grande (3:1). Las variables --bg … --error las usa también kit.css. */
@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(fonts/outfit-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Outfit; font-weight: 600; font-display: swap; src: url(fonts/outfit-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Outfit; font-weight: 800; font-display: swap; src: url(fonts/outfit-latin-800-normal.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --bg: #F6F8FC; --bg2: #EEF2F9; --surface: #FFFFFF; --border: #DCE3F0; --line: #DCE3F0;
  --text: #0B1430; --muted: #4A5878;
  --accent: #0047D6; --accent-text: #0047D6; --accent-fill: #0057FF; --accent-hover: #0047D6; --accent-ink: #FFFFFF;
  --grad: linear-gradient(120deg, #0047D6, #00707E);
  --quimica: #00707E; --fisica: #1F55D0; --matematica: #6142D4;
  --ok: #0A7A4C; --warm: #FFF1CC; --warm-ink: #5C4300; --error: #B3261E;
  --tag-bg: #EEF2F9; --tag-text: #3A4766;
  --demo-bg: linear-gradient(180deg, #FFFFFF, #F3F6FC); --demo-in: #F6F8FC; --sombra: 0 30px 80px -40px rgba(11, 20, 48, 0.35);
  --top-bg: rgba(246, 248, 252, 0.85);
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #05070F; --bg2: #0A1020; --surface: #0D1428; --border: #1B2645; --line: #1B2645;
    --text: #EEF2FF; --muted: #93A0C4;
    --accent: #00E5FF; --accent-text: #00E5FF; --accent-fill: #0057FF; --accent-hover: #0047D6; --accent-ink: #FFFFFF;
    --grad: linear-gradient(120deg, #0057FF, #00E5FF);
    --quimica: #00E5FF; --fisica: #5B9BFF; --matematica: #A08BFF;
    --ok: #2EE59D; --warm: #3A2E0A; --warm-ink: #FFD978; --error: #FF8A80;
    --tag-bg: #121B35; --tag-text: #B9C3E2;
    --demo-bg: linear-gradient(180deg, #101A33, #0B1226); --demo-in: #060B18; --sombra: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
    --top-bg: rgba(5, 7, 15, 0.78);
  }
}

html { scroll-behavior: smooth; }
body { font: 400 17px/1.55 Outfit, system-ui, -apple-system, sans-serif; overflow-x: hidden; }
a { color: var(--accent-text); }
h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 20px; }
img { display: block; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 8px; z-index: 9; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* botones (también los del aviso de versión nueva del kit: .btn y .btn.ghost) */
.btn { gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--accent-fill); color: var(--accent-ink); font: 800 17px Outfit, sans-serif; text-decoration: none; transition: transform 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-1px); background: var(--accent-hover); filter: none; }
.btn-ghost, .btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover, .btn.ghost:hover { background: transparent; border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* cabecera */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 12px max(16px, calc((100% - 1120px) / 2)); background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.brand img { border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--text); }
body:not([data-vista="inicio"]) .nav a { display: none; }

section { padding: 72px max(16px, calc((100% - 1120px) / 2)); }

/* comienzo */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 64px; }
.eyebrow { color: var(--accent-text); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(18px, 2vw, 21px); margin-top: 20px; max-width: 34ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* demo animada */
.demo { position: relative; }
.demo-glow { position: absolute; inset: 10% 5%; background: var(--grad); filter: blur(70px); opacity: 0.22; z-index: 0; border-radius: 50%; }
.demo-card { position: relative; z-index: 1; background: var(--demo-bg); border: 1px solid var(--line); border-radius: 28px; padding: 24px; min-height: 380px; box-shadow: var(--sombra); }
.demo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.demo-chip { --c: var(--quimica); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.demo-lvl { font-size: 13px; color: var(--muted); text-align: right; }
.demo-q { color: var(--muted); margin-top: 22px; }
.demo-f { font-size: 40px; font-weight: 800; margin-top: 4px; letter-spacing: -0.01em; }
.demo-in { margin-top: 18px; min-height: 56px; display: flex; align-items: center; padding: 0 16px; border-radius: 14px; background: var(--demo-in); border: 1.5px solid var(--line); font-size: 20px; font-weight: 600; transition: border-color 0.3s; }
.demo-in.ok { border-color: var(--ok); }
.caret { width: 2px; height: 24px; background: var(--accent); margin-left: 2px; animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.demo-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; margin-top: 14px; opacity: 0; transform: translateY(6px); transition: 0.35s; }
.demo-ok.on { opacity: 1; transform: none; }
.demo-steps { margin: 12px 0 0; padding-left: 20px; list-style: decimal; color: var(--muted); font-size: 15px; }
.demo-steps li { opacity: 0; transform: translateX(-6px); transition: 0.35s; }
.demo-steps li.on { opacity: 1; transform: none; }

/* cómo funciona */
.how h2 { margin-bottom: 28px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.how p { color: var(--muted); margin-top: 8px; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent-fill); color: var(--accent-ink); font-weight: 800; margin-bottom: 14px; }

/* catálogo */
.apps-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--muted); font: 600 15px Outfit, sans-serif; }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.app { --c: var(--quimica); display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; color: var(--text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.app:hover { border-color: var(--c); transform: translateY(-2px); }
.app[hidden] { display: none; }
.app-ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.app-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.app-m { font-size: 13px; font-weight: 600; color: var(--c); text-transform: uppercase; letter-spacing: 0.1em; }
.app p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--tag-bg); color: var(--tag-text); }
.note { color: var(--muted); margin-top: 24px; text-align: center; }

/* instalar */
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.install > div > p { color: var(--muted); margin-top: 12px; max-width: 40ch; }
.install-ways { display: grid; gap: 12px; }
.install-ways article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.install-ways p { color: var(--muted); margin-top: 6px; }
.install-ways b { color: var(--text); }

/* pie */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 28px max(16px, calc((100% - 1120px) / 2)) calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 20px; }
.foot-brand img { border-radius: 7px; }
.foot small { font-weight: 400; color: var(--muted); font-size: 14px; }
.foot nav { display: flex; gap: 20px; }
.foot nav a, .foot small a { color: var(--muted); }
.foot .kit-idioma { width: 100%; margin-top: 0; }

/* páginas de texto */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 16px; }
.doc h1 { font-size: 40px; margin-bottom: 20px; }
.doc h2 { font-size: 22px; margin: 28px 0 8px; }
.doc p { color: var(--muted); }
.doc .doc-fecha { margin-top: 32px; font-size: 14px; }
.doc p:last-child { margin-top: 24px; }
.doc-centro { text-align: center; }
.doc-centro img { margin: 0 auto 24px; border-radius: 18px; }
.doc-centro p { margin-bottom: 28px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .how-grid, .install { grid-template-columns: 1fr; }
  .nav a { display: none; }
  section { padding-top: 56px; padding-bottom: 56px; }
  .demo-card { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
