/* فونت: اول فایل‌های داخل پروژه، بعد گوگل‌فونت (در header لود می‌شود)، بعد فونت سیستم */
@font-face { font-family: "VazirLocal"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "VazirLocal"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "VazirLocal"; src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #150a35;
  --ink-2: #1f1253;
  --violet: #3a22a0;
  --sun: #ffc21a;
  --sky: #35c4ff;
  --lime: #9be564;
  --coral: #ff4f6d;
  --paper: #fff6df;
  --line: #08031c;
  --muted: #5b5273;
  --font: "VazirLocal", "Vazirmatn", Tahoma, "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --pop: 0 6px 0 var(--line);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.95;
  color: var(--paper);
  background-color: var(--ink);
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 92%); margin-inline: auto; }
.narrow { width: min(820px, 92%); }

/* ---------- هدر ---------- */
.site-header {
  background: var(--violet);
  border-bottom: 4px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 22px; color: var(--sun); text-shadow: 0 3px 0 var(--line); }
.site-header nav { display: flex; gap: 8px; }
.site-header nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 4px 16px;
  border: 3px solid transparent;
  border-radius: 12px;
  transition: background .15s;
}
.site-header nav a:hover { background: rgba(255, 255, 255, .14); }
.site-header nav a.on { background: var(--sun); color: var(--line); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }

/* ---------- دکمه و برچسب ---------- */
.btn {
  display: inline-block;
  padding: 8px 26px;
  background: var(--sun);
  color: var(--line);
  font-weight: 900;
  font-size: 17px;
  text-decoration: none;
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--pop);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--line); }
.btn:active { transform: translateY(6px); box-shadow: 0 0 0 var(--line); }
.btn-ghost { background: var(--paper); }

.tag {
  display: inline-block;
  padding: 0 12px;
  background: var(--sun);
  color: var(--line);
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.9;
  text-decoration: none;
}
.meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- کارت ---------- */
.card {
  background: var(--paper);
  color: var(--line);
  border: 3px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--pop);
  overflow: hidden;
}

/* جای خالی عکس: رنگ بر اساس دسته */
.ph {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  font-weight: 900;
  font-size: 26px;
  color: var(--line);
  background-color: var(--sky);
  background-image: radial-gradient(rgba(8, 3, 28, .16) 2px, transparent 2.2px);
  background-size: 14px 14px;
}
.ph-gameplay { background-color: var(--sun); }
.ph-edit { background-color: var(--coral); }
.ph-event { background-color: var(--lime); }

/* ---------- هیرو ---------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  background: linear-gradient(160deg, var(--violet) 0%, var(--ink-2) 70%);
  border-bottom: 4px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset-block: -20% -20%;
  inset-inline-start: -8%;
  width: 34%;
  background: rgba(255, 255, 255, .06);
  transform: skewX(-14deg);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(52px, 9vw, 96px);
  line-height: 1.25;
  font-weight: 900;
  color: var(--sun);
  text-shadow: 0 5px 0 var(--line), 0 10px 0 rgba(8, 3, 28, .45);
}
.lead { margin: 0 0 30px; font-size: clamp(18px, 2.4vw, 22px); max-width: 34ch; text-wrap: balance; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; }

.feature { display: block; text-decoration: none; transform: rotate(-2.2deg); position: relative; transition: transform .18s; }
.feature:hover { transform: rotate(-1deg) translateY(-3px); }
.feature-flag {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  background: var(--coral);
  color: #fff;
  border: 3px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.9;
  box-shadow: 0 3px 0 var(--line);
}
.feature > img, .feature > .ph { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-bottom: 3px solid var(--line); }
.feature-body { display: grid; gap: 4px; padding: 16px 20px 20px; }
.feature-body strong { font-size: 22px; font-weight: 900; line-height: 1.7; }
.feature-sum { color: var(--muted); font-size: 15px; line-height: 1.9; }

/* ---------- بخش‌ها ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--ink-2); border-block: 4px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-title { margin: 0 0 28px; font-size: clamp(26px, 4vw, 34px); font-weight: 900; line-height: 1.5; }
.section-head .section-title { margin: 0; }
.section-title::after { content: ""; display: block; width: 64px; height: 8px; margin-top: 6px; background: var(--sun); border: 2px solid var(--line); border-radius: 6px; }
.head-link { font-weight: 700; color: var(--sun); text-decoration: none; border-bottom: 2px solid transparent; }
.head-link:hover { border-color: var(--sun); }
.empty { padding: 32px; text-align: center; background: rgba(255, 255, 255, .06); border: 3px dashed rgba(255, 255, 255, .25); border-radius: 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.news-card { display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--line); }
.news-card .cover { display: block; text-decoration: none; border-bottom: 3px solid var(--line); aspect-ratio: 16 / 10; overflow: hidden; }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 22px; flex: 1; }
.news-card h3 { margin: 4px 0 0; font-size: 20px; font-weight: 900; line-height: 1.7; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a:hover { color: var(--violet); }
.news-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.95; }
.more { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--violet); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 5px; }

/* دسته‌ها در صفحه‌ی اصلی */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.tile {
  display: block;
  padding: 24px 24px 28px;
  text-decoration: none;
  color: var(--line);
  border: 3px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--pop);
  background-image: radial-gradient(rgba(8, 3, 28, .13) 2px, transparent 2.2px);
  background-size: 14px 14px;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--line); }
.tile h3 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.tile p { margin: 0; font-size: 16px; }
.tile-news { background-color: var(--sky); }
.tile-gameplay { background-color: var(--sun); }
.tile-edit { background-color: var(--coral); }

/* ---------- صفحه‌ی اخبار ---------- */
.page-head { padding: 56px 0 40px; background: linear-gradient(160deg, var(--violet), var(--ink-2)); border-bottom: 4px solid var(--line); }
.page-head h1 { margin: 0; font-size: clamp(34px, 6vw, 52px); font-weight: 900; color: var(--sun); text-shadow: 0 4px 0 var(--line); line-height: 1.5; }
.page-head p { margin: 0 0 22px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips a, .pager a {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 2px 18px;
  color: var(--paper);
  border: 3px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  transition: background .15s;
}
.chips a:hover, .pager a:hover { background: rgba(255, 255, 255, .22); }
.chips a.on, .pager a.on { background: var(--sun); color: var(--line); box-shadow: 0 3px 0 var(--line); }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 44px; }
.pager a { min-width: 46px; text-align: center; padding-inline: 10px; }

/* ---------- صفحه‌ی خبر ---------- */
.article { padding: 32px clamp(20px, 5vw, 44px) 40px; }
.article h1 { margin: 12px 0 8px; font-size: clamp(26px, 4.5vw, 38px); font-weight: 900; line-height: 1.6; }
.article-sum { margin: 0 0 22px; font-size: 18px; color: var(--muted); }
.article-img { width: calc(100% + 2 * clamp(20px, 5vw, 44px)); margin: 0 calc(-1 * clamp(20px, 5vw, 44px)) 26px; max-height: 460px; object-fit: cover; border-block: 3px solid var(--line); }
.prose { font-size: 18px; line-height: 2.2; }
.prose p { margin: 0 0 1.1em; }
.back { display: inline-block; margin-top: 26px; }
.related { margin-top: 64px; }

/* ---------- فوتر ---------- */
.site-footer { background: var(--line); border-top: 4px solid var(--violet); padding: 36px 0; margin-top: 0; }
.foot { display: grid; gap: 6px; }
.foot p { margin: 0; }
.foot-name { font-weight: 900; font-size: 20px; color: var(--sun); }
.foot-note { font-size: 14px; color: #bdb4d8; max-width: 70ch; }
.foot-copy { font-size: 13px; color: #8f85b3; }

/* ---------- موبایل ---------- */
@media (max-width: 860px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature { transform: none; }
  .feature:hover { transform: translateY(-3px); }
  .section { padding: 48px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .logo { font-size: 19px; }
  .site-header nav a { padding: 4px 10px; font-size: 14px; }
  .site-header nav { gap: 2px; }
  .grid { gap: 22px; }
}
