/* ==========================================================================
   Aprendo Álgebra · Landing — maqueta de diseño (Fase 3)
   Tokens, componentes y secciones. Base de la maquetación (Fase 4).
   ========================================================================== */
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("/assets/fonts/baloo2-800.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700 900; font-display: swap; src: url("/assets/fonts/nunito.woff2") format("woff2"); }

:root {
  /* Base (juego) */
  --ink: #0b0820;
  --night: #150e2d;
  --card: #241a47;
  --card-2: #2e2160;
  --text: #f5f2ea;
  --muted: #b9b0d9;
  /* Acentos (juego) */
  --yellow: #ffb703;
  --orange: #fb8500;
  --green: #2dd573;
  --cyan: #4cc9f0;
  --purple: #9b5de5;
  --pink: #ff5470;
  /* Mundos (gradientes del contenido publicado) */
  --w1: linear-gradient(160deg, #10b981, #15803d);
  --w2: linear-gradient(160deg, #06b6d4, #1d4ed8);
  --w3: linear-gradient(160deg, #f59e0b, #c2410c);
  --w4: linear-gradient(160deg, #f43f5e, #991b1b);
  --w5: linear-gradient(160deg, #8b5cf6, #6b21a8);
  --w6: linear-gradient(160deg, #6366f1, #1e40af);
  --w7: linear-gradient(160deg, #2dd4bf, #047857);
  /* Admin */
  --a-canvas: #f6f7fb;
  --a-text: #191d2b;
  --a-text-2: #5a6275;
  --a-accent: #6a5bf6;
  --a-sidebar: #1c1a3a;
  /* Tipografía */
  --f-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --f-body: "Nunito", system-ui, sans-serif;
  --t-mega: clamp(56px, 10.4vw, 150px);
  --t-h1: clamp(44px, 7.5vw, 120px);
  --t-h2: clamp(36px, 5.6vw, 88px);
  --t-h3: clamp(24px, 2.6vw, 36px);
  --t-body: clamp(16px, 1.25vw, 19px);
  --t-small: 14px;
  --t-kicker: 12px;
  /* Espaciado y forma */
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(72px, 11vw, 160px);
  --r-sheet: clamp(28px, 4vw, 56px);
  --r-card: 24px;
  --r-pill: 999px;
  --shadow-pop: 0 6px 0 var(--orange), 0 18px 40px rgba(255, 183, 3, .28);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.3, 1.6, .5, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--f-body); font-weight: 700; font-size: var(--t-body); line-height: 1.55; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
main { overflow-x: clip; }
.wrap { width: min(1320px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Componentes ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: var(--t-kicker); letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); }
.kicker::before { content: ""; width: 9px; height: 9px; background: currentColor; }
.display { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; line-height: .86; letter-spacing: -.01em; margin: 0; }
.mega { font-size: var(--t-mega); }
.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); line-height: 1; }
.h2.tight { font-size: clamp(34px, 4.4vw, 68px); line-height: .9; }
.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 40ch; }
.grad-text { background: linear-gradient(90deg, var(--yellow), var(--orange) 30%, var(--pink) 55%, var(--purple) 78%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn { display: inline-flex; align-items: center; gap: 10px; font: 900 15px/1 var(--f-body); text-decoration: none; padding: 12px 20px; border-radius: var(--r-pill); border: 0; cursor: pointer; transition: transform .15s var(--ease-out), box-shadow .15s; }
.btn-primary { background: var(--yellow); color: var(--card); box-shadow: var(--shadow-pop); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--orange); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-dark { background: var(--card); color: var(--text); box-shadow: 0 6px 0 #000; }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .16); font-size: 14px; font-weight: 800; }

/* Marco de teléfono */
.phone { position: relative; width: var(--pw, 300px); aspect-ratio: 390 / 844; border-radius: calc(var(--pw, 300px) * .15); background: #0d0d12; padding: calc(var(--pw, 300px) * .035); box-shadow: 0 0 0 2px #2c2c36, 0 40px 80px rgba(0, 0, 0, .5); flex: none; }
.phone > img, .phone > video { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--pw, 300px) * .12); }
.phone::after { content: ""; position: absolute; top: calc(var(--pw, 300px) * .06); left: 50%; width: 30%; height: calc(var(--pw, 300px) * .075); transform: translateX(-50%); background: #0d0d12; border-radius: 99px; }
/* Marco de laptop */
.laptop { position: relative; width: 100%; }
.laptop .screen { background: #0d0d12; border-radius: 18px 18px 0 0; padding: 1.6% 1.6% 0; box-shadow: 0 0 0 2px #2c2c36; }
.laptop .screen img { border-radius: 6px 6px 0 0; width: 100%; }
.laptop .base { height: 16px; margin: 0 -6%; background: linear-gradient(#cfd3dc, #9aa0ad); border-radius: 0 0 20px 20px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }

/* Sprites flotantes */
.sprite { position: absolute; width: var(--s, 72px); pointer-events: none; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sym { position: absolute; font-family: var(--f-display); font-weight: 800; font-size: var(--s, 64px); color: var(--c, var(--yellow)); pointer-events: none; animation: float 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r0, -8deg)); } 50% { transform: translateY(-22px) rotate(var(--r1, 8deg)); } }

/* ---------- Navegación ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11, 8, 32, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--f-display); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 auto; padding: 0; font-size: 14px; font-weight: 800; }
.nav ul a { text-decoration: none; color: var(--muted); }
.nav ul a:hover { color: var(--text); }
.nav .btn { padding: 12px 20px; font-size: 15px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .08); color: var(--text); font-size: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0; background: radial-gradient(90% 70% at 50% 0%, #3a2a72 0%, var(--night) 45%, var(--ink) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.hero h1 { margin: 18px 0 22px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.hero .micro { font-size: 14px; color: var(--muted); font-style: italic; width: fit-content; }
.hero .stage { position: relative; display: grid; place-items: center; min-height: 620px; }
.hero .stage .phone { --pw: clamp(240px, 22vw, 320px); transform: rotate(4deg); }

/* ---------- Cifras ---------- */
.stats { background: linear-gradient(90deg, var(--yellow), var(--orange)); color: var(--card); padding: 44px 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat b { display: block; font: 800 clamp(48px, 6vw, 84px)/.9 var(--f-display); }
.stat span { font-weight: 900; font-size: 15px; }

/* ---------- Mundos (hojas apiladas) ---------- */
.intro { padding: var(--section) 0 48px; text-align: center; }
.intro .lead { margin: 18px auto 0; }
.sheets { position: relative; }
.sheet { position: sticky; top: 0; min-height: 100vh; border-radius: var(--r-sheet) var(--r-sheet) 0 0; display: flex; align-items: center; overflow: hidden; box-shadow: 0 -24px 60px rgba(0, 0, 0, .35); }
.sheet .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.sheet .grade { font: 800 clamp(96px, 16vw, 240px)/.8 var(--f-display); opacity: .22; position: absolute; right: 4%; top: 6%; }
.sheet .level { display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .22); }
.sheet h3 { margin: 18px 0 14px; }
.sheet p { max-width: 42ch; font-size: clamp(17px, 1.4vw, 21px); }
.sheet .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.sheet .boss { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; padding: 10px 18px 10px 10px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .28); }
.sheet .boss img { width: 36px; }
.sheet .phone { --pw: clamp(220px, 20vw, 290px); justify-self: center; transform: rotate(-3deg); }
.sheets-foot { position: relative; z-index: 2; background: var(--ink); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- Mecánicas (sección de color con capturas flotantes) ---------- */
.mech { position: relative; background: var(--purple); color: var(--card); overflow: hidden; padding: var(--section) 0; }
.mech .center { position: relative; z-index: 2; text-align: center; min-height: 72vh; display: grid; place-content: center; }
.mech .kicker { color: var(--ink); }
.mech h2 { margin: 16px 0; }
.mech .lead { color: var(--ink); margin: 0 auto; }
.mech .float { position: absolute; --pw: clamp(120px, 11vw, 170px); z-index: 1; animation: float 8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.mech-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.mech-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 6px 0 rgba(36, 26, 71, .25); }
.mech-card b { display: block; font: 800 20px/1.1 var(--f-display); }
.mech-card span { font-size: 14px; color: #4a3d7a; }
.try { position: relative; z-index: 2; margin: 40px auto 0; max-width: 560px; background: var(--card); color: var(--text); border-radius: var(--r-card); padding: 28px; text-align: center; box-shadow: 0 10px 0 rgba(0, 0, 0, .25); }
.try .kicker { color: var(--yellow); }
.try .scale { display: flex; justify-content: center; align-items: end; gap: 14px; margin: 18px 0 8px; font: 800 28px var(--f-display); }
.try .pan { padding: 12px 22px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.try .beam { height: 10px; border-radius: 8px; background: linear-gradient(#e0b84a, #9c7a1b); max-width: 360px; margin: 0 auto 18px; }
.try .btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Recompensas ---------- */
.rewards { padding: var(--section) 0; }
.rewards .head { text-align: center; margin-bottom: 56px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rcard { position: relative; border-radius: 32px; padding: 30px; min-height: 460px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.rcard .big { position: absolute; top: 26px; right: 20px; width: 150px; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .4)); animation: float 6s ease-in-out infinite; }
.rcard .kicker { color: rgba(255, 255, 255, .85); }
.rcard h3 { margin: 10px 0; }
.rcard p { margin: 0; font-size: 16px; }
.rcard.c1 { background: linear-gradient(160deg, #7c3aed, #3b1d8f); }
.rcard.c2 { background: linear-gradient(160deg, var(--orange), #b4231a); }
.rcard.c3 { background: linear-gradient(160deg, #0ea5e9, #1e3a8a); }
.strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.strip .chip { background: var(--card); color: var(--muted); }
.lalo { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.lalo img { width: 96px; height: auto; }
.lalo .bubble { background: var(--text); color: var(--card); padding: 14px 20px; border-radius: 20px 20px 20px 4px; font-weight: 900; max-width: 44ch; }

/* ---------- Modalidades ---------- */
.modes { padding: var(--section) 0; }
.modes .head { margin-bottom: 40px; }
.modes-top { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.modes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode { position: relative; border-radius: var(--r-card); padding: 24px; min-height: 210px; background: var(--card); overflow: hidden; border-top: 6px solid var(--accent, var(--yellow)); }
.mode img { width: 56px; margin-bottom: 14px; }
.mode b { display: block; font: 800 24px/1.05 var(--f-display); margin-bottom: 8px; }
.mode span { font-size: 15px; color: var(--muted); }
.mode.hi { min-height: 300px; padding-right: 210px; display: flex; align-items: flex-end; background: linear-gradient(160deg, #2a1b5e, #150e2d); }
.mode.hi .phone img { width: 100%; margin: 0; }
.mode.hi .phone { --pw: 150px; position: absolute; right: 34px; top: 30px; transform: rotate(7deg); }

/* ---------- Docentes (paleta admin) ---------- */
.teach { background: var(--a-canvas); color: var(--a-text); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: var(--section) 0; }
.teach .kicker { color: #4c3fd6; }
.teach .lead { color: var(--a-text-2); }
.teach .top { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.feat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; margin-top: 56px; }
.feat div { padding: 18px 0 0; border-top: 2px solid #e2e5ef; }
.feat b { display: flex; align-items: center; gap: 10px; font: 800 21px/1.1 var(--f-display); margin-bottom: 6px; }
.feat b::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--a-accent); flex: none; }
.feat span { color: var(--a-text-2); font-size: 16px; }
.shots { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-top: 56px; align-items: start; }
.shot { border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(25, 29, 43, .18); background: #fff; }
.shot figcaption { padding: 12px 16px; font-size: 14px; font-weight: 900; color: var(--a-text-2); }
.roles { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.roles .chip { background: #fff; color: var(--a-text); box-shadow: inset 0 0 0 2px #e2e5ef; }
.teach .btn-primary { background: var(--a-accent); color: #fff; box-shadow: 0 6px 0 #4436c9; }

/* ---------- Establecimientos ---------- */
.schools { background: linear-gradient(170deg, #1c1a3a, #0b0820); padding: var(--section) 0; }
.schools .top { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.schools .list { display: grid; gap: 16px; }
.schools .list.cols3 { grid-template-columns: repeat(3, 1fr); margin-top: 48px; }
.schools .list div { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 18px 20px; }
.schools .list b { display: block; font: 800 21px/1.1 var(--f-display); color: var(--cyan); margin-bottom: 4px; }
.schools .list span { font-size: 15px; color: var(--muted); }

/* ---------- Acceso ---------- */
.access { padding: var(--section) 0; }
.access-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.access-grid div { border-radius: var(--r-card); padding: 26px; background: var(--c, var(--card)); color: var(--card); }
.access-grid b { display: block; font: 800 26px/1.05 var(--f-display); margin-bottom: 8px; }
.access-grid span { font-size: 15px; font-weight: 800; }

/* ---------- CNB (cinta) ---------- */
.cnb { padding: var(--section) 0; text-align: center; overflow: hidden; background: var(--night); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.cnb .lead { margin: 18px auto 40px; }
.ribbon { overflow: hidden; padding: 18px 0; background: var(--card); }
.ribbon .track { display: flex; gap: 14px; width: max-content; animation: marquee 28s linear infinite; }
.ribbon .chip { font-size: 18px; padding: 12px 22px; color: var(--card); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { padding: var(--section) 0; }
.faq .wrap { max-width: 900px; }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 22px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font: 800 clamp(20px, 2vw, 26px)/1.2 var(--f-display); }
.faq summary::after { content: "+"; color: var(--yellow); font-size: 30px; line-height: .8; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; max-width: 64ch; }
.tbd { color: var(--pink); font-size: 13px; font-weight: 900; letter-spacing: .06em; }

/* ---------- Cierre ---------- */
.final { position: relative; overflow: hidden; text-align: center; padding: calc(var(--section) * 1.2) 0; background: linear-gradient(135deg, var(--pink), var(--orange) 40%, var(--yellow)); color: var(--card); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.final { --fgap: clamp(20px, 2vw, 28px); }
.final p { font-size: clamp(18px, 1.8vw, 24px); margin: 18px 0 var(--fgap); }
.final .cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ---------- Pie ---------- */
.foot { background: var(--ink); padding: 56px 0 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .modes-grid, .mech-grid { grid-template-columns: repeat(2, 1fr); }
  .modes-top { grid-template-columns: 1fr; }
  .cards3 { grid-template-columns: 1fr; }
  .rcard { min-height: 320px; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots figure:first-child { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav ul, .nav .btn { display: none; }
  .nav-toggle { display: block; }
  .hero .wrap, .sheet .wrap, .teach .top, .schools .top { grid-template-columns: 1fr; }
  .hero .stage { min-height: 520px; }
  .hero .sym { display: none; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .sheet { min-height: auto; position: relative; }
  .sheet .phone { --pw: 220px; }
  .mech .float { display: none; }
  .mech .center { min-height: auto; }
  .feat { grid-template-columns: 1fr; }
  .schools .list.cols3 { grid-template-columns: 1fr; }
  .laptop .base { margin: 0 -2%; }
  .access-grid { grid-template-columns: 1fr; }
  .mode.hi { padding-right: 24px; min-height: 210px; }
  .mode.hi .phone { display: none; }
}
@media (max-width: 520px) {
  .modes-grid, .mech-grid, .shots { grid-template-columns: 1fr; }
  .shots figure:first-child { grid-column: auto; }
  .sheet .grade { font-size: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sprite, .sym, .mech .float, .rcard .big, .ribbon .track { animation: none; }
}

/* ---------- Clases que reemplazan los estilos en línea de la maqueta ---------- */
/* Colores de la cinta de grados */
.g-5p { background:#34d399; }
.g-6p { background:#22d3ee; }
.g-1b { background:#fbbf24; }
.g-2b { background:#fb7185; }
.g-3b { background:#a78bfa; }
.g-4d { background:#818cf8; }
.g-5d { background:#2dd4bf; }
/* Acentos de las tarjetas de modalidades y de acceso */
.ac-yellow { --accent:var(--yellow); }
.ac-cyan { --accent:var(--cyan); }
.ac-green { --accent:var(--green); }
.ac-pink { --accent:var(--pink); }
.ac-purple { --accent:var(--purple); }
.ac-orange { --accent:var(--orange); }
.tile-green { --c:var(--green); }
.tile-cyan { --c:var(--cyan); }
.tile-yellow { --c:var(--yellow); }
.tile-pink { --c:var(--pink); }
.tile-lila { --c:#c4a1ff; }
.tile-orange { --c:var(--orange); }
/* Posiciones de la decoración (símbolos, sprites y capturas flotantes) */
.deco-1 { left:4%; top:14%; --s:72px; --c:var(--yellow); }
.deco-2 { left:44%; top:8%; --s:52px; --c:var(--cyan); --d:-2s; }
.deco-3 { left:1.5%; bottom:2%; --s:60px; --c:var(--pink); --d:-4s; }
.deco-4 { left:46%; bottom:3%; --s:64px; --c:var(--green); --d:-1s; }
.deco-5 { left:2%; top:10%; --s:84px; }
.deco-6 { right:4%; top:4%; --s:76px; --d:-2s; }
.deco-7 { right:0; bottom:16%; --s:120px; --d:-3s; }
.deco-8 { left:0; bottom:22%; --s:70px; --d:-1s; }
.deco-9 { left:18%; bottom:2%; --s:60px; --d:-4s; }
.deco-10 { right:18%; top:-2%; --s:66px; --d:-5s; }
.deco-11 { left:4%; top:5%; --r0:-9deg; --r1:-4deg; --d:0s; }
.deco-12 { left:85%; top:1%; --r0:8deg; --r1:12deg; --d:-2s; }
.deco-13 { left:0%; top:22%; --r0:6deg; --r1:10deg; --d:-4s; }
.deco-14 { left:87%; top:22%; --r0:-7deg; --r1:-12deg; --d:-1s; }
.deco-15 { left:6%; top:18%; --s:90px; }
.deco-16 { right:8%; top:14%; --s:80px; --d:-2s; }
.deco-17 { right:12%; bottom:12%; --s:120px; --d:-3s; }
.deco-18 { left:12%; bottom:14%; --s:74px; --d:-1s; }
/* Ajustes puntuales */
.delay-2 { animation-delay:-2s; }
.delay-4 { animation-delay:-4s; }
.cta-space { margin-top:28px; }
.faq-title { margin:14px 0 24px; }
.btn-ghost-dark { color:var(--card); box-shadow:inset 0 0 0 2px rgba(36,26,71,.35); }

/* ---------- Menú móvil ---------- */
@media (max-width: 860px) {
  .nav.open nav ul { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 68px; left: 0; right: 0; margin: 0; padding: 12px var(--gutter) 20px; background: rgba(11, 8, 32, .97); border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav.open nav ul a { display: block; padding: 12px 0; font-size: 17px; color: var(--text); }
}

/* ---------- Demo de balanza ---------- */
.try-msg { margin: 6px 0 16px; color: var(--muted); font-weight: 800; min-height: 1.5em; }
.try.solved .try-msg { color: var(--green); }
.try .beam { transition: transform .6s var(--ease-back); }
.try.tilt .beam { transform: rotate(-4deg); }
.try.solved .beam { transform: rotate(0); }

/* ==========================================================================
   Fase 5 · Animación
   ========================================================================== */
/* Pantalla de carga: se va sola aunque falle el JS (animación CSS de respaldo) */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--ink); animation: loader-out .45s ease 2.2s forwards; }
.loader-compass { width: 120px; height: 120px; filter: drop-shadow(0 18px 40px rgba(251, 133, 0, .35)); }
.loader-needle { transform-origin: 256px 256px; animation: needle-seek 1.1s var(--ease-back) both; }
.loader.done { animation: loader-out .45s ease forwards; }
@keyframes needle-seek { from { transform: rotate(-540deg); } to { transform: rotate(0); } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* K'uk en la página */
.hero-lalo { position: absolute; left: -14%; bottom: -3%; width: clamp(150px, 14vw, 210px); height: auto; z-index: 3; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .4)); }
.try { position: relative; }
.try-lalo { position: absolute; right: -34px; top: -70px; width: 110px; height: auto; opacity: 0; transform: scale(.4) rotate(-12deg); transition: opacity .3s, transform .5s var(--ease-back); pointer-events: none; }
.try.solved .try-lalo { opacity: 1; transform: scale(1) rotate(0); }

/* Los sprites flotan con CSS (transform); GSAP los desplaza con variables (translate/scale) */
.sprite, .sym, .mech .float { translate: calc(var(--tx, 0px) + var(--px, 0px)) calc(var(--ty, 0px) + var(--py, 0px)); scale: calc(var(--sc, 1) * var(--ps, 1)); }
.hero h1 .line { display: block; }
.sheet .phone, .sheet .grade { translate: var(--tx, 0px) var(--ty, 0px); }

/* Texto que rueda al pasar el mouse */
.roll { display: inline-block; overflow: hidden; vertical-align: top; height: 1.25em; line-height: 1.25; }
.roll > span { display: block; transition: transform .35s var(--ease-out); }
.roll > span::after { content: attr(data-t); display: block; }
a:hover > .roll > span, .btn:hover .roll > span { transform: translateY(-50%); }

@media (max-width: 860px) {
  .hero-lalo { left: -2%; bottom: -2%; width: 140px; }
  .try-lalo { right: -8px; top: -60px; width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .try-lalo { transition: none; }
}

/* ---------- Conoce a K'uk ---------- */
.lalo-sec { position: relative; overflow: hidden; padding: var(--section) 0; background: radial-gradient(70% 60% at 20% 20%, #14b8a6 0%, transparent 60%), linear-gradient(160deg, #0f766e, #063f36 70%, #052e28); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.lalo-sec::before { content: ""; position: absolute; inset: 0; opacity: .07; background: repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 28px), repeating-linear-gradient(-45deg, #fff 0 2px, transparent 2px 28px); pointer-events: none; }
.lalo-sec .kicker { color: #ffd166; }
.lalo-sec .lead { color: #d7fff6; }
.lalo-top { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.lalo-hero { position: relative; display: grid; justify-items: center; }
.lalo-big { width: clamp(280px, 31vw, 440px); height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; --r0: -3deg; --r1: 3deg; }
.lalo-say { position: relative; max-width: 300px; margin-bottom: 8px; background: var(--text); color: var(--card); padding: 14px 18px; border-radius: 20px; font-weight: 900; font-size: 17px; box-shadow: 0 8px 0 rgba(0, 0, 0, .18); }
.lalo-say::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 24px; height: 24px; background: var(--text); transform: translateX(-50%) rotate(45deg); border-radius: 4px; }
.lalo-poses { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 64px 0; }
.pose { margin: 0; padding: 20px 18px 22px; border-radius: var(--r-card); background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); text-align: center; }
.pose img { width: 100%; max-width: 180px; height: auto; margin: 0 auto 10px; transition: transform .3s var(--ease-back); }
.pose:hover img { transform: translateY(-8px) rotate(-3deg); }
.pose b { display: block; font: 800 22px/1.1 var(--f-display); }
.pose span { display: block; color: #bff5e9; font-size: 15px; margin-top: 4px; }
.lalo-help { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
.lalo-help .phone { --pw: clamp(220px, 20vw, 280px); transform: rotate(-4deg); }
.lalo-help h3 { margin: 0 0 24px; }
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tool { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px 128px 18px 18px; min-height: 168px; border-radius: 20px; background: var(--card); border-top: 5px solid var(--ac); }
.tool > img:first-child { width: 56px; height: 56px; flex: none; }
.tool b { display: block; font: 800 22px/1.1 var(--f-display); }
.tool .cost { display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; margin: 6px 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 900; color: var(--text); }
.tool .cost img { width: 18px; height: 18px; }
.tool p { margin: 0; color: var(--muted); font-size: 15px; }
.t-pista { --ac: var(--yellow); } .t-ayuda { --ac: var(--pink); } .t-fifty { --ac: var(--green); } .t-escudo { --ac: var(--cyan); }
.lalo-note { margin: 36px 0 0; color: #bff5e9; font-size: 15px; }
@media (max-width: 1080px) { .lalo-poses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .lalo-top, .lalo-help { grid-template-columns: 1fr; }
  .lalo-top > div:last-child { order: -1; }
  .lalo-help .phone { justify-self: center; }
  .tools { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .lalo-big { animation: none; } }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 40px var(--gutter); background: radial-gradient(90% 70% at 50% 0%, #3a2a72 0%, var(--night) 45%, var(--ink) 100%); }
.notfound img { width: clamp(160px, 20vw, 220px); height: auto; animation: float 6s ease-in-out infinite; }
.notfound h1 { margin: 10px 0 14px; }
.notfound .lead { margin: 0 auto 26px; }
.notfound .cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
@media (prefers-reduced-motion: reduce) { .notfound img { animation: none; } }

/* K'uk acompaña cada ayuda: se asoma por la esquina de la tarjeta */
.tool-lalo { position: absolute; right: -14px; bottom: -18px; width: 132px; height: auto; pointer-events: none; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); transform: rotate(var(--rt, 4deg)); transition: transform .35s var(--ease-back); }
.tool:hover .tool-lalo { transform: rotate(0) translateY(-8px) scale(1.04); }
.t-pista .tool-lalo { --rt: 6deg; }
.t-ayuda .tool-lalo { --rt: -4deg; }
.t-fifty .tool-lalo { --rt: 5deg; }
.t-escudo .tool-lalo { --rt: -6deg; bottom: -10px; }
@media (max-width: 860px) {
  .tool { padding-right: 104px; min-height: 150px; }
  .tool-lalo { width: 108px; right: -8px; }
}

/* Anchos intermedios y móvil: la decoración nunca tapa texto ni botones */
@media (max-width: 1439px) { .hero .sym { display: none; } }
@media (max-width: 1200px) {
  .mech .deco-13, .mech .deco-14 { display: none; }
  .tools { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .rcard { min-height: auto; padding-top: 158px; }
  .rcard .big { width: 124px; top: 18px; right: 18px; }
}
@media (max-width: 1200px) {
  .final .deco-17, .final .deco-18 { display: none; }
  .final .deco-15 { left: 4%; top: 6%; --s: 64px; }
  .final .deco-16 { right: 4%; top: 5%; --s: 58px; }
}
@media (max-width: 400px) {
  .tool { padding-right: 112px; min-height: 160px; }
  .tool-lalo { width: 96px; right: -6px; bottom: -12px; }
  .t-ayuda .tool-lalo { width: 92px; }
}

/* ---------- Página legal (privacidad) ---------- */
.legal { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.legal .wrap { max-width: 820px; }
.legal h1 { margin: 12px 0 6px; }
.legal-date { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.legal-lead { font-size: clamp(18px, 1.6vw, 21px); }
.legal h2 { margin: 48px 0 12px; color: var(--yellow); }
.legal-h4 { font: 800 19px/1.2 var(--f-display); margin: 22px 0 6px; color: var(--cyan); }
.legal p, .legal li { color: #ddd6f3; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal a { color: var(--cyan); }
.legal-summary { margin: 28px 0 8px; padding: 22px 24px; border-radius: var(--r-card); background: var(--card); border-left: 6px solid var(--green); }
.legal-summary b { font: 800 20px/1 var(--f-display); }
.legal-summary ul { margin: 10px 0 0; }
.legal-back { margin-left: auto; padding: 10px 16px; font-size: 14px; }
.faq details p a { color: var(--cyan); }

/* ---------- Gratis ---------- */
.foot-copy { font-weight: 800; color: var(--text); }
.free-seal { position: relative; display: inline-grid; place-content: center; width: 92px; height: 92px; margin-left: 6px; text-decoration: none; text-align: center; line-height: 1; color: var(--card); transform: rotate(-12deg); animation: seal-wobble 3.2s ease-in-out infinite; }
.free-seal::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--green); clip-path: polygon(50% 0, 61% 12%, 76% 6%, 80% 21%, 95% 24%, 90% 39%, 100% 50%, 90% 61%, 95% 76%, 80% 79%, 76% 94%, 61% 88%, 50% 100%, 39% 88%, 24% 94%, 20% 79%, 5% 76%, 10% 61%, 0 50%, 10% 39%, 5% 24%, 20% 21%, 24% 6%, 39% 12%); filter: drop-shadow(0 6px 0 #0e8a57); }
.free-seal span { font: 900 15px/1 var(--f-body); }
.free-seal b { font: 800 19px/1 var(--f-display); letter-spacing: .02em; }
.free-seal:hover { animation-play-state: paused; transform: rotate(0) scale(1.08); }
@keyframes seal-wobble { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.06); } }
.free { position: relative; overflow: hidden; padding: var(--section) 0; text-align: center; color: var(--card); background: linear-gradient(135deg, #2dd573 0%, #a3e635 45%, #ffb703 100%); border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
.free .kicker { color: var(--card); }
.free h2 { margin: 16px 0 18px; }
.free-lead { font-size: clamp(19px, 2vw, 26px); max-width: 34ch; margin: 0 auto 36px; }
.free-points { list-style: none; padding: 0; margin: 0 auto 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 980px; }
.free-points li { background: rgba(255, 255, 255, .55); border-radius: var(--r-card); padding: 22px; box-shadow: 0 6px 0 rgba(36, 26, 71, .18); }
.free-points b { display: block; font: 800 22px/1.1 var(--f-display); margin-bottom: 6px; }
.free-points span { font-size: 15px; }
.free .cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.deco-f1 { left: 6%; top: 5%; --s: 92px; }
.deco-f2 { right: 7%; top: 7%; --s: 76px; --d: -2s; }
.deco-f3 { right: 12%; bottom: 10%; --s: 104px; --d: -3s; }
@media (max-width: 1200px) { .deco-f3 { display: none; } }
@media (max-width: 860px) {
  .free-points { grid-template-columns: 1fr; }
  .deco-f1 { left: 3%; top: 3%; --s: 60px; }
  .deco-f2 { right: 3%; top: 4%; --s: 52px; }
}
@media (prefers-reduced-motion: reduce) { .free-seal { animation: none; } }

/* Menú: con 8 enlaces pasa a hamburguesa antes de partirse en dos líneas */
@media (max-width: 1180px) {
  .nav ul, .nav .wrap > .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open nav ul { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 68px; left: 0; right: 0; margin: 0; padding: 12px var(--gutter) 20px; background: rgba(11, 8, 32, .97); border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav.open nav ul a { display: block; padding: 12px 0; font-size: 17px; color: var(--text); }
}

/* ---------- Carrusel del panel docente ---------- */
.showcase { position: relative; }
.showcase .screen { position: relative; }
.showcase .slides { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px 6px 0 0; background: #e9ecf3; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.02); transition: opacity .6s ease, transform .8s var(--ease-out); }
.slide.is-active { opacity: 1; transform: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 0; }
.slide.is-doc { background: linear-gradient(160deg, #e9ecf3, #d5dae6); }
.slide.is-doc img { width: 78%; height: auto; margin: 3% auto 0; object-fit: initial; border-radius: 6px; box-shadow: 0 14px 30px rgba(25, 29, 43, .28); }
.slide.is-wide { background: #120c2c; }
.slide.is-wide img { object-fit: contain; object-position: center; }
.sc-nav { position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; margin-top: -23px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(25, 29, 43, .28); color: #fff; font: 800 28px/1 var(--f-display); cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: .75; transition: opacity .2s, background .2s, transform .2s var(--ease-back); }
.sc-prev { left: 12px; } .sc-next { right: 12px; }
.showcase:hover .sc-nav, .sc-nav:focus-visible { opacity: 1; }
.sc-nav:hover { background: rgba(106, 91, 246, .75); transform: scale(1.08); }
.sc-nav:focus-visible, .sc-dot:focus-visible { outline: 3px solid var(--a-accent); outline-offset: 3px; }
.sc-dots { display: flex; justify-content: center; gap: 10px; margin: 22px 0 16px; }
.sc-dot { width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 2px solid rgba(106, 91, 246, .55); background: rgba(106, 91, 246, .12); cursor: pointer; transition: width .3s var(--ease-out), background .3s, border-color .3s; }
.sc-dot:hover { background: rgba(106, 91, 246, .35); }
.sc-dot.is-active { width: 34px; border-radius: 999px; background: var(--a-accent); border-color: var(--a-accent); }
.sc-caption { position: relative; padding: 18px 22px 18px 24px; border-radius: 18px; background: #fff; border-left: 6px solid var(--a-accent); box-shadow: 0 14px 34px rgba(25, 29, 43, .12); min-height: 106px; }
.sc-count { position: absolute; top: 16px; right: 18px; font-size: 13px; font-weight: 900; color: var(--a-text-2); }
.sc-title { display: block; font: 800 22px/1.1 var(--f-display); color: var(--a-text); margin-bottom: 6px; padding-right: 60px; }
.sc-text { margin: 0; color: var(--a-text-2); font-size: 16px; }
.sc-caption.swap .sc-title, .sc-caption.swap .sc-text { animation: cap-in .45s var(--ease-out); }
@keyframes cap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .sc-nav { width: 38px; height: 38px; margin-top: -19px; font-size: 22px; opacity: .9; }
  .sc-prev { left: 8px; } .sc-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; transform: none; }
  .sc-caption.swap .sc-title, .sc-caption.swap .sc-text { animation: none; }
}

/* ==========================================================================
   Arte V3 · fondos ilustrados (portada y 7 mundos)
   Las capas de color originales quedan debajo como respaldo. Los fondos de
   los mundos se piden solo al acercarse (clase .bg-on, en js/main.js).
   ========================================================================== */
.hero {
  --hero-img: url("/assets/media/fondos/hero-1920.webp");
  background:
    linear-gradient(90deg, rgba(11, 8, 32, .86) 0%, rgba(11, 8, 32, .62) 38%, rgba(11, 8, 32, .12) 68%, rgba(11, 8, 32, 0) 100%),
    linear-gradient(180deg, rgba(11, 8, 32, 0) 62%, rgba(11, 8, 32, .55) 100%),
    var(--hero-img) center / cover no-repeat,
    radial-gradient(90% 70% at 50% 0%, #3a2a72 0%, var(--night) 45%, var(--ink) 100%);
}
.sheet {
  --shade: linear-gradient(90deg, rgba(8, 6, 28, var(--sa, .62)) 0%, rgba(8, 6, 28, calc(var(--sa, .62) * .7)) 36%, rgba(8, 6, 28, 0) 64%);
  background: var(--shade), var(--bg, none) var(--bgpos, center) / cover no-repeat, var(--grad);
}
.sheet.w1 { --grad: var(--w1); --sa: .66; } .sheet.w2 { --grad: var(--w2); --sa: .8; } .sheet.w3 { --grad: var(--w3); --sa: .8; }
.sheet.w4 { --grad: var(--w4); --sa: .5; } .sheet.w5 { --grad: var(--w5); --sa: .55; } .sheet.w6 { --grad: var(--w6); --sa: .78; }
.sheet.w7 { --grad: var(--w7); --sa: .4; }
.sheet.w1.bg-on { --bg: url("/assets/media/fondos/w1-1920.webp"); } .sheet.w2.bg-on { --bg: url("/assets/media/fondos/w2-1920.webp"); }
.sheet.w3.bg-on { --bg: url("/assets/media/fondos/w3-1920.webp"); } .sheet.w4.bg-on { --bg: url("/assets/media/fondos/w4-1920.webp"); }
.sheet.w5.bg-on { --bg: url("/assets/media/fondos/w5-1920.webp"); } .sheet.w6.bg-on { --bg: url("/assets/media/fondos/w6-1920.webp"); }
.sheet.w7.bg-on { --bg: url("/assets/media/fondos/w7-1920.webp"); }
.sheet .chip { background: rgba(8, 6, 28, .38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet h3, .sheet p { text-shadow: 0 2px 14px rgba(8, 6, 28, .55); }

/* Pantallas grandes o de alta densidad: versión 2560 */
@media (min-width: 1600px), (min-width: 861px) and (min-resolution: 1.5dppx) {
  .hero { --hero-img: url("/assets/media/fondos/hero-2560.webp"); }
  .sheet.w1.bg-on { --bg: url("/assets/media/fondos/w1-2560.webp"); } .sheet.w2.bg-on { --bg: url("/assets/media/fondos/w2-2560.webp"); }
  .sheet.w3.bg-on { --bg: url("/assets/media/fondos/w3-2560.webp"); } .sheet.w4.bg-on { --bg: url("/assets/media/fondos/w4-2560.webp"); }
  .sheet.w5.bg-on { --bg: url("/assets/media/fondos/w5-2560.webp"); } .sheet.w6.bg-on { --bg: url("/assets/media/fondos/w6-2560.webp"); }
  .sheet.w7.bg-on { --bg: url("/assets/media/fondos/w7-2560.webp"); }
}
/* Móvil: composición vertical propia, texto arriba y teléfono abajo */
@media (max-width: 860px) {
  .hero {
    --hero-img: url("/assets/media/fondos/hero-movil-720.webp");
    background:
      linear-gradient(180deg, rgba(11, 8, 32, .88) 0%, rgba(11, 8, 32, .7) 42%, rgba(11, 8, 32, .25) 70%, rgba(11, 8, 32, .5) 100%),
      var(--hero-img) center top / cover no-repeat,
      radial-gradient(90% 70% at 50% 0%, #3a2a72 0%, var(--night) 45%, var(--ink) 100%);
  }
  @media (min-resolution: 2.5dppx) { .hero { --hero-img: url("/assets/media/fondos/hero-movil.webp"); } }
  .sheet { --shade: linear-gradient(180deg, rgba(8, 6, 28, var(--sa, .62)) 0%, rgba(8, 6, 28, calc(var(--sa, .62) * .75)) 45%, rgba(8, 6, 28, .1) 80%); --bgpos: center top; }
  .sheet.w1.bg-on { --bg: url("/assets/media/fondos/w1-movil.webp"); } .sheet.w2.bg-on { --bg: url("/assets/media/fondos/w2-movil.webp"); }
  .sheet.w3.bg-on { --bg: url("/assets/media/fondos/w3-movil.webp"); } .sheet.w4.bg-on { --bg: url("/assets/media/fondos/w4-movil.webp"); }
  .sheet.w5.bg-on { --bg: url("/assets/media/fondos/w5-movil.webp"); } .sheet.w6.bg-on { --bg: url("/assets/media/fondos/w6-movil.webp"); }
  .sheet.w7.bg-on { --bg: url("/assets/media/fondos/w7-movil.webp"); }
}

/* Arte V3: el ícono 50:50 (dos siluetas oscuras) necesita superficie clara; su etiqueta sigue siendo texto */
.t-fifty > img:first-child { background: #f5f2ea; border-radius: 14px; padding: 6px; box-shadow: inset 0 0 0 2px rgba(36, 26, 71, .15); }

/* Arte V3 · cierre: follaje con transparencia en los bordes, SOBRE el degradado cálido (no lo reemplaza) */
.final {
  background:
    url("/assets/media/fondos/cierre-follaje.webp") center / cover no-repeat,
    linear-gradient(135deg, var(--pink), var(--orange) 40%, var(--yellow));
}
@media (max-width: 860px) {
  .final {
    background:
      url("/assets/media/fondos/cierre-follaje-movil.webp") center / cover no-repeat,
      linear-gradient(135deg, var(--pink), var(--orange) 40%, var(--yellow));
  }
}

/* Cierre sin K'uk: aire sobre el título en móvil para que no choque con las monedas */
@media (max-width: 860px) { .final h2 { margin-top: 48px; } }

/* Ícono nuevo (X de cristal) en la pantalla de carga */
.loader-icon { width: 120px; height: 120px; border-radius: 26px; filter: drop-shadow(0 18px 40px rgba(76, 201, 240, .35)); animation: icon-pop .9s var(--ease-back) both; }
@keyframes icon-pop { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.brand img { border-radius: 9px; }
@media (prefers-reduced-motion: reduce) { .loader-icon { animation: none; } }

/* ---------- Cierre con los jefes (estilo póster) ----------
   Capas: degradado cálido intacto (arriba) → paisaje amarillo suave que aparece hacia
   abajo (::before, con máscara) → brillo dorado → jefes de pie → follaje y adornos. */
.final { padding-bottom: 0; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 32% at 50% 90%, rgba(255, 240, 170, .8), rgba(255, 240, 170, 0) 100%),
    url("/assets/media/jefes/cierre-fondo.webp") center bottom / cover no-repeat;
  opacity: .62;
  -webkit-mask-image: linear-gradient(180deg, transparent 22%, #000 78%);
          mask-image: linear-gradient(180deg, transparent 22%, #000 78%);
}
.final .wrap { position: relative; z-index: 2; }
.final-jefes { position: relative; z-index: 1; display: block; width: min(1440px, 100%); margin: var(--fgap) auto 0; pointer-events: none; }
/* main.js ajusta el ancho y la posición para alinear el 1.er jefe con la «T» y el 7.º con el «?» */
.final-jefes.alineada { margin-left: var(--jx, auto); width: var(--jw, auto); }
.final-jefes img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 22px rgba(36, 26, 71, .28)); }
@media (max-width: 860px) {
  .final::before {
    background:
      radial-gradient(70% 24% at 50% 92%, rgba(255, 240, 170, .8), rgba(255, 240, 170, 0) 100%),
      url("/assets/media/jefes/cierre-fondo-movil.webp") center bottom / cover no-repeat;
    -webkit-mask-image: linear-gradient(180deg, transparent 38%, #000 82%);
            mask-image: linear-gradient(180deg, transparent 38%, #000 82%);
  }
  .final-jefes { width: min(520px, 100%); }
}
/* los jefes ocupan el borde inferior: el cofre y la estrella quedarían tapados */
.final .deco-17, .final .deco-18 { display: none; }
/* la sección creció con los jefes: monedas a altura fija, junto al título y no sobre él */
.final .deco-15 { top: 40px; } .final .deco-16 { top: 36px; }
