/* games.xoiga.org — same language as xoiga.org (tokens.css is a copy of its tokens). */

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: -0.02em; text-transform: uppercase; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { margin-bottom: 24px; opacity: .7; }

/* ===== Pills ===== */
.pill {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: 600 14px/1.3 var(--font-sans); letter-spacing: .025em;
  padding: 12px 18px; border-radius: var(--radius-pill);
  transition: transform .4s var(--ease-out), background-color .3s, color .3s;
}
.pill:hover { transform: translateY(-2px); }
.pill--solid { background: var(--ink); color: var(--white); }
.pill--tint { background: rgba(0,0,0,.06); color: var(--ink); font-weight: 400; }
.section--black .pill--solid, .section--offblack .pill--solid, [data-theme="dark"] .pill--solid { background: var(--white); color: var(--black); }
.section--black .pill--tint, .section--offblack .pill--tint, .play .pill--tint, [data-theme="dark"] .pill--tint { background: rgba(255,255,255,.1); color: var(--white); }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background-color .4s, color .4s;
}
.nav[data-theme="light"] { background: rgba(255,255,255,.18); color: var(--ink); }
.nav[data-theme="dark"]  { background: rgba(0,0,0,.25); color: var(--white); }
.nav__logo { display: flex; align-items: baseline; gap: 10px; }
.nav__mark { font-weight: 600; font-size: 22px; letter-spacing: -0.04em; }
.nav__sub { opacity: .6; font-size: 12px; text-transform: none; }
.nav__links { display: flex; gap: 32px; font-size: 15px; }
.nav__links a { opacity: .75; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ===== Hero ===== */
.hero { background: var(--cream); min-height: 100vh; min-height: 100svh; position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding: calc(var(--nav-h) + 4vh) var(--gutter) 32px; }
.hero__top { text-align: center; position: relative; z-index: 2; }
.hero__title { font-size: var(--fs-h1); line-height: 1; letter-spacing: var(--ls-h1); font-weight: 400; }
.hero__title em { color: var(--leaf); }
.hero__phones { flex: 1; position: relative; display: flex; justify-content: center; align-items: flex-end;
  gap: clamp(12px, 2vw, 28px); margin-top: clamp(24px, 4vh, 48px); min-height: 200px; }
.hero__phones a { height: clamp(200px, 33vh, 400px); max-width: 26vw; border-radius: clamp(18px, 2vw, 30px); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(80, 40, 10, .35); transition: transform .6s var(--ease-out); aspect-ratio: 420 / 800; background: var(--paper); }
.hero__phones a img { width: 100%; height: 100%; object-fit: cover; }
.hero__phones a:nth-child(1) { transform: translateY(8%) rotate(-6deg); }
.hero__phones a:nth-child(2) { transform: translateY(-4%); z-index: 1; }
.hero__phones a:nth-child(3) { transform: translateY(8%) rotate(6deg); }
.hero__phones a:hover { transform: translateY(-8%) rotate(0); z-index: 3; }
.hero__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; margin-top: 32px; position: relative; z-index: 2; }
.hero__sub { max-width: 380px; font-size: var(--fs-small); color: var(--muted); }
.hero__scroll { display: flex; align-items: center; gap: 10px; opacity: .6; }
.hero__scroll .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { transform: translateY(6px); opacity: .3; } }
.hero__ctas { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 860px) {
  .hero { padding-top: calc(var(--nav-h) + 3vh); justify-content: center; }
  .hero__phones { flex: none; margin-top: 36px; }
  .hero__foot { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; }
  .hero__sub { max-width: 34ch; font-size: 15px; }
  .hero__scroll { display: none; }
  .hero__ctas { justify-content: center; }
  .hero__phones a { height: auto; width: 28vw; max-width: none; }
}

/* ===== Sections ===== */
.section { padding: var(--section-y) 0; position: relative; }
.section--white { background: var(--white); color: var(--ink); }
.section--white .h2 em { color: var(--leaf); }
.section--black { background: var(--black); color: var(--white); }
.section--offblack { background: var(--offblack); color: var(--white); }
.section--black .h2 em, .section--offblack .h2 em { color: var(--lime); }
.section--accent { background: var(--lime); color: var(--black); }
.h2 { font-size: var(--fs-h2); line-height: .93; letter-spacing: var(--ls-h2); font-weight: 400; }

/* ===== Game cards ===== */
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 72px; }
.game { border-radius: var(--radius-card); padding: 28px 28px 32px; display: flex; flex-direction: column;
  transition: transform .5s var(--ease-out); }
.game:hover { transform: translateY(-6px); }
.game--rice { background: var(--tint-rice); }
.game--chicken { background: var(--tint-chicken); }
.game--scallion { background: var(--tint-scallion); }
.game__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tag { align-self: flex-start; padding: 6px 12px; border-radius: var(--radius-pill); background: rgba(0,0,0,.06); }
.game__shot { display: block; margin: 24px auto 28px; width: min(100%, 240px); aspect-ratio: 420 / 800; border-radius: 26px;
  overflow: hidden; box-shadow: 0 24px 48px -18px rgba(0,0,0,.35); background: var(--paper); transition: transform .6s var(--ease-out); }
.game:hover .game__shot { transform: scale(1.03) rotate(-1.5deg); }
.game__shot img { width: 100%; height: 100%; object-fit: cover; }
.game h3 { margin-top: auto; font-size: var(--fs-h3); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.game p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.game__cta { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 960px) { .games { grid-template-columns: 1fr; } .game__shot { width: min(70%, 260px); } }

/* ===== How-to steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 72px; }
.step { background: var(--card-dark); border-radius: var(--radius-card); padding: clamp(24px, 3vw, 40px); min-height: 300px;
  display: flex; flex-direction: column; }
.step__num { font-size: 15px; color: var(--lime); }
.step h3 { margin-top: auto; font-size: clamp(36px, 4vw, 64px); line-height: 1; font-weight: 400; }
.step p { margin-top: 12px; color: var(--muted-dark); font-size: 17px; max-width: 34ch; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr; } .step { min-height: 220px; } }

/* ===== CTA ===== */
.cta__title { font-size: clamp(64px, 12vw, 180px); line-height: 1; letter-spacing: -0.06em; font-weight: 400; }
.cta__body { margin-top: 40px; font-size: clamp(20px, 2vw, 28px); max-width: 30ch; letter-spacing: -0.02em; line-height: 1.25; }
.cta__ctas { display: flex; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.copy.is-copied::after { content: " · copied"; }

/* ===== Footer ===== */
.footer { background: var(--black); color: var(--white); padding: 72px 0 0; overflow: hidden; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; font-size: 16px; }
.footer__cols p + p { margin-top: 6px; color: var(--muted-dark); }
.footer__cols a:hover { color: var(--white); }
.footer__label { margin-bottom: 16px; opacity: .5; }
.footer__word { font-size: 17.5vw; line-height: .78; letter-spacing: -0.07em; white-space: nowrap; margin: 96px 0 0 -0.04em; padding-bottom: 2vw; }
@media (max-width: 700px) { .footer__cols { grid-template-columns: 1fr; } }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.no-io .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__phones a, .game, .game__shot, .pill { transition: none; }
}

/* ===== Play page ===== */
.play { background: var(--offblack); color: var(--white); min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; }
.play__info { max-width: 380px; justify-self: end; }
.play__title { font-size: clamp(44px, 5vw, 80px); line-height: .95; letter-spacing: var(--ls-h2); font-weight: 400; margin-top: 8px; }
.play__title em { color: var(--lime); }
.play__desc { margin-top: 20px; color: var(--muted-dark); font-size: 17px; }
.play__how { margin-top: 28px; padding: 0; list-style: none; font-size: 15px; color: var(--muted-dark); }
.play__how li { padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.play__how li b { color: var(--white); font-weight: 500; }
.play__frame { position: relative; height: calc(100svh - var(--nav-h) - 56px); max-height: 900px; aspect-ratio: 420 / 800;
  border-radius: 36px; overflow: hidden; background: #000; box-shadow: 0 0 0 10px #111, 0 40px 80px -20px rgba(0,0,0,.6); }
.play__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.play__side { justify-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.play__more { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.play__more a { display: flex; align-items: center; gap: 12px; opacity: .75; transition: opacity .2s; font-size: 15px; }
.play__more a:hover { opacity: 1; }
.play__more img { width: 40px; height: 52px; object-fit: cover; border-radius: 8px; }
/* Phones: the game takes the whole screen under the nav. */
@media (max-width: 860px) {
  .play { display: block; padding: var(--nav-h) 0 0; }
  .play__info, .play__side { display: none; }
  .play__frame { height: calc(100svh - var(--nav-h)); max-height: none; width: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .nav--play .nav__sub { display: none; }
}
