/* Valed Game Studio — valedgostar.com */

@font-face { font-family: "Lalezar"; font-weight: 400; font-display: swap;
  src: url(fonts/lalezar-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Lalezar"; font-weight: 400; font-display: swap;
  src: url(fonts/lalezar-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url(fonts/vazirmatn-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url(fonts/vazirmatn-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap;
  src: url(fonts/vazirmatn-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD; }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap;
  src: url(fonts/vazirmatn-arabic-600-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --night: #1b2236;      /* the room after lights-out */
  --night-deep: #131828;
  --dusk: #2a3350;       /* raised surfaces */
  --lamp: #e9a93b;       /* the narrator's lamp */
  --moon: #e3e7ef;       /* body text */
  --haze: #a3abbf;       /* secondary text */
  --ivory: #f1e7d0;      /* card faces only */
  --ink: #23252d;        /* text on cards */

  --display: "Lalezar", "Vazirmatn", system-ui, sans-serif;
  --text: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.875rem;
  --step-3: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
  --step-4: clamp(4.5rem, 2.5rem + 10vw, 10rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font: 400 var(--step-0)/1.65 var(--text);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--lamp); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 2px; }
[lang="fa"] { font-family: var(--display); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 0.75rem; z-index: 10; background: var(--lamp); color: var(--night); padding: 0.4rem 0.8rem; }

/* ---------- header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.25rem var(--gutter);
  max-width: 76rem; margin: 0 auto;
}
.wordmark {
  font: 400 var(--step-1)/1 var(--display);
  color: var(--moon); text-decoration: none; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 0.6rem;
}
.wordmark svg { width: 1.6rem; height: 1.6rem; }
.site-head nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-head nav a { color: var(--haze); text-decoration: none; font-size: var(--step--1); }
.site-head nav a:hover { color: var(--moon); }

/* ---------- hero: lights out ---------- */
.hero {
  position: relative; overflow-x: clip;
  max-width: 76rem; margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(4rem, 10vw, 8rem);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 5vw, 4rem);
}
.hero::before {          /* the lamp: one warm pool of light on a dark table */
  content: ""; position: absolute; z-index: -1;
  width: min(48rem, 90vw); aspect-ratio: 1; right: -10%; top: 50%; translate: 0 -50%;
  background: radial-gradient(closest-side, rgb(233 169 59 / 0.16), transparent 70%);
}
.title-fa, .title-en { display: block; }
.title-fa {
  margin: 0;
  font: 400 var(--step-4)/1.05 var(--display);
  color: var(--lamp);
  direction: rtl; text-align: left;
}
.title-en {
  margin: 0.25rem 0 1.5rem;
  font: 400 var(--step-2)/1.15 var(--display);
  color: var(--moon); letter-spacing: 0.01em;
}
.lede { max-width: var(--measure); margin: 0 0 2rem; color: var(--moon); font-size: var(--step-1); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.button {
  display: inline-block; padding: 0.8rem 1.4rem; border-radius: 999px;
  background: var(--lamp); color: var(--night-deep);
  font-weight: 600; text-decoration: none;
}
.button:hover { background: #f2bb57; }
.status { margin: 0; color: var(--haze); font-size: var(--step--1); }

/* the hand of role cards */
.hand {
  position: relative; height: clamp(22rem, 40vw, 30rem);
  list-style: none; margin: 0; padding: 0;
}
.card {
  position: absolute; left: 50%; bottom: 0;
  width: clamp(9.5rem, 16vw, 12.5rem); aspect-ratio: 5 / 7;
  margin-left: calc(clamp(9.5rem, 16vw, 12.5rem) / -2);
  background: var(--ivory); color: var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0 1.5rem 3rem -1rem rgb(5 8 16 / 0.7);
  transform-origin: 50% 230%;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center;
  padding: 0.9rem 0.75rem 1rem;
  rotate: var(--r);
  animation: deal 900ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: var(--d);
}
.card .fa { font: 400 1.9rem/1 var(--display); direction: rtl; }
.card svg { width: 62%; align-self: center; color: var(--ink); }
.card .en { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.02em; }
.card:nth-child(1) { --r: -21deg; --d: 120ms; }
.card:nth-child(2) { --r: -7deg;  --d: 220ms; }
.card:nth-child(3) { --r: 7deg;   --d: 320ms; }
.card:nth-child(4) { --r: 21deg;  --d: 420ms; }
.card.is-mafia { background: var(--ink); color: var(--ivory); }
.card.is-mafia svg { color: var(--lamp); }
@keyframes deal { from { rotate: 0deg; translate: 0 2rem; opacity: 0; } }

/* ---------- sections ---------- */
.band { padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); }
.band--raised { background: var(--night-deep); }
.inner { max-width: calc(76rem - 2 * var(--gutter)); margin: 0 auto; }
.band h2 { font: 400 var(--step-3)/1.1 var(--display); margin: 0 0 2.5rem; max-width: 20ch; }

.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 0.75rem;
  font: 400 var(--step-3)/1 var(--display); color: var(--lamp);
}
.steps h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; margin: 0 0 0.5rem; }
.steps p { margin: 0; color: var(--haze); max-width: 30ch; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split h2 { margin-bottom: 0; }
.prose p { margin: 0 0 1.1rem; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.prose .quiet { color: var(--haze); }

/* ---------- footer ---------- */
.site-foot {
  max-width: 76rem; margin: 0 auto; padding: 2.5rem var(--gutter) 3rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  color: var(--haze); font-size: var(--step--1);
}
.site-foot p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hand { height: 14rem; order: -1; margin-top: 1rem; }
  .card { transform-origin: 50% 260%; }
  .card:nth-child(1) { --r: -15deg; }
  .card:nth-child(2) { --r: -5deg; }
  .card:nth-child(3) { --r: 5deg; }
  .card:nth-child(4) { --r: 15deg; }
  .card { width: 7.25rem; margin-left: -3.625rem; padding: 0.7rem 0.5rem 0.8rem; }
  .card .fa { font-size: 1.3rem; }
  .card .en { font-size: 0.75rem; }
  .steps, .split { grid-template-columns: minmax(0, 1fr); }
  .site-head nav ul { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
