/*
Theme Name: رشمه
Theme URI: https://reshmeh.ir
Author: انجمن ادبی رشمه
Description: قالب اختصاصی انجمن ادبی رشمه. راست‌به‌چپ، با تمرکز بر خوانایی متن فارسی و موتیف رشته که از نشان انجمن می‌آید.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: reshmeh
*/

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

:root {
	--wine: #701428;
	--wine-deep: #4a0c1b;
	--sand: #e3cdbb;
	--sand-soft: #f4eae2;
	--paper: #faf8f7;
	--ink: #2b1a1f;
	--ink-soft: #6b5a5f;
	--line: #e4d8d3;
	--measure: 40rem;
	--wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: "Vazirmatn", Tahoma, sans-serif;
	font-size: 1.0625rem;
	line-height: 2;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-underline-offset: .3em; text-decoration-thickness: 1px; }
a:hover { color: var(--wine-deep); }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 800; line-height: 1.5; color: var(--wine-deep); margin: 0 0 .6em; }
p { margin: 0 0 1.2em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
	position: absolute; inset-inline-start: 1rem; top: -5rem; z-index: 100;
	background: var(--wine); color: #fff; padding: .5rem 1rem; border-radius: .3rem;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- سربرگ ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--wine); }
.brand svg { width: 1.5rem; height: 1.5rem; fill: var(--wine); flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 1.8rem; font-weight: 900; line-height: 1.1; }
.brand-sub { font-size: .8rem; font-weight: 500; color: var(--ink-soft); line-height: 1.4; }
.brand-logo { max-height: 3rem; width: auto; }

.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.site-nav a { display: block; padding: .3rem 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--wine); border-color: var(--sand); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--wine); border-color: var(--wine); }
.nav-toggle {
	display: none; background: none; border: 1.5px solid var(--wine); color: var(--wine);
	border-radius: .4rem; padding: .3rem 1rem; font: inherit; font-weight: 700; cursor: pointer;
}

/* ---------- دکمه‌ها ---------- */
.btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.btn {
	display: inline-block; padding: .6rem 1.6rem; border: 2px solid var(--wine); border-radius: .4rem;
	font: inherit; font-weight: 700; text-decoration: none; color: var(--wine); background: transparent; cursor: pointer;
}
.btn:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: #fff; }
.btn-solid { background: var(--wine); color: #fff; }
.btn-light { background: var(--sand); border-color: var(--sand); color: var(--wine-deep); }
.btn-light:hover { background: #fff; border-color: #fff; color: var(--wine-deep); }

/* ---------- صفحهٔ اول: نخ ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 900; line-height: 1.4; margin-bottom: .5em; color: var(--wine); }
.hero-text p { font-size: 1.2rem; max-width: 32rem; color: var(--ink-soft); }
.hero-art img { width: 100%; mix-blend-mode: multiply; filter: brightness(1.04) contrast(1.05); }

.thread { display: block; width: 100%; height: clamp(4.5rem, 9vw, 8rem); margin-top: clamp(1rem, 3vw, 2.5rem); }
.thread path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.thread .t1 { stroke: var(--wine); stroke-width: 3; animation: draw 2.6s cubic-bezier(.5, 0, .2, 1) both; }
.thread .t2 { stroke: var(--sand); stroke-width: 2.5; animation: draw 2.6s cubic-bezier(.5, 0, .2, 1) .35s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- بخش‌ها ---------- */
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.section-head a { font-weight: 600; }

.meta { display: flex; flex-wrap: wrap; gap: 0 .8rem; margin: 0 0 .4em; font-size: .9rem; color: var(--ink-soft); line-height: 1.8; }
.meta > * + * { border-inline-start: 1px solid var(--line); padding-inline-start: .8rem; }
.meta a { color: var(--wine); font-weight: 600; text-decoration: none; }

.works-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.work-lead h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.5; }
.work-lead h3 a, .work-list a { color: var(--wine-deep); text-decoration: none; }
.work-lead h3 a:hover, .work-list a:hover { color: var(--wine); text-decoration: underline; }
.work-lead .thumb { margin-bottom: 1.2rem; }
.work-lead .thumb img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: .3rem; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.work-list li:first-child { padding-top: 0; }
.work-list h3 { font-size: 1.2rem; margin: 0; }

.event { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.2rem; padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.event-date { text-align: center; color: var(--wine); border-inline-end: 3px solid var(--sand); padding-inline-end: 1.2rem; }
.event-day { display: block; font-size: 2.6rem; font-weight: 900; line-height: 1.3; }
.event-month { display: block; font-size: .95rem; font-weight: 600; line-height: 1.4; }
.event-body h3 { font-size: 1.3rem; margin: 0 0 .2em; }
.event-body h3 a { color: var(--wine-deep); text-decoration: none; }
.event-body h3 a:hover { color: var(--wine); text-decoration: underline; }
.event-info { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.event-info span + span { margin-inline-start: 1.2rem; }
.empty-note { color: var(--ink-soft); }

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); border-block: 1px solid var(--line); }
.cats a { display: block; padding: 1.6rem 1.4rem; text-decoration: none; color: var(--wine-deep); border-inline-end: 1px solid var(--line); }
.cats a:last-child { border-inline-end: 0; }
.cats a:hover { background: var(--sand-soft); color: var(--wine); }
.cats strong { display: block; font-size: 1.9rem; font-weight: 900; line-height: 1.5; }
.cats span { font-size: .9rem; color: var(--ink-soft); }

.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 2rem 1rem; }
.member { text-align: center; }
.member a { text-decoration: none; color: var(--ink); display: block; }
.member a:hover .member-name { color: var(--wine); }
.avatar { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; margin: 0 auto .6rem; background: var(--sand); }
.avatar-fallback { display: grid; place-items: center; font-size: 2.4rem; font-weight: 900; color: var(--wine); }
.member-name { display: block; font-weight: 700; line-height: 1.6; }
.member-role { display: block; font-size: .85rem; color: var(--ink-soft); }

.cta { background: var(--wine); color: var(--sand); }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding-block: clamp(2.5rem, 5vw, 4rem); }
.cta h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: .3em; }
.cta p { margin: 0; max-width: 34rem; }

/* ---------- صفحه‌ها و نوشته‌ها ---------- */
.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900; margin-bottom: .4em; color: var(--wine); }
.page-head p { color: var(--ink-soft); max-width: var(--measure); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chip { display: inline-block; padding: .1rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.chip:hover { border-color: var(--wine); color: var(--wine); }
.chip.is-current { background: var(--wine); border-color: var(--wine); color: #fff; }

.post-list { max-width: 50rem; padding-bottom: 2rem; }
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; padding-block: 1.8rem; border-top: 1px solid var(--line); }
.post-row-title { font-size: 1.6rem; margin-bottom: .3em; }
.post-row-title a { color: var(--wine-deep); text-decoration: none; }
.post-row-title a:hover { color: var(--wine); text-decoration: underline; }
.post-row-excerpt { color: var(--ink-soft); }
.post-row-excerpt p { margin: 0; }
.post-row-thumb img { width: 9rem; height: 9rem; object-fit: cover; border-radius: .3rem; }

.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-block: 2rem 4rem; }
.page-numbers { padding: .1rem .9rem; border: 1px solid var(--line); border-radius: .3rem; text-decoration: none; }
.page-numbers.current { background: var(--wine); border-color: var(--wine); color: #fff; }
.pagination .screen-reader-text { display: none; }

.entry { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; padding-bottom: 4rem; }
.single-head { padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.single-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900; line-height: 1.5; color: var(--wine); margin-bottom: .4em; }
.single-thumb { margin: 0 0 2rem; }
.single-thumb img { width: 100%; border-radius: .3rem; }
.entry-content { font-size: 1.15rem; line-height: 2.15; }
.entry-content h2 { font-size: 1.6rem; margin-top: 2em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.6em; }
.entry-content blockquote { margin: 1.8em 0; padding-inline-start: 1.4rem; border-inline-start: 3px solid var(--wine); color: var(--ink-soft); }
.entry-content ul, .entry-content ol { padding-inline-start: 1.5rem; margin: 0 0 1.2em; }
.entry-content .wp-block-verse, .entry-content pre.wp-block-verse {
	font-family: inherit; font-size: 1.2rem; line-height: 2.4; text-align: center; white-space: pre-wrap;
	background: none; border: 0; padding: 1rem 0; margin: 1.8em 0; color: var(--wine-deep);
}
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption { font-size: .9rem; color: var(--ink-soft); text-align: center; margin-top: .5rem; }
.entry-content .alignwide { width: min(100vw - 2.5rem, var(--wrap)); margin-inline: 50%; transform: translateX(50%); max-width: none; }
.post-nav { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; font-weight: 700; }

.event-facts { margin: 0 0 2rem; padding: 1.2rem 1.4rem; background: var(--sand-soft); border-inline-start: 4px solid var(--wine); }
.event-facts div { display: flex; gap: 1rem; }
.event-facts dt { font-weight: 800; color: var(--wine-deep); min-width: 4rem; }
.event-facts dd { margin: 0; }
.member-head { display: flex; align-items: center; gap: 1.5rem; }
.member-head .avatar { margin: 0; width: 7.5rem; height: 7.5rem; flex: none; }

/* ---------- فرم‌ها ---------- */
.rm-form label { display: block; font-weight: 700; margin: 1.2rem 0 .3rem; }
.rm-form input[type="text"], .rm-form input[type="email"], .rm-form select, .rm-form textarea, .search-form input[type="search"] {
	width: 100%; padding: .7rem .9rem; border: 1px solid #cdbbb4; border-radius: .4rem; background: #fff; font: inherit; color: var(--ink);
}
.rm-form textarea { min-height: 15rem; line-height: 2; }
.rm-form .hint { font-size: .9rem; color: var(--ink-soft); margin: .2rem 0 0; }
.rm-form .btn { margin-top: 1.5rem; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.2rem; border-radius: .4rem; margin-bottom: 1.5rem; font-weight: 600; }
.notice-ok { background: #eaf3ea; color: #1f4d2b; border: 1px solid #b9d7bf; }
.notice-err { background: #fbeaea; color: #7a1d1d; border: 1px solid #e3b5b5; }
.search-form { display: flex; gap: .5rem; }
.search-form .btn { margin: 0; padding-block: .4rem; }

/* ---------- پاورقی ---------- */
.site-footer { background: var(--sand-soft); border-top: 1px solid var(--line); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding-block: 3rem 2rem; }
.footer-brand .brand-name { font-size: 2rem; }
.latin { font-family: Georgia, "Times New Roman", serif; letter-spacing: .22em; font-size: .75rem; color: var(--wine); margin: .4rem 0 1rem; direction: ltr; text-align: start; }
.site-footer h2 { font-size: 1.05rem; color: var(--wine-deep); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { text-decoration: none; display: inline-block; padding-block: .1rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.2rem; font-size: .9rem; color: var(--ink-soft); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 52rem) {
	.js .nav-toggle { display: inline-block; }
	.js .site-nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; }
	.js .site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; gap: .3rem; }
	.hero-grid, .works-grid, .footer-grid { grid-template-columns: 1fr; }
	.hero-art { max-width: 30rem; }
	.post-row { grid-template-columns: 1fr; }
	.post-row-thumb img { width: 100%; height: auto; aspect-ratio: 8 / 5; }
	.member-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	.thread .t1, .thread .t2 { animation: none; }
}
