@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0e1a2b;
  --ink-2: #172a44;
  --paper: #f6f3ec;
  --card: #fffdf8;
  --line: #e4ddcc;
  --gold: #b38a4a;
  --gold-2: #d6b36f;
  --text: #1c2535;
  --muted: #5d6676;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 26, 43, 0.05), 0 10px 30px -12px rgba(14, 26, 43, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.95;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .5em; color: var(--ink); font-weight: 800; }
p { margin: 0 0 1em; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--gold); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 26, 43, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.bar { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-inline-end: auto; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--gold); color: var(--gold-2); border-radius: 12px; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.4; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; }
.brand-text small { color: var(--gold-2); font-size: .78rem; }
.nav { display: flex; gap: 6px; }
.nav a { color: #d8dee9; padding: 8px 14px; border-radius: 10px; font-size: .95rem; transition: .2s; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-toggle, .burger { display: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 12px; font-weight: 700; font-size: 1rem; border: 1.5px solid transparent; cursor: pointer; transition: .2s; font-family: inherit; line-height: 1.6; }
.btn svg { width: 20px; height: 20px; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1405; box-shadow: 0 8px 22px -8px rgba(179, 138, 74, 0.7); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-line { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn-line:hover { background: rgba(255, 255, 255, 0.08); }

/* hero */
.hero { position: relative; background: radial-gradient(900px 480px at 85% -10%, rgba(214, 179, 111, 0.22), transparent 60%), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 38px); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: 96px 0 72px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 900; margin-bottom: .4em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.hero .lead { color: #c3cddc; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 700; font-size: .92rem; letter-spacing: .01em; margin-bottom: 10px; }
.eyebrow.gold { color: var(--gold-2); }
.seal { justify-self: center; width: min(300px, 70vw); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(214, 179, 111, 0.55); color: var(--gold-2); background: radial-gradient(circle, rgba(214, 179, 111, 0.12), transparent 70%); box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.025), 0 0 0 14px rgba(214, 179, 111, 0.06); }
.seal svg { width: 46%; height: 46%; }
.seal.sm { width: 56px; border-width: 1.5px; box-shadow: none; flex: none; background: var(--ink); }
.stats { position: relative; list-style: none; padding: 26px 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.stats li { text-align: center; }
.stats strong { display: block; font-size: 1.9rem; font-weight: 900; color: var(--gold-2); line-height: 1.4; }
.stats span { color: #c3cddc; font-size: .95rem; }

/* sections */
.section { padding: 84px 0; }
.section.alt { background: #efe9dc; }
.section.dark { background: var(--ink); color: #fff; }
.section.dark h2 { color: #fff; }
.section.dark .lead { color: #c3cddc; }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0; }
.section-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.more { color: var(--gold); font-weight: 700; }
.more:hover { text-decoration: underline; }

.grid { display: grid; gap: 22px; }
.areas { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--gold-2); }
.area { padding: 28px; position: relative; overflow: hidden; }
.area .num { position: absolute; top: 14px; inset-inline-end: 20px; font-size: 2.6rem; font-weight: 900; color: rgba(179, 138, 74, 0.16); line-height: 1; }
.area h3 { font-size: 1.15rem; margin-top: 18px; }
.area p { color: var(--muted); margin: 0; font-size: .97rem; }

/* about */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.portrait { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 4 / 5; background: var(--ink); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait.empty { display: grid; place-items: center; color: var(--gold-2); }
.portrait.empty svg { width: 40%; }
.about h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* prose */
.prose { font-size: 1.04rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose h4 { font-size: 1.1rem; margin-top: 1.2em; }
.prose a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 22px; border-inline-start: 4px solid var(--gold); background: rgba(179, 138, 74, 0.09); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.prose img { border-radius: 12px; margin: 1.4em auto; box-shadow: var(--shadow); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* article cards */
.article-card { overflow: hidden; display: flex; flex-direction: column; }
.article-card .cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin: 8px 0; }
.card-body h3 a:hover { color: var(--gold); }
.card-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.tag { background: rgba(179, 138, 74, 0.14); color: #7d5d27; padding: 2px 12px; border-radius: 99px; font-weight: 700; }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; }

/* page heads */
.page-head { background: linear-gradient(160deg, var(--ink), var(--ink-2)); color: #fff; padding: 72px 0 56px; }
.page-head h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.page-head .lead { color: #c3cddc; }
.page-head .meta { color: #c3cddc; margin-bottom: 14px; }
.page-head .tag { background: rgba(214, 179, 111, 0.2); color: var(--gold-2); }
.article-head { text-align: right; }
.hero-img { margin: -30px 0 32px; }
.hero-img img { width: 100%; border-radius: 16px; box-shadow: var(--shadow); max-height: 460px; object-fit: cover; }
.article-body { padding: 40px 0 20px; }
.author { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0 64px; }
.author > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.6; flex: 1; min-width: 160px; }
.author span { color: var(--muted); font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.chips.filter { margin: 0 0 32px; }
.chip { padding: 6px 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: .92rem; font-weight: 600; transition: .2s; }
.chip:hover, .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.dark .chip { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.dark .chip:hover { background: rgba(255, 255, 255, 0.1); }

/* contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.contact h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.info { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.info li { display: flex; gap: 16px; align-items: flex-start; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 16px 20px; }
.info svg { width: 24px; height: 24px; color: var(--gold-2); flex: none; margin-top: 4px; }
.info small { display: block; color: #9fb0c8; line-height: 1.6; }
.info a:hover { color: var(--gold-2); }

/* footer */
.site-footer { background: #091322; color: #aab6c8; padding-top: 48px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; }
.foot strong { color: #fff; font-size: 1.1rem; }
.foot p { margin: 4px 0 0; font-size: .92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: flex-start; }
.foot-links a:hover { color: var(--gold-2); }
.copy { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 0 26px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: .85rem; }
.copy a:hover { color: #fff; }

/* responsive */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; padding: 64px 0 44px; }
  .seal { display: none; }
  .about, .contact { grid-template-columns: 1fr; gap: 32px; }
  .portrait { max-width: 300px; }
  .section { padding: 60px 0; }
  .burger { display: grid; gap: 5px; padding: 10px; cursor: pointer; }
  .burger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
  .nav { position: absolute; top: 72px; inset-inline: 0; flex-direction: column; background: var(--ink); padding: 8px 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: none; }
  .nav a { padding: 12px 8px; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle:checked ~ .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .author { display: none; } body { background: #fff; } }

/* ===== نسخه‌ی محتوایی: نوع مطلب، پلیر، فیلتر، نظرات ===== */
.tiles-sec { padding: 0; margin-top: -34px; position: relative; z-index: 2; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); transition: .25s; }
.tile:hover { transform: translateY(-4px); border-color: var(--gold-2); }
.tile-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--gold-2); margin-bottom: 8px; }
.tile-icon svg { width: 22px; height: 22px; }
.tile strong { color: var(--ink); }
.tile small { color: var(--muted); }

.topics { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.topic { padding: 20px 24px; display: block; }
.topic h3 { font-size: 1.05rem; margin: 0; }
.topic p { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }

.post-card .cover { position: relative; display: block; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; line-height: 1.6; }
.type-badge svg { width: 16px; height: 16px; }
.post-card .cover .type-badge { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(14, 26, 43, .86); color: var(--gold-2); padding: 3px 12px; border-radius: 99px; }
.type-badge.solid { background: var(--ink); color: var(--gold-2); padding: 2px 12px; border-radius: 99px; }
.page-head .type-badge.solid { background: rgba(214, 179, 111, .2); }
.lang-tag { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); direction: ltr; }
.page-head .lang-tag { border-color: rgba(255, 255, 255, .25); color: #c3cddc; }

.search { display: flex; gap: 10px; margin-bottom: 20px; max-width: 560px; }
.search input { flex: 1; font: inherit; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.search input:focus { outline: 3px solid var(--gold-2); outline-offset: 1px; }
.search .btn { padding: 8px 22px; }
.filter-group { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.filter-group > span { flex: none; color: var(--muted); font-size: .9rem; font-weight: 700; min-width: 44px; }
.chips.filter { margin: 0 0 12px; }
.chips.plain { margin-top: 18px; }
.chips.plain .chip { background: transparent; }
.about.no-photo { grid-template-columns: 1fr; max-width: 820px; }

.media-slot { margin: -30px 0 32px; position: relative; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player video { width: 100%; border-radius: 16px; box-shadow: var(--shadow); background: #000; max-height: 540px; }
.player.audio { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.player audio { width: 100%; display: block; }

.prose[dir=ltr] { text-align: left; }
.prose[dir=rtl] { text-align: right; }
.prose[lang=zh], .prose[lang=ja] { line-height: 2.1; }

.comments { margin: 16px 0 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 1.35rem; }
.comment-list { list-style: none; padding: 0; margin: 20px 0 32px; display: grid; gap: 14px; }
.comment-list li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.comment-list p { margin: 6px 0 0; }
.c-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.c-head time { color: var(--muted); font-size: .85rem; }
.comment-form { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.comment-form label { display: grid; gap: 4px; font-weight: 700; font-size: .93rem; }
.comment-form input, .comment-form textarea { font: inherit; font-weight: 400; padding: 10px 14px; border: 1px solid #d5cdbb; border-radius: 10px; background: #fff; color: var(--text); }
.comment-form input:focus, .comment-form textarea:focus { outline: 3px solid var(--gold-2); outline-offset: 1px; }
.comment-form .btn { justify-self: start; }
.comment-form small { color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 18px; border-radius: 12px; margin: 14px 0; font-weight: 600; }
.notice.ok { background: #dcfae6; color: #067647; }
.notice.err { background: #fee4e2; color: #b42318; }
