/* ============================================================
   Sonexa Game Studios — studio site
   Palette derives from the monochrome wordmark + per-game accents
   ============================================================ */

:root {
  --bg: #0b0b0f;
  --bg-2: #101018;
  --surface: #16161c;
  --line: rgba(244, 244, 245, 0.08);
  --text: #f4f4f5;
  --muted: #a2a2ae;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the intrinsic aspect ratio even when width/height
   attributes are present — never let an image stretch. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(139, 92, 246, 0.45); color: #fff; }

h1, h2, h3 { line-height: 1.15; }

.wrap {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

/* ---------------- Nav ---------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 11, 15, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo img { height: 46px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(244, 244, 245, 0.06); }
.nav-links a.nav-cta {
  color: var(--text);
  border: 1px solid rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.12);
}
.nav-links a.nav-cta:hover {
  background: rgba(139, 92, 246, 0.28);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}

/* ---------------- Language picker ---------------- */

.nav-lang { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.lang-btn:hover { color: var(--text); background: rgba(244, 244, 245, 0.06); }
.lang-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lang-globe { width: 17px; height: 17px; flex: 0 0 auto; }
.lang-chev { width: 14px; height: 14px; flex: 0 0 auto; transition: transform 0.25s ease; }
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 232px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  padding: 6px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 24, 0.98);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: none; }
.lang-menu a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.lang-menu a:hover { color: var(--text); background: rgba(244, 244, 245, 0.07); }
.lang-menu a:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.lang-menu a.on { color: var(--text); background: rgba(139, 92, 246, 0.18); font-weight: 700; }

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

#fx {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-glow {
  position: absolute;
  z-index: -2;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-glow.violet { background: radial-gradient(circle, #7c3aed, transparent 62%); top: -22vmax; left: -14vmax; }
.hero-glow.cyan   { background: radial-gradient(circle, #0891b2, transparent 62%); bottom: -26vmax; right: -16vmax; animation-delay: -8s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}

.hero-grid {
  position: absolute;
  z-index: -1;
  left: -25%;
  right: -25%;
  bottom: -6%;
  height: 42%;
  background:
    repeating-linear-gradient(to right, rgba(139, 92, 246, 0.22) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to top, rgba(139, 92, 246, 0.22) 0 1px, transparent 1px 56px);
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.7), transparent 85%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.7), transparent 85%);
  animation: grid-run 3.2s linear infinite;
}
@keyframes grid-run {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 0, 0 56px; }
}

.hero-inner {
  position: relative;
  padding: calc(var(--nav-h) + 24px) 20px 96px;
  width: min(900px, 94vw);
}

.hero-logo {
  width: min(430px, 74vw);
  margin: 0 auto 8px;
  animation: logo-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  filter: drop-shadow(0 0 34px rgba(139, 92, 246, 0.35));
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(26px) scale(0.94); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0) drop-shadow(0 0 34px rgba(139, 92, 246, 0.35)); }
}

.hero-tag {
  font-family: "Archivo Black", "Space Grotesk", sans-serif;
  font-size: clamp(1.45rem, 4.4vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(100deg, #f4f4f5 20%, var(--violet) 45%, var(--cyan) 60%, #f4f4f5 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 6s linear infinite, rise-in 0.9s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes shimmer {
  from { background-position: 0% 0; }
  to   { background-position: -220% 0; }
}

.hero-sub {
  margin: 18px auto 34px;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  animation: rise-in 0.9s 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: rise-in 0.9s 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(120deg, var(--violet), #6d28d9);
  color: #fff;
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 44px rgba(139, 92, 246, 0.6);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(244, 244, 245, 0.04);
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.22);
  transform: translateY(-2px);
}

.hero-icons {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 22px;
  animation: rise-in 0.9s 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-icons a {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: bob 5s ease-in-out infinite;
}
.hero-icons a:nth-child(2) { animation-delay: -1.6s; }
.hero-icons a:nth-child(3) { animation-delay: -3.2s; }
.hero-icons a:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.45);
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  translate: -50% 0;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: hint 2.2s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* ---------------- Marquee ---------------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
/* spacing via margin (not flex gap) so -50% equals exactly one copy */
.marquee span {
  margin-right: 48px;
  font-family: "Archivo Black", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 245, 0.22);
}
.marquee span.solid { color: rgba(244, 244, 245, 0.5); -webkit-text-stroke: 0; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------------- Sections ---------------- */

section { padding: 110px 0; }

.sec-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.sec-title {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.sec-sub { color: var(--muted); max-width: 620px; }

/* ---------------- Game cards ---------------- */

.games-head { margin-bottom: 70px; }

.game {
  --accent: var(--violet);
  --accent-soft: rgba(139, 92, 246, 0.16);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
  padding: clamp(26px, 3.5vw, 48px);
  border-radius: 28px;
  background: linear-gradient(160deg, var(--surface), rgba(22, 22, 28, 0.4));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.game + .game { margin-top: 64px; }
.game::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(720px 340px at var(--mx, 20%) var(--my, 10%), var(--accent-soft), transparent 60%);
  pointer-events: none;
  transition: opacity 0.4s;
}
.game.flip .g-media { order: 2; }
.game.flip .g-body { order: 1; }

.g-media { position: relative; }
.g-art {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s ease;
  will-change: transform;
}
.g-media:hover .g-art { transform: scale(1.025) rotate(-0.4deg); }

/* ---------------- Trailer ---------------- */

.g-video {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  background: #000;
}
.g-video-btn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--text);
}
.g-video .poster {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.g-video .poster.tall { display: none; }
.g-video-btn:hover .poster,
.g-video-btn:focus-visible .poster { transform: scale(1.03); opacity: 0.85; }
.g-video-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.g-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.92);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.55);
  transition: transform 0.25s ease, background 0.25s ease;
}
.g-video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  translate: -50% -50%;
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}
.g-video-btn:hover .g-video-play,
.g-video-btn:focus-visible .g-video-play { transform: scale(1.1); background: rgba(139, 92, 246, 1); }

.g-video-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.g-video.playing { aspect-ratio: 16 / 9; }
.g-video.playing.portrait { aspect-ratio: 9 / 16; max-width: 420px; margin: 0 auto; }
.g-video iframe { width: 100%; height: 100%; border: 0; display: block; }

.g-shots {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding: 6px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.5) transparent;
}
.shot-btn {
  background: none;
  border: 0;
  padding: 0;
  flex: 0 0 auto;
  scroll-snap-align: start;
  cursor: zoom-in;
  border-radius: 12px;
}
.shot-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.g-shots img {
  height: 190px;
  width: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s;
}
.shot-btn:hover img,
.shot-btn:focus-visible img {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.g-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.g-icon {
  width: 68px;
  height: 68px;
  border-radius: 17px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
.g-title {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-transform: uppercase;
}
.g-genre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.g-genre::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.g-tag {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.g-desc { color: var(--muted); margin-bottom: 26px; }

.g-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.play-badge img { height: 58px; width: auto; transition: transform 0.2s ease, filter 0.25s; }
.play-badge:hover img { transform: translateY(-2px); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6)); }

/* non-interactive chip: the listing isn't live yet, so this is a <span>
   (data-play-url holds the future link — see README) */
.badge-soon {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 20px;
  border-radius: 10px;
  border: 1px dashed rgba(244, 244, 245, 0.28);
  color: var(--muted);
  line-height: 1.25;
  cursor: default;
}
.badge-soon .s1 { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; }
.badge-soon .s2 { font-weight: 700; font-size: 1rem; }

.g-links {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}
.g-links a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.g-links a:hover { color: var(--accent); }

.g-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* per-game accents */
.game.drumhit { --accent: #c084fc; --accent-soft: rgba(192, 132, 252, 0.15); }
.game.tower   { --accent: #38bdf8; --accent-soft: rgba(56, 189, 248, 0.13); }
.game.wobbins { --accent: #facc15; --accent-soft: rgba(250, 204, 21, 0.11); }

/* ---------------- About ---------------- */

.about {
  background:
    radial-gradient(800px 400px at 85% 0%, rgba(34, 211, 238, 0.07), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.about-copy p { color: var(--muted); margin-bottom: 16px; }
.about-copy p strong { color: var(--text); }

.values {
  display: grid;
  gap: 16px;
}
.value {
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s;
}
.value:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.value h3 { font-size: 1.02rem; margin-bottom: 6px; }
.value h3 span { margin-right: 10px; }
.value p { color: var(--muted); font-size: 0.92rem; }

/* ---------------- Contact / footer ---------------- */

.contact { text-align: center; }
.contact .sec-sub { margin: 0 auto 34px; }

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 60px;
  background: var(--bg-2);
}
.footer .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: start;
}
.footer-logo img { height: 54px; width: auto; opacity: 0.9; }
.footer-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; max-width: 320px; }

.footer h3 {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a {
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.2s;
}
.footer ul a:hover { color: var(--text); }

.footer-cols {
  display: flex;
  gap: clamp(40px, 6vw, 90px);
  justify-content: center;
}

.copyright {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 5, 9, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
}
.lightbox.open { display: flex; animation: lb-in 0.25s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(22, 22, 28, 0.8);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: rgba(139, 92, 246, 0.4); transform: rotate(90deg); }

/* ---------------- Reveal on scroll ---------------- */

/* hidden state only when JS is confirmed present (html.js set inline in <head>),
   so content stays visible if main.js never loads */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
}
.reveal {
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */

@media (max-width: 960px) {
  .game { grid-template-columns: 1fr; }
  .game.flip .g-media { order: 0; }
  .game.flip .g-body { order: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; gap: 34px; }
  .footer-cols { justify-content: flex-start; }
}

@media (max-width: 720px) {
  :root { --nav-h: 62px; }
  section { padding: 76px 0; }
  .nav-logo img { height: 38px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 4vw 22px;
    gap: 4px;
    background: rgba(11, 11, 15, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }
  .nav-links.open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  /* block, not inline: inline vertical padding overflows instead of
     spacing the rows, which made the dropdown items overlap */
  .nav-links a { display: block; padding: 13px 16px; font-size: 1.05rem; }
  /* the desktop CTA pill reads as an oversized box in the dropdown list */
  .nav-links a.nav-cta {
    color: var(--muted);
    border: 0;
    background: none;
  }
  .nav-links a.nav-cta:hover {
    color: var(--text);
    background: rgba(244, 244, 245, 0.06);
    box-shadow: none;
  }
  .hero-icons { gap: 16px; margin-top: 44px; }
  .hero-icons a { width: 54px; height: 54px; }
  .g-shots img { height: 150px; }
  .g-head { flex-wrap: wrap; }
  /* portrait cut of the trailer on phones */
  .g-video .poster.wide { display: none; }
  .g-video .poster.tall { display: block; margin: 0 auto; max-width: 420px; }
  .g-video-play { width: 64px; height: 64px; }
  /* language picker sits inside the open dropdown, not floating over it */
  .nav-lang { padding: 4px 0 0; }
  .lang-btn { width: 100%; justify-content: flex-start; padding: 13px 16px; font-size: 1.05rem; }
  .lang-menu {
    position: static;
    min-width: 0;
    margin-top: 6px;
    max-height: 46vh;
    background: rgba(22, 22, 28, 0.9);
  }
  .btn { padding: 13px 22px; }
  .play-badge img { height: 52px; }
  .footer-cols { flex-wrap: wrap; gap: 30px; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  #fx { display: none; }
}
