:root {
  --ink: #1f0b24;
  --ink-soft: #4a3d4f;
  --muted: #6e6474;
  --plum: #2e0f2f;
  --plum-mid: #4b2a4d;
  --plum-soft: #6b4a6e;
  --gold: #b08d3c;
  --gold-soft: #e7dcc4;
  --bg: #f3f2f0;
  --bg-alt: #ebe7e2;
  --card: #ffffff;
  --line: #d9d3cc;
  --radius: 4px;
  --wrap: 1140px;
  --font-fa: "Vazirmatn", Tahoma, sans-serif;
  --font-en: "Montserrat", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-fa);
  line-height: 2;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body[lang="en"] { font-family: var(--font-en); line-height: 1.75; font-size: 16px; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.22rem; font-weight: 600; }
p { margin: 0 0 1em; }
em { font-style: italic; }

/* English headings use the serif display face, with italic emphasis */
body[lang="en"] h1,
body[lang="en"] h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
}
body[lang="en"] h1 em, body[lang="en"] h2 em { font-weight: 500; }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 48px)); margin-inline: auto; }
.muted { color: var(--muted); font-size: .95rem; }
.sub { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }
.light { color: #efe7f1; }
.contact-band .muted.light, .contact-band .sub.light { color: #cdbfd3; }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--gold); font-weight: 600; font-size: .9rem;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px;
}
.kicker::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
body[lang="fa"] .kicker { letter-spacing: 0; text-transform: none; font-size: 1rem; }
body[lang="fa"] .kicker::before { display: none; }
body[lang="fa"] .kicker { border-inline-start: 2px solid var(--gold); padding-inline-start: 12px; }

.skip {
  position: absolute; inset-inline-start: -999px; top: 0;
  background: var(--plum); color: #fff; padding: 8px 12px; z-index: 10;
}
.skip:focus { inset-inline-start: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 28px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--plum); text-decoration: none; font-weight: 800; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform .25s ease;
}
.nav a:hover::after { transform: scaleX(1); }
.bar-end { display: flex; align-items: center; gap: 14px; }
.lang {
  font: inherit; font-size: .88rem; cursor: pointer;
  border: 0; background: transparent; color: var(--ink); padding: 6px 2px;
}

.menu-btn {
  display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
  position: relative;
}
.menu-btn span {
  position: absolute; inset-inline: 10px; height: 2px; background: var(--plum); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.menu-btn span:nth-child(1) { top: 14px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 28px; }
.menu-btn.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius); border: 1.5px solid var(--plum);
  transition: background .2s, color .2s, border-color .2s; font-size: .95rem; line-height: 1.4;
}
.btn.small { padding: 9px 18px; font-size: .88rem; }
.btn.primary { background: var(--plum); color: #fff; }
.btn.primary:hover { background: var(--plum-mid); border-color: var(--plum-mid); }
.btn.ghost { background: transparent; color: var(--plum); }
.btn.ghost:hover { background: var(--plum); color: #fff; }
.btn.light { background: #fff; color: var(--plum); border-color: #fff; }
.btn.light:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--plum);
  font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 3px;
}
.link-arrow:hover { color: var(--gold); }

/* Hero: text-first, no video */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px;
  align-items: center; padding: 96px 0 104px;
}

/* Reading thread (built by main.js): the faint track shows the way ahead,
   the gold fill follows the reader, and each heading has a dot */
.thread {
  position: absolute; width: 2px; z-index: 2; pointer-events: none;
  background: color-mix(in srgb, var(--gold) 40%, transparent);
}
.thread-fill { position: absolute; top: 0; left: 0; width: 2px; height: 0; background: var(--gold); }
.thread-tip, .thread-node { position: absolute; left: 50%; border-radius: 50%; }
.thread-tip {
  z-index: 1; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; top: 0;
  background: var(--gold); animation: thread-pulse 2.2s ease-out infinite;
}
.thread-node {
  z-index: 2; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  background: var(--bg); border: 2px solid color-mix(in srgb, var(--gold) 55%, transparent);
  transition: background .35s, border-color .35s, transform .35s;
}
.thread-node.on { background: var(--plum); border-color: var(--gold); transform: scale(1.2); }
.thread.done .thread-tip { animation: none; opacity: 0; }
@keyframes thread-pulse {
  0% { box-shadow: 0 0 0 0 rgba(176, 141, 60, .55); }
  70% { box-shadow: 0 0 0 14px rgba(176, 141, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(176, 141, 60, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .thread-tip { animation: none; }
  .thread-node { transition: none; }
}
@media print { .thread { display: none; } }
/* Leave room beside the content for the thread */
@media (min-width: 861px) {
  body.has-thread main .wrap { width: min(var(--wrap), calc(100% - 136px)); }
  body.has-thread main .narrow { width: min(760px, calc(100% - 136px)); }
}
.eyebrow { color: var(--gold); font-weight: 600; font-size: .92rem; margin-bottom: 20px; letter-spacing: .02em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 50ch; margin-top: 22px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 0; }
.notice {
  display: inline-block; border-inline-start: 2px solid var(--gold);
  padding: 4px 16px; margin: 26px 0 0; font-size: .95rem; color: var(--ink-soft); max-width: 56ch;
}
.chips { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.chips li { color: var(--muted); font-size: .9rem; }
.chips li::before { content: "— "; color: var(--gold); }
.hero-img { margin: 0; position: relative; }
.hero-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-tag {
  position: absolute; bottom: 22px; inset-inline-start: -22px;
  background: var(--plum); color: #fff; padding: 10px 18px; font-size: .88rem; letter-spacing: .04em;
}

/* Feelings: dark band, large type */
.feelings { background: var(--plum); color: #f1ebf3; padding: 96px 0; }
.feelings h2 { color: #fff; margin-bottom: 36px; }
body[lang="en"] .feelings h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.feel-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.feel-list li {
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.6; padding: 26px 0;
  border-top: 1px solid rgba(231, 220, 196, .3);
}
.feel-list li:nth-child(n+3) { border-bottom: 1px solid rgba(231, 220, 196, .3); }
.feel-close { margin: 40px 0 0; color: #cdbfd3; max-width: 60ch; font-size: 1.05rem; }

/* Sections */
.section { padding: 112px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { margin-bottom: .4em; }

/* Offers: featured dark card + two light ones */
.offers {
  display: grid; gap: 20px; margin-top: 52px;
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: stretch;
}
.offer {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 32px; display: flex; flex-direction: column; gap: 4px;
}
.offer h3 { margin-top: 6px; color: var(--plum); }
.offer p { color: var(--ink-soft); font-size: .97rem; margin: 0 0 18px; }
.offer .link-arrow { margin-top: auto; align-self: flex-start; }
.offer .btn { margin-top: auto; align-self: flex-start; }
.offer-tag {
  align-self: flex-start; font-size: .8rem; color: var(--gold); letter-spacing: .1em;
  text-transform: uppercase; font-weight: 600; margin: 0; border: 1px solid var(--gold-soft); padding: 2px 10px;
}
.offer.featured { background: var(--plum); border-color: var(--plum); color: #efe7f1; }
.offer.featured h3 { color: #fff; font-size: 1.5rem; }
.offer.featured p { color: #d6c9da; }
.tags { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: .86rem; color: #efe7f1; border: 1px solid rgba(231, 220, 196, .35);
  padding: 4px 12px; border-radius: 999px;
}

/* Approach steps */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); }
.steps li { border-top: 1px solid var(--gold); padding-top: 26px; }
.steps .num {
  display: block; font-family: var(--font-serif); font-style: italic;
  font-size: 3rem; color: var(--gold); line-height: 1; margin-bottom: 16px;
}
body[lang="fa"] .steps .num { font-family: var(--font-fa); font-style: normal; font-size: 2rem; font-weight: 800; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-soft); margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
.about-img { margin: 0; position: relative; }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-img::after {
  content: ""; position: absolute; top: -18px; inset-inline-end: -18px;
  width: 60%; height: 60%; border-top: 1px solid var(--gold); border-inline-end: 1px solid var(--gold);
  pointer-events: none;
}
.about-text h2 { margin-bottom: .6em; }
.about-text p { color: var(--ink-soft); font-size: 1.05rem; }
.about-text .link-arrow { margin-top: 10px; }

/* FAQ */
.faq-list { margin-top: 44px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 0; }
summary {
  cursor: pointer; list-style: none; padding: 24px 40px 24px 0;
  font-weight: 600; font-size: 1.1rem; color: var(--plum); position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; inset-inline-end: 0; top: 18px;
  font-size: 1.6rem; font-weight: 300; color: var(--gold); line-height: 1;
}
details[open] summary::after { content: "–"; }
details p { margin: 0 0 26px; color: var(--ink-soft); padding-inline-end: 40px; }

/* Contact band */
.contact-band { background: var(--plum); color: #f1ebf3; padding: 112px 0; text-align: start; }
.contact-band h2 { color: #fff; }
.contact-line { font-size: 1.2rem; margin-top: 22px; }
.contact-line a { color: var(--gold-soft); text-underline-offset: 4px; }

/* Photo band (used when a section needs an image break) */
.band { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; padding: 0; margin-bottom: 112px; }
.band img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Footer */
.site-footer { background: #1a0a1b; color: #cbbfd0; padding: 56px 0; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr auto; gap: 40px; align-items: start; }
.site-footer p { font-size: .93rem; color: #b8a9bd; margin: 0; }
.site-footer .brand-line { color: #fff; margin-bottom: 10px; }
.foot-nav { display: flex; flex-direction: column; gap: 10px; }
.foot-nav a { color: #e7dcc4; text-decoration: none; font-size: .95rem; }
.foot-nav a:hover { color: var(--gold); }
.site-footer .muted { color: #8a7b90; }

/* Magazine list as editorial cards */
.post-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.post-list li {
  background: var(--card); border: 1px solid var(--line); padding: 28px 28px 24px;
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .2s;
}
.post-list li:hover { border-color: var(--gold); transform: translateY(-2px); }
.post-list a { color: var(--plum); text-decoration: none; font-weight: 700; font-size: 1.08rem; line-height: 1.6; }
.post-list a:hover { color: var(--gold); }
.post-list .muted { margin-top: auto; font-size: .85rem; }

/* Articles (blog posts, magazine index, about) */
.article { padding: 72px 0 96px; max-width: 800px; }
.article h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); margin-bottom: .5em; }
.crumb { font-size: .92rem; margin-bottom: 14px; }
.crumb a { color: var(--gold); text-decoration: none; }
.prose { font-size: 1.1rem; line-height: 2.05; overflow-wrap: anywhere; color: var(--ink-soft); }
.prose > p:first-child { font-size: 1.2rem; color: var(--ink); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.3rem; margin-top: 1.5em; color: var(--ink); }
.prose a { color: var(--plum); text-underline-offset: 3px; }
.prose img { max-width: 100%; height: auto; margin: 20px auto; border-radius: var(--radius); }
.prose figure { margin: 28px 0; text-align: center; }
.prose figure img { margin: 0 auto; }
.prose figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px; }
.prose audio { width: 100%; margin: 14px 0; }
.prose [dir="ltr"] { text-align: left; }
body[lang="fa"] .article > [lang="en"] { font-family: var(--font-en); margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (min-width: 700px) { [dir="rtl"] .prose > p { text-align: justify; } }
.cta-end { margin-top: 48px; }
.notice-box {
  background: var(--card); border-inline-start: 3px solid var(--gold);
  padding: 18px 22px; margin: 40px 0; font-size: .98rem; line-height: 1.85; color: var(--ink-soft);
}
.related { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.45rem; }
.related .post-list { grid-template-columns: 1fr; }
.lead-small { color: var(--ink-soft); max-width: 60ch; font-size: 1.1rem; }

/* Tablet */
@media (max-width: 1024px) {
  .hero { gap: 48px; }
  .offers { grid-template-columns: 1fr 1fr; }
  .offer.featured { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { gap: 48px; }
  .nav { gap: 18px; }
}

/* Phones */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap, .narrow { width: calc(100% - 40px); }
  .bar { gap: 14px; }
  .nav {
    display: none; position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); margin: 0; padding: 8px 20px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a::after { display: none; }
  .menu-btn { display: block; }
  .bar-end .btn.small { display: none; }
  .bar-end { margin-inline-start: auto; gap: 8px; }
  .brand { min-width: 0; }
  .brand span { overflow: hidden; text-overflow: ellipsis; }
  .hero, .band, .about-grid, .foot-grid { grid-template-columns: 1fr; }
  .hero { gap: 40px; padding: 56px 0 64px; }
  body.has-thread main .wrap, body.has-thread main .narrow { width: auto; margin-inline-start: 44px; margin-inline-end: 20px; }
  .hero-img { order: -1; }
  .hero-img img { aspect-ratio: 4 / 3; }
  .hero-tag { inset-inline-start: 14px; bottom: 14px; }
  .feel-list { grid-template-columns: 1fr; gap: 0; }
  .feel-list li:nth-child(n+3) { border-bottom: 0; }
  .feel-list li:last-child { border-bottom: 1px solid rgba(231, 220, 196, .3); }
  .feelings, .contact-band { padding: 72px 0; }
  .section { padding: 72px 0; }
  .offers { grid-template-columns: 1fr; margin-top: 36px; }
  .offer { padding: 28px 24px; }
  .steps { margin-top: 36px; }
  .about-img { order: -1; }
  .about-img img { aspect-ratio: 4 / 3; }
  .about-img::after { display: none; }
  .about-grid { gap: 36px; }
  .band { gap: 28px; margin-bottom: 72px; }
  .band img { aspect-ratio: 4 / 3; }
  .post-list { grid-template-columns: 1fr; }
  .article { padding: 48px 0 72px; }
  .prose { font-size: 1.05rem; }
  .cta-row .btn { flex: 1 1 100%; text-align: center; }
}

/* Publish and update dates */
.post-meta { color: var(--muted); font-size: .9rem; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.post-meta time { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* Table of contents in articles */
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; margin: 0 0 40px;
}
.toc-title { font-weight: 700; color: var(--plum); margin: 0 0 10px; font-size: 1rem; }
.toc ol { margin: 0; padding-inline-start: 1.4em; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.toc li { margin: 6px 0; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: .96rem; }
.toc a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Services, prices, privacy and English pages */
a.lang { text-decoration: none; }
.service-grid { margin-top: 36px; }
.sub-h { font-size: 1.5rem; margin-top: 56px; color: var(--plum); }
.plain-list { padding-inline-start: 1.2em; color: var(--ink-soft); }
.plain-list li { margin: 8px 0; }
.article .notice-box { margin: 36px 0; }
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.contact-note {
  display: inline-block; color: #e7dcc4; border-inline-start: 2px solid var(--gold);
  padding: 4px 16px; margin: 18px 0 0; font-size: .98rem;
}
.service-grid .offer { min-height: 0; }

/* Back to top */
.to-top {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 15;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold);
  background: var(--plum); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--plum-mid); }
.to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Data tables and crisis box in articles */
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0 28px; font-size: .97rem; display: block; overflow-x: auto; }
.data-table th { background: var(--plum); color: #fff; font-weight: 600; text-align: start; padding: 10px 12px; }
.data-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; vertical-align: top; background: var(--card); }
.data-table tr:nth-child(even) td { background: var(--bg-alt); }
.crisis-box {
  display: block; background: #fff6f3; border: 1px solid #f0c9bd; border-inline-start: 4px solid #c0503a;
  padding: 16px 20px; margin: 28px 0; line-height: 1.9; color: var(--ink);
}
