
@font-face { font-family: 'Vazirmatn'; font-weight: 400; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Vazirmatn'; font-weight: 700; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Vazirmatn'; font-weight: 900; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-arabic-900-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Vazirmatn'; font-weight: 400; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Vazirmatn'; font-weight: 700; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Vazirmatn'; font-weight: 900; font-display: swap; src: url(/mafia-app/fonts/vazirmatn-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF; }

:root {
  --bg: #0B0B14;
  --surface: #151521;
  --surface-2: #1C1C2B;
  --line: rgba(255, 255, 255, 0.08);
  --text: #F5F5FA;
  --muted: rgba(245, 245, 250, 0.62);
  --accent: #7C5CFC;
  --accent-soft: #A78BFA;
  --blood: #E5484D;
  --town: #3DD68C;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 20, 0.8);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; text-decoration: none; font-size: 1.1rem; }
.brand small { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
nav.links { display: flex; gap: 20px; font-size: 0.92rem; color: var(--muted); }
nav.links a { text-decoration: none; }
nav.links a:hover { color: var(--text); }
@media (max-width: 720px) { nav.links { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 16px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 0;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(124, 92, 252, 0.8); }
.btn-primary:hover { background: #8B6EFF; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn-sm { min-height: 40px; padding: 8px 16px; border-radius: 12px; font-size: 0.9rem; }
.btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }

/* hero */
.hero { position: relative; padding: 72px 0 56px; text-align: center; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: -120px 0 auto; height: 520px; z-index: -1;
  background:
    radial-gradient(420px 260px at 50% 30%, rgba(124, 92, 252, 0.35), transparent 70%),
    radial-gradient(300px 200px at 70% 60%, rgba(229, 72, 77, 0.18), transparent 70%);
}
.moon {
  width: 92px; height: 92px; margin: 0 auto 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #E9E4FF 35%, #A78BFA 100%);
  box-shadow: 0 0 60px 10px rgba(167, 139, 250, 0.35);
  position: relative;
}
.moon::after {
  content: ''; position: absolute; inset: -6px -22px 6px 22px; border-radius: 50%; background: var(--bg);
}
.eyebrow { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(124, 92, 252, 0.14); color: var(--accent-soft); font-size: 0.85rem; font-weight: 700; margin-bottom: 18px; }
h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); line-height: 1.25; margin: 0 0 16px; font-weight: 900; letter-spacing: -0.5px; }
h1 .red { color: var(--blood); }
.lead { font-size: clamp(1rem, 2.6vw, 1.2rem); color: var(--muted); max-width: 620px; margin: 0 auto 32px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta .btn { min-width: 180px; }
.stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 40px; color: var(--muted); font-size: 0.92rem; }
.stats b { display: block; color: var(--text); font-size: 1.35rem; font-weight: 900; }

/* sections */
section { padding: 56px 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 8px; font-weight: 900; }
.sub { color: var(--muted); margin: 0 0 32px; }
.center { text-align: center; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.role { position: relative; overflow: hidden; }
.role .icon { font-size: 2.2rem; line-height: 1; margin-bottom: 12px; }
.role h3 { margin: 0 0 4px; font-size: 1.2rem; }
.role .team { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }
.team-mafia { background: rgba(229, 72, 77, 0.15); color: #FF8589; }
.team-town { background: rgba(61, 214, 140, 0.13); color: var(--town); }
.role p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.role.mafia { border-color: rgba(229, 72, 77, 0.3); }

.steps { counter-reset: step; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step, persian);
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(124, 92, 252, 0.16); color: var(--accent-soft); font-weight: 900; font-size: 1.2rem;
}
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* day/night cycle */
.cycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .cycle { grid-template-columns: repeat(2, 1fr); } }
.phase { border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.phase .t { font-size: 1.6rem; }
.phase h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.phase p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.phase.night { background: linear-gradient(160deg, #191433, #10101C); }
.phase.day { background: linear-gradient(160deg, #2A2112, #15131A); }

.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .i { flex: none; font-size: 1.5rem; }
.feature h3 { margin: 0 0 2px; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent-soft); font-weight: 900; }
details[open] summary::after { content: '−'; }
details p { margin: 0 0 16px; color: var(--muted); }

.final {
  text-align: center; border-radius: 28px; padding: 48px 20px;
  background: radial-gradient(500px 220px at 50% 0%, rgba(124, 92, 252, 0.3), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}

footer { padding: 32px 0 48px; color: var(--muted); font-size: 0.88rem; text-align: center; }
footer a { color: var(--accent-soft); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
  
/* language switch + privacy */
.langs { display: flex; gap: 6px; font-size: 0.85rem; }
.langs a { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.langs a[aria-current="page"] { color: var(--text); border-color: var(--accent-soft); }
.top-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 420px) { .langs a { padding: 2px 7px; font-size: 0.72rem; } .brand small { display: none; } .top-actions .btn-sm { padding: 6px 10px; } }
.note { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
[dir="ltr"] .step::before { content: counter(step); }
.doc { max-width: 760px; padding: 48px 0; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-size: 1.2rem; margin-top: 28px; }
.doc p, .doc li { color: var(--muted); }
[lang="ar"] .step::before { content: counter(step, arabic-indic); }
