/* =========================================================
   Dajgames.ir: "Tehran after dark"
   Persian, RTL. Never use letter-spacing on Persian text:
   it breaks the joins between letters.
   ========================================================= */

/* ---------- Fonts (self-hosted, subset by tools/subset-fonts.cjs) ----------
   Persian files include the space, so Persian text never pulls in a Latin file.
   Lalezar has no Latin face: Latin characters in headings fall back to Vazirmatn. */
@font-face { font-family: "Lalezar"; src: url("../fonts/lalezar-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0020, U+060C, U+061B, U+061F, U+0621-0655, U+0660-066C, U+0670, U+067E, U+0686, U+0698, U+06A9, U+06AF, U+06C0, U+06CC, U+06F0-06F9, U+200C-200D; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0020, U+060C, U+061B, U+061F, U+0621-0655, U+0660-066C, U+0670, U+067E, U+0686, U+0698, U+06A9, U+06AF, U+06C0, U+06CC, U+06F0-06F9, U+200C-200D; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0020, U+060C, U+061B, U+061F, U+0621-0655, U+0660-066C, U+0670, U+067E, U+0686, U+0698, U+06A9, U+06AF, U+06C0, U+06CC, U+06F0-06F9, U+200C-200D; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0021-007E, U+00A9, U+00AB, U+00BB, U+2013-2014, U+2019, U+201C-201D, U+2022; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/vazirmatn-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0021-007E, U+00A9, U+00AB, U+00BB, U+2013-2014, U+2019, U+201C-201D, U+2022; }

/* ---------- Tokens ---------- */
:root {
  --lapis:      #0E1640;   /* night sky base */
  --lapis-deep: #070B24;   /* deepest shadow */
  --lapis-up:   #18245E;   /* raised surface */
  --firoozeh:   #36D1C4;   /* turquoise tile */
  --saffron:    #FFB238;   /* warm window light */
  --anar:       #E23D5B;   /* pomegranate neon */
  --plaster:    #EFE6D8;   /* text */
  --plaster-dim: rgba(239, 230, 216, .68);
  --line:       rgba(239, 230, 216, .14);

  --display: "Lalezar", "Vazirmatn", system-ui, sans-serif;
  --body: "Vazirmatn", Tahoma, system-ui, sans-serif;

  /* type scale (perfect fourth) */
  --t-sm: .875rem;
  --t-base: 1.0625rem;
  --t-md: 1.333rem;
  --t-lg: clamp(1.6rem, 1.1rem + 1.6vw, 2.37rem);
  --t-xl: clamp(2.4rem, 1.4rem + 4vw, 4.2rem);
  --t-xxl: clamp(3.4rem, 1.5rem + 9vw, 9rem);

  --gutter: clamp(1rem, .5rem + 3vw, 3.5rem);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--lapis-deep);
  color: var(--plaster);
  font-family: var(--body);
  font-size: var(--t-base);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.2; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--anar); color: #fff; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: fixed; top: -100px; right: 1rem; z-index: 100;
  background: var(--saffron); color: var(--lapis-deep);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* film grain over everything, gives the "printed poster" texture */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .55rem 1.4rem;
  border-radius: 999px; font-weight: 700; font-size: var(--t-sm);
  text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease), background-color .3s, color .3s, box-shadow .3s;
}
.btn--solid {
  background: var(--accent, var(--saffron)); color: var(--lapis-deep);
  box-shadow: 0 0 0 0 transparent;
}
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px var(--accent, var(--saffron)); }
.btn--ghost { border: 1.5px solid currentColor; color: var(--plaster); }
.btn--ghost:hover { background: var(--plaster); color: var(--lapis-deep); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem var(--gutter);
  transition: background-color .4s, backdrop-filter .4s, padding .4s;
}
.nav.is-scrolled {
  background: rgba(7, 11, 36, .72);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  padding-block: .6rem;
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--display); font-size: 1.45rem; text-decoration: none;
}
.nav__logo {
  height: 44px; width: auto;
  filter: drop-shadow(0 0 10px rgba(226, 61, 91, .55));
  transition: height .4s var(--ease), filter .3s;
}
.nav.is-scrolled .nav__logo { height: 36px; }
.nav__brand:hover .nav__logo { filter: drop-shadow(0 0 14px rgba(255, 178, 56, .8)); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav__links a { text-decoration: none; font-weight: 400; font-size: var(--t-sm); opacity: .85; transition: opacity .2s, color .2s; }
.nav__links a:hover { opacity: 1; color: var(--saffron); }
.nav__links .nav__cta { opacity: 1; border: 1.5px solid var(--plaster); padding: .45rem 1.1rem; border-radius: 999px; }
.nav__links .nav__cta:hover { background: var(--plaster); color: var(--lapis-deep); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; place-items: center; isolation: isolate;
}
.hero__sky { position: absolute; inset: 0; z-index: -2; }
.hero__sky picture, .game__frame picture { display: block; width: 100%; height: 100%; }
.hero__sky img {
  width: 100%; height: 100%; object-fit: cover; object-position: 30% 70%;
  transform-origin: 50% 80%;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(7,11,36,.55) 0%, rgba(7,11,36,0) 30%, rgba(7,11,36,0) 55%, var(--lapis-deep) 100%),
    radial-gradient(ellipse at 50% 35%, rgba(14,22,64,0) 0%, rgba(7,11,36,.5) 75%);
}
.hero__content {
  text-align: center; padding: 6rem var(--gutter) 9rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  transform: translateY(-6vh);
}
.hero__kicker { font-size: var(--t-md); color: var(--plaster-dim); }
.hero__lead { font-size: var(--t-md); max-width: 36ch; text-wrap: balance; color: var(--plaster); text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: .8rem; }

/* The neon sign: the one loud thing on the page */
.neon {
  position: relative;
  font-family: var(--display);
  font-size: clamp(4.2rem, 1rem + 14vw, 11rem);
  line-height: 1.05;
  color: #FFEFF3;
  text-shadow:
    0 0 4px #fff,
    0 0 12px #ff8aa0,
    0 0 26px var(--anar),
    0 0 52px var(--anar),
    0 0 110px rgba(226, 61, 91, .65);
}
/* With JS, the sign stays dark until the preloader lifts, then flickers on. */
.js .neon { opacity: .06; text-shadow: none; }
.js.is-ready .neon { opacity: 1; text-shadow: 0 0 4px #fff, 0 0 12px #ff8aa0, 0 0 26px var(--anar), 0 0 52px var(--anar), 0 0 110px rgba(226, 61, 91, .65);
  animation: neon-on 1.8s steps(1, end) .25s both, neon-buzz 7s ease-in-out 3s infinite; }
/* reflected glow on the "wall" below the sign */
.neon::after {
  content: ""; position: absolute; inset: 70% 10% -40%; z-index: -1;
  background: radial-gradient(ellipse at center top, rgba(226,61,91,.35), transparent 65%);
  filter: blur(18px);
}
.js .neon::after { opacity: 0; }
.js.is-ready .neon::after { animation: glow-on 1.8s steps(1, end) .25s both; }@keyframes neon-on {
  0%   { opacity: .08; text-shadow: none; }
  8%   { opacity: 1; }
  10%  { opacity: .08; text-shadow: none; }
  22%  { opacity: 1; }
  24%  { opacity: .2;  text-shadow: none; }
  30%  { opacity: .08; text-shadow: none; }
  46%  { opacity: 1; }
  48%  { opacity: .3;  text-shadow: none; }
  52%  { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes glow-on { 0%, 45% { opacity: 0; } 52%, 100% { opacity: 1; } }
@keyframes neon-buzz {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .75; } 94% { opacity: 1; } 96% { opacity: .85; }
}

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--plaster-dim); text-decoration: none;
}
.hero__scroll i {
  width: 1px; height: 46px; background: linear-gradient(var(--plaster), transparent);
  animation: drip 2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Manifest ---------- */
.manifest {
  padding: clamp(6rem, 18vh, 12rem) var(--gutter);
  background: var(--lapis-deep);
}
.manifest__text {
  max-width: 24em; margin-inline: auto;
  font-family: var(--display);
  font-size: var(--t-xl);
  line-height: 1.55;
  text-align: center;
}
.manifest__text .w { opacity: .14; transition: opacity .2s linear; }
.no-motion .manifest__text .w { opacity: 1; }

/* ---------- Section heads ---------- */
.section-head { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); }
.section-head h2 { font-family: var(--display); font-size: var(--t-xl); }
.section-head p { margin-top: .6rem; color: var(--plaster-dim); max-width: 46ch; }

/* ---------- Games ---------- */
.games { background: var(--lapis-deep); }
.games > .section-head { padding-bottom: clamp(2.5rem, 6vh, 4rem); }

.game { position: relative; }
.game__stage {
  position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden;
  display: flex; align-items: flex-end;
}
.game__frame {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 0 round 0);
  will-change: clip-path;
}
.game__frame img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.game__frame::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to left, rgba(7,11,36,.92) 0%, rgba(7,11,36,.55) 38%, rgba(7,11,36,0) 65%),
    linear-gradient(to top, rgba(7,11,36,.85) 0%, rgba(7,11,36,0) 45%);
}
.game__info {
  position: relative; z-index: 1;
  width: min(100%, 36rem);
  padding: 0 var(--gutter) clamp(2.5rem, 9vh, 6rem);
  margin-inline-start: max(0px, calc((100vw - var(--max)) / 2));
}
.game__genre {
  display: inline-block; font-size: var(--t-sm); font-weight: 700; color: var(--accent);
  border-inline-start: 3px solid var(--accent); padding-inline-start: .7rem;
}
.game__title {
  font-family: var(--display);
  font-size: var(--t-xxl);
  line-height: 1.1;
  margin-top: .4rem;
  color: var(--plaster);
  text-shadow: 0 0 40px rgba(var(--accent-rgb), .45);
}
.game:nth-of-type(3) .game__title { font-size: clamp(2.6rem, 1rem + 5.2vw, 6rem); }
.latin { white-space: nowrap; }
.game__desc { margin-top: 1rem; max-width: 34em; color: var(--plaster); }
.game__links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* ---------- In development (horizontal scroll) ---------- */
.next { background: var(--lapis); position: relative; overflow: hidden; }
.next__pin {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  gap: clamp(2rem, 5vh, 3.5rem); padding-block: clamp(5rem, 12vh, 7rem);
}
.next__head { width: 100%; }
.next__track {
  display: flex; gap: clamp(1rem, 2vw, 1.75rem);
  padding-inline: var(--gutter) var(--gutter);
  padding-inline-start: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  width: max-content;
  will-change: transform;
}
.poster {
  --accent: var(--saffron); --accent-rgb: 255, 178, 56;
  position: relative; flex: none;
  width: clamp(250px, 26vw, 360px); aspect-ratio: 3 / 4;
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem;
  padding: 1.5rem;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(var(--accent-rgb), .38), transparent 70%),
    linear-gradient(to top, var(--lapis-deep), var(--lapis-up));
  outline: 1px solid rgba(var(--accent-rgb), .45);
  outline-offset: -10px;
}
/* a giant question mark is the poster "art" for a game we can't show yet */
.poster::before {
  content: "؟"; position: absolute; top: 4%; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: clamp(11rem, 17vw, 15rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(var(--accent-rgb), .7);
  filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), .5));
}
.poster h3 { font-family: var(--display); font-size: var(--t-lg); position: relative; }
.poster p { color: var(--plaster-dim); font-size: var(--t-sm); position: relative; }
.poster__state {
  position: absolute; top: 1.4rem; right: 1.4rem;
  font-size: .78rem; font-weight: 700; color: var(--lapis-deep);
  background: var(--accent); padding: .15rem .7rem; border-radius: 999px;
}
.poster--more {
  background: transparent; outline: 1.5px dashed var(--line); outline-offset: -1px;
  justify-content: center; gap: .8rem; align-items: flex-start;
}
.poster--more::before { content: none; }
.poster--more .btn { margin-top: .6rem; }

/* ---------- About ---------- */
.about { background: var(--lapis-deep); padding: clamp(6rem, 16vh, 10rem) var(--gutter); }
.about__inner {
  max-width: var(--max); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.about h2 { font-family: var(--display); font-size: var(--t-xl); position: sticky; top: 7rem; }
.about__body > p { font-size: var(--t-md); line-height: 2; max-width: 36em; }
.about__body strong { color: var(--saffron); font-weight: 700; }
.about__values { margin-top: 3rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.about__values li {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5rem;
  padding: 1.6rem 0; border-bottom: 1px solid var(--line);
}
.about__values h3 { font-family: var(--display); font-size: var(--t-md); color: var(--firoozeh); }
.about__values p { color: var(--plaster-dim); }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden;
  padding: clamp(7rem, 20vh, 12rem) var(--gutter) clamp(5rem, 12vh, 8rem);
  text-align: center;
  background:
    radial-gradient(60% 55% at 50% 100%, rgba(226, 61, 91, .28), transparent 70%),
    var(--lapis);
}
.contact__title { font-family: var(--display); font-size: var(--t-xxl); max-width: 12ch; margin-inline: auto; line-height: 1.15; }
.contact__lead { margin: 1.4rem auto 0; max-width: 40ch; color: var(--plaster-dim); }
.contact__mail {
  display: inline-block; margin-top: 2.2rem;
  font-size: clamp(1.4rem, 1rem + 2.4vw, 2.6rem); font-weight: 700; text-decoration: none;
  direction: ltr; color: var(--saffron);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size .5s var(--ease);
}
.contact__mail:hover { background-size: 100% 2px; }
.contact__social { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2.6rem; }
.contact__social a {
  display: inline-block; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; font-size: var(--t-sm); transition: border-color .2s, color .2s;
}
.contact__social a:hover { border-color: var(--firoozeh); color: var(--firoozeh); }
.contact__support { margin-top: 2.2rem; font-size: var(--t-sm); color: var(--plaster-dim); }
.contact__support a { color: var(--firoozeh); font-weight: 700; text-underline-offset: 5px; }

.foot__copy { display: flex; align-items: center; gap: .7rem; }
.foot__copy img { height: 28px; width: auto; opacity: .85; }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem;
  padding: 1.5rem var(--gutter); background: var(--lapis); border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--plaster-dim);
}

/* =========================================================
   Living layer: preloader, particles, tapes, tilt, cursor
   ========================================================= */

/* ---------- Preloader ---------- */
.loader { display: none; }
.js .loader {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
}
.loader__panel { position: absolute; inset-inline: 0; height: 50.5%; background: var(--lapis-deep); }
.loader__panel--a { top: 0; }
.loader__panel--b { bottom: 0; }
.loader__core { position: relative; display: grid; place-items: center; width: 132px; height: 132px; }
.loader__ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.loader__ring circle {
  fill: none; stroke: var(--anar); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  filter: drop-shadow(0 0 6px var(--anar)) drop-shadow(0 0 16px var(--anar));
}
.loader__mark {
  width: 76px; height: auto; opacity: .1;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)) drop-shadow(0 0 18px var(--anar));
}
.loader__count {
  position: absolute; top: calc(100% + 1.2rem);
  font-size: .85rem; color: var(--plaster-dim); font-variant-numeric: tabular-nums;
}
.is-ready .loader { visibility: hidden; transition: visibility 0s 1.4s; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60;
  background: linear-gradient(to left, var(--anar), var(--saffron), var(--firoozeh));
  transform-origin: 100% 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(226, 61, 91, .7);
}

/* ---------- Particle canvases ---------- */
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.hero .fx { z-index: -1; }
.game__info { z-index: 2; }

/* zombie fog: two slow sheets drifting in opposite directions */
.fog { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; mix-blend-mode: screen; }
.fog i {
  position: absolute; inset: 35% -50% -10%; opacity: .5;
  background:
    radial-gradient(40% 50% at 20% 60%, rgba(54, 209, 196, .32), transparent 70%),
    radial-gradient(35% 40% at 60% 70%, rgba(54, 209, 196, .22), transparent 70%),
    radial-gradient(30% 45% at 85% 55%, rgba(120, 230, 220, .25), transparent 70%);
  animation: fog-drift 26s linear infinite alternate;
}
.fog i + i { inset: 50% -60% -20%; opacity: .4; animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes fog-drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }

/* ---------- Crossed tapes (velocity marquee) ---------- */
.tapes {
  position: relative; z-index: 3; height: clamp(9rem, 22vw, 15rem);
  background: var(--lapis-deep); overflow: hidden;
  display: grid; place-items: center;
}
.tape {
  position: absolute; width: 130%; overflow: hidden;
  padding-block: .55rem; white-space: nowrap;
}
.tape--a { background: var(--saffron); color: var(--lapis-deep); transform: rotate(-3.5deg); z-index: 2;
  box-shadow: 0 18px 40px -18px rgba(255, 178, 56, .55); }
.tape--b { background: var(--anar); color: #FFEFF3; transform: rotate(3deg); opacity: .92; }
.tape__track { display: inline-flex; align-items: center; gap: 1.4rem; will-change: transform; }
.tape span { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 2.6vw, 3.2rem); line-height: 1.25; }
/* eight-pointed Persian star as the separator */
.tape i {
  width: 1.3rem; height: 1.3rem; flex: none; background: currentColor;
  clip-path: polygon(50% 0, 61% 26%, 85% 15%, 74% 39%, 100% 50%, 74% 61%, 85% 85%, 61% 74%, 50% 100%, 39% 74%, 15% 85%, 26% 61%, 0 50%, 26% 39%, 15% 15%, 39% 26%);
}

/* ---------- Posters: 3D tilt + glare + pulsing question mark ---------- */
.poster { --mx: 50%; --my: 30%; }
.poster::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .2), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.poster.is-tilting::after { opacity: 1; }
.poster:not(.poster--more)::before { animation: q-pulse 3.2s ease-in-out infinite; }
.poster:nth-child(2)::before { animation-delay: -.8s; }
.poster:nth-child(3)::before { animation-delay: -1.6s; }
.poster:nth-child(4)::before { animation-delay: -2.4s; }
@keyframes q-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .3)); opacity: .7; }
  50%      { filter: drop-shadow(0 0 26px rgba(var(--accent-rgb), .85)); opacity: 1; }
}

/* ---------- Cursor glow (fine pointers only) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js .cursor { display: block; position: fixed; inset: 0; z-index: 95; pointer-events: none; }
  .cursor i { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; opacity: 0; transition: opacity .4s; }
  .cursor.is-on i { opacity: 1; }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    border: 1.5px solid rgba(239, 230, 216, .55);
    transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), border-color .3s, background-color .3s, opacity .4s;
  }
  .cursor.is-hot .cursor__ring {
    width: 68px; height: 68px; margin: -34px 0 0 -34px;
    border-color: var(--saffron); background: rgba(255, 178, 56, .08);
  }
  .cursor__glow {
    width: 560px; height: 560px; margin: -280px 0 0 -280px;
    background: radial-gradient(circle, rgba(255, 178, 56, .10), rgba(226, 61, 91, .05) 35%, transparent 65%);
    mix-blend-mode: screen;
  }
}

/* ---------- Heading reveals (line mask) ---------- */
.reveal-line { display: block; overflow: hidden; padding-block: .15em; margin-block: -.15em; }
.reveal-line > span { display: inline-block; will-change: transform; }

/* ---------- Contact girih rosette ---------- */
.contact > *:not(.girih) { position: relative; z-index: 1; }
.girih {
  position: absolute; z-index: 0; top: 50%; left: 50%;
  width: min(1100px, 160vw); height: auto; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  fill: none; stroke: var(--firoozeh); stroke-width: .35; opacity: .2;
  pointer-events: none;
}
.girih g { animation: spin 140s linear infinite; }
.girih g + g { animation-direction: reverse; animation-duration: 200s; stroke: var(--saffron); }
@keyframes spin { to { transform: rotate(360deg); } }
.contact__title { text-shadow: 0 0 40px rgba(54, 209, 196, .25); }

/* ---------- Footer wordmark ---------- */
.foot { position: relative; overflow: hidden; padding-top: 0; }
.foot__word {
  flex-basis: 100%; text-align: center; margin: 0 0 .5rem;
  font-family: var(--display); font-size: clamp(5rem, 1rem + 20vw, 19rem); line-height: 1.15;
  color: transparent; -webkit-text-stroke: 1.5px rgba(239, 230, 216, .16);
  background: linear-gradient(100deg, var(--anar), var(--saffron), var(--firoozeh), var(--anar)) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  background-size: 300% 100%;
  transition: -webkit-text-stroke-color .5s;
  user-select: none;
}
.foot__word:not(:hover) { background-image: none; }
.foot__word:hover { -webkit-text-stroke-color: transparent; animation: sheen 4s linear infinite; }
@keyframes sheen { to { background-position: 300% 0; } }

/* ---------- Buttons: shine sweep ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn--solid::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(120%); transition: transform .7s var(--ease);
}
.btn--solid:hover::after { transform: translateX(-120%); }

@media (max-aspect-ratio: 4/5) { .hero__sky img { object-position: 50% 70%; } }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .nav__toggle {
    display: grid; gap: 7px; place-content: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(7,11,36,.5); border: 1px solid var(--line); cursor: pointer; z-index: 2;
  }
  .nav__toggle span { display: block; width: 20px; height: 2px; background: var(--plaster); transition: transform .35s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .nav__links {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 1.6rem;
    background: rgba(7, 11, 36, .97);
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav__links a { font-family: var(--display); font-size: 2rem; font-weight: 400; }
  .nav__links .nav__cta { font-size: 1.4rem; padding: .5rem 1.6rem; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }


  .tapes { height: 11rem; }
  .tape--a { transform: rotate(-7deg); }
  .tape--b { transform: rotate(6deg); }

  .game__frame::after {
    background: linear-gradient(to top, rgba(7,11,36,.96) 0%, rgba(7,11,36,.7) 40%, rgba(7,11,36,0) 75%);
  }
  .game__info { padding-bottom: 2.5rem; }
  .game__desc { font-size: .98rem; }

  .about__inner { grid-template-columns: 1fr; }
  .about h2 { position: static; }
  .about__values li { grid-template-columns: 1fr; gap: .3rem; }

  .foot { justify-content: center; text-align: center; }
}

/* ---------- Performance tiers ----------
   .low  = modest phone: no film grain, no backdrop blur, fewer particles (JS)
   .lite = weak device, slow network or Data Saver: no preloader, particles,
           fog, cursor or grain; decorative loops stop. Set in <head> and by a
           frame-rate check after load. */
@media (pointer: coarse) { .grain { display: none; } }
.low .grain, .lite .grain { display: none; }
.low .nav.is-scrolled, .lite .nav.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 11, 36, .95); }
.lite .loader, .lite .fx, .lite .fog, .lite .cursor { display: none !important; }
.lite .girih g, .lite .poster::before, .lite .hero__scroll i { animation: none; }
.lite .neon::after { filter: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .neon, .neon::after { animation: none; }
  .fx, .fog, .cursor, .loader { display: none !important; }
  .js .neon { opacity: 1; text-shadow: 0 0 4px #fff, 0 0 12px #ff8aa0, 0 0 26px var(--anar), 0 0 52px var(--anar); }
  .js .neon::after { opacity: 1; }
}
