/*
Theme Name: Pundit Persian
Theme URI: https://example.com/pundit-persian
Author: Codex
Description: قالب فارسی و راست‌چین برای خدمات ویرایش و بازنویسی محتوا.
Version: 0.2.0
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: pundit-fa
*/

@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-DemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'IRANSansX'; src: url('assets/fonts/IRANSansX-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --font-site: 'IRANSansX', sans-serif;
  --ink: #111111;
  --muted: #606060;
  --line: #dddddd;
  --soft: #f6f6f4;
  --paper: #ffffff;
  --radius: 14px;
  --shadow: 0 16px 50px rgba(0, 0, 0, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-site);
  font-weight: 400;
  direction: rtl;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
h1, h2 { font-weight: 800; }
h3, h4, h5, h6, strong, b { font-weight: 700; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0,0,0,.07);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 34px; }
.brand { margin-left: 20px; line-height: 1.1; }
.brand-name { display: block; font: 900 29px/1 var(--font-site); letter-spacing: -.8px; }
.brand-tagline { display: block; margin-top: 7px; font-size: 10px; color: #333; }
.primary-nav { margin-inline: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 30px; padding: 0; margin: 0; list-style: none; }
.primary-nav a { position: relative; display: block; padding: 10px 0; font-size: 14px; font-weight: 500; }
.primary-nav a::after { content: ""; position: absolute; right: 0; bottom: 0; width: 0; height: 2px; background: var(--ink); transition: width .2s ease; }
.primary-nav a:hover::after, .primary-nav .current-menu-item a::after { width: 100%; }
.header-actions { display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 47px; padding: 10px 24px; border: 1px solid #cfcfcf; border-radius: 8px; background: white; color: var(--ink); font-weight: 600; cursor: pointer; transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { border-color: #222; background: #222; color: #fff; }
.btn-sm { min-height: 42px; padding-inline: 25px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 22px; }

.hero { overflow: hidden; border-bottom: 1px solid #eee; }
.hero-grid { min-height: 500px; display: grid; grid-template-columns: 1fr 1.05fr; align-items: stretch; direction: ltr; }
.hero-grid > * { direction: rtl; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 70px 0 60px 55px; }
.eyebrow { margin: 0 0 13px; color: #373737; font-size: 14px; }
.hero h1 { margin: 0; max-width: 620px; font-size: clamp(34px, 4.3vw, 58px); line-height: 1.45; letter-spacing: -1.8px; }
.hero-lead { max-width: 610px; margin: 22px 0 28px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow { font-size: 24px; line-height: 1; }

.hero-visual { position: relative; min-height: 500px; background: linear-gradient(135deg, #f7f7f7 0%, #d9d9d7 100%); overflow: hidden; }
.hero-visual::before { content: ""; position: absolute; inset: 0; opacity: .45; background: repeating-linear-gradient(90deg, transparent 0 110px, rgba(255,255,255,.65) 111px 113px); }
.desk-line { position: absolute; right: -5%; bottom: 21%; width: 112%; height: 2px; background: rgba(0,0,0,.16); transform: rotate(-8deg); }
.books { position: absolute; left: 8%; top: 22%; width: 37%; height: 115px; transform: rotate(-5deg); }
.book { position: absolute; left: 0; width: 100%; height: 35px; border: 2px solid #333; border-radius: 3px; background: #c7c7c5; box-shadow: 0 8px 12px rgba(0,0,0,.1); }
.book:nth-child(2) { top: 38px; left: 5%; background: #a9a9a7; }
.book:nth-child(3) { top: 76px; left: -3%; background: #e3e3e1; }
.cup { position: absolute; right: 18%; top: 21%; width: 105px; height: 86px; border: 5px solid #555; border-top-color: #222; border-radius: 10px 10px 40px 40px; background: #e9e9e7; box-shadow: 0 16px 20px rgba(0,0,0,.13); }
.cup::before { content: ""; position: absolute; top: 13px; right: -42px; width: 42px; height: 38px; border: 5px solid #555; border-left: 0; border-radius: 0 28px 28px 0; }
.cup::after { content: ""; position: absolute; top: -10px; right: 10px; left: 10px; height: 13px; border-radius: 50%; background: #1a1a1a; }
.notebook { position: absolute; right: 6%; bottom: 3%; width: 73%; height: 190px; padding: 42px 45px; border: 1px solid #aaa; background: #f9f9f7; box-shadow: -14px 17px 26px rgba(0,0,0,.16); transform: rotate(-8deg); }
.notebook::before { content: ""; position: absolute; inset: 25px 30px; background: repeating-linear-gradient(0deg, transparent 0 28px, rgba(0,0,0,.09) 29px 30px); }
.note { position: relative; z-index: 1; display: block; font-family: var(--font-site); font-weight: 500; font-size: 22px; line-height: 1.8; transform: rotate(1deg); }
.leaf { position: absolute; width: 45px; height: 90px; border-radius: 100% 0 100% 0; background: #2f2f2f; opacity: .85; transform-origin: bottom center; }
.leaf.one { left: 7%; top: 4%; transform: rotate(43deg); }
.leaf.two { left: 14%; top: 1%; transform: rotate(78deg) scale(.75); }
.leaf.three { left: 2%; top: 11%; transform: rotate(15deg) scale(.65); }

.benefits { padding: 26px 0; background: #fafafa; border-bottom: 1px solid #eee; }
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.benefit { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; }
.icon-circle { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #f0f0ef; }
.icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.benefit h3 { margin: 1px 0 6px; font-size: 17px; }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; }

.section { padding: 70px 0; }
.section-soft { background: #fafafa; }
.section-head { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.section-head h2 { margin: 0 0 5px; font-size: clamp(28px, 3vw, 39px); line-height: 1.5; }
.section-head p { margin: 0; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: steps; }
.step { position: relative; min-height: 210px; padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; }
.step:not(:last-child)::after { content: "←"; position: absolute; left: -19px; top: 44%; z-index: 2; width: 38px; font-size: 26px; }
.step .icon { width: 34px; height: 34px; }
.step h3 { margin: 17px 0 8px; font-size: 20px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.comparison { display: grid; grid-template-columns: 1fr 62px 1fr; align-items: stretch; }
.compare-card { min-height: 240px; padding: 28px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #fff, #f4f4f3); }
.compare-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; font-size: 23px; }
.compare-card p { margin: 0; color: #3e3e3e; }
.compare-arrow { display: grid; place-items: center; font-size: 34px; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card { display: flex; min-height: 270px; padding: 28px; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service-card .icon { width: 42px; height: 42px; }
.service-card h3 { margin: 16px 0 7px; font-size: 22px; }
.service-card p { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.service-card .btn { width: 100%; min-height: 39px; margin-top: auto; padding: 6px 15px; }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { position: relative; min-height: 190px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.quote::before { content: "“"; position: absolute; left: 20px; top: 10px; color: #ccc; font: 400 70px/1 var(--font-site); }
.quote p { position: relative; margin: 0 0 22px; }
.person { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: #222; color: #fff; font-weight: 900; }
.person strong, .person span { display: block; }
.person span { color: var(--muted); font-size: 12px; }

.contact-section { overflow: hidden; background: #f0f0ed; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 55px; align-items: center; }
.contact-copy h2 { margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.5; }
.contact-copy p { margin: 0; color: var(--muted); }
.contact-form { padding: 30px; border: 1px solid #d4d4d1; border-radius: 18px; background: white; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 500; }
.field input, .field textarea { width: 100%; border: 1px solid #d5d5d5; border-radius: 8px; background: #fff; padding: 11px 13px; outline: 0; transition: border .2s ease, box-shadow .2s ease; }
.field input:focus, .field textarea:focus { border-color: #333; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.field textarea { min-height: 125px; resize: vertical; }
.file-note { color: var(--muted); font-size: 11px; }
.status { margin: 0 0 15px; padding: 10px 13px; border-radius: 7px; background: #e9f6ec; color: #175a27; font-size: 13px; }
.status.error { background: #fff0f0; color: #8a1c1c; }

.site-footer { padding: 36px 0; background: #141414; color: #fff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-copy { color: #bdbdbd; font-size: 13px; }
.footer-nav { display: flex; gap: 18px; font-size: 13px; }

.entry-shell { min-height: 65vh; padding: 70px 0; }
.entry-shell article { max-width: 840px; margin: auto; }
.entry-title { font-size: clamp(32px, 5vw, 55px); line-height: 1.4; }
.entry-content { font-size: 17px; }
.entry-content a { text-decoration: underline; }

@media (max-width: 980px) {
  .header-inner { min-height: 70px; }
  .menu-toggle { display: block; margin-right: auto; }
  .primary-nav { display: none; position: absolute; top: 70px; right: 20px; left: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 4px; }
  .primary-nav a { padding: 9px; }
  .header-actions { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 55px 0 45px; }
  .hero-visual { min-height: 390px; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2)::after { display: none; }
  .service-grid, .testimonials { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .brand-name { font-size: 24px; }
  .brand-tagline { display: none; }
  .hero-copy { padding-left: 0; }
  .hero h1 { font-size: 33px; letter-spacing: -.8px; }
  .hero-visual { min-height: 310px; }
  .notebook { width: 88%; height: 155px; padding: 32px 27px; }
  .note { font-size: 17px; }
  .cup { transform: scale(.75); }
  .benefit-grid, .steps, .service-grid, .testimonials { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .comparison { grid-template-columns: 1fr; gap: 12px; }
  .compare-arrow { transform: rotate(-90deg); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 20px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
