/* ==========================================================
   preando.com — estilos
   Colores sacados de la app: azul, negro, amarillo, naranja,
   rosa y verde, con bordes negros gruesos y sombra "apilada".
   ========================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"),
       url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --blue: #2240f0;
  --ink: #141414;
  --yellow: #ffd22f;
  --orange: #fe5a35;
  --pink: #fe98d9;
  --green: #86dd58;
  --white: #ffffff;
  --paper: #fff8e6;
  --cream: #fdeba6;

  --radius-lg: 32px;
  --radius: 24px;
  --border: 3px solid var(--ink);
  --stack: 0 6px 0 var(--ink);
  --gutter: clamp(20px, 5vw, 48px);
  --max: 1160px;

  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--blue);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--yellow); color: var(--ink); padding: 10px 16px;
  border: var(--border); border-radius: 14px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--blue);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 16px;
}
.logo {
  font-weight: 800; font-size: 34px; letter-spacing: -0.06em; line-height: 1;
  color: var(--white); text-decoration: none; padding-bottom: 4px;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  color: var(--white); text-decoration: none; font-weight: 700; font-size: 17px;
}
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); background: var(--yellow);
  border: var(--border); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
  padding: 10px 20px; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Badges de las tiendas ---------- */

.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.store {
  position: relative; display: inline-block; line-height: 0;
  border-radius: 12px;
}
.store img { height: 54px; width: auto; }
.store.is-soon img { opacity: .92; }
.soon-tag {
  position: absolute; top: -12px; right: -10px;
  font-size: 12px; line-height: 1; font-weight: 800; letter-spacing: .02em;
  background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: 5px 9px;
  transform: rotate(6deg);
}
.stores-note { margin-top: 14px; font-weight: 600; font-size: 15px; opacity: .85; }

/* ---------- Hero ---------- */

.hero { color: var(--white); padding-block: clamp(24px, 6vw, 72px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(32px, 6vw, 72px);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--white);
  border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 700;
}
.chip b { color: var(--yellow); }
.hero h1 { font-size: clamp(56px, 10vw, 128px); margin-top: 22px; }
.hero h1 span { color: var(--yellow); }
.hero .lead { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; line-height: 1.3; margin-top: 22px; max-width: 30ch; }
.hero .stores { margin-top: 34px; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .phone { margin-inline: auto; }
}

/* ---------- Móvil (mockup) ---------- */

.phone {
  --pw: 300px;
  width: var(--pw); max-width: 100%;
  aspect-ratio: 9 / 19.2;
  background: var(--ink);
  border-radius: 48px;
  padding: 11px;
  box-shadow: 0 10px 0 rgba(0,0,0,.25);
  position: relative;
}
.phone.tilt-r { transform: rotate(3deg); }
.phone.tilt-l { transform: rotate(-3deg); }
.screen {
  height: 100%; border-radius: 38px; overflow: hidden; position: relative;
  padding: 44px 16px 16px; font-size: 13px; line-height: 1.25;
}
.screen::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; background: var(--ink); border-radius: 999px;
}
.screen.blue { background: var(--blue); color: var(--white); }
.screen.orange { background: var(--orange); color: var(--ink); }

.s-top { display: flex; justify-content: space-between; align-items: center; }
.s-logo { font-weight: 800; font-size: 30px; letter-spacing: -0.06em; line-height: 1; padding-bottom: 3px; }
.s-card {
  border-radius: 20px; padding: 16px; margin-top: 14px;
}
.s-card.black { background: var(--ink); color: var(--white); }
.s-card h4 { margin: 0; font-size: 28px; line-height: .95; letter-spacing: -0.045em; font-weight: 800; }
.s-code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 14px; }
.s-code span {
  aspect-ratio: .8; background: var(--yellow); border-radius: 8px;
  display: grid; place-items: center; color: var(--ink); font-weight: 800; font-size: 17px;
}
.s-code span:empty::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(20,20,20,.45); }
.s-hint { margin-top: 12px; font-weight: 700; font-size: 12px; }
.s-label { margin-top: 18px; font-weight: 800; font-size: 15px; }
.s-game {
  border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
  padding: 12px 14px; margin-top: 12px; color: var(--ink); position: relative;
}
.s-game h5 { margin: 0; font-size: 23px; line-height: .95; letter-spacing: -0.045em; font-weight: 800; padding-right: 30px; }
.s-game p { margin-top: 8px; font-weight: 700; font-size: 11.5px; }
.s-game svg { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; }

.s-title { position: relative; z-index: 1; font-weight: 800; font-size: 32px; line-height: .92; letter-spacing: -0.05em; max-width: 5em; }
.s-wheel { position: absolute; top: 30px; right: -78px; width: 150px; transform: rotate(-12deg); }
.s-room { position: relative; z-index: 1; background: var(--ink); color: var(--white); border-radius: 18px; text-align: center; padding: 12px; margin-top: 18px; }
.s-room small { display: block; font-weight: 700; font-size: 11px; }
.s-room strong { display: block; font-size: 36px; letter-spacing: .04em; line-height: 1.1; font-weight: 800; }
.s-players { margin-top: 14px; font-weight: 800; font-size: 14px; }
.s-avatars { display: flex; gap: 10px; margin-top: 8px; }
.s-avatars figure { margin: 0; text-align: center; font-weight: 800; font-size: 11px; }
.s-avatars figure .avatar { width: 46px; height: 46px; font-size: 18px; margin-bottom: 4px; }
.s-cta {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink);
  text-align: center; font-weight: 800; font-size: 18px; padding: 10px; letter-spacing: -0.02em;
}

.avatar {
  display: grid; place-items: center; border-radius: 50%;
  border: 3px solid var(--ink); font-weight: 800; color: var(--ink);
}
.avatar.me { width: 40px; height: 40px; background: var(--yellow); font-size: 17px; }

/* ---------- Secciones ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section h2 { font-size: clamp(44px, 7vw, 84px); }
.section .intro { font-size: clamp(19px, 2vw, 22px); font-weight: 600; margin-top: 18px; max-width: 40ch; }

.bg-yellow { background: var(--yellow); }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-pink { background: var(--pink); }
.bg-blue { background: var(--blue); color: var(--white); }

/* Cómo funciona */
.how { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 80px); align-items: center; }
.steps { list-style: none; padding: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.step {
  background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--stack);
  padding: 20px; min-height: 210px;
}
.step:nth-child(1) { transform: rotate(-2deg); }
.step:nth-child(2) { background: var(--pink); transform: rotate(1deg); }
.step:nth-child(3) { background: var(--orange); transform: rotate(-1deg); }
.step .num { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.step h3 { font-size: 24px; line-height: 1.05; letter-spacing: -0.03em; margin-top: 18px; }
.step p { font-size: 16px; font-weight: 600; margin-top: 8px; }

@media (max-width: 980px) {
  .how { grid-template-columns: 1fr; }
  .how .phone { margin-inline: auto; }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step:nth-child(n) { transform: none; }
}

/* Juegos */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 44px; }
.game {
  position: relative; overflow: hidden;
  border: var(--border); border-radius: var(--radius-lg); box-shadow: 0 7px 0 #000;
  padding: clamp(22px, 3vw, 32px); color: var(--ink); min-height: 300px;
  display: flex; flex-direction: column;
}
.game.orange { background: var(--orange); }
.game.pink { background: var(--pink); }
.game.yellow { background: var(--yellow); }
.game.green { background: var(--green); }
.game.wide { grid-column: 1 / -1; }
.game .icon { position: absolute; top: clamp(22px, 3vw, 32px); right: clamp(22px, 3vw, 32px); width: 44px; height: 44px; }
.game h3 { font-size: clamp(38px, 4.6vw, 56px); padding-right: 56px; }
.game .tag { margin-top: 12px; font-weight: 700; font-size: 17px; }
.game .desc { margin-top: auto; padding-top: 28px; font-size: 18px; font-weight: 600; max-width: 30ch; }
.game .wheel-deco { position: absolute; right: -70px; bottom: -70px; width: 220px; opacity: 1; transform: rotate(18deg); }
.game.has-wheel .desc { max-width: 22ch; }

@media (max-width: 760px) {
  .games { grid-template-columns: 1fr; }
  .game { min-height: 260px; }
}
@media (max-width: 560px) {
  .game .wheel-deco { display: none; }
  .game.has-wheel .desc { max-width: 30ch; }
}

/* Privacidad */
.promise { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li {
  background: var(--white); border: var(--border); border-radius: 20px; box-shadow: 0 4px 0 var(--ink);
  padding: 16px 18px 16px 60px; position: relative; font-weight: 600;
}
.checks li strong { display: block; font-size: 20px; letter-spacing: -0.02em; font-weight: 800; }
.checks li::before {
  content: ""; position: absolute; left: 16px; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23141414' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  border: 2.5px solid var(--ink);
}
.promise .more { margin-top: 26px; font-weight: 700; }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; } }

/* Descarga */
.download {
  background: var(--ink); color: var(--white); border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 72px); text-align: center; position: relative; overflow: hidden;
}
.download h2 { font-size: clamp(48px, 8vw, 96px); }
.download p { font-size: clamp(19px, 2vw, 22px); font-weight: 600; margin: 18px auto 0; max-width: 34ch; }
.download .stores { justify-content: center; margin-top: 34px; }
.download .age { margin-top: 26px; font-size: 15px; opacity: .8; }

/* ---------- Pie ---------- */

.site-footer {
  background: var(--ink); color: var(--white);
  padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px));
}
.foot { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.foot .logo { font-size: 44px; }
.foot p { margin-top: 12px; font-size: 16px; opacity: .8; max-width: 30ch; }
.foot h3 { font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: var(--yellow); line-height: 1.2; }
.foot ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.foot ul a { text-decoration: none; font-weight: 600; }
.foot ul a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal-line {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-size: 14px; opacity: .75;
}
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* ---------- Páginas legales y de soporte ---------- */

.page-head { color: var(--white); padding-block: clamp(28px, 6vw, 64px) clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(48px, 8vw, 96px); }
.page-head p { margin-top: 18px; font-size: 19px; font-weight: 600; max-width: 46ch; }
.page-head .updated { display: inline-block; margin-top: 18px; }

.doc-wrap { background: var(--paper); border-top: var(--border); }
.doc {
  max-width: 780px; margin-inline: auto; padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(64px, 8vw, 96px);
  font-size: 17.5px; line-height: 1.65;
}
.doc h2 { font-size: clamp(26px, 3.2vw, 32px); line-height: 1.1; letter-spacing: -0.03em; margin: 48px 0 14px; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; margin: 28px 0 8px; }
.doc p + p, .doc p + ul, .doc ul + p, .doc ol + p, .doc table + p, .doc p + table { margin-top: 12px; }
.doc ul, .doc > ol { padding-left: 22px; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc a { font-weight: 700; text-underline-offset: 3px; }
.doc .summary {
  background: var(--yellow); border: var(--border); border-radius: var(--radius); box-shadow: var(--stack);
  padding: 22px 24px; margin-bottom: 40px;
}
.doc .summary h2 { margin: 0 0 10px; font-size: 24px; }
.doc .summary ul { margin-top: 0; }
.doc .toc { background: var(--white); border: var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 44px; }
.doc .toc strong { display: block; margin-bottom: 6px; }
.doc .toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.doc .toc li + li { margin-top: 2px; }
@media (max-width: 640px) { .doc .toc ol { columns: 1; } }
.table-scroll { overflow-x: auto; margin-top: 12px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 16px; background: var(--white); }
.doc th, .doc td { border: 2px solid var(--ink); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--ink); color: var(--white); }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 12px 0 0; }
.doc dt { font-weight: 800; }
.doc dd { margin: 0; }
@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; gap: 2px; } .doc dd { margin-bottom: 10px; } }

/* FAQ */
.faq details {
  background: var(--white); border: var(--border); border-radius: 20px; box-shadow: 0 4px 0 var(--ink);
  padding: 0; margin-top: 14px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 56px 18px 20px; position: relative;
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--ink);
  display: grid; place-items: center; font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 20px; }

.contact-card {
  background: var(--blue); color: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--stack);
  padding: 26px; margin-top: 18px;
}
.contact-card a { color: var(--yellow); font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -0.02em; word-break: break-word; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; color: var(--white); padding-block: 64px; }
.notfound h1 { font-size: clamp(96px, 20vw, 220px); color: var(--yellow); }
.notfound p { font-size: 22px; font-weight: 600; margin: 12px 0 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Tarjetitas 1-2-3 dentro del móvil de la sala */
.s-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
.s-steps div {
  border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink);
  padding: 8px 7px 10px; font-weight: 700; font-size: 10.5px; line-height: 1.2; min-height: 92px;
}
.s-steps div:nth-child(1) { transform: rotate(-3deg); }
.s-steps div:nth-child(3) { transform: rotate(2deg); }
.s-steps b { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; font-weight: 800; }
