/* =========================================================
   AtOMo — hoja de estilos
   1. Tokens  2. Base  3. Componentes  4. Secciones  5. Páginas
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --off: #F7F8FA;
  --white: #FFFFFF;
  --ink: #111318;
  --ink-2: #3A3F49;
  --muted: #6B717C;      /* gris secundario ajustado para contraste AA */
  --gray: #777E89;
  --blue: #3478F6;
  --blue-ink: #1F5FD6;   /* azul para texto sobre blanco (contraste AA) */
  --blue-soft: #EEF4FF;
  --blue-soft-2: #DCE8FF;
  --line: rgba(17, 19, 24, .08);
  --line-2: rgba(17, 19, 24, .14);

  --f-sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --r-sm: 12px; --r: 20px; --r-lg: 28px;
  --shadow-1: 0 1px 2px rgba(17,19,24,.04), 0 4px 16px rgba(17,19,24,.04);
  --shadow-2: 0 2px 6px rgba(17,19,24,.05), 0 18px 50px rgba(17,19,24,.08);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1200px;
  --header-h: 64px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--white); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11"; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--blue-soft-2); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tipografía editorial */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-ink); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.display { font-size: clamp(46px, 7.4vw, 104px); font-weight: 650; line-height: .98; letter-spacing: -.045em; }
.h2 { font-size: clamp(38px, 5.4vw, 72px); font-weight: 650; line-height: 1.02; letter-spacing: -.04em; }
.serif { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; }
.accent { color: var(--blue); }
.lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--muted); letter-spacing: -.01em; }
.center { text-align: center; }
.section-head { max-width: 820px; margin: 0 0 64px; }
.section-head.center { margin: 0 auto 64px; }
.section-head.wide { max-width: 1120px; }
.section-head .h2 { margin: 18px 0 20px; }
.section-head .lead { max-width: 640px; }
.section-head.center .lead { margin: 0 auto; }

/* Apariciones (solo con JS activo) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 3. Componentes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px;
  border-radius: 999px; font-size: 16px; font-weight: 550; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s, border-color .25s;
}
.btn:active { transform: scale(.97); }
.btn .ico-sm { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn:hover .ico-sm { transform: translateX(3px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 20px rgba(52,120,246,.28); }
.btn-primary:hover { background: #2A6CEB; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 28px rgba(52,120,246,.36); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,.7); color: var(--ink); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.btn-secondary:hover { border-color: rgba(17,19,24,.28); background: #fff; transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }

.ico { width: 24px; height: 24px; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 20px; letter-spacing: -.03em; }
.logo svg { width: 28px; height: 28px; }
.logo .om { color: var(--blue); }
.logo:hover .logo-orbits { transform: rotate(60deg); }
.logo-orbits { transform-origin: 50% 50%; transition: transform 1.2s var(--ease); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); transition: background-color .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.site-header.scrolled, .menu-open .site-header { background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--ink); background: rgba(17,19,24,.04); }
.nav-links a.active { color: var(--ink); }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; }
.menu-toggle span { position: relative; display: block; width: 20px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), background-color .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease); }
.menu-toggle span::before { transform: translateY(-6px); }
.menu-toggle span::after { transform: translateY(6px); }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: rotate(45deg); }
.menu-open .menu-toggle span::after { transform: rotate(-45deg); }

/* ---------- 4. Secciones ---------- */
section { position: relative; }
.section { padding: clamp(96px, 13vw, 168px) 0; }
.bg-off { background: var(--off); }

/* Hero */
.hero { min-height: min(100svh, 980px); padding: calc(var(--header-h) + 40px) 0 72px; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(1200px 600px at 78% 40%, rgba(52,120,246,.07), transparent 60%), linear-gradient(180deg, #fff 0%, var(--off) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(800px 500px at 70% 45%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(800px 500px at 70% 45%, #000 0%, transparent 70%); opacity: .55; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
.hero-copy .display { margin: 22px 0 28px; }
.hero-copy .display .serif { font-size: 1.06em; color: var(--blue); }
.hero-copy .lead { max-width: 540px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.hero-meta { display: flex; gap: 22px; margin-top: 48px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; }
#atom-canvas { width: 100%; height: 100%; }
.chip { position: absolute; font-family: var(--f-mono); font-size: 12px; color: var(--ink-2); background: rgba(255,255,255,.75); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 6px 10px; border-radius: 999px; box-shadow: var(--shadow-1); animation: float 7s ease-in-out infinite; }
.chip b { color: var(--blue-ink); font-weight: 600; }
.chip-1 { top: 14%; left: 2%; }
.chip-2 { top: 22%; right: 0; animation-delay: -2.3s; }
.chip-3 { bottom: 14%; left: 10%; animation-delay: -4.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 24px; height: 38px; border: 1.5px solid var(--line-2); border-radius: 14px; z-index: 1; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gray); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Presentación */
.trio-title { margin: 18px 0 24px; font-size: clamp(40px, 6.4vw, 82px); font-weight: 650; letter-spacing: -.045em; line-height: 1; }
.trio-title span { display: inline-block; }
.trio-title span:nth-child(2) { color: var(--gray); }
.trio-title span:nth-child(3) { color: var(--blue); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 24px; }
.pillar { padding: 44px 36px 8px; position: relative; }
.pillar + .pillar { border-left: 1px solid var(--line); }
.pillar-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: var(--blue); background: linear-gradient(180deg, #fff, var(--blue-soft)); border: 1px solid var(--blue-soft-2); margin-bottom: 28px; transition: transform .5s var(--ease); }
.pillar:hover .pillar-icon { transform: translateY(-4px) rotate(-4deg); }
.pillar-icon svg { width: 40px; height: 40px; }
.pillar-num { font-family: var(--f-mono); font-size: 12px; color: var(--gray); }
.pillar h3 { font-size: 28px; letter-spacing: -.03em; font-weight: 650; margin: 6px 0 10px; }
.pillar p { color: var(--muted); max-width: 320px; }

/* ---------- Tabla periódica ---------- */
.ptable { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; position: relative; }
.el {
  grid-column: var(--col, auto); grid-row: var(--row, auto);
  position: relative; aspect-ratio: 1; text-align: left; overflow: hidden; isolation: isolate;
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px 15px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-1);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s, background-color .3s, opacity .9s var(--ease);
}
.el::before { /* resplandor que sigue al cursor */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
}
.el::after { /* barra de color superior */
  content: ""; position: absolute; left: 15px; right: 15px; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--c); opacity: .55; transition: opacity .3s, left .4s var(--ease), right .4s var(--ease);
}
.el:hover, .el:focus-visible { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 35%, transparent); box-shadow: 0 2px 6px rgba(17,19,24,.05), 0 20px 44px -10px color-mix(in srgb, var(--c) 40%, transparent); }
.el:hover::before, .el:focus-visible::before, .el[aria-selected="true"]::before { opacity: 1; }
.el:hover::after, .el[aria-selected="true"]::after { opacity: 1; left: 0; right: 0; }
.el[aria-selected="true"] { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 5%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent), 0 20px 44px -12px color-mix(in srgb, var(--c) 40%, transparent); }
.js .el.reveal:not(.in) { transform: translateY(20px) scale(.96); }
.el-num { font-family: var(--f-mono); font-size: 12px; color: var(--gray); font-weight: 500; }
.el-glyph { position: absolute; top: 12px; right: 12px; color: var(--c); opacity: .75; transition: transform .5s var(--ease), opacity .3s; }
.el-glyph .ico { width: 20px; height: 20px; }
.el:hover .el-glyph { transform: rotate(-12deg) scale(1.12); opacity: 1; }
.el-sym { font-size: clamp(30px, 3.4vw, 50px); font-weight: 650; letter-spacing: -.05em; line-height: 1; color: var(--ink); margin-top: auto; transition: color .3s; }
.el:hover .el-sym, .el[aria-selected="true"] .el-sym { color: var(--c); }
.el-name { font-size: 12.5px; line-height: 1.25; color: var(--ink-2); margin-top: 8px; font-weight: 500; min-height: 2.5em; }

/* Leyenda tipo "clave del elemento" */
.pkey { grid-column: 3 / 7; grid-row: 1; align-self: center; display: flex; align-items: center; gap: 22px; padding: 0 8px 0 18px; }
.pkey-tile { flex: 0 0 auto; width: 96px; aspect-ratio: 1; border: 1px dashed var(--line-2); border-radius: 16px; padding: 10px 11px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(255,255,255,.6); }
.pkey-tile .el-num { font-size: 11px; }
.pkey-tile b { font-size: 30px; letter-spacing: -.05em; font-weight: 650; line-height: 1; }
.pkey-tile i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.pkey ul { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.pkey li { display: flex; gap: 10px; align-items: center; }
.pkey li::before { content: ""; width: 14px; height: 1px; background: var(--line-2); }
.pnote { grid-column: 4 / 9; grid-row: 3; align-self: end; justify-self: end; text-align: right; font-size: 12.5px; color: var(--muted); max-width: 420px; }

/* Panel del tema */
.topic-panel { margin-top: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.tp-inner { display: grid; grid-template-columns: 200px 1.2fr 1fr; gap: 44px; padding: 40px; align-items: start; position: relative; }
.tp-inner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 0% 0%, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%); pointer-events: none; }
.tp-tile { position: relative; aspect-ratio: 1; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--c) 8%, #fff)); padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; color: var(--c); }
.tp-glyph { position: absolute; right: 16px; top: 16px; width: 30px; height: 30px; }
.tp-sym { font-size: 76px; font-weight: 650; letter-spacing: -.06em; line-height: .9; }
.tp-body { position: relative; }
.tp-kicker { font-family: var(--f-mono); font-size: 12px; color: var(--c); letter-spacing: .04em; text-transform: uppercase; }
.tp-title { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.05; font-weight: 650; margin: 10px 0 14px; }
.tp-intro { color: var(--muted); margin-bottom: 28px; max-width: 460px; }
.tp-list { position: relative; border-left: 1px solid var(--line); padding-left: 32px; }
.tp-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 14px; }
.tp-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); display: flex; gap: 12px; }
.tp-list li::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; margin-top: 9px; background: var(--c); opacity: .7; }
.tp-list li:last-child { border-bottom: 0; }
.topic-panel.swap .tp-inner > * { animation: swapIn .6s var(--ease) both; }
.topic-panel.swap .tp-body { animation-delay: .05s; }
.topic-panel.swap .tp-list { animation-delay: .1s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Recursos (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { position: relative; background: var(--off); border-radius: var(--r-lg); padding: 32px; overflow: hidden; min-height: 340px; display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .3s, transform .5s var(--ease); }
.tile:hover { border-color: var(--line); }
.tile-wide { grid-column: span 2; }
.tile-full { grid-column: 1 / -1; min-height: 0; }
.tile h3 { font-size: 24px; letter-spacing: -.03em; font-weight: 650; margin-top: 14px; }
.tile p { color: var(--muted); font-size: 15.5px; margin-top: 6px; max-width: 380px; }
.tile-ico { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: var(--blue); border: 1px solid var(--line); }
.tile-ico .ico { width: 21px; height: 21px; }
.mock { margin-top: auto; padding-top: 28px; }

/* Mockup: apuntes */
.mock-doc { display: flex; gap: 16px; align-items: flex-end; height: 230px; }
.paper { background: #fff; border-radius: 10px 10px 0 0; box-shadow: var(--shadow-2); padding: 22px 22px 0; flex: 1; height: 100%; position: relative; transition: transform .6s var(--ease); }
.paper.back { flex: .8; height: 86%; opacity: .75; transform: rotate(-2deg) translateY(6px); }
.tile:hover .paper.front { transform: translateY(-8px); }
.paper .ph { font-size: 11px; font-family: var(--f-mono); color: var(--blue-ink); margin-bottom: 8px; }
.paper .pt { height: 12px; width: 62%; background: var(--ink); border-radius: 3px; margin-bottom: 16px; opacity: .85; }
.bar { height: 7px; border-radius: 4px; background: #E9ECF1; margin-bottom: 9px; }
.bar.w90 { width: 90%; } .bar.w75 { width: 75%; } .bar.w60 { width: 60%; } .bar.w40 { width: 40%; }
.paper .fig { display: flex; gap: 14px; align-items: center; margin: 14px 0; }
.paper .fig svg { width: 76px; height: 76px; color: var(--blue); flex: 0 0 auto; }
.paper .fig .lines { flex: 1; }
.hl { background: var(--blue-soft-2); }

/* Mockup: formulario */
.formula-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-1); padding: 6px 18px; font-family: var(--f-serif); font-size: 22px; }
.formula-card div { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.formula-card div:last-child { border-bottom: 0; }
.formula-card sub, .formula-card sup { font-size: .6em; }
.formula-card small { flex: 0 0 auto; font-family: var(--f-sans); font-size: 11px; color: var(--gray); letter-spacing: .02em; }

/* Mockup: resúmenes visuales (mapa) */
.mock-map svg { width: 100%; height: auto; }

/* Mockup: problema paso a paso */
.mock-steps { display: grid; gap: 10px; }
.mstep { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-1); font-size: 13.5px; color: var(--ink-2); }
.mstep i { font-style: normal; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--blue-soft); color: var(--blue-ink); }
.mstep.done i { background: var(--blue); color: #fff; }
.mstep .bar { flex: 1; margin: 0; }

/* Mockup: ejercicios */
.mock-ex { display: grid; gap: 10px; }
.ex-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-1); font-size: 13.5px; }
.ex-row .bar { flex: 1; margin: 0; }
.lvl { display: inline-flex; gap: 3px; }
.lvl b { width: 6px; height: 14px; border-radius: 2px; background: #E3E7EE; }
.lvl b.on { background: var(--blue); }

/* Mockup: vídeo */
.tile-video { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: center; padding: 40px; }
.tile-video .mock { margin: 0; padding: 0; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: radial-gradient(500px 260px at 70% 30%, rgba(52,120,246,.45), transparent 60%), linear-gradient(160deg, #1A1D24, #0C0D10); box-shadow: var(--shadow-2); }
.player .board { position: absolute; inset: 14% 10% 26% 10%; font-family: var(--f-serif); color: rgba(255,255,255,.9); font-size: clamp(16px, 2.2vw, 28px); display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.player .board span { color: #8DB6FF; }
.player .board small { font-family: var(--f-sans); font-size: 12px; color: rgba(255,255,255,.5); letter-spacing: .06em; text-transform: uppercase; }
.play { position: absolute; right: 8%; top: 50%; transform: translateY(-60%); width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(10px); display: grid; place-items: center; transition: transform .4s var(--ease), background-color .3s; }
.play::after { content: ""; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.tile:hover .play { transform: translateY(-60%) scale(1.08); background: rgba(52,120,246,.6); }
.pbar { position: absolute; left: 5%; right: 5%; bottom: 9%; display: flex; gap: 4px; }
.pbar i { height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
.pbar i.on { background: var(--blue); }
.chapters { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.chapters span { font-size: 12.5px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.chapters span:first-child { border-color: var(--blue-soft-2); color: var(--blue-ink); background: var(--blue-soft); }

/* ---------- ABAU ---------- */
.dark { background: #0B0C10; color: #fff; overflow: hidden; }
.dark::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 480px at 85% 0%, rgba(52,120,246,.28), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(52,120,246,.12), transparent 60%); pointer-events: none; }
.dark .wrap { position: relative; }
.dark .eyebrow { color: #8DB6FF; }
.dark .lead { color: rgba(255,255,255,.66); }
.abau-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: end; margin-bottom: 80px; }
.abau-grid .h2 { margin-top: 18px; }
.track { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: linear-gradient(90deg, rgba(141,182,255,.6), rgba(255,255,255,.1)); }
.track li { position: relative; padding-right: 32px; }
.node { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #0B0C10; border: 1px solid rgba(141,182,255,.45); color: #8DB6FF; margin-bottom: 28px; }
.node .ico { width: 21px; height: 21px; }
.node::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(141,182,255,.15); }
.track h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.track p { color: rgba(255,255,255,.6); font-size: 15px; }
.track .k { font-family: var(--f-mono); font-size: 12px; color: rgba(255,255,255,.4); display: block; margin-bottom: 10px; }

/* ---------- CTA final ---------- */
.final { text-align: center; overflow: hidden; }
.final .h2 { max-width: 900px; margin: 0 auto 22px; }
.final .lead { margin-bottom: 40px; }
.rings { position: absolute; left: 50%; top: 50%; width: min(1100px, 140vw); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: .9; }
.rings ellipse { fill: none; stroke: rgba(52,120,246,.14); }
.rings g { transform-origin: 50% 50%; animation: turn 80s linear infinite; }
.rings g:nth-child(2) { animation-duration: 110s; animation-direction: reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
.final .wrap { position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--white); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid p { color: var(--muted); margin-top: 12px; max-width: 280px; }
.foot-grid h4 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); margin-bottom: 14px; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--ink-2); transition: color .2s; }
.foot-grid a:hover { color: var(--blue-ink); }
.foot-grid .soon { color: var(--muted); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ---------- 5. Páginas interiores ---------- */
.page-hero { padding: calc(var(--header-h) + 72px) 0 56px; background: linear-gradient(180deg, #fff, var(--off)); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.crumbs a:hover { color: var(--blue-ink); }
.topic-head { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center; }
.topic-head .tp-tile { width: 220px; }
.topic-head .h2 { margin: 10px 0 16px; }
.mat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; min-height: 180px; display: flex; flex-direction: column; }
.mat .tile-ico { margin-bottom: 18px; }
.mat h3 { font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.mat ul { margin-top: 12px; }
.mat li a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.mat li a:hover { color: var(--blue-ink); }
.status { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #D9A21B; box-shadow: 0 0 0 4px rgba(217,162,27,.15); }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.contents li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; font-size: 17px; }
.contents li span { font-family: var(--f-mono); font-size: 13px; color: var(--gray); padding-top: 3px; }
.topic-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); }
.topic-nav a { display: flex; flex-direction: column; gap: 4px; max-width: 46%; }
.topic-nav a small { color: var(--muted); font-size: 13px; }
.topic-nav a b { font-weight: 600; letter-spacing: -.01em; }
.topic-nav a:hover b { color: var(--blue-ink); }
.topic-nav .next { text-align: right; margin-left: auto; }
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin: 36px 0 10px; }
.prose p { color: var(--ink-2); margin-bottom: 14px; }
.notice { background: var(--blue-soft); border: 1px solid var(--blue-soft-2); border-radius: var(--r); padding: 22px 24px; color: var(--ink-2); }
.notice b { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tp-inner { grid-template-columns: 160px 1fr; }
  .tp-list { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .pkey { grid-column: 2 / 8; }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .menu-toggle { display: inline-flex; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 28px;
    background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .35s var(--ease); }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--ink); }
  .nav-links a:hover { background: none; }
  .nav .btn { margin-top: 20px; height: 52px; }
  .menu-open body { overflow: hidden; }

  .hero .wrap { grid-template-columns: 1fr; gap: 8px; text-align: left; }
  .hero-visual { order: -1; max-width: 340px; width: 86%; margin-top: -4px; }
  .hero { padding-top: calc(var(--header-h) + 8px); }
  .chip { font-size: 11px; }
  .scroll-cue { display: none; }
  .pillar { padding: 36px 24px 8px; }
  .pillar h3 { font-size: 24px; }

  .ptable { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .el { grid-column: auto; grid-row: auto; }
  .pkey { display: none; }
  .el[data-id="repaso"] { grid-column: span 3; aspect-ratio: auto; }
  .pnote { grid-column: 1 / -1; grid-row: auto; text-align: left; justify-self: start; margin-top: 8px; }

  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: 1 / -1; }
  .tile-video { grid-template-columns: 1fr; padding: 32px; gap: 28px; }
  .abau-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .track { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .track::before { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .topic-head { grid-template-columns: 1fr; gap: 28px; }
  .topic-head .tp-tile { width: 140px; }
  .topic-head .tp-sym { font-size: 52px; }
  .mat-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 700px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { padding: 36px 0 28px; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .ptable { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .el { border-radius: 14px; padding: 10px 11px; }
  .el-glyph { top: 9px; right: 9px; }
  .el-glyph .ico { width: 16px; height: 16px; }
  .el-num { font-size: 11px; }
  .el-sym { font-size: 30px; }
  .el-name { font-size: 11px; margin-top: 5px; }
  .el[data-id="repaso"] { grid-column: 1 / -1; min-height: 104px; }
  .paper.back { display: none; }
  .tp-inner { grid-template-columns: 1fr; padding: 26px; gap: 22px; }
  .tp-tile { width: 110px; border-radius: 18px; padding: 10px 12px; }
  .tp-sym { font-size: 44px; }
  .tp-glyph { width: 22px; height: 22px; right: 10px; top: 10px; }
  .bento { grid-template-columns: 1fr; }
  .tile { min-height: 0; padding: 26px; }
  .track { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .hero-meta { gap: 14px; margin-top: 32px; }
  .mat-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .chip-2 { right: -4px; }
}

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

/* ---------- Análisis ABAU (mockup) ---------- */
.analysis { background: #fff; border-radius: 16px; box-shadow: var(--shadow-1); padding: 16px 18px; }
.an-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.an-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; margin: 12px 0 14px; border-bottom: 1px solid var(--line); }
.an-bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--blue), #8DB6FF); opacity: .85; transform-origin: bottom; transition: transform .6s var(--ease); }
.tile:hover .an-bars i { transform: scaleY(1.06); }
.an-flag { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: #FFF4E8; border-left: 3px solid #E8743B; }
.an-flag b { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #B4531F; }
.ex-row { color: var(--ink-2); }
.ex-tag { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; background: var(--blue); color: #fff; min-width: 38px; text-align: center; }
.ex-tag.alt { background: var(--blue-soft); color: var(--blue-ink); }

/* ---------- Precios ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); justify-content: center; gap: 24px; }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px 36px 36px; box-shadow: var(--shadow-1); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.plan-name { font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.plan-desc { color: var(--muted); font-size: 15px; margin-top: 4px; min-height: 3em; padding-right: 70px; }
.price { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 26px; }
.price .amount { font-size: 60px; font-weight: 650; letter-spacing: -.05em; line-height: 1; }
.price .per { color: var(--muted); font-size: 15px; }
.plan-list { display: grid; gap: 12px; margin-bottom: 34px; flex: 1; }
.plan-list li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.plan-list .ico { flex: 0 0 auto; width: 20px; height: 20px; color: var(--blue); margin-top: 1px; }
.plan-btn { width: 100%; }
.plan-featured { background: #0B0C10; color: #fff; border-color: transparent; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(52,120,246,.45); }
.plan-featured::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 260px at 100% 0%, rgba(52,120,246,.4), transparent 65%); pointer-events: none; }
.plan-featured > * { position: relative; }
.plan-featured .plan-desc, .plan-featured .price .per { color: rgba(255,255,255,.62); }
.plan-featured .plan-list li { color: rgba(255,255,255,.85); }
.plan-featured .plan-list .ico { color: #8DB6FF; }
.plan-badge { position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(141,182,255,.16); color: #B9D1FF; border: 1px solid rgba(141,182,255,.3); }
.plans-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 28px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }
@media (max-width: 600px) { .plan { padding: 32px 24px 26px; } .price .amount { font-size: 48px; } }
