/* Ovilo — sitio promocional. Los colores son los de la app (src/features/games/colors.ts). */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FFF6EC;
  --surface: #FFFFFF;
  --raised: #FBEFE2;
  --ink: #2A2233;
  --ink-soft: #574E60;
  --ink-faint: #716779;
  --border: #EADCCB;
  --accent: #CF4A0C;
  --symbol: #FF8A3D;
  --shadow: 122 74 31;
  --bezel: #2A2233;
  --float: .16;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1622;
    --surface: #26202F;
    --raised: #312A3C;
    --ink: #F7F0E8;
    --ink-soft: #C2B8CB;
    --ink-faint: #9A90A4;
    --border: #3A3346;
    --accent: #FF8A3D;
    --shadow: 0 0 0;
    --bezel: #0E0B13;
    --float: .2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-weight: 900; letter-spacing: -.01em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(2rem, 5.2vw, 3.1rem); text-align: center; }
.lead { color: var(--ink-soft); text-align: center; max-width: 34em; margin: 14px auto 0; font-size: 1.1rem; text-wrap: balance; }

section, .top, footer { padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right)); }
section > *, .top, footer > * { max-width: var(--wrap); margin-inline: auto; }
section { padding-block: clamp(56px, 9vw, 110px); }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 1.45rem; letter-spacing: -.01em; }
.symbol { color: var(--symbol); }
.brand .symbol { width: 34px; height: auto; }
.langs { display: flex; padding: 4px; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; font-weight: 700; }
.langs a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); }
.langs a[aria-current] { background: var(--ink); color: var(--bg); }

/* Portada */
.hero { position: relative; padding-top: clamp(20px, 4vw, 48px); padding-bottom: clamp(40px, 6vw, 72px); display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; max-width: none; }
.hero > .hero-text, .hero > .hero-video { margin: 0 auto; position: relative; z-index: 1; }
.hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; max-width: 560px; }
.app-icon { width: 112px; height: 112px; border-radius: 25px; box-shadow: 0 14px 34px rgb(var(--shadow) / .28); }
.wordmark { display: flex; gap: 8px; margin: 26px 0 22px; }
.wordmark span {
  width: clamp(48px, 13vw, 62px); aspect-ratio: 1; display: grid; place-items: center;
  background: var(--g); color: var(--on); border-radius: 26%;
  font-weight: 900; font-size: clamp(1.6rem, 6.4vw, 2.1rem); line-height: 1;
  box-shadow: 0 5px 0 rgb(0 0 0 / .16), 0 12px 20px rgb(var(--shadow) / .16);
  animation: drop .7s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i) * 80ms + 100ms);
}
h1 { font-size: clamp(2.1rem, 7.6vw, 3.5rem); }
h1 span { display: block; }
h1 .accent { color: var(--accent); }
.sub { margin-top: 18px; color: var(--ink-soft); font-size: clamp(1.05rem, 2.6vw, 1.22rem); max-width: 28em; text-wrap: balance; }

.store { margin-top: 30px; display: inline-flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; }
.badge { height: 50px; width: auto; margin: 13px; }
.soon { font-weight: 800; font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--surface); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; }
.store-date { font-weight: 700; font-size: 1rem; color: var(--ink-soft); }
/* La reserva (FO-609): desde el día de salida, un script del <head> marca la página como `released`. */
.released .pre, html:not(.released) .post { display: none; }
@media (prefers-color-scheme: dark) { .badge { outline: 1px solid #5d5566; outline-offset: -1px; border-radius: 9px; } }

.floaters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; margin: 0; max-width: none; }
.floaters span {
  position: absolute; width: var(--s); height: var(--s); display: grid; place-items: center;
  border-radius: 26%; background: var(--g); color: #fff; opacity: var(--float);
  font-weight: 900; font-size: calc(var(--s) * .5); line-height: 1;
  rotate: var(--r); animation: bob 9s ease-in-out infinite; animation-delay: var(--d);
}

/* El teléfono: el mismo marco para el video y para las capturas */
.phone { width: min(300px, 74vw); padding: 9px; background: var(--bezel); border-radius: 46px; box-shadow: 0 30px 60px rgb(var(--shadow) / .3), 0 0 0 1px rgb(255 255 255 / .08) inset; }
.phone .screen { width: 100%; height: auto; border-radius: 37px; background: var(--raised); }
.hero-video .phone .screen { aspect-ratio: 9 / 16; object-fit: cover; }
.video-note { margin-top: 14px; text-align: center; color: var(--ink-faint); font-size: .88rem; max-width: 300px; }

/* Las diferencias */
.why-grid { display: grid; gap: 16px; margin-top: 40px; grid-template-columns: 1fr; }
.why-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 26px; box-shadow: 0 8px 24px rgb(var(--shadow) / .07); }
.why-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--raised); color: var(--accent); margin-bottom: 16px; }
.why-icon svg { width: 28px; height: 28px; }
.why-grid h3 { font-size: 1.3rem; }
.why-grid p { color: var(--ink-soft); margin-top: 8px; font-size: 1rem; }

/* Los juegos */
.game-list { display: grid; gap: clamp(20px, 3vw, 32px); margin-top: clamp(36px, 5vw, 56px); }
.game { background: var(--g); color: var(--on); border-radius: clamp(30px, 4vw, 44px); display: grid; overflow: hidden; box-shadow: 0 16px 36px rgb(var(--shadow) / .16); }
.game-text { padding: clamp(28px, 5vw, 56px); padding-bottom: 8px; display: flex; flex-direction: column; justify-content: center; }
.art { width: 104px; height: 104px; font-family: var(--font); font-weight: 900; margin-bottom: 20px; }
.game h3 { font-size: clamp(1.9rem, 4.6vw, 2.7rem); }
.game p { margin-top: 12px; font-size: clamp(1.05rem, 2.2vw, 1.2rem); max-width: 22em; opacity: .94; font-weight: 600; }
.game-shot { display: flex; justify-content: center; padding: 28px 20px 0; max-height: 440px; }
.game-shot .phone { width: min(270px, 70vw); border-radius: 44px 44px 0 0; padding-bottom: 0; align-self: flex-start; box-shadow: 0 20px 44px rgb(0 0 0 / .28); }
.game-shot .screen { border-radius: 35px 35px 0 0; }

/* La semana */
.week-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
.week-row li { background: var(--g); color: var(--on); border-radius: 24px; padding: 14px 10px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.week-row li:last-child { grid-column: 1 / -1; }
.week-row .art { width: 64px; height: 64px; margin: 0; }
.day { font-weight: 900; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.day-game { font-weight: 800; font-size: .95rem; line-height: 1.2; text-wrap: balance; }
.free-note { margin: 28px auto 0; max-width: 40em; text-align: center; color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; }

/* Cierre y pie */
.end { text-align: center; }
.end .symbol { width: 92px; height: auto; margin: 0 auto 18px; }
.end p { color: var(--ink-soft); margin-top: 12px; font-size: 1.1rem; }
footer { border-top: 1px solid var(--border); padding-block: 32px calc(32px + env(safe-area-inset-bottom)); text-align: center; color: var(--ink-faint); font-size: .9rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-bottom: 14px; font-weight: 800; font-size: 1rem; color: var(--ink); }
footer nav a { text-underline-offset: 4px; }
footer p + p { margin-top: 8px; }
.credit { font-size: .78rem; max-width: 60em; }

/* Entrada suave al desplazar: sólo si hay JS y la persona no pidió menos movimiento */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; translate: 0 0; }

@keyframes drop { from { opacity: 0; translate: 0 -18px; rotate: -8deg; } }
@keyframes bob { 50% { translate: 0 -14px; rotate: calc(var(--r) + 5deg); } }

@media (min-width: 620px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid li:last-child { grid-column: 1 / -1; }
  .week-row { grid-template-columns: repeat(4, 1fr); }
  .week-row li:last-child { grid-column: auto; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2)); }
  .hero-text { text-align: left; align-items: flex-start; margin: 0; }
  .store { align-items: flex-start; }
  .badge { margin-left: 0; }
  .why-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .why-grid li:last-child { grid-column: auto; }
  .why-grid li { padding: 22px; }
  .why-grid h3 { font-size: 1.15rem; }
  .why-grid p { font-size: .95rem; }
  .game { grid-template-columns: 1.15fr 1fr; min-height: 430px; }
  .game.flip .game-text { order: 2; }
  .game-text { padding-bottom: clamp(28px, 5vw, 56px); }
  .game-shot { max-height: 430px; padding-top: 44px; }
  .game-shot .phone { width: 290px; }
  .art { width: 120px; height: 120px; }
  .week-row { grid-template-columns: repeat(7, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wordmark span, .floaters span { animation: none; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
}

/* Privacidad y soporte: una columna de lectura, con el texto tal cual sale de la app */
.doc { max-width: calc(720px + 2 * var(--pad)); margin-inline: auto; padding: clamp(20px, 4vw, 44px) max(var(--pad), env(safe-area-inset-left)) clamp(48px, 8vw, 88px) max(var(--pad), env(safe-area-inset-right)); font-size: 1.02rem; line-height: 1.65; overflow-wrap: break-word; }
.doc h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); }
.doc h2 { font-size: 1.4rem; text-align: left; margin-top: 44px; line-height: 1.2; }
.doc h3 { font-size: 1.12rem; margin-top: 26px; line-height: 1.25; }
.doc p { margin-top: 12px; }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc strong { font-weight: 800; }
.doc .updated { color: var(--ink-faint); font-size: .92rem; margin-top: 8px; }
.doc .callout { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 8px 22px 20px; margin-top: 26px; box-shadow: 0 8px 24px rgb(var(--shadow) / .07); }
.doc ul { list-style: disc; padding-left: 24px; margin-top: 12px; }
.doc li { margin-top: 6px; }
.doc code { background: var(--raised); padding: 1px 6px; border-radius: 6px; font: .86em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.doc .table-wrap { overflow-x: auto; margin-top: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.doc th { color: var(--ink-faint); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.doc td:first-child { width: 42%; }
.doc .contact { line-height: 1.8; }
