/* Andean Games Studio — estilos
   Paleta y tipografía documentadas en CLAUDE.md */

/* Rubik (licencia OFL) servida desde la propia web, sin pedir nada a Google */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(assets/fonts/rubik-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(assets/fonts/rubik-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1E140F;          /* café casi negro: texto, fondos oscuros */
  --night: #0A0908;        /* negro de la portada */
  --sand: #F6EEE2;         /* fondo claro principal */
  --paper: #FFFAF3;        /* tarjetas, menú, inputs */
  --band: #7A2A1A;         /* granate andino: franjas */
  --accent: #B8471F;       /* terracota: botones principales */
  --gold: #F2B33D;         /* mostaza: etiquetas, resaltados */
  --forest: #3F5B3A;       /* verde de montaña */
  --rust: #C9572A;         /* terracota claro: decoración */
  --muted: #4E3B2F;        /* texto secundario sobre claro */
  --muted-dark: #CDBBA4;   /* texto secundario sobre oscuro */
  --blush: #F3D9C9;        /* texto secundario sobre granate */
  --line: #D8C6AC;         /* bordes */
  --chip: #E9DDC9;         /* fondo de etiquetas */
  --radius: 28px;
  --wrap: 1320px;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--band); }
a:hover { color: #4E1A10; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
svg { flex-shrink: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 12px 18px; border-radius: 999px;
  font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }
.hl { color: var(--gold); }
.stack { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.stack--tight { gap: 14px; }

/* Tipografía */
.display {
  margin: 0; font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.01em;
}
.display--brand { color: var(--band); font-size: clamp(40px, 5vw, 68px); line-height: 0.95; }
.display--sm { text-transform: none; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05; color: var(--band); }
.eyebrow {
  margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--forest);
}
.eyebrow--gold { color: var(--gold); }
.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 14px 28px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 800; font-size: 15px; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn--sm { min-height: 44px; padding: 11px 22px; font-size: 14px; }
.btn--accent { background: var(--accent); color: var(--paper); }
.btn--accent:hover { color: var(--paper); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { color: var(--ink); }
.btn--ghost-light { border-color: var(--paper); color: var(--paper); }
.btn--ghost-light:hover { color: var(--paper); }
.btn--ghost-dark { border-color: var(--ink); color: var(--ink); }
.btn--ghost-dark:hover { color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btns--center { justify-content: center; }

.badge {
  display: inline-block; background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: 15px; padding: 7px 16px; border-radius: 999px;
}
.badge--corner { position: absolute; left: 18px; top: 18px; font-size: 14px; padding: 6px 14px; }

/* Barra superior */
.topbar { background: var(--ink); color: var(--sand); }
.topbar__inner {
  min-height: 56px; padding-block: 6px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--sand); text-decoration: none; font-weight: 900; font-size: 18px; letter-spacing: -0.01em;
}
.brand:hover { color: var(--sand); }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.topbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.topbar__link { color: var(--sand); text-decoration: none; font-size: 14px; font-weight: 500; padding: 12px 0; }
.topbar__link:hover { color: var(--gold); }
.lang { display: flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1.5px solid #5B4636; }
.lang button {
  font: inherit; font-weight: 800; font-size: 13px; letter-spacing: 0.06em;
  min-width: 44px; height: 36px; padding: 0 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--sand);
}
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }

/* Menú principal */
.mainnav { position: relative; z-index: 2; margin-bottom: -36px; }
.mainnav__inner {
  background: var(--paper); border-radius: 0 0 24px 24px;
  box-shadow: 0 12px 32px rgba(30, 20, 15, .18);
  padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
}
.mainnav__links { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 16px; font-weight: 500; }
.mainnav__links a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; padding: 12px 0; }
.mainnav__links a:hover { color: var(--accent); }
.mainnav__links svg,
.features svg,
.pills svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Portada */
.hero { position: relative; background: var(--night); color: var(--paper); overflow: hidden; }
.hero__art { position: relative; max-width: 1536px; margin: 0 auto; }
.hero__art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero__art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--night) 0%, rgba(10, 9, 8, 0) 6%, rgba(10, 9, 8, 0) 94%, var(--night) 100%),
    linear-gradient(180deg, rgba(10, 9, 8, 0) 72%, var(--night) 100%);
}
.hero__content {
  position: relative; z-index: 1; max-width: 880px; margin: clamp(-110px, -7vw, -16px) auto 0;
  padding: 0 24px 88px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
}
.hero__genre { margin: 0; font-weight: 700; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero__tagline { margin: 0; color: var(--chip); font-size: clamp(20px, 2vw, 26px); line-height: 1.45; max-width: 640px; }

/* Franjas granate */
.band { position: relative; background: var(--band); color: var(--paper); }
.band__grid {
  padding-block: 96px 120px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 56px; align-items: center;
}
.band__text { margin: 0; font-size: 18px; line-height: 1.6; color: var(--blush); max-width: 560px; }
.emblem { position: relative; display: flex; justify-content: center; }
.emblem img { width: min(440px, 90%); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .4)); }
.dots { position: absolute; right: 0; bottom: -10px; width: 120px; height: 60px; }
.wave { position: absolute; left: 0; width: 100%; height: 70px; display: block; fill: var(--sand); }
.wave--bottom { bottom: -1px; }
.wave--top { top: -1px; }

/* El juego */
.section { padding-block: 72px 112px; }
.game { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 56px; align-items: center; }
.game__card {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--night); box-shadow: 0 20px 44px rgba(30, 20, 15, .22);
}
.game__card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 700; background: var(--chip); padding: 7px 14px; border-radius: 999px; }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 2.2; margin-top: 2px; }

/* Boletín */
.band--waves { padding-block: 70px; }
.newsletter {
  padding-block: 72px 80px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: center;
}
.newsletter__form { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.newsletter__form .display--sm { color: var(--paper); margin-bottom: 8px; }
.newsletter__form > label { font-weight: 700; font-size: 16px; }
.newsletter__form input[type="email"] {
  width: 100%; max-width: 520px; font: inherit; font-size: 17px; padding: 15px 18px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--paper); color: var(--ink);
}
.newsletter__form input[aria-invalid="true"] { border-color: var(--gold); }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
legend { font-weight: 700; font-size: 16px; margin-bottom: 6px; padding: 0; }
.check { display: flex; align-items: center; gap: 12px; font-size: 16px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); }
.form__status { margin: 0; min-height: 1.5em; font-weight: 700; color: var(--gold); }
.newsletter__press { margin: 0; font-size: 15px; color: var(--blush); }
.newsletter__press a { color: var(--gold); font-weight: 700; }
.newsletter__art { position: relative; min-height: 400px; display: flex; align-items: center; justify-content: center; }
.blob {
  position: absolute; width: 82%; aspect-ratio: 1 / 1; background: #E9C58A;
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
}
.tilted {
  position: relative; width: 78%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 24px; transform: rotate(-4deg); box-shadow: 0 24px 50px rgba(0, 0, 0, .35);
}

/* Bloques */
.blocks { display: flex; flex-direction: column; gap: 96px; padding-top: 96px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 56px; align-items: center; }
.panel {
  aspect-ratio: 16 / 10; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.panel--rust { background: var(--rust); color: var(--paper); }
.panel--rust svg { width: 30%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.panel--dark { background: var(--ink); }
.panel--dark img { width: 55%; height: auto; }
@media (min-width: 760px) {
  .split--reverse > :first-child { order: 2; }
}

/* Pie */
.footer { background: var(--ink); color: var(--sand); }
.awayu { display: block; }
.footer__main { padding-block: 56px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer__brand { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.footer__brand > img { width: 112px; height: 112px; object-fit: contain; }
.footer__name { margin: 0; font-weight: 900; font-size: 26px; }
.footer__label { margin: 0; font-weight: 700; font-size: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills a {
  display: inline-flex; align-items: center; gap: 8px; color: var(--sand); text-decoration: none;
  font-size: 14px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid #5B4636;
}
.pills a:hover { border-color: var(--gold); color: var(--gold); }
.pills svg { width: 14px; height: 14px; stroke-width: 2.2; }
.footer__links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px 28px; font-size: 15px; }
.footer__links a { color: var(--sand); padding: 10px 0; }
.footer__links a:hover { color: var(--gold); }
.footer__copy { padding-block: 20px 32px; border-top: 1px solid #3A2A1F; font-size: 14px; color: var(--muted-dark); }
.footer__legal ol { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted-dark); }
.footer__legal li::marker { font-weight: 700; }
.footer__legal a {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 0;
  color: var(--sand); text-decoration: none; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.footer__legal a:hover { color: var(--gold); }
.choices-icon { width: 30px; height: 14px; }
@media (min-width: 760px) {
  .footer__main { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 28px 40px; }
  .footer__brand { grid-row: span 2; }
  .footer__legal { justify-self: end; }
}

/* 404 */
.notfound-page { background: var(--night); }
.notfound { min-height: calc(100vh - 56px); display: flex; align-items: center; color: var(--paper); }
.notfound__inner { padding-block: 64px 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.notfound__code { margin: 0; font-size: clamp(110px, 22vw, 240px); font-weight: 900; line-height: .85; color: var(--gold); letter-spacing: -0.03em; }

/* Páginas legales */
html:not([lang="es"]) [data-lang-block="es"],
html[lang="es"] [data-lang-block="en"] { display: none; }
.topbar__link--keep { font-weight: 700; }
.legal { max-width: 860px; padding-block: 64px 104px; }
.legal h1 { margin: 10px 0 8px; }
.legal section { scroll-margin-top: 24px; }
.legal h2 { margin: 40px 0 10px; font-size: 22px; font-weight: 800; color: var(--band); }
.legal p, .legal li { font-size: 17px; line-height: 1.65; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal__settings {
  margin-top: 16px; padding: 18px 20px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
}
.legal .legal__setting-name { margin: 0; font-weight: 800; }
.legal .legal__setting-state { margin: 0; font-size: 15px; color: var(--muted); }

/* Animación al hacer scroll (script.js marca los bloques con data-reveal) */
.js-reveal [data-reveal] {
  opacity: 0;
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js-reveal [data-reveal="up"] { transform: translateY(56px); }
.js-reveal [data-reveal="down"] { transform: translateY(-32px); }
.js-reveal [data-reveal="left"] { transform: translateX(-90px); }
.js-reveal [data-reveal="right"] { transform: translateX(90px); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
.hero__art { overflow: hidden; }
.js-reveal .hero__art img { animation: hero-in 1.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes hero-in { from { opacity: 0; transform: scale(1.08); } }

/* Móvil */
.mainnav__toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  border: 0; background: none; font: inherit; font-weight: 700; font-size: 16px; color: var(--ink); cursor: pointer;
}
.mainnav__toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mainnav__toggle .ic-close,
.mainnav.is-open .mainnav__toggle .ic-open { display: none; }
.mainnav.is-open .mainnav__toggle .ic-close { display: inline; }
main, .footer { overflow-x: clip; }

@media (max-width: 759px) {
  .wrap { padding-inline: 16px; }
  .topbar__link:not(.topbar__link--keep) { display: none; }
  .legal { padding-block: 44px 72px; }
  .legal h2 { font-size: 20px; margin-top: 32px; }
  .brand { font-size: 16px; }
  .brand img { width: 38px; height: 38px; }
  .mainnav { margin-bottom: -28px; }
  .mainnav__inner { padding: 6px 14px; border-radius: 0 0 20px 20px; }
  .mainnav__toggle { display: inline-flex; }
  .mainnav__links {
    display: none; order: 3; width: 100%; flex-direction: column;
    border-top: 1px solid var(--line); padding-bottom: 6px;
  }
  .mainnav.is-open .mainnav__links { display: flex; }
  .mainnav__links a { padding: 14px 4px; }
  .hero__art img { aspect-ratio: 4 / 3; }
  .hero__content { padding: 0 16px 64px; gap: 14px; }
  .band__grid { padding-block: 64px 96px; gap: 40px; }
  .section { padding-block: 56px 80px; }
  .game { gap: 36px; }
  .lead, .band__text { font-size: 17px; }
  .features { font-size: 16px; }
  .band--waves { padding-block: 56px; }
  .newsletter { padding-block: 56px 64px; gap: 32px; }
  .newsletter__art { min-height: 280px; }
  .blocks { gap: 64px; padding-top: 64px; }
  .split { gap: 28px; }
  .panel--rust svg { width: 24%; }
  .footer__main { padding-block: 44px 32px; gap: 28px; }
  .footer__brand > img { width: 84px; height: 84px; }
  .js-reveal [data-reveal="left"] { transform: translateX(-48px); }
  .js-reveal [data-reveal="right"] { transform: translateX(48px); }
}
@media (max-width: 479px) {
  .btns { width: 100%; }
  .btns .btn { flex: 1 1 100%; }
  .stack > .btn { width: 100%; }
  .newsletter__form .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js-reveal .hero__art img { animation: none; }
}
