/* ==========================================================================
   MidShift Games — cinematic dark design system
   Home page first; the game pages and Privacy move over in the next pass.
   Palette: the brand plum/coral/amber/teal, set on a plum-black night.
   ========================================================================== */

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

:root {
  --night:   #0F0A11;
  --night-2: #150E18;
  --plum:    #241B28;
  --plum-2:  #3A2D40;
  --coral:   #F98A6B;
  --amber:   #F5A623;
  --pink:    #E8577C;
  --teal:    #4BB3A8;
  --cream:   #F5EBD9;

  --ink:      var(--cream);
  --ink-soft: rgba(245,235,217,.68);
  --ink-dim:  rgba(245,235,217,.44);
  --line:     rgba(245,235,217,.11);
  --line-2:   rgba(245,235,217,.22);

  --warm: linear-gradient(100deg, var(--pink) 0%, var(--coral) 45%, var(--amber) 100%);

  --brand:   'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --display: var(--brand);
  --body:    'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'Martian Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --nav-h: 76px;
  --r-lg: 28px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

/* Arabic: Cairo in every role; joined script, so no tracking or uppercase. */
:root[dir="rtl"] {
  --display: 'Cairo', 'Segoe UI', sans-serif;
  --body:    'Cairo', 'Segoe UI', sans-serif;
  --mono:    'Cairo', 'Segoe UI', sans-serif;
}

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--plum-2) var(--night);
}
html:not(.lenis) { scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Film grain — one static noise tile, no blend mode, so it costs nothing */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 6px; }
::selection { background: var(--coral); color: var(--night); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ==========================================================================
   Type
   ========================================================================== */
.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.038em;
}
[dir="rtl"] .display { letter-spacing: 0; line-height: 1.28; }

.latin { font-family: var(--brand); }

/* Mono label with a small shifted tile — the logo's move, in miniature */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label::before {
  content: '';
  width: 10px; height: 10px; flex-shrink: 0;
  border-radius: 2px;
  background: var(--coral);
  transform: rotate(-14deg);
  box-shadow: 0 0 14px rgba(249,138,107,.7);
}
[dir="rtl"] .label { font-size: .95rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
[dir="rtl"] .label::before { transform: rotate(14deg); }

/* Moving warm sweep across gradient text */
.glow {
  background-image: linear-gradient(100deg, var(--pink) 0%, var(--coral) 28%, var(--amber) 46%, #FFE1B4 50%, var(--amber) 54%, var(--coral) 72%, var(--pink) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--coral);
  animation: sweep 7s ease-in-out infinite alternate;
}
@keyframes sweep { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.sec-title { font-size: clamp(2.6rem, 6.4vw, 6.2rem); margin: 22px 0 24px; }
.sec-sub { font-size: clamp(1rem, 1.25vw, 1.16rem); color: var(--ink-soft); max-width: 50ch; }

/* ---- Line masks: each heading part rises out of its own clipped line ---- */
.line {
  display: block;
  overflow: hidden;
  padding-block: .06em .1em;
  margin-block: -.06em -.1em;
}
[dir="rtl"] .line { padding-block: .16em; margin-block: -.16em; }
.line__in { display: inline-block; }

.motion .line__in {
  transform: translateY(115%);
  transition: transform 1.25s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion .line + .line .line__in { transition-delay: calc(var(--d, 0s) + .12s); }
.motion .is-in .line__in { transform: none; }

/* ---- Generic fade-up reveal ---- */
.motion .rv {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion .rv.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  height: 58px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease;
}
[dir="rtl"] .btn { letter-spacing: 0; }
.btn--warm {
  background: var(--warm);
  color: #1B0F14;
  box-shadow: 0 14px 44px -14px rgba(249,138,107,.75);
}
/* light sweep on hover */
.btn--warm::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}
.btn--warm:hover { box-shadow: 0 18px 54px -12px rgba(249,138,107,.9); }
.btn--warm:hover::before { transform: translateX(120%); }
.btn--line { border: 1px solid var(--line-2); color: var(--ink); background: rgba(15,10,17,.35); backdrop-filter: blur(6px); }
.btn--line:hover { border-color: var(--coral); background: rgba(249,138,107,.1); }

.arrow { flex-shrink: 0; transition: transform .5s var(--ease-out); }
a:hover > .arrow { transform: translateX(4px); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
[dir="rtl"] a:hover > .arrow { transform: scaleX(-1) translateX(4px); }
.arrow--down, [dir="rtl"] .arrow--down { transform: none; }
a:hover > .arrow--down, [dir="rtl"] a:hover > .arrow--down { transform: translateY(3px); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease-out), background-color .4s ease, border-color .4s ease, opacity .8s ease;
}
.nav.is-solid {
  background: rgba(15,10,17,.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.motion:not(.is-loaded) .nav { opacity: 0; }

.nav__inner {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--brand);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.015em;
  position: relative; z-index: 2;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; transition: transform .7s var(--ease-out); }
.brand:hover img { transform: rotate(-14deg) scale(1.05); }
.brand__name span { color: var(--ink-dim); font-weight: 500; }

.nav__links { display: flex; gap: 36px; }
.nav__links a {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: .96rem;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .3s ease;
}
.nav__links a::after {
  content: '';
  position: absolute; inset-inline: 0; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
[dir="rtl"] .nav__links a::after { transform-origin: left; }
[dir="rtl"] .nav__links a:hover::after { transform-origin: right; }

.nav__tools { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.lang {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: 'Cairo', var(--body);
  font-weight: 700;
  font-size: .86rem;
  transition: border-color .3s ease, background-color .3s ease;
}
.lang:hover { border-color: var(--coral); background: rgba(249,138,107,.1); }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); }
.burger span {
  display: block; width: 18px; height: 2px; margin: 4px auto;
  border-radius: 2px; background: var(--ink);
  transition: transform .45s var(--ease-out);
}
.nav.is-open .burger span:first-child { transform: translateY(3px) rotate(45deg); }
.nav.is-open .burger span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--nav-h) + 40px) 130px;
  overflow: hidden;
}
.hero__tiles {
  position: absolute; inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  display: block;
  transform-origin: 50% 30%;
}
.hero__shade {
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,10,17,.86) 0%, rgba(15,10,17,.52) 42%, rgba(15,10,17,0) 72%),
    linear-gradient(0deg, var(--night) 0%, rgba(15,10,17,0) 26%),
    linear-gradient(180deg, rgba(15,10,17,.55) 0%, rgba(15,10,17,0) 18%);
}
[dir="rtl"] .hero__shade {
  background:
    linear-gradient(270deg, rgba(15,10,17,.86) 0%, rgba(15,10,17,.52) 42%, rgba(15,10,17,0) 72%),
    linear-gradient(0deg, var(--night) 0%, rgba(15,10,17,0) 26%),
    linear-gradient(180deg, rgba(15,10,17,.55) 0%, rgba(15,10,17,0) 18%);
}
/* No WebGL: a still version of the glow */
.hero.no-webgl {
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(249,138,107,.22), transparent 60%),
    radial-gradient(40% 50% at 90% 80%, rgba(245,166,35,.14), transparent 70%),
    var(--night);
}

.hero__title {
  font-size: clamp(2.8rem, 7.3vw, 7.9rem);
  margin: 26px 0 30px;
  --d: .2s;
}
[dir="rtl"] .hero__title { font-size: clamp(2.5rem, 6.2vw, 6.4rem); }
.hero__lede {
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero__foot {
  position: absolute; bottom: 30px; inset-inline: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.live {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(15,10,17,.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: .9rem;
  color: var(--ink-soft);
  transition: border-color .3s ease;
}
[dir="rtl"] .live { padding: 10px 14px 10px 18px; }
.live:hover { border-color: var(--teal); }
.live b { font-family: var(--brand); font-weight: 700; color: var(--ink); }
.live__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(75,179,168,.6);
  animation: ping 2.2s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(75,179,168,.65); }
  70%  { box-shadow: 0 0 0 10px rgba(75,179,168,0); }
  100% { box-shadow: 0 0 0 0 rgba(75,179,168,0); }
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
[dir="rtl"] .scroll-cue { font-size: .9rem; letter-spacing: 0; }
.scroll-cue i {
  position: relative;
  width: 1px; height: 46px;
  background: var(--line-2);
  overflow: hidden;
}
.scroll-cue i::after {
  content: '';
  position: absolute; left: 0; top: 0;
  width: 1px; height: 45%;
  background: var(--coral);
  animation: drip 2.2s var(--ease-out) infinite;
}
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(230%); } }

/* Page intro (any .intro block) — plays once fonts are in; --d staggers it */
.motion .intro .fade {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.motion .intro.is-in .fade { opacity: 1; transform: none; }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  direction: ltr;
  overflow: hidden;
  padding-block: clamp(22px, 3vw, 38px);
  border-block: 1px solid var(--line);
  background: var(--night-2);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  display: flex; align-items: center; flex-shrink: 0;
  gap: clamp(26px, 3.4vw, 52px);
  padding-inline-end: clamp(26px, 3.4vw, 52px);
}
.mq {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 4.9rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  white-space: nowrap;
  unicode-bidi: isolate;
}
[dir="rtl"] .mq { letter-spacing: 0; }
.mq.latin { font-family: var(--brand); letter-spacing: -.035em; }
.mq--out { color: transparent; -webkit-text-stroke: 1.4px rgba(245,235,217,.5); }
.mq-tile {
  flex-shrink: 0;
  width: clamp(16px, 2vw, 30px); height: clamp(16px, 2vw, 30px);
  border-radius: 22%;
  background: var(--coral);
  transform: rotate(-14deg);
  box-shadow: 0 0 22px rgba(249,138,107,.55);
}
.mq-tile:nth-of-type(3n+2) { background: var(--amber); box-shadow: 0 0 22px rgba(245,166,35,.5); }
.mq-tile:nth-of-type(3n)   { background: var(--teal);  box-shadow: 0 0 22px rgba(75,179,168,.5); }

/* ==========================================================================
   Games — stacked by default; pinned + sideways when .hscroll is on
   ========================================================================== */
.games { position: relative; }

.games__track {
  display: flex; flex-direction: column;
  gap: 28px;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  padding-block: clamp(100px, 14vh, 170px);
}
.panel--intro { padding-bottom: 28px; }

.panel--game {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
  min-height: 580px;
  padding: clamp(26px, 4vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background-color: var(--plum);
}
/* pointer spotlight */
.panel--game::before {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(245,235,217,.07), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
}
.panel--game:hover::before { opacity: 1; }

.panel--pb {
  background-image:
    radial-gradient(90% 80% at 82% 50%, rgba(249,138,107,.30), transparent 62%),
    radial-gradient(60% 60% at 100% 100%, rgba(245,166,35,.20), transparent 70%),
    radial-gradient(50% 60% at 0% 0%, rgba(232,87,124,.10), transparent 70%);
}
[dir="rtl"] .panel--pb {
  background-image:
    radial-gradient(90% 80% at 18% 50%, rgba(249,138,107,.30), transparent 62%),
    radial-gradient(60% 60% at 0% 100%, rgba(245,166,35,.20), transparent 70%),
    radial-gradient(50% 60% at 100% 0%, rgba(232,87,124,.10), transparent 70%);
}

.panel__text { max-width: 540px; }
.panel__head { display: flex; align-items: center; gap: 14px; }
.panel__icon {
  width: 60px; height: 60px;
  border-radius: 15px;
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 26px -8px rgba(0,0,0,.6);
}
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid;
}
[dir="rtl"] .status { font-size: .86rem; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 4px 13px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--live { color: #7FD8CD; border-color: rgba(75,179,168,.45); background: rgba(75,179,168,.12); }
.status--live::before { animation: ping 2.2s ease-out infinite; }
.status--soon { color: var(--amber); border-color: rgba(245,166,35,.45); background: rgba(245,166,35,.12); }

.panel__title {
  font-family: var(--brand);
  font-weight: 800;
  font-size: clamp(2.5rem, 4.8vw, 4.9rem);
  line-height: .95;
  letter-spacing: -.04em;
  margin: 24px 0 12px;
}
.panel__title .glow { display: block; font-size: .5em; letter-spacing: -.02em; margin-top: .22em; }
.panel__title--logo img { width: clamp(230px, 26vw, 400px); height: auto; filter: drop-shadow(0 12px 30px rgba(0,0,0,.45)); }
.panel__meta { color: var(--ink-dim); font-size: .95rem; }
.panel__blurb { color: var(--ink-soft); max-width: 44ch; margin: 18px 0 30px; font-size: 1.04rem; }
.panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

/* Primary link is stretched over the whole panel; store links sit above it */
.more {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
}
.more::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.more span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease-out); padding-bottom: 2px; }
.panel--game:hover .more span { background-size: 100% 2px; }
[dir="rtl"] .more span { background-position: 100% 100%; }
.panel--game:hover .more .arrow { transform: translateX(5px); }
[dir="rtl"] .panel--game:hover .more .arrow { transform: scaleX(-1) translateX(5px); }

.store {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(15,10,17,.4);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color .3s ease, color .3s ease, background-color .3s ease;
}
.store:hover { border-color: var(--coral); color: var(--ink); background: rgba(249,138,107,.1); }

.panel__visual { display: grid; place-items: center; perspective: 1100px; }

/* Phone that holds the PictureBound tile mosaic */
.phone {
  position: relative;
  width: clamp(200px, 19vw, 276px);
  padding: 11px;
  border-radius: 38px;
  background: linear-gradient(160deg, #3F3145, #19121C);
  box-shadow:
    inset 0 0 0 1px rgba(245,235,217,.10),
    0 50px 90px -34px rgba(0,0,0,.85),
    0 0 130px -30px rgba(249,138,107,.55);
  transform-style: preserve-3d;
  will-change: transform;
}
.phone::before {
  content: '';
  position: absolute; top: 21px; left: 50%;
  width: 54px; height: 5px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: rgba(255,255,255,.18);
  z-index: 3;
}
.phone__screen {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 776 / 1092;
  background: #0B080D;
}
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 100%; height: 100%;
}
.mosaic i {
  display: block;
  background: url('../images/puzzle-traveller/paris-board.webp') no-repeat;
  background-size: 400% 200%;
}
.mosaic i:nth-child(1) { background-position: 0 0; }
.mosaic i:nth-child(2) { background-position: 33.333% 0; }
.mosaic i:nth-child(3) { background-position: 66.667% 0; }
.mosaic i:nth-child(4) { background-position: 100% 0; }
.mosaic i:nth-child(5) { background-position: 0 100%; }
.mosaic i:nth-child(6) { background-position: 33.333% 100%; }
.mosaic i:nth-child(7) { background-position: 66.667% 100%; }
.mosaic i:nth-child(8) { background-position: 100% 100%; }

/* JarSort: the key art is the panel's backdrop */
.panel--js { background-image: radial-gradient(70% 90% at 0% 100%, rgba(232,87,124,.14), transparent 70%); }
.panel__art {
  position: absolute;
  inset: 0 0 0 36%;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 44%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 44%);
}
[dir="rtl"] .panel__art {
  inset: 0 36% 0 0;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 44%);
  mask-image: linear-gradient(270deg, transparent 0%, #000 44%);
}
.panel__art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  filter: brightness(.9) saturate(1.05);
  transform: scale(1.14);
  will-change: transform;
}
.panel--js .panel__text { position: static; }

/* Pinned sideways layout */
.hscroll .games__pin {
  position: relative;
  height: 100vh;
  display: flex; align-items: center;
  overflow: clip;
}
.hscroll .games__track {
  flex-direction: row; align-items: center;
  width: max-content;
  margin: 0;
  gap: 4vw;
  padding-block: 0;
  padding-inline: var(--gutter);
  will-change: transform;
}
.hscroll .panel--intro { width: 34vw; min-width: 380px; flex-shrink: 0; padding-bottom: 0; }
.hscroll .panel--game {
  width: min(76vw, 1200px);
  height: min(76vh, 740px);
  min-height: 0;
  flex-shrink: 0;
}
.games__progress {
  display: none;
  position: absolute; bottom: 6vh; inset-inline: var(--gutter);
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.hscroll .games__progress { display: block; }
.games__bar {
  display: block;
  height: 100%;
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: left center;
}
[dir="rtl"] .games__bar { transform-origin: right center; }

/* ==========================================================================
   Studio — commitments stack as you scroll
   ========================================================================== */
.studio { padding-block: clamp(100px, 14vh, 170px) clamp(60px, 10vh, 120px); }
.sec-head { max-width: 980px; margin-bottom: clamp(48px, 8vh, 96px); }

.pillars { display: grid; gap: clamp(22px, 4vh, 40px); padding-bottom: 8vh; }
.pillar {
  --accent: var(--coral);
  position: sticky;
  top: calc(var(--nav-h) + 30px + var(--i, 0) * 26px);
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: min(64vh, 580px);
  padding: clamp(28px, 5vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #2A2030 0%, #1A131D 100%);
  box-shadow: 0 -24px 60px -24px rgba(0,0,0,.7);
  transform-origin: 50% 0;
}
.pillar::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 70% at 85% 50%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
}
[dir="rtl"] .pillar::before { background: radial-gradient(50% 70% at 15% 50%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); }
/* dimmer, driven by scroll as the next card slides over */
.pillar::after {
  content: '';
  position: absolute; inset: 0;
  background: #07040A;
  opacity: var(--dim, 0);
  pointer-events: none;
}
.pillar h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.035em;
}
[dir="rtl"] .pillar h3 { letter-spacing: 0; line-height: 1.3; }
.pillar p { margin-top: 22px; max-width: 42ch; font-size: clamp(1rem, 1.3vw, 1.18rem); color: var(--ink-soft); }
.pillar--amber { --accent: var(--amber); }
.pillar--teal  { --accent: var(--teal); }

.motif { display: grid; place-items: center; min-height: 220px; }

/* Motif 1: a 3x3 board snaps together, then a check says "done" */
.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: clamp(170px, 17vw, 230px);
  aspect-ratio: 1;
}
.board i {
  border-radius: 12px;
  background: var(--plum-2);
  animation: snap 6.4s var(--ease-out) infinite;
  animation-delay: calc(var(--n) * .26s);
}
.board i:nth-child(1) { --n: 0; --dx: -18px; --dy: -22px; --r: -16deg; }
.board i:nth-child(2) { --n: 1; --dx:  10px; --dy: -26px; --r:  12deg; }
.board i:nth-child(3) { --n: 2; --dx:  24px; --dy: -12px; --r: -10deg; }
.board i:nth-child(4) { --n: 5; --dx: -26px; --dy:   8px; --r:  14deg; }
.board i:nth-child(5) { --n: 4; --dx:   6px; --dy:  14px; --r:  -8deg; }
.board i:nth-child(6) { --n: 3; --dx:  26px; --dy:  10px; --r:  16deg; }
.board i:nth-child(7) { --n: 6; --dx: -20px; --dy:  24px; --r: -12deg; }
.board i:nth-child(8) { --n: 7; --dx:   8px; --dy:  28px; --r:  10deg; }
.board i:nth-child(9) { --n: 8; --dx:  22px; --dy:  22px; --r: -14deg; }
@keyframes snap {
  0%   { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); background: var(--plum-2); opacity: .45; }
  9%   { transform: none; background: var(--accent); opacity: 1; box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent); }
  76%  { transform: none; background: var(--accent); opacity: 1; box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent); }
  92%, 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); background: var(--plum-2); opacity: .45; box-shadow: none; }
}
.board b {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  animation: done 6.4s ease infinite;
}
.board b svg { width: 42%; height: 42%; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
@keyframes done {
  0%, 44%   { opacity: 0; transform: scale(.6); }
  50%, 72%  { opacity: 1; transform: scale(1); }
  78%, 100% { opacity: 0; transform: scale(.9); }
}

/* Motif 2: a five-second ring */
.ring { position: relative; width: clamp(170px, 16vw, 220px); aspect-ratio: 1; }
.ring::before {
  content: '';
  position: absolute; inset: 6%;
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(245,166,35,.28), inset 0 0 24px rgba(245,166,35,.12);
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .ring__bg { stroke: var(--plum-2); }
.ring .ring__fg {
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  animation: ring 6s linear infinite;
}
@keyframes ring { 0% { stroke-dashoffset: 327; } 83%, 100% { stroke-dashoffset: 0; } }
@property --sec { syntax: '<integer>'; inherits: false; initial-value: 0; }
.ring__num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--brand);
  font-weight: 800;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  letter-spacing: -.04em;
  counter-reset: sec var(--sec);
  animation: count 6s linear infinite;
}
.ring__num::before { content: counter(sec) 's'; }
@keyframes count { 0% { --sec: 0; } 83%, 100% { --sec: 5; } }

/* Motif 3: a phone with the one-thumb reach zone */
.mphone {
  position: relative;
  width: clamp(120px, 11vw, 150px);
  aspect-ratio: 9 / 19;
  border: 2px solid rgba(245,235,217,.32);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15,10,17,.45);
}
.mphone::before {
  content: '';
  position: absolute; top: 10px; left: 50%;
  width: 34%; height: 5px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: rgba(245,235,217,.2);
}
.mphone__zone {
  position: absolute;
  right: -62%; bottom: -30%;
  width: 150%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75,179,168,.5) 0%, rgba(75,179,168,.16) 52%, transparent 70%);
}
.mphone__tap {
  position: absolute;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(75,179,168,.6), 0 0 18px rgba(75,179,168,.8);
  animation: tap 4.8s var(--ease-out) infinite;
}
@keyframes tap {
  0%, 100% { left: 70%; top: 78%; transform: scale(1); }
  12%      { transform: scale(.7); }
  24%      { left: 50%; top: 64%; transform: scale(1); }
  36%      { transform: scale(.7); }
  50%      { left: 76%; top: 56%; transform: scale(1); }
  62%      { transform: scale(.7); }
  75%      { left: 58%; top: 84%; transform: scale(1); }
  87%      { transform: scale(.7); }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(120px, 20vh, 220px);
  text-align: center;
}
.contact__glow {
  position: absolute; left: 50%; top: 50%;
  z-index: -1;
  width: 80vmax; height: 80vmax;
  margin: -40vmax 0 0 -40vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,138,107,.22) 0%, rgba(232,87,124,.08) 38%, transparent 64%);
  pointer-events: none;
}
.contact .sec-head { margin-inline: auto; margin-bottom: 0; }
.contact .label { justify-content: center; }
.contact .sec-sub { margin-inline: auto; }
.mail {
  display: inline-block;
  position: relative;
  margin-top: clamp(34px, 6vh, 60px);
  font-family: var(--brand);
  font-weight: 800;
  font-size: clamp(1.45rem, 5.6vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
  padding-bottom: .14em;
}
.mail::before, .mail::after {
  content: '';
  position: absolute; inset-inline: 0; bottom: 0;
  height: 3px; border-radius: 3px;
}
.mail::before { background: var(--line-2); }
.mail::after {
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .7s var(--ease-out);
}
.mail:hover::after { transform: scaleX(1); transform-origin: left; }
.copy { display: flex; width: max-content; margin: 26px auto 0; height: 46px; padding: 0 22px; font-size: .92rem; }
.copy__b { display: none; }
.copy.is-copied { border-color: var(--teal); color: #7FD8CD; }
.copy.is-copied .copy__a { display: none; }
.copy.is-copied .copy__b { display: inline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding-top: 54px; overflow: hidden; }
.footer__row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 22px 32px;
  font-size: .92rem;
  color: var(--ink-dim);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.footer__links a { color: var(--ink-soft); transition: color .3s ease; }
.footer__links a:hover { color: var(--coral); }
.footer .brand { color: var(--ink); }

.footer__mark {
  direction: ltr;
  display: flex; justify-content: center;
  margin-top: clamp(36px, 6vw, 70px);
  font-family: var(--brand);
  font-weight: 800;
  font-size: 21.5vw;
  line-height: .8;
  letter-spacing: -.04em;
  user-select: none;
  padding-bottom: 1.6vw;
}
.footer__mark span {
  display: inline-block;
  /* pad the box so glyph ink that spills past the advance width still gets the clipped fill */
  padding: .12em .12em 0;
  margin: -.12em -.12em 0;
  /* opaque stops, so letters that overlap never show a double layer */
  background: linear-gradient(180deg, #E8DECE 0%, #6E6468 45%, var(--night) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform .7s var(--ease-out);
}
.footer__mark span:hover {
  background-image: linear-gradient(180deg, var(--amber) 0%, var(--coral) 40%, #5A2233 72%, var(--night) 92%);
  transform: translateY(-5%) rotate(-3deg);
}
.motion .footer__mark span {
  opacity: 0;
  transform: translateY(55%);
  transition: transform 1.3s var(--ease-out), opacity 1s ease;
  transition-delay: calc(var(--i) * .055s);
}
.motion .footer__mark.is-in span { opacity: 1; transform: none; }
.motion .footer__mark.is-in span:hover { transform: translateY(-5%) rotate(-3deg); transition-delay: 0s; }

/* ==========================================================================
   Cursor aura (fine pointers only; the real cursor stays visible)
   ========================================================================== */
.cursor {
  position: fixed; left: 0; top: 0;
  z-index: 250;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  display: none; place-items: center;
  border: 1px solid rgba(245,235,217,.38);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out),
              background-color .3s ease, border-color .3s ease, opacity .3s ease;
}
.has-cursor .cursor { display: grid; }
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 62px; height: 62px; margin: -31px 0 0 -31px; border-color: var(--coral); background: rgba(249,138,107,.08); }
.cursor.is-view { width: 104px; height: 104px; margin: -52px 0 0 -52px; border-color: var(--coral); background: var(--coral); }
.cursor__label {
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--night);
  opacity: 0;
  transition: opacity .2s ease;
}
[dir="rtl"] .cursor__label { font-size: .95rem; font-weight: 700; letter-spacing: 0; }
.cursor.is-view .cursor__label { opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .pillar { grid-template-columns: 1fr .7fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 66px; }
  .burger { display: block; }
  .brand { font-size: 1rem; }
  .nav.is-open { transform: none; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__links {
    position: fixed; inset: 0;
    z-index: 1;
    flex-direction: column; justify-content: center; gap: 8px;
    padding: 0 var(--gutter);
    background: var(--night);
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility 0s linear .45s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity .45s ease; }
  .nav__links a {
    display: inline-block;
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.03em;
    transform: translateY(30px);
    opacity: 0;
    transition: transform .8s var(--ease-out), opacity .6s ease, color .3s ease;
  }
  .nav.is-open .nav__links li:nth-child(1) a { transition-delay: .08s; }
  .nav.is-open .nav__links li:nth-child(2) a { transition-delay: .14s; }
  .nav.is-open .nav__links li:nth-child(3) a { transition-delay: .2s; }
  .nav.is-open .nav__links a { transform: none; opacity: 1; }
  .nav__links a::after { display: none; }

  /* phones: text spans the full width, so darken the whole field behind it */
  .hero__shade, [dir="rtl"] .hero__shade {
    background: linear-gradient(180deg, rgba(15,10,17,.3) 0%, rgba(15,10,17,.8) 34%, rgba(15,10,17,.84) 74%, var(--night) 100%);
  }

  .panel--game { grid-template-columns: 1fr; min-height: 0; }
  .panel__visual { order: -1; padding-top: 8px; }
  .phone { width: min(236px, 62vw); }

  .panel__art {
    position: relative; inset: auto;
    order: -1;
    height: clamp(190px, 46vw, 300px);
    margin: calc(-1 * clamp(26px, 4vw, 64px)) calc(-1 * clamp(26px, 4vw, 64px)) 0;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }
  [dir="rtl"] .panel__art {
    inset: auto;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }
  .panel__art img { transform: none; }

  .pillar {
    grid-template-columns: 1fr;
    top: calc(var(--nav-h) + 16px + var(--i, 0) * 14px);
    min-height: 0;
    gap: 18px;
  }
  .pillar .motif { order: -1; min-height: 0; justify-content: start; }
  .pillar .board, .pillar .ring { width: 124px; }
  .pillar .mphone { width: 84px; border-radius: 18px; }
  .ring__num { font-size: 2rem; }
  .pillar::before { background: radial-gradient(80% 50% at 20% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); }
  [dir="rtl"] .pillar::before { background: radial-gradient(80% 50% at 80% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%); }
  [dir="rtl"] .pillar .motif { justify-content: end; }
}

@media (max-width: 560px) {
  .brand__name span { display: none; }
  .hero { padding-bottom: 116px; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .scroll-cue { display: none; }
  .panel__head { flex-wrap: wrap; }
  .store { flex: 1 1 100%; justify-content: center; }
  .more { flex: 1 1 100%; }
}

/* ==========================================================================
   Sub-pages — game pages and Privacy
   ========================================================================== */
.section { position: relative; padding-block: clamp(90px, 13vh, 160px); }
.section--flush { padding-top: 0; }
.section--tint { background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%); border-top: 1px solid var(--line); }
.section .sec-head { margin-bottom: clamp(40px, 7vh, 80px); }
.section .sec-title { font-size: clamp(2.4rem, 5.4vw, 5.2rem); }

.backlink {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(15,10,17,.4);
  transition: color .3s ease, border-color .3s ease;
}
[dir="rtl"] .backlink { padding: 6px 12px 6px 16px; font-size: .9rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.backlink:hover { color: var(--ink); border-color: var(--coral); }
a:hover > .arrow--back { transform: translateX(-4px); }
[dir="rtl"] a:hover > .arrow--back { transform: scaleX(-1) translateX(-4px); }

/* ---- Game hero: the game's own art, blurred into a backdrop ---- */
.ghero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: min(100svh, 1000px);
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 40px) 90px;
}
.ghero__bg { position: absolute; inset: -8%; z-index: -2; }
.ghero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(34px) brightness(.4) saturate(1.3);
  will-change: transform;
}
.ghero::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,10,17,.9) 0%, rgba(15,10,17,.55) 50%, rgba(15,10,17,.25) 100%),
    linear-gradient(0deg, var(--night) 0%, rgba(15,10,17,0) 32%),
    linear-gradient(180deg, rgba(15,10,17,.6) 0%, rgba(15,10,17,0) 22%);
}
[dir="rtl"] .ghero::after {
  background:
    linear-gradient(270deg, rgba(15,10,17,.9) 0%, rgba(15,10,17,.55) 50%, rgba(15,10,17,.25) 100%),
    linear-gradient(0deg, var(--night) 0%, rgba(15,10,17,0) 32%),
    linear-gradient(180deg, rgba(15,10,17,.6) 0%, rgba(15,10,17,0) 22%);
}
.ghero__grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(36px, 5vw, 90px);
  align-items: center;
}
.ghero__head { display: flex; align-items: center; gap: 16px; margin: 30px 0 24px; }
.ghero__icon {
  width: 76px; height: 76px;
  border-radius: 19px;
  border: 1px solid var(--line-2);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.7);
}
.ghero__title { font-size: clamp(2.6rem, 5.6vw, 5.6rem); margin-bottom: 18px; --d: .15s; }
.ghero__title .line__in { font-family: var(--brand); }
/* the title is the Latin product name: keep it left-to-right inside Arabic pages */
.ghero__title .line__in { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ghero__title { line-height: .98; letter-spacing: -.038em; }
.ghero__logo { margin-bottom: 14px; }
.ghero__logo img { width: clamp(250px, 32vw, 470px); height: auto; filter: drop-shadow(0 14px 34px rgba(0,0,0,.5)); }
.ghero__meta { color: var(--ink-dim); font-size: 1rem; }
.ghero .hero__lede { margin-top: 22px; }
.ghero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.ghero__actions .btn { height: 54px; padding: 0 24px; font-size: .96rem; }
.btn--static { cursor: default; }
.ghero__note { margin-top: 18px; font-size: .92rem; color: var(--ink-dim); }

.ghero__stage { position: relative; display: grid; place-items: center; perspective: 1100px; }
.phone--lg { width: clamp(230px, 22vw, 312px); }
.phone__screen--tall { aspect-ratio: 720 / 1274; }
.phone__screen--tall img { width: 100%; height: 100%; object-fit: cover; }
.flag {
  position: absolute;
  inset-inline-end: 2%; bottom: 16%;
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 18px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(15,10,17,.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.8);
  rotate: 3deg;
  animation: bob 6s ease-in-out infinite;
}
[dir="rtl"] .flag { rotate: -3deg; }
.flag span { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: #7FD8CD; }
[dir="rtl"] .flag span { font-size: .85rem; letter-spacing: 0; text-transform: none; }
.flag b { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.stat {
  padding: clamp(30px, 4.5vw, 56px) 16px;
  text-align: center;
  border-inline-start: 1px solid var(--line);
}
.stat:first-child { border-inline-start: 0; }
.stat-num {
  font-family: var(--brand);
  font-weight: 800;
  font-size: clamp(2.8rem, 6.2vw, 5.6rem);
  line-height: 1;
  letter-spacing: -.045em;
  background: var(--warm);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
[dir="rtl"] .stat-label { font-size: .92rem; font-weight: 600; letter-spacing: 0; text-transform: none; }

/* ---- Wide key art ---- */
.keyart {
  position: relative;
  margin-top: clamp(48px, 8vh, 96px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.9);
}
.keyart img { width: 100%; height: auto; transform-origin: 50% 50%; will-change: transform; }

/* ---- Feature list ---- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(28px, 4vw, 72px);
}
.features li {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  font-size: 1.04rem;
  color: var(--ink-soft);
}
.features b { font-family: var(--display); font-weight: 700; color: var(--ink); }
.check {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 28px; height: 28px;
  margin-top: 1px;
  border-radius: 8px;
  border: 1px solid rgba(249,138,107,.4);
  background: rgba(249,138,107,.14);
  rotate: -9deg;
}
[dir="rtl"] .check { rotate: 9deg; }
.check svg { stroke: var(--coral); }

/* ---- Screenshots, framed as phones ---- */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3.4vw, 52px);
  align-items: start;
  max-width: 1080px;
  margin-inline: auto;
}
.shot { margin: 0; will-change: transform; }
.shot:nth-child(2) { margin-top: 80px; }
.shot__frame {
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(160deg, #3F3145, #19121C);
  box-shadow: inset 0 0 0 1px rgba(245,235,217,.08), 0 40px 80px -34px rgba(0,0,0,.9);
  transition: translate .7s var(--ease-out), box-shadow .7s var(--ease-out);
}
.shot:hover .shot__frame { translate: 0 -8px; box-shadow: inset 0 0 0 1px rgba(249,138,107,.3), 0 50px 90px -30px rgba(0,0,0,.9), 0 0 80px -30px rgba(249,138,107,.5); }
.shot img { width: 100%; height: auto; border-radius: 25px; }
.shot figcaption {
  margin-top: 20px;
  text-align: center;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
[dir="rtl"] .shot figcaption { font-family: var(--body); font-size: .95rem; font-weight: 600; letter-spacing: 0; text-transform: none; }

/* ---- Steps: a real sequence, so the numbers stay and a bar fills in order ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative;
  overflow: hidden;
  padding: 32px 30px 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, #221A26 0%, #17111A 100%);
}
.step::before {
  content: '';
  position: absolute; top: 0; inset-inline: 0;
  height: 3px;
  background: var(--warm);
  transform-origin: left center;
}
[dir="rtl"] .step::before { transform-origin: right center; }
.motion .step::before { transform: scaleX(0); transition: transform 1.2s var(--ease-out) calc(var(--d, 0s) + .25s); }
.motion .step.is-in::before { transform: none; }
.step-n {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--coral);
}
[dir="rtl"] .step-n { font-size: .92rem; font-weight: 700; letter-spacing: 0; }
.step h3 { margin: 16px 0 10px; font-family: var(--display); font-weight: 800; font-size: 1.36rem; line-height: 1.2; letter-spacing: -.02em; }
[dir="rtl"] .step h3 { letter-spacing: 0; line-height: 1.4; }
.step p { color: var(--ink-soft); font-size: .99rem; }

/* ---- Posters: chapters and play modes ---- */
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.poster {
  --pa: #3A2D40; --pb: #241B28; --pc: #120C14;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(300px, 30vw, 400px);
  padding: 30px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, var(--pa) 0%, var(--pb) 48%, var(--pc) 100%);
  color: #fff;
  transition: translate .7s var(--ease-out), box-shadow .7s var(--ease-out);
}
.poster::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(400px circle at var(--mx, 70%) var(--my, 10%), rgba(255,255,255,.18), transparent 60%);
}
.poster::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(10,6,12,.55) 0%, rgba(10,6,12,0) 60%);
}
.poster:hover { translate: 0 -8px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.9); }
.poster__tag {
  position: absolute; top: 24px; inset-inline-start: 24px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}
[dir="rtl"] .poster__tag { font-size: .88rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.poster__name { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 3.3rem); line-height: 1; letter-spacing: -.035em; }
[dir="rtl"] .poster__name { letter-spacing: 0; line-height: 1.3; }
.poster__meta { margin-top: 12px; font-size: .98rem; opacity: .88; max-width: 34ch; }
.poster--paris  { --pa: #5B8CC4; --pb: #2E5B8C; --pc: #14243B; }
.poster--riyadh { --pa: #FFB38A; --pb: #D8694A; --pc: #5A2218; }
.poster--tokyo  { --pa: #F07AA4; --pb: #BE3C68; --pc: #461730; }
.poster--berry  { --pa: #F0676B; --pb: #B52D3C; --pc: #43101A; }
.poster--lime   { --pa: #6CC46F; --pb: #2E8A44; --pc: #10331B; }
.poster--blue   { --pa: #6A9BEE; --pb: #2F63C8; --pc: #132657; }

/* ---- Twist chips, each with its own jam colour ---- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  --jam: var(--coral);
  display: inline-flex; align-items: center; gap: 11px;
  padding: 13px 22px 13px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(36,27,40,.6);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.98rem, 1.3vw, 1.14rem);
  transition: translate .5s var(--ease-out), border-color .3s ease, background-color .3s ease;
}
[dir="rtl"] .chip { padding: 11px 18px 11px 22px; }
.chip::before {
  content: '';
  flex-shrink: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--jam);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 0 14px var(--jam);
}
.chip:hover { translate: 0 -4px; border-color: var(--jam); background: rgba(36,27,40,.95); }
.chip:nth-child(12n+1)  { --jam: #E0393E; }
.chip:nth-child(12n+2)  { --jam: #F5862A; }
.chip:nth-child(12n+3)  { --jam: #2F6FDE; }
.chip:nth-child(12n+4)  { --jam: #3FB34F; }
.chip:nth-child(12n+5)  { --jam: #8E4FD8; }
.chip:nth-child(12n+6)  { --jam: #F2C230; }
.chip:nth-child(12n+7)  { --jam: #22B5B0; }
.chip:nth-child(12n+8)  { --jam: #EE5E9A; }
.chip:nth-child(12n+9)  { --jam: #A8714E; }
.chip:nth-child(12n+10) { --jam: #9FD13B; }
.chip:nth-child(12n+11) { --jam: #B3325E; }
.chip:nth-child(12n+12) { --jam: #7FB8F0; }

/* ---- Privacy: reading bar, page head, contents rail, document ---- */
.readbar {
  position: fixed; top: 0; inset-inline: 0;
  z-index: 70;
  height: 3px;
  background: var(--warm);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
[dir="rtl"] .readbar { transform-origin: right center; }

.page-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: calc(var(--nav-h) + clamp(60px, 12vh, 130px)) clamp(50px, 8vh, 90px);
}
.page-head::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 90% at 85% 0%, rgba(249,138,107,.2), transparent 65%),
    radial-gradient(40% 70% at 100% 40%, rgba(245,166,35,.1), transparent 70%);
}
[dir="rtl"] .page-head::before {
  background:
    radial-gradient(50% 90% at 15% 0%, rgba(249,138,107,.2), transparent 65%),
    radial-gradient(40% 70% at 0% 40%, rgba(245,166,35,.1), transparent 70%);
}
.page-head h1 { font-size: clamp(3rem, 8.4vw, 8rem); margin: 22px 0 26px; --d: .12s; }
.page-head__date {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
[dir="rtl"] .page-head__date { font-size: .95rem; letter-spacing: 0; text-transform: none; }

.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(36px, 6vw, 110px);
  align-items: start;
  padding-top: clamp(30px, 5vh, 60px);
  padding-bottom: clamp(100px, 16vh, 180px);
  border-top: 1px solid var(--line);
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  max-height: calc(100vh - var(--nav-h) - 64px);
  overflow: auto;
  scrollbar-width: none;
}
.toc ol { list-style: none; border-inline-start: 1px solid var(--line); }
.toc a {
  display: block;
  margin-inline-start: -1px;
  padding: 7px 0;
  padding-inline-start: 18px;
  border-inline-start: 2px solid transparent;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--ink-dim);
  transition: color .3s ease, border-color .3s ease;
}
.toc a:hover { color: var(--ink-soft); }
.toc a.is-active { color: var(--ink); border-color: var(--coral); }

.doc { max-width: 74ch; }
.doc h2 {
  margin: 68px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
[dir="rtl"] .doc h2 { letter-spacing: 0; line-height: 1.45; }
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc p, .doc ul { margin-bottom: 16px; color: var(--ink-soft); font-size: 1.03rem; line-height: 1.8; }
.doc ul { list-style: none; }
.doc li { position: relative; margin-bottom: 10px; padding-inline-start: 26px; }
.doc li::before {
  content: '';
  position: absolute; top: .72em; inset-inline-start: 2px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--coral);
  rotate: -14deg;
}
.doc strong { color: var(--ink); }
.doc a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: rgba(249,138,107,.4);
  text-underline-offset: 3px;
  transition: color .3s ease, text-decoration-color .3s ease;
}
.doc a:hover { color: var(--amber); text-decoration-color: var(--amber); }

.pv-games { display: grid; gap: 16px; margin: 8px 0 26px; }
.pv-game {
  --acc: var(--coral);
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, #221A26 0%, #17111A 100%);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.pv-game::before {
  content: '';
  position: absolute; inset-block: 0; inset-inline-start: 0;
  width: 3px;
  background: var(--acc);
  box-shadow: 0 0 18px var(--acc);
}
#treadmill-tycoon { --acc: var(--teal); }
#jarsort { --acc: var(--amber); }
.pv-game h3 { margin-bottom: 16px; font-family: var(--brand); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.pv-game dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 20px; font-size: .96rem; line-height: 1.65; }
.pv-game dt { color: var(--ink); font-weight: 700; }
.pv-game dd { color: var(--ink-soft); }

/* ---- Sub-page responsive ---- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .ghero { min-height: 0; }
  .ghero__grid { grid-template-columns: 1fr; }
  .ghero__stage { order: -1; margin-bottom: 8px; }
  .phone--lg { width: min(210px, 52vw); }
  .flag { inset-inline-end: 0; bottom: 10%; padding: 10px 14px; }
  .flag b { font-size: 1rem; }
  .legal { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .ghero::after, [dir="rtl"] .ghero::after {
    background: linear-gradient(180deg, rgba(15,10,17,.45) 0%, rgba(15,10,17,.8) 45%, var(--night) 100%);
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .features { grid-template-columns: 1fr; }
  .posters { grid-template-columns: 1fr; }
  .poster { min-height: 250px; }
  /* screenshots become a swipeable row */
  .shots {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    max-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding: 6px var(--gutter) 10px;
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 68vw; max-width: 300px; scroll-snap-align: center; }
  .shot:nth-child(2) { margin-top: 0; }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .pv-game { padding: 22px 20px; }
  .pv-game dl { grid-template-columns: 1fr; gap: 2px; }
  .pv-game dd { margin-bottom: 10px; }
  .ghero__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   Reduced motion — everything visible, nothing moving on its own
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .glow { background-position: 30% 50%; }
  .board i { transform: none; background: var(--accent); opacity: 1; }
  .board b { opacity: 1; transform: none; }
  .ring .ring__fg { stroke-dashoffset: 0; }
  .ring__num::before { content: '5s'; }
  .flag { animation: none; }
}
