/* ChessZ · página de presentación. Misma paleta que la app (tema.py). Fuentes servidas desde aquí: nada de terceros (RGPD). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("/fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 700; font-display: swap; src: url("/fonts/orbitron-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 800; font-display: swap; src: url("/fonts/orbitron-latin-800-normal.woff2") format("woff2"); }
:root {
  --bg: #09070D; --surface: #111019; --surface-2: #171020; --highlight: #28133D; --line: #30243B;
  --text: #F0EAF6; --text-2: #A69AAF; --accent: #9333EA; --accent-light: #C084FC; --accent-dark: #6B21A8; --accent-ink: #FFFFFF;
  --legendary: #F5B942; --bad: #ff8a8a; --r: 20px; --max: 1200px;
  --brand: "Orbitron", "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--body); }
/* Fondo de la marca (flores y torii), fijo detrás de la página; un pseudo-elemento fijo porque iOS ignora background-attachment. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 55% at 50% -8%, rgba(107,33,168,.30), transparent 62%), url("/img/chessz/fondo.webp") center bottom / cover no-repeat, var(--bg); }
a { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(var(--max), 100% - 40px); margin: 0 auto; }

header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.marca { display: flex; align-items: center; gap: 10px; font: 800 20px var(--brand); letter-spacing: .02em; color: var(--text); text-decoration: none; }
.marca img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(192,132,252,.35); }
.marca b { color: var(--accent-light); }
nav.top { display: flex; align-items: center; gap: 16px; font-size: 15px; }
nav.top a { color: var(--text-2); text-decoration: none; }
nav.top a.idioma { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
  padding: 15px 28px; border-radius: 14px; box-shadow: 0 4px 0 var(--accent-dark), 0 10px 30px rgba(147,51,234,.25); font-size: 17px; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn.sec { background: transparent; color: var(--text); box-shadow: none; border: 1.5px solid var(--line); }

.hero { display: grid; gap: 36px; align-items: start; padding: 28px 0 56px; }
.hero > *, .funcion > *, .pasos > *, .planes > * { min-width: 0; }
.kicker { display: inline-block; color: var(--accent-light); font: 700 12px var(--brand); letter-spacing: .14em; text-transform: uppercase;
  background: rgba(147,51,234,.14); border: 1px solid rgba(192,132,252,.35); padding: 6px 12px; border-radius: 999px; }
h1 { overflow-wrap: break-word; font-size: clamp(30px, 7vw, 54px); line-height: 1.08; margin: 16px 0 14px; letter-spacing: -.02em; }
h1 em { font-style: normal; color: var(--accent-light); }
.sub { color: var(--text-2); font-size: 19px; margin: 0 0 26px; max-width: 34em; }
.nota { color: var(--text-2); font-size: 14px; margin-top: 14px; }
.movil { border-radius: 26px; border: 1px solid rgba(192,132,252,.25); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 8px #0e0b14; overflow: hidden; }
/* Portada: el banner de la marca. En el móvil va debajo del titular y del botón (lo primero que se ve es la propuesta); en el ordenador, a la derecha. */
.banner { width: 100%; border-radius: var(--r); border: 1px solid rgba(192,132,252,.3); box-shadow: 0 20px 60px rgba(107,33,168,.35); }

section { padding: 56px 0; }
h2 { font: 800 clamp(24px, 4.6vw, 34px)/1.2 var(--brand); margin: 0 0 12px; letter-spacing: .01em; }
.intro { color: var(--text-2); max-width: 40em; margin: 0 0 30px; }

.pasos { display: grid; gap: 16px; counter-reset: paso; }
.paso { background: rgba(17,16,25,.86); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.paso::before { counter-increment: paso; content: counter(paso); display: inline-flex; width: 34px; height: 34px; border-radius: 10px;
  align-items: center; justify-content: center; background: var(--highlight); color: var(--accent-light); font: 800 15px var(--brand);
  box-shadow: 0 0 0 1px rgba(192,132,252,.4); margin-bottom: 12px; }
.paso h3 { margin: 0 0 6px; font-size: 19px; }
.paso p { margin: 0; color: var(--text-2); }

/* Cada función, en un marco con trazo de pincel en la esquina (como en la referencia de la marca). */
.funcion { display: grid; gap: 28px; align-items: start; padding: 26px; margin: 0 0 22px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(40,19,61,.55), rgba(17,16,25,.88) 55%); border: 1px solid var(--line); border-radius: 24px; }
.funcion::after { content: ""; position: absolute; right: -60px; top: 22px; width: 280px; height: 22px; pointer-events: none; transform: rotate(-22deg);
  border-radius: 60% 30% 70% 20%; background: linear-gradient(90deg, transparent, rgba(147,51,234,.45) 35%, rgba(192,132,252,.25) 70%, transparent); filter: blur(.6px); }
.funcion > * { position: relative; z-index: 1; }
.funcion h3 { font-size: 24px; margin: 0 0 10px; }
.funcion p { color: var(--text-2); margin: 0 0 10px; }
.funcion .movil { max-width: 340px; width: 100%; }
ul.check { list-style: none; padding: 0; margin: 12px 0 0; }
ul.check li { padding-left: 28px; position: relative; margin: 6px 0; color: var(--text); }
ul.check li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-light); font-weight: 800; }

.planes { display: grid; gap: 16px; }
.plan { background: rgba(17,16,25,.88); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.plan.dest { border-color: rgba(192,132,252,.55); background: linear-gradient(160deg, rgba(147,51,234,.18), rgba(17,16,25,.9) 60%); }
.plan h3 { margin: 0; font-size: 20px; }
.precio { font: 800 30px var(--brand); margin: 8px 0 4px; }
.precio small { font-size: 15px; color: var(--text-2); font-weight: 500; }

details { background: rgba(17,16,25,.88); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin: 0 0 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--accent-light); font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { color: var(--text-2); margin: 0 0 16px; }

/* Llamada final: el samurái de fondo, fundido hacia el texto. */
.final .wrap { position: relative; overflow: hidden; padding: 34px 26px; border-radius: 24px; border: 1px solid rgba(192,132,252,.35);
  background: linear-gradient(90deg, rgba(17,16,25,.97) 40%, rgba(17,16,25,.55) 75%, rgba(17,16,25,.25)), url("/img/chessz/samurai.webp") right top / auto 130% no-repeat, var(--surface); }
.final .sub { max-width: 30em; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--text-2); font-size: 14px; background: rgba(9,7,13,.85); }
footer nav { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-bottom: 12px; }
footer a { color: var(--text-2); }

/* Textos legales */
.legal { max-width: 46em; padding: 10px 0 50px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 22px; margin-top: 30px; }
.legal p, .legal li { color: #DCD3E6; }
.legal h1, .legal h2 { font-family: var(--brand); }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.falta { background: rgba(255,138,138,.15); color: var(--bad); padding: 0 4px; border-radius: 4px; }

@media (max-width: 400px) {
  nav.top a[href="#como"] { display: none; }          /* en móviles estrechos la cabecera no cabe entera */
}
@media (min-width: 860px) {
  /* Una sola rejilla de 12 columnas para todas las parejas texto + imagen: el texto a la izquierda (7), la imagen a la derecha (5). */
  .hero, .funcion { grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .hero > :first-child, .funcion > :first-child { grid-column: 1 / span 7; }
  .hero > :last-child, .funcion > :last-child { grid-column: 8 / span 5; justify-self: end; }
  .hero { align-items: center; }
  .hero { padding: 40px 0 70px; }
  .pasos { grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
  .planes { grid-template-columns: 1fr 1fr; column-gap: 24px; }
}

/* Foco visible al navegar con el teclado, y respuesta al pasar el ratón (solo CSS, sin scripts). */
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; border-radius: 10px; }
.btn { transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-dark), 0 14px 34px rgba(147,51,234,.32); }
.paso, .plan, details { transition: transform .2s ease, border-color .2s ease; }
.paso:hover, .plan:hover { transform: translateY(-2px); border-color: rgba(192,132,252,.45); }
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: cc-entra .6s ease-out both; }
  .hero > :last-child { animation-delay: .12s; }
  @keyframes cc-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
