/* =========================================================================
   SOPA — Tale of the Stolen Potato
   StudioBando · sopagame.com
   ========================================================================= */

/* --- Fonts ------------------------------------------------------------- */
/* M PLUS Rounded 1c (SIL OFL 1.1, see fonts/OFL.txt), the Latin subsets Google
   Fonts serves. The only change is the gasp table, which now asks for symmetric
   smoothing at every size: without it, Chrome on Windows drops vertical
   anti-aliasing below ~21px and rounded letters get stair-stepped edges. */
/* latin-ext */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The Latin subset skips U+2192; the page uses it once ("Discord →"). */
/* arrows */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-400-arrows.woff2") format("woff2");
  unicode-range: U+2192;
}
/* arrows */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-500-arrows.woff2") format("woff2");
  unicode-range: U+2192;
}
/* arrows */
@font-face {
  font-family: "M PLUS Rounded 1c";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/mplus-rounded-1c-700-arrows.woff2") format("woff2");
  unicode-range: U+2192;
}

/* --- Tokens ------------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* Warm ink (night kitchen) */
  --ink-900: #180730;
  --ink-800: #1D0836;
  --ink-700: #230B41;
  --surf-1: #2A0E4B;
  --surf-2: #351459;

  /* Paper */
  --cream: #FBF1E2;
  --paper: #F7EBD8;
  --paper-2: #FDF6EA;

  /* Spice */
  --marigold: #FFB03A;
  --amber: #FF8B3D;
  --terracotta: #DD5A38;
  --jade: #3FBFA0;

  /* From sopagame.com */
  --blue: #33C3F0;
  --blue-lift: #1EAEDB;
  --violet: #8A3FF2;
  --violet-lift: #9B58F6;
  --plum-1: #3A1039;
  --plum-2: #4A1545;
  --plum-line: #260A28;
  --purple: #9A00B2;
  --purple-lift: #B317CC;

  /* Text */
  --t-1: var(--cream);
  --t-2: rgba(251, 241, 226, 0.74);
  --t-3: rgba(251, 241, 226, 0.52);
  --ink-t2: rgba(24, 7, 48, 0.76);
  --ink-t3: rgba(24, 7, 48, 0.55);

  /* Type */
  --display: "M PLUS Rounded 1c", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "M PLUS Rounded 1c", ui-rounded, "Segoe UI", system-ui, sans-serif;

  /* Metrics */
  --max: 1200px;
  --measure: 720px;
  --gutter: clamp(20px, 5vw, 56px);
  --r-md: 16px;
  --r-lg: 26px;
  --r-xl: 38px;

  --lift-strong: 0 36px 70px -34px rgba(12, 4, 26, 0.95);
  --ease: cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* --- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-800);
  color: var(--t-1);
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(16px, 0.5vw + 14.6px, 17.5px);
  line-height: 1.68;
  overflow-x: hidden;
}

img, svg, iframe, video { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--marigold); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 50%;
  top: -90px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--marigold);
  color: var(--ink-900);
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 0; }

/* --- Layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: 1460px; }

.section { position: relative; overflow: hidden; padding-block: clamp(68px, 8vw, 120px); }
.section--tight { padding-block: clamp(44px, 5vw, 72px); }
.section--rail { padding-block: 44px clamp(48px, 6vw, 84px); }
.section--flush-top { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }
.section--awards { padding-bottom: clamp(34px, 4vw, 58px); }
.section--screenshots {
  background: linear-gradient(180deg,
    rgba(74, 17, 64, 0) 0%,
    rgba(74, 17, 64, 0.08) 58%,
    rgba(74, 17, 64, 0.34) 100%);
}
.section--trailer {
  padding-top: clamp(46px, 5.5vw, 78px);
  background:
    linear-gradient(180deg,
      rgba(74, 17, 64, 0.02) 0%,
      rgba(74, 17, 64, 0.06) 48%,
      rgba(74, 17, 64, 0.18) 100%),
    linear-gradient(180deg,
      rgba(24, 7, 48, 0) 0%,
      rgba(24, 7, 48, 0.03) 70%,
      rgba(24, 7, 48, 0.06) 100%);
}
#news {
  background: linear-gradient(180deg,
    rgba(63, 191, 160, 0.014) 0%,
    rgba(63, 191, 160, 0.025) 38%,
    rgba(63, 191, 160, 0.07) 72%,
    rgba(63, 191, 160, 0.12) 100%);
}
#news > .glow { display: none; }
/* Sketch strips on a dark band: the strip images become a mask over
   --sketch-ink, with the same layout as the paper bands; cream at low
   strength reads as faint chalk on the purple. */
.sketch-band--ink {
  --sketch-w: clamp(220px, 21vw, 360px);
  --sketch-shift: 0px;
  --sketch-ink: var(--cream);
  isolation: isolate;
}
.sketch-band--ink::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.17;
  background: var(--sketch-ink);
  -webkit-mask-image: url("paper-sketch-left.webp"), url("paper-sketch-right.webp");
  mask-image: url("paper-sketch-left.webp"), url("paper-sketch-right.webp");
  -webkit-mask-repeat: repeat-y;
  mask-repeat: repeat-y;
  -webkit-mask-size: var(--sketch-w) auto;
  mask-size: var(--sketch-w) auto;
  -webkit-mask-position:
    left 0 top calc(var(--sketch-shift) * -1),
    right 0 top calc(var(--sketch-w) * 5 / 9 - var(--sketch-shift));
  mask-position:
    left 0 top calc(var(--sketch-shift) * -1),
    right 0 top calc(var(--sketch-w) * 5 / 9 - var(--sketch-shift));
}
@media (min-width: 1800px) {
  .sketch-band--ink::after {
    -webkit-mask-image: url("paper-sketch-left-wide.webp"), url("paper-sketch-right-wide.webp");
    mask-image: url("paper-sketch-left-wide.webp"), url("paper-sketch-right-wide.webp");
    -webkit-mask-size: calc(var(--sketch-w) * 43 / 36) auto;
    mask-size: calc(var(--sketch-w) * 43 / 36) auto;
  }
}
@media (max-width: 620px) {
  .sketch-band--ink { --sketch-w: 30vw; }
  .sketch-band--ink::after { opacity: 0.08; }
}

.section-head { margin-bottom: clamp(30px, 4vw, 52px); }
.section-head--tight { margin-bottom: clamp(10px, 1.3vw, 18px); }
.press-head { margin-bottom: clamp(26px, 3.4vw, 44px); }
.section-head--center { text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--terracotta), var(--marigold));
}
.section-head--center .eyebrow::after {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--marigold), var(--terracotta));
}

.section-title { font-size: clamp(31px, 4.4vw, 54px); }

.section-sub {
  margin-top: 16px;
  max-width: 60ch;
  color: var(--t-2);
  font-size: clamp(16px, 1.1vw, 18px);
}
.section-head--center .section-sub { margin-inline: auto; }

/* Paper (light) bands — noise sits behind content, never over glyphs */
.paper-section {
  /* Soft creases from the artbook paper, blended into the paper colour. Sketch
     bands share --sketch-shift so the creases run on across sections. */
  background:
    url("paper-creases.webp") 0 calc(var(--sketch-shift, 0px) * -1) / 1032px 1032px repeat,
    var(--paper);
  background-blend-mode: soft-light;
  color: var(--ink-900);
  isolation: isolate;
}
/* Sketch bands: two strips of artbook drawings hug the viewport edges, facing
   inward, so the reading column stays clear. The right strip runs half a step
   behind the left so drawings alternate sides, and site.js sets --sketch-shift
   so consecutive bands continue one pattern instead of each restarting it. */
.paper-section--sketch {
  --sketch-w: clamp(220px, 21vw, 360px);
  --sketch-shift: 0px;
  background-color: var(--paper);
}
.paper-section--sketch::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("paper-sketch-left.webp"), url("paper-sketch-right.webp");
  background-repeat: repeat-y;
  background-size: var(--sketch-w) auto;
  background-position:
    left 0 top calc(var(--sketch-shift) * -1),
    right 0 top calc(var(--sketch-w) * 5 / 9 - var(--sketch-shift));
}
/* Wide screens have room for an inner column of drawings on each side. */
@media (min-width: 1800px) {
  .paper-section--sketch::after {
    background-image: url("paper-sketch-left-wide.webp"), url("paper-sketch-right-wide.webp");
    background-size: calc(var(--sketch-w) * 43 / 36) auto;
  }
}
.paper-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Fibre grain lifted from the artbook paper; a seamless 512px tile. */
  background: url("paper-grain.webp") 0 0 / 512px 512px repeat;
  mix-blend-mode: soft-light;
}
.paper-section h1,
.paper-section h2,
.paper-section h3 { color: var(--ink-900); }
.paper-section .section-sub { color: var(--ink-t2); }
.paper-section .eyebrow { color: var(--terracotta); }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--surf-2);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: #3E1A69; }
.btn:active { transform: translateY(0); }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn--primary {
  --btn-bg: var(--violet);
  --btn-fg: #fff;
}
.btn--primary:hover { background: var(--violet-lift); }

.btn--purple { --btn-bg: var(--purple); --btn-fg: #fff; }
.btn--purple:hover { background: var(--purple-lift); }

.btn--lg { padding: 17px 32px; font-size: 16px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

.paper-section .btn { --btn-bg: #2A0E4B; --btn-fg: var(--cream); }
.paper-section .btn:hover { background: #3A1961; }
.paper-section .btn--primary { --btn-fg: #fff; }

/* --- Header ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-header.is-stuck {
  background: rgba(24, 7, 48, 0.82);
  backdrop-filter: blur(14px) saturate(130%);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.nav__brand {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s;
}
.site-header.is-past-hero .nav__brand {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav__brand img {
  width: clamp(88px, 8vw, 108px);
  /* the steam sits light above the heavy letterforms, so optical centre is a touch high */
  transform: translateY(-3px);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.2vw, 14px);
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
.nav__links a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--t-2);
  border-radius: 10px;
  transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--marigold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__links a[aria-current="true"] { color: var(--cream); }

.nav__cta { flex: none; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(251, 241, 226, 0.1);
  color: var(--cream);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.nav__toggle span {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* --- Hero -------------------------------------------------------------- */
/* Short enough that the awards rail peeks above the fold on load */
.hero {
  position: relative;
  min-height: min(calc(100svh - 150px), 860px);
  display: flex;
  align-items: flex-end;
  padding-top: 88px;
  padding-bottom: clamp(22px, 2.4vw, 34px);
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}
.hero__flare {
  position: absolute;
  top: -200px;
  left: -200px;
  width: 1600px;
  height: 1200px;
  transform: rotate(-10deg);
  animation: flarePulse 7s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
  contain: paint;
  will-change: opacity;
}
.hero__flare-inner {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255, 220, 100, 0.58) 0%, transparent 75%),
    radial-gradient(ellipse at 12% 6%, rgba(255, 190, 70, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse at 35% 25%, rgba(255, 176, 58, 0.08) 0%, transparent 45%);
  filter: blur(28px);
  contain: paint;
}
.hero__flare-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 34% 30% at 0% 0%, rgba(255, 240, 178, 0.58) 0%, transparent 82%);
  mix-blend-mode: screen;
}
.hero__flare-inner::after {
  display: none;
}
@keyframes flarePulse {
  0%   { opacity: 0.85; }
  30%  { opacity: 1.05; }
  55%  { opacity: 0.92; }
  80%  { opacity: 1.08; }
  100% { opacity: 0.88; }
}

.hero__shafts {
  position: absolute;
  top: 0;
  left: 0;
  width: 720px;
  height: 760px;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.hero__shaft {
  position: absolute;
  top: -180px;
  left: var(--shaft-left);
  width: var(--shaft-width);
  height: var(--shaft-length);
  transform: rotate(-45deg);
  transform-origin: 50% 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 220, 0.82) 0%, rgba(255, 240, 190, 0.48) 46%, rgba(255, 225, 160, 0.22) 75%, transparent 100%);
  filter: blur(6px);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: opacity, transform;
  animation: lightShaft var(--shaft-duration, 11s) ease-in-out var(--shaft-delay, 0s) infinite;
}
@keyframes lightShaft {
  0%, 100% { opacity: 0.12; transform: rotate(-45deg) translate3d(0, 16px, 0); }
  26% { opacity: 0.3; transform: rotate(-45deg) translate3d(5px, 5px, 0); }
  48% { opacity: 0.55; transform: rotate(-45deg) translate3d(11px, -3px, 0); }
  68% { opacity: 0.28; transform: rotate(-45deg) translate3d(-4px, 7px, 0); }
  86% { opacity: 0.14; transform: rotate(-45deg) translate3d(-8px, 15px, 0); }
}
.hero.is-motion-paused .hero__shaft,
.hero.is-motion-paused .hero__dust span,
.hero.is-motion-paused .hero__flare,
.hero.is-motion-paused .hero__media img,
.hero.is-motion-paused .hero__scroll,
.marquee.is-motion-paused .marquee__track { animation-play-state: paused; }
.is-low-power .hero__shafts .hero__shaft:nth-child(n + 3) { display: none; }
.is-low-power .hero__shafts .hero__shaft { filter: blur(4px); }
.is-very-low-power .hero__shafts,
.is-very-low-power .hero__dust,
.is-very-low-power .glow,
.is-very-low-power .paper-section::before { display: none; }
.is-very-low-power .hero__flare {
  display: block;
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
  animation: none;
  opacity: 1;
  background: radial-gradient(
    ellipse 62% 78% at 0% 0%,
    rgba(255, 196, 92, 0.28) 0%,
    rgba(255, 174, 58, 0.11) 32%,
    transparent 72%
  );
}
.is-very-low-power .hero__flare-inner { display: none; }
.is-very-low-power .hero__media img,
.is-very-low-power .hero__media img.is-active {
  animation: none;
  transform: none;
}
.is-very-low-power .hero__scrim {
  background: linear-gradient(
    180deg,
    rgba(24, 7, 48, 0.18) 0%,
    rgba(24, 7, 48, 0.12) 42%,
    rgba(24, 7, 48, 0.72) 84%,
    var(--ink-800) 100%
  );
}
.is-very-low-power .marquee__track { animation: slide 120s linear infinite; }
.is-very-low-power [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}
.is-very-low-power .nav__links,
.is-very-low-power .tags li,
.is-very-low-power .store-card,
.is-very-low-power .cta { backdrop-filter: none; }
.hero__media { position: absolute; inset: 0; z-index: -2; container-type: size; }
/* Slideshow: the incoming slide fades in over the outgoing one (.is-prev),
   which holds full opacity underneath so the ink never shows through. */
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos, 78% 42%);
  /* Slides whose subject sits near the right edge zoom from that edge,
     which is the only way to pull it left while the hero is wider than 16:9. */
  scale: var(--hero-zoom, 1);
  transform-origin: var(--hero-origin, 50% 50%);
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.hero__media img.is-active {
  z-index: 1;
  opacity: 1;
  animation: drift 52s var(--ease) infinite alternate;
}
.hero__media img.is-prev {
  opacity: 1;
  animation: drift 52s var(--ease) infinite alternate;
}
/* Ultra-wide heroes: past 9:4 the slides stop growing with the screen. Each
   keeps the frame it has on a standard desktop, pinned to the right edge,
   and its left edge fades so the scrim and light shafts take over there. */
@container (min-aspect-ratio: 9 / 4) {
  .hero__media img {
    left: auto;
    width: auto;
    aspect-ratio: 9 / 4;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%);
    mask-image: linear-gradient(90deg, transparent, #000 32%);
  }
  /* The poster runs wider, up to 2.8 hero heights, so its last frog stays in
     frame; below that it still matches the standard layout exactly. */
  .hero__media img.hero__poster { aspect-ratio: auto; width: min(100%, 280cqh); }
}
@keyframes drift {
  from { transform: scale(1.01); }
  to { transform: scale(1.09855); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(103deg, rgba(24, 7, 48, 0.94) 0%, rgba(24, 7, 48, 0.68) 30%, rgba(24, 7, 48, 0.12) 55%, rgba(24, 7, 48, 0) 72%, rgba(24, 7, 48, 0.1) 100%),
    linear-gradient(180deg, rgba(24, 7, 48, 0.5) 0%, rgba(24, 7, 48, 0) 22%, rgba(24, 7, 48, 0) 60%, rgba(24, 7, 48, 0.4) 86%, var(--ink-800) 100%);
}

.hero__inner { position: relative; width: 100%; z-index: 3; }
.hero__mobile-details { display: none; }

.hero__studio-logo {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(14px, calc(2.8vw - 8px), 28px);
  z-index: 4;
  width: clamp(86px, 10vw, 126px);
  overflow: hidden;
  border-radius: 14%;
  filter: drop-shadow(0 10px 22px rgba(12, 4, 26, 0.5));
  opacity: 0.94;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.hero__studio-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 54%, rgba(12, 4, 26, 0.18) 100%);
}
.hero__studio-logo:hover,
.hero__studio-logo:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}
.hero__studio-logo picture { display: block; }
.hero__studio-logo img { width: 100%; height: auto; display: block; }
.hero__dust {
  position: absolute;
  inset: 50% 0 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
}
.hero__dust span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: calc(var(--size) * 1.5);
  height: calc(var(--size) * 1.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 238, 208, 0.9) 0 24%, rgba(255, 224, 178, 0.38) 52%, transparent 78%);
  mix-blend-mode: plus-lighter;
  opacity: 0;
  contain: paint;
  animation: dustFloat var(--duration, 10s) ease-in-out var(--delay, 0s) infinite;
}
/* Keep the atmosphere on older hardware without promoting 42 animated
   particles at once. Full particle density remains the default. */
.is-low-power .hero__dust span:nth-child(3n + 1),
.is-low-power .hero__dust span:nth-child(3n + 2) { display: none; }
@keyframes dustFloat {
  0%, 100% { opacity: 0; transform: translate3d(0, 9px, 0) scale(0.62); }
  16% { opacity: 0.1; transform: translate3d(0, 2px, 0) scale(0.8); }
  38% { opacity: calc(var(--alpha, 0.42) + 0.18); transform: translate3d(var(--drift, 6px), -8px, 0) scale(1); }
  56% { opacity: calc(var(--alpha, 0.42) + 0.18); transform: translate3d(calc(var(--drift, 6px) * 0.38), -13px, 0) scale(1.06); }
  72% { opacity: calc(var(--alpha, 0.42) + 0.14); transform: translate3d(calc(var(--drift, 6px) * -0.24), -5px, 0) scale(0.94); }
  88% { opacity: 0.08; transform: translate3d(calc(var(--drift, 6px) * -0.35), 4px, 0) scale(0.78); }
}

.hero__logo {
  width: min(452px, 76vw);
  aspect-ratio: 1254 / 516;
  margin-bottom: clamp(12px, 1.4vw, 16px);
  filter: drop-shadow(0 16px 36px rgba(12, 4, 26, 0.75));
}

.hero__title { font-size: clamp(24px, 2.6vw, 33px); margin-bottom: 10px; }
.hero__title .sub {
  display: block;
  font-family: var(--body);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-top: 9px;
}

.hero__byline { color: var(--t-2); font-size: 15px; margin-bottom: 14px; }
.hero__byline a { color: var(--cream); box-shadow: inset 0 -1px 0 rgba(251, 241, 226, 0.35); }
.hero__byline a:hover { color: var(--marigold); box-shadow: inset 0 -1px 0 var(--marigold); }

.hero__pitch {
  max-width: 50ch;
  color: rgba(255, 248, 238, 0.9);
  font-size: clamp(16px, 1.1vw, 18.5px);
  margin-bottom: 20px;
  text-shadow: 0 2px 18px rgba(16, 5, 32, 0.85);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.tags li {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(24, 7, 48, 0.55);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 245, 235, 0.88);
  backdrop-filter: blur(3px);
}

/* Hero store rail — solid, no glass, no outlines */
.storerail { max-width: 740px; }
.storerail__label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 245, 235, 0.78);
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(16, 5, 32, 0.9);
}
.storerail__row { display: flex; flex-wrap: wrap; gap: 10px; }

.storebtn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #06303D;
  box-shadow: 0 16px 30px -18px rgba(12, 4, 26, 0.95);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.storebtn svg { width: 22px; height: 22px; flex: none; }
.storebtn__text { display: grid; line-height: 1.2; }
.storebtn__name { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.storebtn__meta { font-size: 11.5px; color: rgba(6, 48, 61, 0.72); }
.storebtn__break-mobile { display: none; }
.storebtn:hover {
  transform: translateY(-3px);
  background: #57D0F6;
  box-shadow: 0 22px 40px -20px rgba(51, 195, 240, 0.65);
}

.hero__ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(255, 248, 238, 0.92);
  padding: 12px 16px;
  transition: color 0.25s var(--ease);
}
.hero__ghost svg { width: 26px; height: 26px; }
.hero__ghost:hover { color: var(--marigold); }
.hero__scroll { display: none; }

/* --- Marquee ----------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  --marquee-gap: clamp(16px, 3vw, 40px);
  --marquee-gap-half: clamp(8px, 1.5vw, 20px);
  gap: var(--marquee-gap);
  animation: slide var(--speed, 80s) linear infinite;
  will-change: transform;
}
.marquee--reverse .marquee__track { animation-direction: reverse; }
@keyframes slide {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-50% - var(--marquee-gap-half)), 0, 0); }
}
.marquee img {
  height: clamp(66px, 6.1vw, 90px);
  width: auto;
  opacity: 0.82;
  flex: none;
}
.marquee--small img { height: clamp(46px, 4.2vw, 62px); opacity: 0.62; }

/* --- Story / About ----------------------------------------------------- */
.prose {
  max-width: var(--measure);
  margin-inline: auto;
  font-size: clamp(16.5px, 1.15vw, 18.5px);
  color: var(--ink-t2);
}
.prose p { margin-bottom: 1.15em; }
.prose > .lede {
  font-family: var(--display);
  font-size: clamp(21px, 2.1vw, 28px);
  font-weight: 500;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin-bottom: 1.1em;
}
.prose .feat-title {
  font-family: var(--display);
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  color: var(--ink-900);
  margin: 1.5em 0 0.7em;
}

/* --- Features (cards, with loops spanning full rows) ------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  align-items: stretch;
}
.feature { grid-column: span 2; }
.feature--c7 { grid-column: 2 / span 2; }
.feature--c8 { grid-column: 4 / span 2; }
.feature {
  position: relative;
  isolation: isolate;
  padding: 26px 26px 28px;
  transition: transform 0.3s var(--ease);
}
/* The card is a hand-drawn shape: fill, wobbly outline and shadow all follow
   it. Three variants rotate so neighbouring cards never share a wobble. */
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("feature-outline-1.svg") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 14px rgba(60, 24, 10, 0.16));
  transition: filter 0.3s var(--ease);
}
.feature:nth-of-type(3n + 2)::before { background-image: url("feature-outline-2.svg"); }
.feature:nth-of-type(3n)::before { background-image: url("feature-outline-3.svg"); }
.feature:hover { transform: translateY(-4px); }
.feature:hover::before { filter: drop-shadow(0 18px 20px rgba(60, 24, 10, 0.22)); }
.feature p { color: var(--ink-t2); font-size: 16px; line-height: 1.58; }
.feature p strong {
  display: block;
  font-family: var(--display);
  font-size: 19.5px;
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin-bottom: 7px;
}

.features .loop { grid-column: 1 / -1; margin: clamp(4px, 0.6vw, 10px) 3%; max-width: 100%; }

/* Animated loop strips, Steam-style */
.loop {
  position: relative;
  margin: clamp(18px, 2.4vw, 36px) auto;
  max-width: 1320px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(60, 24, 10, 0.12);
  background: #2A0E4B;
}
.loop picture { display: block; }
.loop img { width: 100%; }
.loop-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--loop-video-height, 100%);
  max-width: none;
  object-fit: fill;
  opacity: 0;
  pointer-events: none;
}
.loop-video.is-playing { opacity: 1; }
.buy__bg { overflow: hidden; }
.buy__bg .loop-video { object-fit: cover; object-position: center 45%; }
.buy__bg::after { z-index: 1; }

/* --- Pull quotes ------------------------------------------------------- */
.pull {
  position: relative;
  text-align: center;
  padding-block: clamp(54px, 7vw, 100px);
  overflow: hidden;
}
.pull__inner { position: relative; max-width: 940px; margin-inline: auto; }
.pull blockquote {
  margin: 0;
  font-family: var(--display);
  max-width: 820px;
  margin-inline: auto;
  font-size: clamp(21px, 2.6vw, 36px);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "SOFT" 70, "WONK" 1;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--t-2);
  text-wrap: balance;
}
.pull blockquote::before { content: "\201C"; color: var(--marigold); }
.pull blockquote::after { content: "\201D"; color: var(--marigold); }
.pull__src {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--t-3);
  transition: color 0.25s var(--ease);
}
.pull__src svg { width: 13px; height: 13px; }
.pull a.pull__src:hover { color: var(--marigold); }
.pull--band {
  padding-bottom: clamp(62px, 7.6vw, 108px);
  background: linear-gradient(180deg,
    rgba(74, 17, 64, 0) 0%,
    rgba(74, 17, 64, 0.62) 22%,
    rgba(74, 17, 64, 0.62) 78%,
    rgba(74, 17, 64, 0) 100%);
}
.pull--paper blockquote { color: var(--ink-t2); }
.pull--paper .pull__src { color: var(--ink-t3); }
.pull--paper a.pull__src:hover { color: var(--terracotta); }
.awards__quote {
  margin-top: clamp(16px, 2vw, 28px);
  padding-top: clamp(26px, 3vw, 44px);
  padding-bottom: 0;
}
.screenshots__quote {
  margin-top: 0;
  padding-block: clamp(34px, 4vw, 58px);
}
.section--trailer .tv { margin-top: clamp(-128px, -8.3vw, -68px); }

/* --- Screenshots ------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(118px, 12.5vw, 184px);
  gap: clamp(9px, 1vw, 14px);
}
.shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 0;
  padding: 0;
  background: var(--surf-1);
  cursor: zoom-in;
  display: block;
  width: 100%;
  height: 100%;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.shot:hover img { transform: scale(1.06); }
.shot--xl { grid-column: span 2; grid-row: span 2; }
.shot--wide { grid-column: span 2; }

/* --- Lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(16, 5, 32, 0.93);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(1400px, 100%);
  max-height: 84vh;
  width: auto;
  border-radius: var(--r-md);
  box-shadow: 0 40px 90px -30px rgba(12, 4, 26, 0.9);
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 241, 226, 0.12);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox__btn:hover { background: rgba(251, 241, 226, 0.24); transform: scale(1.06); }
.lightbox__btn svg { width: 21px; height: 21px; }
.lightbox__close { top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); }
.lightbox__prev { left: clamp(8px, 2.4vw, 30px); }
.lightbox__next { right: clamp(8px, 2.4vw, 30px); }
.lightbox__count {
  position: absolute;
  bottom: clamp(14px, 3vw, 30px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--t-3);
}

/* --- Trailer in the TV ------------------------------------------------- */
.tv {
  position: relative;
  width: min(1340px, 100%);
  margin-inline: auto;
  aspect-ratio: 3840 / 2760;
}
.tv__set {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 40px 60px rgba(12, 4, 26, 0.55));
}
.tv__screen {
  position: absolute;
  left: 18.52%;
  top: 33.55%;
  width: 59.82%;
  height: 46.88%;
  z-index: 1;
  overflow: hidden;
  border-radius: 2.4% / 3.2%;
  background: #180730;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: block;
}
.tv__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 0.5s var(--ease), transform 0.9s var(--ease);
}
.tv__screen:hover img { opacity: 0.96; transform: scale(1.04); }
.tv__screen iframe { width: 100%; height: 100%; border: 0; }
.tv__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.tv__disc {
  width: clamp(48px, 6vw, 76px);
  height: clamp(48px, 6vw, 76px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--violet);
  box-shadow: 0 16px 40px -14px rgba(138, 63, 242, 0.75);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.tv__screen:hover .tv__disc { background: var(--violet-lift); transform: scale(1.1); }
.tv__disc svg { width: 38%; height: 38%; color: #fff; transform: translateX(-7%); }

/* --- Latest: three most recent things, whatever the source ------------- */
.latest {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
  max-width: 1040px;
  margin-inline: auto;
}
.latest--bare { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.latest__hero {
  display: block;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surf-1);
  aspect-ratio: var(--latest-ratio, 16 / 9);
  min-height: 0;
  align-self: center;
}
.latest__hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.latest__hero:hover img { transform: scale(1.04); }
.latest__list { min-width: 0; }

.post {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 28px);
  align-items: baseline;
  padding: 22px 6px;
  transition: opacity 0.25s var(--ease);
}
.post + .post { box-shadow: inset 0 1px 0 rgba(251, 241, 226, 0.08); }
.post:hover { opacity: 0.78; }
.post__meta {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-3);
  line-height: 1.4;
}
.post__src { display: inline-flex; align-items: center; gap: 6px; color: var(--marigold); }
.post__src svg { width: 13px; height: 13px; }
.post__body {
  font-family: var(--display);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 500;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--t-1);
}
.latest__empty { color: var(--t-3); font-size: 14.5px; padding: 16px 6px; }
.latest__more {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding-left: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--t-3);
}
.latest__more a { color: var(--marigold); }
.latest__more a:hover { color: var(--cream); }

/* --- Press: six laurels at a time, cross-fading ------------------------ */
.press-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 30px);
  max-width: 760px;
  margin-inline: auto;
  align-items: center;
  justify-items: center;
}
.press-grid img {
  width: 100%;
  max-width: 190px;
  height: auto;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.6, 1);   /* leaves gently */
}
.press-grid img.is-shown {
  opacity: 0.7;
  transition: opacity 1.5s cubic-bezier(0.33, 0, 0.2, 1);   /* arrives gently */
}

/* --- Buy ---------------------------------------------------------------
   The simmering pot fills the whole band, the way it does at the bottom of
   the old sopagame.com.                                                   */
.buy { isolation: isolate; }
.buy__bg { position: absolute; inset: 0; z-index: -2; }
.buy__bg picture { display: block; width: 100%; height: 100%; }
.buy__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
.buy__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(29, 8, 54, 0.82) 0%, rgba(29, 8, 54, 0.52) 12%, rgba(29, 8, 54, 0.2) 34%, rgba(29, 8, 54, 0.12) 66%, var(--ink-800) 100%);
}

.buy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(12px, 1.5vw, 20px);
}

.store-card {
  --accent: var(--marigold);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 26px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(255, 176, 58, 0.26), transparent 62%),
    linear-gradient(135deg, #4A1354, #331061 60%, #21093E);
  backdrop-filter: blur(6px);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.store-card::before {
  content: "";
  position: absolute;
  inset: -50% 10% auto -30%;
  height: 80%;
  background: radial-gradient(60% 60% at 50% 50%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.45s var(--ease);
}
.store-card:hover {
  transform: translateY(-5px);
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(255, 176, 58, 0.34), transparent 62%),
    linear-gradient(135deg, #5A1A64, #3E1571 60%, #2A0F4E);
  box-shadow: 0 30px 56px -34px color-mix(in srgb, var(--accent) 85%, transparent);
}
.store-card:hover::before { opacity: 1; }
.store-card--steam { --accent: #6FC3F0; }
.store-card--xbox { --accent: #6FD46F; }
.store-card--ps { --accent: #7AA9FF; }

.store-card__top { display: flex; align-items: center; gap: 14px; }
.store-card__glyph {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 15px;
  background: rgba(251, 241, 226, 0.08);
  color: var(--cream);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.store-card__glyph svg { width: 27px; height: 27px; }
.store-card:hover .store-card__glyph {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.store-card__name { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.store-card__where { font-size: 13px; color: var(--t-3); }

.store-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14.5px;
  color: var(--t-2);
}
.store-card__list li { display: flex; align-items: flex-start; gap: 9px; }
.store-card__list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.store-card .btn { width: 100%; margin-top: auto; background: var(--purple); color: #fff; }
.store-card .btn:hover, .store-card:hover .btn { background: var(--purple-lift); }

.buy__note { margin-top: 24px; text-align: center; font-size: 14px; color: var(--t-3); }
.buy__note a { color: var(--marigold); }
.buy__note a:hover { color: var(--cream); }

/* --- Specs ------------------------------------------------------------- */
.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 2px;
  background: var(--ink-700);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.spec {
  background: var(--ink-800);
  padding: 22px 24px 24px;
  display: grid;
  gap: 6px;
  align-content: start;
  transition: background 0.3s var(--ease);
}
.spec:hover { background: #2E1048; }
.spec dt {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--marigold);
}
.spec dd { margin: 0; font-size: 15.5px; color: #fff; line-height: 1.45; }

/* --- FAQ --------------------------------------------------------------- */
.faq { display: grid; gap: 10px; max-width: 880px; margin-inline: auto; }
.faq details {
  border-radius: var(--r-md);
  background: var(--paper-2);
  overflow: hidden;
  box-shadow: 0 10px 26px -22px rgba(60, 24, 10, 0.8);
}
.faq details[open] { background: #fff; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 19px 56px 19px 24px;
  position: relative;
  font-family: var(--display);
  font-size: clamp(17px, 1.3vw, 19.5px);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--terracotta);
  border-bottom: 2px solid var(--terracotta);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__a { padding: 0 24px 22px; color: var(--ink-t2); font-size: 16px; max-width: 76ch; }

/* --- CTA band ---------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(34px, 5vw, 66px);
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(255, 176, 58, 0.26), transparent 62%),
    linear-gradient(135deg, #4A1354, #331061 60%, #21093E);
  text-align: center;
}
.cta h2 { font-size: clamp(27px, 3.2vw, 42px); margin-bottom: 14px; }
.cta p { color: var(--t-2); max-width: 54ch; margin-inline: auto; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 26px;
}
.cta__minor { font-size: 14.5px; font-weight: 700; color: var(--t-2); padding: 12px 6px; }
.cta__minor:hover { color: var(--marigold); }

/* --- Footer ------------------------------------------------------------ */
.site-footer { background: var(--ink-900); padding-block: clamp(48px, 6vw, 76px) 36px; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 48px);
  align-items: start;
}
.footer__brand img { width: 104px; margin-bottom: 18px; }
.footer__brand p { color: var(--t-3); font-size: 14.5px; max-width: 34ch; }

.footer__col h4 {
  font-family: var(--body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 16px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__list a { color: var(--t-2); font-size: 15px; transition: color 0.2s var(--ease); }
.footer__list a:hover { color: var(--marigold); }

.socials { display: flex; flex-wrap: wrap; gap: 9px; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(251, 241, 226, 0.06);
  color: var(--t-2);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.socials a:hover { transform: translateY(-3px); color: #fff; background: var(--purple); }
.socials svg { width: 18px; height: 18px; }

.footer__bottom {
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: 22px;
  border-top: 1px solid rgba(251, 241, 226, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--t-3);
}
.footer__stores { display: flex; gap: 14px; align-items: center; }
.footer__stores a { color: var(--t-3); transition: color 0.2s var(--ease); }
.footer__stores a:hover { color: var(--cream); }
.footer__stores svg { width: 20px; height: 20px; }

/* --- Mobile buy bar ---------------------------------------------------- */
.buybar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 9px 18px;
  border-radius: 999px;
  background: rgba(24, 7, 48, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -16px rgba(12, 4, 26, 0.95);
  transform: translateY(150%);
  transition: transform 0.45s var(--ease);
}
.buybar.is-visible { transform: translateY(0); }
.buybar__label { font-size: 13px; font-weight: 700; margin-right: auto; }
.buybar__icons { display: flex; gap: 8px; }
.buybar__icons a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #06303D;
}
.buybar__icons svg { width: 19px; height: 19px; }
.buybar__icons a:first-child svg { transform: translate(-1.25px, -1.25px); }

/* --- Reveal ------------------------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1040px) {
  .latest { grid-template-columns: minmax(0, 1fr); }
  .latest__hero { min-height: 0; max-height: none; }
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .nav__toggle { display: grid; }
  .nav__brand { margin-right: 0; }
  .nav__links {
    position: fixed;
    inset: 72px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px;
    border-radius: var(--r-lg);
    background: rgba(24, 7, 48, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: var(--lift-strong);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 13px 14px; font-size: 16px; }
  .nav__links a::after { display: none; }
  .nav__cta { display: none; }

  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feature, .feature--c7, .feature--c8 { grid-column: span 2; }

  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(112px, 25vw, 190px); }
  .shot--wide { grid-column: span 1; }
  .shot--xl { grid-column: span 2; grid-row: span 2; }

  .buybar { display: flex; }
}

/* Below tablet the TV bezel eats too much width — show a plain player instead */
@media (max-width: 700px) {
  .tv { aspect-ratio: 16 / 9; }
  .section--trailer .tv { margin-top: 8px; }
  .tv__set { display: none; }
  .tv__screen {
    position: static;
    width: 100%;
    height: 100%;
    border-radius: var(--r-md);
  }
}

@media (max-width: 620px) {
  .paper-section--sketch { --sketch-w: 30vw; }
  .paper-section--sketch::after { opacity: 0.2; }
  .hero {
    min-height: clamp(560px, 68svh, 650px);
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 112px;
    padding-bottom: 18px;
  }
  .hero__flare {
    top: -65px;
    left: -70px;
    width: 500px;
    height: 360px;
    animation: flarePulseMobile 8s ease-in-out infinite alternate;
  }
  .hero__shafts { transform: scale(0.68); transform-origin: 0 0; }
  .hero__shaft { filter: blur(7px); }
  .hero__shaft:nth-child(4) { display: none; }
  .hero__shaft:nth-child(3) { height: 410px; }
  .hero__flare-inner {
    filter: blur(26px);
  }
  @keyframes flarePulseMobile {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.18; }
  }
  .hero__media { background: var(--ink-900); }
  .hero__media img,
  .hero__media img.is-active,
  .hero__media img.is-prev {
    object-position: var(--hero-pos-sm, 76% 40%);
    scale: none;
    animation: none;
    transform: scale(1);
    filter: none;
  }
  /* The poster is three times wider than it is tall: on a phone it becomes a
     band framing Nana through the frog thief, fading into the ink around it. */
  .hero__media img.hero__poster {
    top: 56px;
    bottom: auto;
    height: calc(100vw * 0.82);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 66%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 66%, transparent);
  }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(24, 7, 48, 0.08) 0%, rgba(24, 7, 48, 0.1) 36%, rgba(24, 7, 48, 0.5) 76%, rgba(24, 7, 48, 0.9) 92%, var(--ink-900) 100%);
  }
  .hero__logo { width: min(360px, 86vw); }
  .hero__studio-logo {
    top: 16px;
    right: auto;
    bottom: auto;
    left: var(--gutter);
    width: 47px;
  }
  .hero__studio-logo::after {
    background: linear-gradient(135deg, rgba(255, 242, 218, 0.12) 0%, rgba(255, 242, 218, 0.04) 32%, transparent 62%);
  }
  .hero__title { font-size: clamp(18px, 4.6vw, 19px); }
  .hero__title .sub { font-size: 11px; letter-spacing: 0.18em; margin-top: 7px; }
  .hero__supporting { display: none; }
  .hero__mobile-details {
    display: block;
    position: relative;
    padding: 0 0 20px;
    background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 100%);
  }
  .hero__mobile-details .hero__byline { margin-bottom: 14px; }
  .tags { gap: 6px; margin-bottom: 14px; }
  .tags li {
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.06em;
    background: rgba(74, 21, 69, 0.72);
    border: 1px solid rgba(251, 241, 226, 0.1);
    box-shadow: inset 0 1px 0 rgba(251, 241, 226, 0.06);
  }
  .hero__pitch { font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
  .section--awards { padding-top: 26px; }
  .storerail__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .storebtn {
    display: grid;
    grid-template-columns: 18px max-content;
    column-gap: 6px;
    min-width: 0;
    padding: 9px 5px;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
  }
  .storebtn svg { grid-column: 1; grid-row: 1; width: 18px; height: 18px; }
  .storebtn__text {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: max-content;
    flex: none;
    text-align: center;
  }
  .storebtn__name { font-size: 12.5px; white-space: nowrap; }
  .hero__mobile-details .storebtn__meta { display: none; }
  .storebtn:nth-of-type(1) { order: 2; }
  .storebtn:nth-of-type(2) { order: 1; }
  .storebtn:nth-of-type(3) { order: 3; }
  .hero__ghost { order: 4; }
  .hero__ghost { grid-column: 1 / -1; width: fit-content; padding: 10px 12px; }
  .hero__scroll {
    position: absolute;
    right: var(--gutter);
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(251, 241, 226, 0.34);
    border-radius: 50%;
    color: var(--cream);
    background: rgba(24, 7, 48, 0.42);
    z-index: 3;
    animation: scrollCue 2.2s var(--ease) infinite;
  }
  .hero__scroll svg { width: 17px; height: 17px; }
  @keyframes scrollCue {
    0%, 100% { transform: translateY(0); opacity: 0.72; }
    50% { transform: translateY(4px); opacity: 1; }
  }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { grid-template-columns: 1fr; gap: 8px; }
  .press-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature, .feature--c7, .feature--c8 { grid-column: 1 / -1; }
}

@media (max-width: 340px) {
  .storebtn {
    grid-template-columns: 14px max-content;
    column-gap: 4px;
    padding-inline: 4px;
  }
  .storebtn svg { width: 14px; height: 14px; }
  .storebtn__name { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
