/* playrazlo.com — one stylesheet for every page, English (LTR) and Persian (RTL).
   Layout: a centred theatrical opening (the app's R and eyes), then each game gets
   its own stage in its own light, then quiet reference sections. Dark by design,
   like the app's game introductions; long documents sit on a light paper sheet. */

@font-face { font-family: "Bodoni Moda"; src: url("/fonts/bodoni-moda.woff") format("woff"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/fonts/bodoni-moda-italic.woff") format("woff"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff") format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courier-prime-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Allura"; src: url("/fonts/allura.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Noto Nastaliq Cabal"; src: url("/fonts/noto-nastaliq-cabal.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-extrabold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  /* Night: the icon's deep indigo, from almost black to the electric blue of its swirl */
  --night: #07061A;
  --night-2: #0E0C2C;
  --night-3: #18153F;
  --line: #2B2763;
  --violet: #4A30FF;
  /* The R ribbon and the eyes */
  --coral: #FF5E5B;
  --ember: #FFB547;
  --ivory: #F8F2E7;
  --mist: #B9B5DC;
  --mist-2: #8D89B8;
  /* Game identities, as in the app */
  --spy: #FFC95C;
  --blank: #66D9BF;
  --cabal: #9CA8FA;
  --mask: #D8414B;
  --town: #4FD6C8;
  /* Paper, for Dossier and long documents */
  --paper: #F3EBDD;
  --paper-2: #E8DCC6;
  --ink: #17132F;
  --ink-2: #4E4766;
  --sepia: #8A5A2B;

  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --spy-face: "Courier Prime", "Courier New", monospace;
  --cabal-face: "Allura", "Snell Roundhand", cursive;
  --wrap: 1140px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .75, .2, 1);
}
:root[lang="fa"] {
  --display: "Vazirmatn", Tahoma, sans-serif;
  --body: "Vazirmatn", Tahoma, sans-serif;
  --spy-face: "Vazirmatn", Tahoma, sans-serif;
  --cabal-face: "Noto Nastaliq Cabal", "Vazirmatn", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--night); color: var(--ivory); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:root[lang="fa"] body { line-height: 1.95; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--ivory); color: var(--ink); padding: 8px 14px; z-index: 60; border-radius: 8px; }
.fa-inline { font-family: "Vazirmatn", Tahoma, sans-serif; color: var(--ember); }
.en-inline { font-family: "Manrope", system-ui, sans-serif; color: var(--ember); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; }
:root[lang="fa"] h1, :root[lang="fa"] h2, :root[lang="fa"] h3 { font-weight: 800; letter-spacing: 0; }
h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -.015em; margin: 0 0 18px; }
:root[lang="fa"] h2 { line-height: 1.4; font-size: clamp(30px, 4.4vw, 50px); }
.lead { color: var(--mist); font-size: 18px; max-width: 36em; margin: 0; }
section { padding-block: 120px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ember); margin: 0 0 14px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 30; transition: background .35s, border-color .35s, box-shadow .35s; border-bottom: 1px solid transparent; }
.site-head.scrolled { background: rgba(7, 6, 26, .78); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom-color: rgba(43, 39, 99, .7); }
.site-head .nav { transition: padding .35s var(--ease); }
.site-head.scrolled .nav { padding-block: 12px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { font-family: "Bodoni Moda", Georgia, serif; font-weight: 500; font-size: 23px; letter-spacing: .28em; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; font-size: 15px; }
.nav-links a { color: var(--mist); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ivory); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 8px; }
.lang-pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; }
.lang-pill:hover { border-color: var(--ember); }
:root[lang="en"] .lang-pill { font-family: "Vazirmatn", Tahoma, sans-serif; }
:root[lang="fa"] .lang-pill { font-family: "Manrope", system-ui, sans-serif; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ivory); cursor: pointer; place-items: center; }
.menu-btn svg { width: 18px; height: 18px; }

.sheet { position: fixed; inset: 0; z-index: 50; background: var(--night); display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s; }
.sheet::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 50% 0%, rgba(74, 48, 255, .28), transparent 70%); }
.sheet.open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.sheet > * { position: relative; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; }
.sheet-top .menu-btn { display: grid; }
.sheet nav { margin-block: auto; display: flex; flex-direction: column; gap: 4px; }
.sheet nav a { font-family: var(--display); font-size: 40px; line-height: 1.3; text-decoration: none; color: var(--ivory); transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease); }
:root[lang="fa"] .sheet nav a { font-size: 32px; line-height: 1.7; }
.sheet.open nav a { transform: none; opacity: 1; }
.sheet.open nav a:nth-child(2) { transition-delay: .04s; } .sheet.open nav a:nth-child(3) { transition-delay: .08s; }
.sheet.open nav a:nth-child(4) { transition-delay: .12s; } .sheet.open nav a:nth-child(5) { transition-delay: .16s; } .sheet.open nav a:nth-child(6) { transition-delay: .2s; }
.sheet nav a.sheet-lang { font-size: 22px; color: var(--ember); margin-top: 18px; }
.sheet-foot { font-size: 14px; color: var(--mist); }
.sheet-foot a { color: var(--ember); }
body.locked { overflow: hidden; }

/* ---------- App Store badge (not live yet) ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.soon { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 18px; border-radius: 14px; direction: ltr;
  background: rgba(248, 242, 231, .06); border: 1px solid rgba(248, 242, 231, .22); color: var(--ivory); font-family: "Manrope", system-ui, sans-serif; }
.soon svg { width: 20px; height: 24px; opacity: .9; }
.soon small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ember); line-height: 1.1; }
.soon b { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; }
:root[lang="fa"] .soon { font-family: "Vazirmatn", Tahoma, sans-serif; direction: rtl; }
.text-link { color: var(--mist); text-decoration: none; font-weight: 600; padding-block: 10px; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.text-link:hover { color: var(--ivory); border-color: var(--ember); }

/* ---------- hero: the R with its eyes ---------- */
.hero { position: relative; text-align: center; padding-block: 24px 96px; overflow: clip; }
body.home { background: radial-gradient(1100px 1000px at 50% 300px, rgba(74, 48, 255, .42), rgba(74, 48, 255, .1) 55%, transparent 75%) no-repeat, var(--night); }
.hero > .wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.mark { position: relative; width: min(300px, 62vw); aspect-ratio: 1; margin-bottom: 10px; }
.mark img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mark .swirl { border-radius: 22.4%; opacity: 0; transform: scale(.94); filter: saturate(1.1); animation: swirl 1.4s .9s var(--ease) forwards; box-shadow: 0 40px 120px -30px rgba(74, 48, 255, .9); }
.mark .ribbon { opacity: 0; transform: translateY(10px) scale(.97); animation: rise 1.1s 1.1s var(--ease) forwards; }
.mark .eyes { animation: eyes-open 1.3s .15s ease-out both, blink 9s 3.4s infinite; transform-origin: 50% 40%; filter: drop-shadow(0 0 18px rgba(255, 181, 71, .8)); }
@keyframes swirl { to { opacity: 1; transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes eyes-open { 0% { opacity: 0; transform: scaleY(.1); } 40% { opacity: 1; transform: scaleY(1); } 55% { transform: scaleY(.08); } 70% { transform: scaleY(1); } 100% { opacity: 1; transform: none; } }
@keyframes blink { 0%, 94%, 100% { transform: none; } 96% { transform: scaleY(.08); } }
.wordmark { font-family: "Bodoni Moda", Georgia, serif; font-size: 15px; letter-spacing: .6em; text-indent: .6em; color: var(--mist); margin: 6px 0 22px; }
:root[lang="fa"] .wordmark { font-family: "Vazirmatn", Tahoma, sans-serif; letter-spacing: 0; text-indent: 0; font-size: 18px; font-weight: 600; }
h1 { font-size: clamp(46px, 7.6vw, 100px); line-height: .98; letter-spacing: -.025em; margin: 0 0 26px; }
h1 span { display: block; }
h1 em { display: block; font-style: italic; font-weight: 400; background: linear-gradient(90deg, var(--coral), var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
:root[lang="fa"] h1 { font-size: clamp(44px, 7vw, 92px); line-height: 1.28; }
:root[lang="fa"] h1 em { font-style: normal; font-weight: 800; }
.hero .lead { margin: 0 auto 34px; font-size: 19px; max-width: 34em; }
.hero .cta-row { justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(4, auto); gap: 0; margin: 56px auto 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 20px; background: rgba(14, 12, 44, .55); }
.facts li { padding: 16px 30px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--mist); }
.facts li + li { border-inline-start: 1px solid var(--line); }
.facts b { font-family: var(--display); font-size: 30px; font-weight: 500; color: var(--ivory); line-height: 1.15; font-variant-numeric: lining-nums; }
:root[lang="fa"] .facts b { font-size: 24px; font-weight: 800; }
.hero-copy, .hero .cta-row, .hero .facts { animation: up .9s var(--ease) both; }
.hero-copy { animation-delay: 1.2s; } .hero .cta-row { animation-delay: 1.35s; } .hero .facts { animation-delay: 1.5s; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- games ---------- */
.games { padding-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 12px; max-width: 14ch; }
.deck { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.game { --tone: var(--spy); position: relative; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; text-decoration: none;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 70%), linear-gradient(180deg, var(--night-3), var(--night-2) 60%);
  border: 1px solid color-mix(in srgb, var(--tone) 32%, var(--line)); transition: transform .35s var(--ease), border-color .35s; }
.game:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 70%, var(--line)); }
.game.cabal { --tone: var(--cabal); }
.game.dossier { --tone: #D9B48A; }
.game .art { height: 250px; display: grid; place-items: center; padding: 28px 28px 0; }
.game .art img { max-height: 210px; width: auto; filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .55)); }
.game.dossier .art img { max-height: 236px; border-radius: 14px; mask-image: linear-gradient(180deg, #000 70%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); }
.game .body { padding: 22px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.game .players { font-size: 13px; font-weight: 600; color: var(--tone); margin: 0 0 4px; }
.game h3 { margin: 0 0 12px; font-size: 38px; line-height: 1.1; color: var(--ivory); }
.game.spy h3 { font-family: var(--spy-face); font-weight: 700; font-size: 31px; letter-spacing: -.01em; }
.game.cabal h3 { font-family: var(--cabal-face); font-weight: 400; font-size: 54px; line-height: 1; }
:root[lang="fa"] .game.spy h3 { font-weight: 800; font-size: 32px; }
:root[lang="fa"] .game.cabal h3 { font-size: 46px; line-height: 1.6; font-weight: 400; }
.game p.line { margin: 0 0 18px; color: var(--mist); font-size: 15.5px; }
.game ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.game li { display: flex; gap: 10px; align-items: baseline; }
.game li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); transform: translateY(-2px); }
.price { margin-top: auto; align-self: flex-start; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; color: var(--night); background: var(--tone); }
.game.cabal .price, .game.dossier .price { background: transparent; color: var(--tone); border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent); }
.deck-dots { display: none; }

/* ---------- Who's the Spy ---------- */
.spy-stage { position: relative; background: radial-gradient(80% 60% at 85% 30%, rgba(255, 201, 92, .13), transparent 70%); }
[dir="rtl"] .spy-stage { background: radial-gradient(80% 60% at 15% 30%, rgba(255, 201, 92, .13), transparent 70%); }
.spy-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.spy-stage h2 { font-family: var(--spy-face); font-weight: 700; letter-spacing: -.02em; }
:root[lang="fa"] .spy-stage h2 { font-weight: 800; }
.spy-stage .kicker { color: var(--spy); }
.variants { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0 26px; }
.variant { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--night-2); border: 1px solid var(--line); }
.variant img { width: 64px; height: 64px; object-fit: contain; }
.variant b { display: block; font-size: 16px; margin-bottom: 2px; }
.variant.spy b { color: var(--spy); } .variant.blank b { color: var(--blank); }
.variant span { font-size: 13.5px; color: var(--mist); line-height: 1.5; display: block; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--mist); font-size: 15.5px; }
.rules li { display: flex; gap: 12px; }
.rules li::before { content: ""; flex: none; width: 14px; height: 1px; background: var(--spy); transform: translateY(13px); }

.table { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.stage { position: relative; width: min(290px, 70vw); aspect-ratio: 5 / 7; perspective: 1400px; margin-top: 10px; }
.stage::before, .stage::after { content: ""; position: absolute; inset: 0; border-radius: 22px; background: var(--night-3); border: 1px solid var(--line); }
.stage::before { transform: rotate(-8deg) translate(-16px, 10px); }
.stage::after { transform: rotate(6deg) translate(14px, 4px); }
.card { --c: #E2574C; position: absolute; inset: 0; z-index: 2; transform-style: preserve-3d; transition: transform .8s var(--ease); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card.flipped { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px; box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .8); }
.front { background: radial-gradient(90% 70% at 50% 40%, color-mix(in srgb, var(--c) 92%, #fff 8%), color-mix(in srgb, var(--c) 70%, #000 30%)); transition: background .4s; }
.front::after, .back::after { content: ""; position: absolute; inset: 11px; border-radius: 14px; pointer-events: none; }
.front::after { border: 1px solid rgba(255, 255, 255, .35); }
.front .emblem { width: 112px; height: 112px; position: relative; margin-bottom: 18px; }
.front .emblem img { position: absolute; inset: 0; width: 100%; height: 100%; }
.front .who { font-family: var(--display); font-size: 25px; margin: 0; color: #fff; }
.front .tap { margin: 4px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .85); }
.back { background: var(--ivory); color: var(--ink); transform: rotateY(180deg); border-top: 10px solid var(--c); }
.back::after { border: 1px solid #E4D6BC; }
.back .role { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 12px; }
.back .word { font-family: var(--spy-face); font-weight: 700; font-size: 42px; line-height: 1.1; margin: 0 0 14px; }
:root[lang="fa"] .back .word { font-weight: 800; font-size: 40px; line-height: 1.5; }
.back .hint { font-size: 14px; color: var(--ink-2); max-width: 20ch; margin: 0; }
.back.blank .word { color: #2E8C76; }
.back.blank .role { color: #2E8C76; }
.table .btn { font: 600 15px var(--body); border-radius: 999px; padding: 11px 22px; cursor: pointer; border: 1px solid var(--spy); background: transparent; color: var(--spy); transition: background .2s, color .2s; }
.table .btn:hover { background: var(--spy); color: var(--night); }
.table .note { font-size: 13.5px; color: var(--mist); margin: 0; min-height: 3.2em; text-align: center; max-width: 30ch; }
.seats { display: flex; gap: 8px; }
.seats i { width: 14px; height: 14px; border-radius: 50%; background: var(--c, #555); opacity: .35; transition: opacity .3s, transform .3s; }
.seats i.on { opacity: 1; transform: scale(1.25); }

/* ---------- Cabal ---------- */
.cabal-stage { position: relative; isolation: isolate; overflow: clip; padding-block: 140px 120px; }
.cabal-stage .backdrop { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .55; }
.cabal-stage::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--night) 0%, rgba(7, 6, 26, .55) 30%, rgba(7, 6, 26, .78) 62%, var(--night) 100%), radial-gradient(60% 50% at 50% 30%, rgba(156, 168, 250, .18), transparent 70%); }
.cabal-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; margin-bottom: 56px; }
.cabal-head .insignia { width: 190px; filter: drop-shadow(0 20px 40px rgba(216, 65, 75, .35)); }
.cabal-stage .kicker { color: var(--cabal); }
.cabal-stage h2 { font-family: var(--cabal-face); font-weight: 400; font-size: clamp(76px, 10vw, 128px); line-height: .9; margin: 0 0 10px; letter-spacing: 0; color: #E6E9FF; text-shadow: 0 0 40px rgba(156, 168, 250, .45); }
:root[lang="fa"] .cabal-stage h2 { font-weight: 400; font-size: clamp(60px, 8vw, 100px); line-height: 1.7; margin-bottom: 0; }
.cast { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.role-card { --team: var(--town); position: relative; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #D9D6CF, #BDB8AE); color: var(--ink); display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .2); }
.role-card.cabal { --team: var(--mask); }
.role-card .pic { aspect-ratio: 2 / 3; overflow: hidden; }
.role-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.04); transition: transform .6s var(--ease); }
.role-card:hover img { transform: scale(1.09); }
.role-card .txt { padding: 12px 14px 16px; background: linear-gradient(180deg, #F2EEE6, #E6E0D4); flex: 1; border-top: 3px solid var(--team); }
.role-card .team { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--team) 70%, #000); }
:root[lang="fa"] .role-card .team { letter-spacing: 0; text-transform: none; font-size: 12px; }
.role-card h3 { font-size: 21px; margin: 2px 0 6px; line-height: 1.15; }
.role-card p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.win-line { margin: 34px 0 0; display: flex; gap: 14px; align-items: center; color: var(--mist); font-size: 15.5px; }
.win-line img { width: 34px; flex: none; }

/* ---------- Dossier (paper) ---------- */
.dossier-stage { background: var(--paper); color: var(--ink); position: relative; }
.dossier-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(138, 90, 43, .08) 31px 32px); }
.dossier-stage > .wrap { position: relative; }
.dossier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.file-tab { display: inline-flex; gap: 10px; align-items: center; font-family: "Courier Prime", monospace; font-weight: 700; font-size: 13px; color: var(--sepia); border: 1.5px solid var(--sepia); padding: 4px 12px; border-radius: 6px; transform: rotate(-2deg); margin-bottom: 18px; }
:root[lang="fa"] .file-tab { font-family: "Vazirmatn", sans-serif; transform: rotate(2deg); }
.dossier-stage h2 { font-size: clamp(56px, 7vw, 88px); line-height: 1; color: var(--ink); }
.dossier-stage .lead { color: var(--ink-2); }
.missions { display: flex; gap: 10px; align-items: center; margin: 28px 0 34px; }
.missions span { font-size: 13px; font-weight: 700; color: var(--sepia); margin-inline-end: 6px; }
.missions i { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--sepia); display: grid; place-items: center; font-style: normal; font-family: "Courier Prime", monospace; font-weight: 700; font-size: 14px; color: var(--sepia); }
.missions i.ok { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.missions i.no { background: var(--mask); border-color: var(--mask); color: #fff; }
.steps-paper { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps-paper li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.steps-paper li::before { content: counter(s); font-family: "Courier Prime", monospace; font-weight: 700; font-size: 26px; color: var(--sepia); line-height: 1.2; }
:root[lang="fa"] .steps-paper li::before { content: counter(s, persian); font-family: "Vazirmatn", sans-serif; font-weight: 800; }
.steps-paper b { display: block; font-size: 17px; }
.steps-paper p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.agents { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.agent { margin: 0; background: #FBF7EF; padding: 10px 10px 14px; border-radius: 6px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 18px 30px -18px rgba(60, 40, 10, .45); transform: rotate(var(--tilt, -1.5deg)); }
.agent:nth-child(2) { --tilt: 1.8deg; margin-top: 24px; } .agent:nth-child(3) { --tilt: 1.2deg; margin-top: -10px; } .agent:nth-child(4) { --tilt: -2deg; margin-top: 14px; }
.agent .pic { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: #DDD3C2; }
.agent img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; filter: sepia(.25) contrast(1.05); }
.agent figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; font-family: "Courier Prime", monospace; font-weight: 700; font-size: 15px; }
:root[lang="fa"] .agent figcaption { font-family: "Vazirmatn", sans-serif; font-weight: 800; }
.agent figcaption span { font-family: var(--body); font-weight: 600; font-size: 11.5px; color: var(--sepia); }
.agent.infiltrators figcaption span { color: var(--mask); }

/* ---------- how a round plays ---------- */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 24px; border-top: 1px solid var(--line); position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 18px;
  font-family: "Bodoni Moda", Georgia, serif; font-style: italic; font-size: 20px; color: var(--night); background: linear-gradient(135deg, var(--coral), var(--ember)); }
:root[lang="fa"] .steps li::before { content: counter(s, persian); font-family: "Vazirmatn", sans-serif; font-style: normal; font-weight: 800; }
.steps li::after { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 40px; height: 1px; background: var(--ember); }
.steps h3 { font-size: 23px; margin: 0 0 8px; }
.steps p { margin: 0; color: var(--mist); font-size: 15px; }

/* ---------- Apple TV ---------- */
.tv-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.tv { position: relative; padding-bottom: 34px; }
.tv .screen { border-radius: 18px; padding: 12px; background: linear-gradient(180deg, #1D1B2E, #0B0A14); border: 1px solid #2E2B45; box-shadow: 0 50px 100px -40px rgba(74, 48, 255, .7); }
.tv .screen img { width: 100%; border-radius: 8px; aspect-ratio: 1920 / 720; object-fit: cover; background: #0b0a18; }
.tv::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 26%; height: 22px; transform: translateX(-50%); border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #2A2742, #14121F); }
.tv-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.tv-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--mist); font-size: 15.5px; }
.tv-points svg { flex: none; width: 20px; height: 20px; margin-top: 4px; stroke: var(--ember); fill: none; stroke-width: 1.8; }

/* ---------- details ---------- */
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; margin-top: 44px; }
.detail { background: var(--night); padding: 32px 30px; }
.detail svg { width: 28px; height: 28px; stroke: var(--ember); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 16px; }
.detail h3 { font-size: 21px; margin: 0 0 6px; }
.detail p { margin: 0; color: var(--mist); font-size: 15px; }

/* ---------- privacy + price ---------- */
.trust { padding-top: 0; }
.trust-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.promise, .pricing { border-radius: 28px; padding: 44px; }
.promise { background: radial-gradient(120% 90% at 0% 0%, rgba(74, 48, 255, .3), transparent 60%), var(--night-2); border: 1px solid var(--line); }
[dir="rtl"] .promise { background: radial-gradient(120% 90% at 100% 0%, rgba(74, 48, 255, .3), transparent 60%), var(--night-2); }
.promise h2, .pricing h2 { font-size: clamp(28px, 3.4vw, 40px); }
.promise p { color: var(--mist); margin: 0 0 24px; }
.nos { list-style: none; margin: 0 0 26px; padding: 0; }
.nos li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.nos li span:last-child { color: var(--ember); font-family: var(--display); font-style: italic; }
:root[lang="fa"] .nos li span:last-child { font-style: normal; font-weight: 600; }
.pricing { background: var(--ivory); color: var(--ink); }
.pricing dl { margin: 6px 0 22px; display: grid; gap: 0; }
.pricing dl div { padding: 14px 0; border-bottom: 1px solid #E2D6C0; }
.pricing dt { font-family: var(--display); font-size: 21px; font-weight: 500; }
:root[lang="fa"] .pricing dt { font-weight: 800; font-size: 18px; }
.pricing dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.pricing .note { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------- finale ---------- */
.finale { text-align: center; padding-block: 120px 130px; position: relative; overflow: clip; }
.finale::before { content: ""; position: absolute; inset: 20% -20% -40%; background: radial-gradient(closest-side, rgba(74, 48, 255, .35), transparent 70%); pointer-events: none; }
.finale .wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.finale .eyes { width: 220px; margin-bottom: 20px; filter: drop-shadow(0 0 24px rgba(255, 181, 71, .85)); animation: blink 7s 1s infinite; }
.finale h2 { font-size: clamp(42px, 6.4vw, 84px); max-width: 13ch; }
.finale .lead { margin: 0 auto 36px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 44px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--mist); }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.foot p { margin: 10px 0 0; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ivory); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 30px; font-size: 12.5px; color: var(--mist-2); }
.site-version { font-variant-numeric: tabular-nums; opacity: .75; }
.mail { direction: ltr; unicode-bidi: isolate; }

/* ---------- theme music ---------- */
.music { position: fixed; z-index: 40; inset-inline-end: max(22px, env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 999px; cursor: pointer;
  font: 600 14px var(--body); color: var(--ivory); background: rgba(14, 12, 44, .72); border: 1px solid rgba(255, 181, 71, .35);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .3s, background .3s; }
.music.ready { opacity: 1; transform: none; pointer-events: auto; }
.music:hover { border-color: var(--ember); }
.music[aria-pressed="true"] { background: linear-gradient(135deg, rgba(255, 94, 91, .22), rgba(255, 181, 71, .22)), rgba(14, 12, 44, .8); border-color: var(--ember); }
.bars { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.bars i { width: 3px; height: 4px; border-radius: 2px; background: linear-gradient(var(--ember), var(--coral)); transition: height .3s; }
.bars i:nth-child(2) { height: 9px; } .bars i:nth-child(3) { height: 6px; } .bars i:nth-child(4) { height: 11px; }
body.playing .bars i { animation: eq 1.1s ease-in-out infinite; }
body.playing .bars i:nth-child(2) { animation-delay: -.3s; } body.playing .bars i:nth-child(3) { animation-delay: -.6s; } body.playing .bars i:nth-child(4) { animation-delay: -.85s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
/* while the theme plays, the R's eyes glow with it */
body.playing .mark .eyes, body.playing .finale .eyes { animation: eyes-pulse 2.4s ease-in-out infinite; }
@keyframes eyes-pulse { 0%, 100% { filter: drop-shadow(0 0 14px rgba(255, 181, 71, .7)); } 50% { filter: drop-shadow(0 0 34px rgba(255, 181, 71, 1)) brightness(1.15); } }

/* ---------- documents (privacy, support) ---------- */
.doc-hero { position: relative; padding-block: 40px 80px; overflow: clip; }
body.doc-page { background: radial-gradient(900px 640px at 78% 160px, rgba(74, 48, 255, .38), transparent 72%) no-repeat, var(--night); }
[dir="rtl"] body.doc-page { background: radial-gradient(900px 640px at 22% 160px, rgba(74, 48, 255, .38), transparent 72%) no-repeat, var(--night); }
.doc-hero .wrap { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.doc-hero h1 { font-size: clamp(46px, 7vw, 86px); margin: 0 0 16px; }
.doc-hero .lead { font-size: 18px; max-width: 38em; }
.doc-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge { font-size: 13px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--mist); }
.doc-hero .mark-sm { width: 150px; flex: none; position: relative; aspect-ratio: 1; }
.doc-hero .mark-sm img { position: absolute; inset: 0; width: 100%; height: 100%; }
.doc-hero .mark-sm .swirl { border-radius: 22.4%; box-shadow: 0 30px 80px -24px rgba(74, 48, 255, .9); }
.doc-hero .mark-sm .eyes { filter: drop-shadow(0 0 12px rgba(255, 181, 71, .8)); animation: blink 9s 2s infinite; }
.paper { background: var(--paper); color: var(--ink); border-radius: 36px 36px 0 0; padding-block: 80px 110px; }
.doc-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
.toc { position: sticky; top: 28px; font-size: 14px; }
.toc summary { list-style: none; font-weight: 700; margin-bottom: 12px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid #D9CBB0; }
.toc a { display: block; padding: 7px 16px; text-decoration: none; color: var(--ink-2); margin-inline-start: -1px; border-inline-start: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-color: var(--coral); font-weight: 700; }
.doc { max-width: 68ch; min-width: 0; }
.doc section { padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid #DCCDB2; scroll-margin-top: 24px; }
.doc section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.doc h2 { font-size: clamp(27px, 3.2vw, 36px); color: var(--ink); margin-bottom: 18px; }
.doc p { margin: 0 0 16px; color: #352E4A; }
.doc p:last-child { margin-bottom: 0; }
.path { font-weight: 700; color: var(--ink); background: #E6D8BE; border-radius: 6px; padding: 1px 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.contact-card { margin-top: 56px; border-radius: 26px; background: var(--night); color: var(--ivory); padding: 36px; display: flex; gap: 24px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.contact-card h2 { color: var(--ivory); margin: 0 0 4px; font-size: 26px; }
.contact-card p { margin: 0; color: var(--mist); }
.contact-card .addr { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.contact-card .addr a { font-weight: 700; font-size: 18px; color: var(--ember); text-decoration: none; direction: ltr; }
.contact-card button { font: 600 14px var(--body); border-radius: 999px; padding: 8px 16px; border: 1px solid var(--line); background: transparent; color: var(--ivory); cursor: pointer; }
.contact-card button:hover { border-color: var(--ember); }

/* ---------- 404 ---------- */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 60px; }
.lost .mark { width: 180px; margin: 0 auto 26px; }
.lost h1 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 10px; }
.lost p { color: var(--mist); margin: 0 0 28px; }
.lost .row { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .music { opacity: 1; transform: none; pointer-events: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .mark .swirl, .mark .ribbon, .hero-copy, .hero .cta-row, .hero .facts { opacity: 1; transform: none; }
}

/* =================== tablet =================== */
@media (max-width: 1000px) {
  .nav-links li.wide { display: none; }
  .cast { grid-template-columns: repeat(3, 1fr); }
  .spy-grid, .tv-grid, .dossier-grid, .trust-grid { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .details-grid { grid-template-columns: 1fr 1fr; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; }
  section { padding-block: 96px; }
}

/* =================== phone =================== */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .nav { padding-block: 14px; }
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .site-head { padding-top: env(safe-area-inset-top, 0px); }
  .site-head.scrolled .nav { padding-block: 10px; }
  .music { inset-inline-end: 50%; transform: translate(50%, 16px); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); padding: 11px 20px 11px 16px; }
  [dir="rtl"] .music { transform: translate(-50%, 16px); }
  .music.ready { transform: translate(50%, 0); }
  [dir="rtl"] .music.ready { transform: translate(-50%, 0); }
  footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .brand img { width: 34px; height: 34px; }
  .brand b { font-size: 20px; }
  section { padding-block: 80px; }
  h2 { font-size: clamp(32px, 9.5vw, 42px); }
  .lead { font-size: 16.5px; }

  .hero { padding-block: 8px 64px; }
  .mark { width: min(220px, 58vw); }
  h1 { font-size: clamp(44px, 13.4vw, 60px); margin-bottom: 18px; }
  :root[lang="fa"] h1 { font-size: clamp(42px, 12vw, 56px); }
  .hero .lead { font-size: 16.5px; margin-bottom: 26px; }
  .hero .cta-row { flex-direction: column; gap: 8px; }
  .facts { grid-template-columns: 1fr 1fr; width: 100%; margin-top: 36px; }
  .facts li { padding: 14px 8px; }
  .facts li + li { border-inline-start: 0; }
  .facts li:nth-child(even) { border-inline-start: 1px solid var(--line); }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts b { font-size: 26px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 28px; }
  /* swipe decks with a peek of the next card, like the app's Home carousel */
  .swipe { display: grid !important; grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: 84%; gap: 14px !important;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
    margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))); padding: 6px max(var(--gutter), env(safe-area-inset-left, 0px)) 16px;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { scroll-snap-align: start; }
  .deck-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
  .deck-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .3s, background .3s; }
  .deck-dots i.on { width: 20px; background: var(--ember); }
  .game .art { height: 210px; }
  .game .art img { max-height: 176px; }
  .game.dossier .art img { max-height: 200px; }
  .game h3 { font-size: 32px; }
  .game.cabal h3 { font-size: 48px; }

  .variants { grid-template-columns: 1fr; }
  .stage { width: min(250px, 66vw); }
  .back .word { font-size: 36px; }

  .cabal-stage { padding-block: 96px 80px; }
  .cabal-head { grid-template-columns: 1fr; gap: 8px; margin-bottom: 30px; }
  .cabal-head .insignia { width: 120px; }
  .cast.swipe { grid-auto-columns: 46%; }
  .role-card h3 { font-size: 19px; }

  .agents { gap: 12px; }
  .dossier-stage h2 { font-size: 56px; }
  .missions i { width: 30px; height: 30px; }

  .steps { grid-template-columns: 1fr; gap: 0; margin-top: 32px; }
  .steps li { display: grid; grid-template-columns: 52px 1fr; column-gap: 4px; padding-block: 20px; }
  .steps li::before { grid-row: span 2; margin: 0; }
  .steps h3 { font-size: 20px; margin-bottom: 2px; }

  .details-grid { grid-template-columns: 1fr; border-radius: 22px; }
  .detail { padding: 22px; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; }
  .detail svg { grid-row: span 2; margin: 2px 0 0; }
  .detail h3 { font-size: 18px; }

  .promise, .pricing { padding: 30px 24px; border-radius: 24px; }
  .finale { padding-block: 90px 100px; }
  .finale .eyes { width: 160px; }

  .doc-hero { padding-block: 16px 44px; }
  .doc-hero .wrap { flex-direction: column-reverse; align-items: flex-start; gap: 18px; }
  .doc-hero .mark-sm { width: 84px; }
  .doc-hero h1 { font-size: clamp(42px, 12vw, 54px); }
  .doc-hero .lead { font-size: 16.5px; }
  .paper { border-radius: 28px 28px 0 0; padding-block: 26px 80px; }
  .toc { background: #FBF6EC; border: 1px solid #DCCDB2; border-radius: 18px; padding: 14px 18px; }
  .toc summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
  .toc summary::after { content: ""; width: 9px; height: 9px; border-inline-end: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
  .toc[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
  .toc ol { margin-top: 10px; }
  .doc section { padding-bottom: 36px; margin-bottom: 36px; }
  .contact-card { padding: 26px 22px; }
}
@media (max-width: 380px) {
  .agents { grid-template-columns: 1fr 1fr; }
  .cast.swipe { grid-auto-columns: 62%; }
}
