/* UnosRandomsGames — portada y páginas de juego. Fuentes propias (OFL), sin servicios externos. */
@font-face { font-family: "Chakra Petch"; src: url(assets/ChakraPetch-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(assets/AtkinsonHyperlegible-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(assets/AtkinsonHyperlegible-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root { --ink: #0b0618; --ink-2: #150b2b; --text: #f3efff; --muted: #b5a9d3; --line: rgba(181, 169, 211, .22);
  --cyan: #2ef2ff; --pink: #ff3fd8; --orange: #ffb030; --world: #ff8a4c; --world-bg: #3b1a4f; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.6 "Atkinson", system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3, .wordmark, .btn { font-family: "Chakra Petch", "Atkinson", system-ui, sans-serif; font-weight: 700; }
h1, h2, h3 { line-height: 1.06; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--cyan); text-underline-offset: 3px; }
img, video { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
html[lang="en"] .es, html[lang="es"] .en { display: none !important; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 9; background: var(--ink); padding: 8px 12px; }

/* barra */
.bar { position: relative; z-index: 3; display: flex; align-items: center; gap: 28px; padding: 18px 0; }
.bar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.bar .brand img { width: 34px; height: 38px; }
.wordmark { font-size: 19px; letter-spacing: -.01em; }
.bar nav { display: flex; gap: 24px; }
.bar nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.bar nav a:hover { color: var(--cyan); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; }
.lang a { padding: 6px 11px; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--text); color: var(--ink); font-weight: 700; }

/* botones */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 22px; border: 0; border-radius: 12px; font-size: 17px; line-height: 1.15;
  cursor: pointer; text-decoration: none; background: var(--text); color: var(--ink); transition: transform .15s; }
.btn:hover { transform: translateY(-2px); } .btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.btn.roll { background: var(--orange); color: #221000; font-size: 19px; min-height: 58px; padding-inline: 26px; }
.btn.line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.status { color: var(--muted); font-size: 15px; }

/* portada: el dado */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 74% 48%, var(--world-bg), transparent 72%); transition: opacity .5s; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px 0 84px; min-height: min(760px, calc(100vh - 80px)); }
.hero h1 .ln { display: block; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); letter-spacing: -.035em; }
.hero .lead { margin: 22px 0 30px; font-size: clamp(18px, 1.6vw, 21px); color: #d9cff0; max-width: 31em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stage { position: relative; display: grid; grid-template-columns: 1fr 300px; align-items: center; }
.phone { position: relative; border-radius: 38px; padding: 9px; background: #07030f; box-shadow: 0 0 0 1.5px rgba(255,255,255,.16), 0 40px 80px rgba(0,0,0,.5); }
.phone video, .phone img { width: 100%; aspect-ratio: 420 / 910; object-fit: cover; border-radius: 30px; background: #000; }
.stage .phone { grid-column: 2; }
.die-box { position: absolute; left: 0; bottom: 64px; width: 210px; height: 210px; perspective: 900px; z-index: 2; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
.die { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.15s cubic-bezier(.2, .75, .25, 1); transform: rotateX(-18deg) rotateY(26deg); }
.die img { position: absolute; inset: 0; width: 210px; height: 210px; border-radius: 20px; border: 3px solid var(--cyan); background: var(--ink-2); backface-visibility: hidden; }
.die img:nth-of-type(1) { transform: translateZ(105px); }
.die img:nth-of-type(2) { transform: rotateY(90deg) translateZ(105px); border-color: var(--pink); }
.die img:nth-of-type(3) { transform: rotateY(180deg) translateZ(105px); }
.die img:nth-of-type(4) { transform: rotateY(-90deg) translateZ(105px); border-color: var(--pink); }
.die img:nth-of-type(5) { transform: rotateX(90deg) translateZ(105px); border-color: var(--orange); }
.die img:nth-of-type(6) { transform: rotateX(-90deg) translateZ(105px); border-color: var(--orange); }
.result { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 480px; min-height: 148px; }
.result h2 { font-size: 27px; color: var(--world); }
.result p { margin: 6px 0 12px; }
.result .row { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; }

.roller { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); grid-template-rows: auto auto; row-gap: 0; align-content: center; }
.roller .intro { align-self: end; } .roller .play { align-self: start; position: relative; z-index: 1; } .roller .stage { grid-column: 2; grid-row: 1 / 3; }
.roller h1 { font-size: clamp(38px, 5.1vw, 66px); }

/* secciones */
section { padding: 84px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
h2.big { font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.03em; }
.sec-head p { color: var(--muted); max-width: 30em; }
.worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.world { position: relative; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; padding: 28px 28px 0; background: var(--bg); color: var(--fg, #fff); }
.world h3 { font-size: 30px; letter-spacing: -.02em; }
.world h3 a { color: inherit; text-decoration: none; }
.world h3 a:hover { text-decoration: underline; }
.world .what { margin: 10px 0 20px; color: rgba(255,255,255,.86); flex: 1; }
.world .actions { margin-bottom: 30px; }
.world .btn { min-height: 48px; font-size: 16px; padding-inline: 18px; }
.world .more { color: #fff; }
.world .phone { width: 76%; margin: 0 auto -38%; transition: transform .35s cubic-bezier(.2, .75, .25, 1); }
.world:hover .phone { transform: translateY(-16px); }
@media (min-width: 941px) {
  .world { display: grid; grid-template-columns: minmax(0, 1fr) 44%; grid-template-rows: auto auto 1fr; column-gap: 24px; height: 400px; padding: 32px 28px 0 32px; }
  .world h3 { font-size: 32px; } .world .what { margin-bottom: 22px; } .world .actions { align-self: start; margin: 0; }
  .world .phone { grid-column: 2; grid-row: 1 / 4; width: 100%; margin: 0; align-self: start; }
}
.rr { --bg: linear-gradient(180deg, #5b1560, #14062a 78%); }
.cm { --bg: linear-gradient(180deg, #6b3a1f, #2a1244 78%); }
.ch { --bg: linear-gradient(180deg, #14533d, #061410 78%); }
.sc { --bg: linear-gradient(180deg, #4a2796, #160a35 78%); }
.li { --bg: linear-gradient(180deg, #a8406f, #3a1d63 70%); }

.soon { display: grid; gap: 0; border-top: 1px solid var(--line); }
.soon a { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.soon img { width: 96px; height: 96px; border-radius: 22px; transition: transform .3s; }
.soon a:hover img { transform: rotate(-6deg) scale(1.05); }
.soon h3 { font-size: 27px; letter-spacing: -.02em; }
.soon p { color: #d9cff0; }
.soon .go { color: var(--cyan); white-space: nowrap; }

.deal { background: var(--ink-2); }
.deal .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: start; }
.deal dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 34px; }
.deal dt { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 21px; line-height: 1.2; }
.deal dd { margin: 6px 0 0; color: var(--muted); }
.deal .lead { color: var(--muted); margin-top: 18px; max-width: 26em; }

.join .wrap { text-align: left; }
.join .links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.join .links a { display: block; padding: 24px 26px; border-radius: 20px; text-decoration: none; color: #0b0618; background: var(--c); transition: transform .15s; }
.join .links a:hover { transform: translateY(-4px); }
.join .links strong { display: block; font: 700 25px/1.1 "Chakra Petch", sans-serif; margin-bottom: 6px; }
.mail { margin-top: 34px; color: var(--muted); } .mail a { font-weight: 700; overflow-wrap: anywhere; }

footer.foot { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; gap: 20px 40px; flex-wrap: wrap; justify-content: space-between; }
.foot ul { list-style: none; display: flex; gap: 6px 18px; flex-wrap: wrap; padding: 0; margin: 4px 0 0; }
.foot a { color: var(--muted); } .foot a:hover { color: var(--text); }

/* páginas de juego */
.game-hero { background: var(--bg); }
.game-hero .hero-in { min-height: 0; padding: 22px 0 72px; }
.game-hero .icon { width: 104px; height: 104px; border-radius: 24px; margin-bottom: 24px; }
.game-hero h1 { font-size: clamp(44px, 6.4vw, 80px); letter-spacing: -.035em; }
.game-hero .phone { width: min(310px, 78vw); justify-self: center; }
.game-hero .status { margin-top: 14px; color: rgba(255,255,255,.78); }
.story { font-size: clamp(21px, 2.5vw, 30px); line-height: 1.42; max-width: 31em; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-top: 38px; counter-reset: n; padding: 0; list-style: none; }
.how li { counter-increment: n; border-top: 3px solid var(--world); padding-top: 16px; }
.how h3 { font-size: 23px; margin-bottom: 8px; } .how h3::before { content: counter(n) ". "; color: var(--world); }
.how p, .facts dd { color: var(--muted); }
.strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px max(20px, (100vw - 1180px) / 2) 20px; }
.strip img { flex: none; width: 250px; aspect-ratio: 1206 / 2622; border-radius: 24px; scroll-snap-align: center; background: var(--ink-2); }
.deal dl.facts { margin-top: 36px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; margin: 36px 0 0; }
.facts dt { font: 700 22px/1.2 "Chakra Petch", sans-serif; } .facts dd { margin: 6px 0 0; }

@media (max-width: 940px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); padding: 14px 0 60px; gap: 40px; min-height: 0; }
  .stage { max-width: 440px; width: 100%; margin-inline: auto; grid-template-columns: 1fr 66%; }
  .die-box { --k: .68; transform: scale(.68); transform-origin: 0 100%; bottom: 40px; left: 10px; }
  .roller { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 26px; }
  .roller .stage { grid-column: 1; grid-row: auto; max-width: 350px; grid-template-columns: 1fr 58%; } .roller .lead { margin-bottom: 0; } .roller .result { margin-top: 24px; }
  .worlds { grid-template-columns: minmax(0, 1fr); } .world .phone { width: 62%; margin-bottom: -46%; max-width: 280px; }
  .deal .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .soon a { grid-template-columns: 76px minmax(0, 1fr); gap: 6px 18px; } .soon img { width: 76px; height: 76px; border-radius: 18px; grid-row: span 3; align-self: start; }
  .how, .join .links { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  section { padding: 60px 0; }
}
@media (max-width: 640px) { .bar nav { display: none; } .deal dl, .facts { grid-template-columns: minmax(0, 1fr); } .strip img { width: 210px; } .btn.roll { flex: 1 1 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, .die { transition: none !important; } }
