/* ¿Qué vende? — base común (inicio, botones, número que se descubre).
   El escenario mide 1920 × 1080 (1px = 1 píxel del diseño) y main.js lo escala con --s.
   --bv y --bl son los sobrantes vertical y horizontal de la ventana, en píxeles del diseño. */
@font-face { font-family: "Cascadia"; src: url("assets/fonts/cascadia-code-latin-200-normal.woff2") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: "Cascadia"; src: url("assets/fonts/cascadia-code-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --cream: #fff9ee;
  --ink: #000;
  --red: #d3201f;
  --s: 1; --bv: 0px; --bl: 0px;
  --ease: cubic-bezier(.65, 0, .2, 1);
  --soft: cubic-bezier(.22, .8, .25, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--cream); color: var(--ink);
  font-family: "Cascadia", ui-monospace, "Cascadia Code", Consolas, monospace; font-weight: 200;
  overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
p, h1, h2, h3, figure { margin: 0; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; }
img { user-select: none; -webkit-user-drag: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Escenario ---------- */
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; margin: -540px 0 0 -960px; transform: scale(var(--s)); }
.home { position: absolute; inset: 0; z-index: 1; }

.rule { position: absolute; display: block; height: 1px; background: #000; opacity: .72; }
.tag { position: absolute; font-size: 22.4px; letter-spacing: -2.31px; line-height: 28px; white-space: nowrap; }
.tag-home { left: 0; width: 1920px; top: 106.5px; text-align: center; }
.rule-home { left: 77px; top: 139px; width: 1765px; }
.cifras { position: absolute; left: 0; width: 1920px; top: 694.7px; text-align: center; font-size: 13.98px; line-height: 1; letter-spacing: 4.2px; opacity: .42; }
.lead { position: absolute; left: 0; width: 1920px; top: 797px; text-align: center; font-size: 22.4px; line-height: 28.2px; letter-spacing: 6.71px; }

/* ---------- Número que se descubre con el cursor ---------- */
.rv { position: absolute; }
.rv .sh { position: absolute; max-width: none; opacity: .15; pointer-events: none; }
.rv-base { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--cream); overflow: visible; }
.rv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Botones ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 45px; padding: 0 0 3px; border: 1px solid #000; border-radius: 23px; background: transparent; color: #000; cursor: pointer; pointer-events: auto;
  font: inherit; font-size: 31.46px; letter-spacing: -3.24px; line-height: 1; white-space: nowrap; transition: background .3s var(--soft), color .3s var(--soft), transform .3s var(--soft), box-shadow .3s var(--soft); }
.arr { width: 20.4px; height: 15.4px; flex: none; fill: none; stroke: currentColor; stroke-width: 1; transition: transform .35s var(--soft); }
.pill:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
@media (hover: hover) {
  .pill:not([aria-disabled="true"]):hover { background: #000; color: var(--cream); }
  .pill:hover .arr { transform: translateX(4px); }
  .pill.back:hover .arr, .pill.back-sign:hover .arr, .w-inicio:hover .arr, .t-inicio:hover .arr, .r-volver:hover .arr { transform: translateX(-4px); }
}
.send[aria-disabled="true"] { cursor: not-allowed; }
.send.shake { animation: shake .46s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.back { border: 0; background: var(--cream); box-shadow: 8px 8px 18px rgba(0, 0, 0, .38); }

/* Entrada */
.tag-home, .rule-home, .rv-num, .cifras, .lead { animation: up 1.2s var(--soft) both; }
.rule-home { animation-name: draw; transform-origin: center; animation-delay: .1s; }
.rv-num { animation-delay: .25s; } .cifras { animation-delay: .45s; } .lead { animation-delay: .55s; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Pantallas verticales (celulares y tabletas) ---------- */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  body { overflow: auto; overflow-x: hidden; }
  .stage { position: relative; left: 0; top: 0; width: 100%; height: auto; min-height: 100dvh; margin: 0; transform: none; }
  .home { position: relative; inset: auto; padding: 28px 16px 0; text-align: center; }
  .tag { position: static; white-space: normal; font-size: 15px; line-height: 19px; letter-spacing: -1.1px; }
  .tag-home { width: auto; }
  .rule { position: static; display: block; width: auto !important; margin-top: 8px; }
  .rv { position: relative; left: auto !important; top: auto !important; width: 100% !important; height: auto !important; aspect-ratio: var(--ar); }
  .rv-num { margin-top: 5vh; }
  .rv-num .sh { display: none; }
  .rv-base { filter: drop-shadow(0 0 3px rgba(0, 0, 0, .16)); }
  .cifras { position: static; width: auto; margin-top: 8px; font-size: 10px; letter-spacing: 3px; }
  .lead { position: static; width: auto; margin-top: 5vh; font-size: 13px; line-height: 19px; letter-spacing: 3px; }
  .lead br { display: none; }
  .pill { font-size: 22px; letter-spacing: -2.2px; height: 40px; }
}
