:root {
  --bg: #f6f1ea;
  --bg-alt: #fffdf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7ddd2;
  --teal: #0f5c57;
  --teal-dark: #0a3f3b;
  --teal-soft: #d7ece9;
  --gold: #b0894d;
  --danger: #9f1239;
  --ok: #166534;
  --shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
  --radius: 16px;
  --max: 1120px;
  --text: 720px;
  --header: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.45; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.6em; }
h2 { font-size: 1.45rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.3em 0 0.4em; }
p { margin: 0 0 1em; }
ul, ol { padding-right: 1.3em; }

.skip {
  position: absolute;
  right: -999px;
}
.skip:focus {
  right: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(var(--text), calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  height: var(--header);
}
.header-inner {
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand:hover { text-decoration: none; color: var(--teal); }
.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"],
.nav-cta:hover {
  background: var(--teal-soft);
  color: var(--teal-dark);
  text-decoration: none;
}
.nav-cta {
  appearance: none;
  border: 0;
  background: var(--teal);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.nav-cta:hover {
  background: var(--teal-dark);
  color: #fff;
}
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
}

.hero {
  padding: 56px 0 40px;
}
.hero-kicker {
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.grid-3, .grid-2, .cards {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-top: 0.6em; }
.card p:last-child { margin-bottom: 0; }
.card img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.section { padding: 36px 0; }
.section-title { margin-top: 0; }

.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.point {
  padding: 16px;
  border-right: 3px solid var(--gold);
  background: var(--bg-alt);
}

.article-hero { padding: 36px 0 12px; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.meta-row { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.featured {
  border-radius: 18px;
  overflow: hidden;
  margin: 12px 0 28px;
  border: 1px solid var(--line);
}
.prose iframe, .prose video { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 12px; }
.prose img { border-radius: 12px; margin: 16px 0; }
.prose a { text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px; }
.video-wrap { margin: 20px 0; }

.form {
  display: grid;
  gap: 12px;
}
.form label { font-weight: 600; font-size: 0.92rem; }
.form input, .form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.form-status { min-height: 1.4em; font-size: 0.92rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  margin-top: 48px;
  padding: 36px 0 108px;
  border-top: 1px solid var(--line);
  background: #efe7dc;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.site-footer h2 { font-size: 1rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 6px; }

.sticky-consult {
  position: fixed;
  z-index: 55;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 92, 87, 0.28);
}
.sticky-consult:hover { background: var(--teal-dark); }

body.modal-open { overflow: hidden; }
.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.46);
}
.modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: var(--bg-alt);
  border-radius: 20px;
  padding: 28px 24px 22px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.18);
}
.modal-dialog h2 { margin-top: 0; }
.modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.cta-card {
  margin: 28px 0;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(160deg, #0f5c57 0%, #147a73 100%);
  color: #fff;
  border: 0;
}
.cta-card h2, .cta-card p { color: #fff; }
.cta-card .cta-kicker {
  margin: 0 0 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #d9c38a;
}
.cta-card .btn-primary {
  background: #fff;
  color: var(--teal-dark);
}
.cta-card .btn-primary:hover { background: var(--teal-soft); color: var(--teal-dark); }

.hero-home { padding: 28px 0 12px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}
.hero-visual {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 92, 87, 0.12);
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 340px;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
.service-card img { height: 180px; }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}
.about-visual {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
}
.about-visual img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
[data-reveal].is-in { opacity: 1; transform: none; }

.service-card .btn { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .hero-visual img { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .nav { transition: none; }
}

.post-list { display: grid; gap: 14px; }
.post-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.post-item img { width: 100%; height: 100%; object-fit: cover; min-height: 120px; }
.post-item-body { padding: 14px 14px 14px 0; }
.post-item h2 { margin: 0 0 8px; font-size: 1.1rem; }

.cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 24px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}
.chip:hover, .chip.active { background: var(--teal); color: #fff; text-decoration: none; border-color: var(--teal); }

@media (max-width: 860px) {
  .grid-3, .grid-2, .points, .footer-grid, .post-item,
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .site-header { position: sticky; }
  .nav {
    position: absolute;
    top: var(--header);
    right: 0;
    left: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: max-height 0.18s ease, opacity 0.16s ease, transform 0.16s ease, padding 0.16s ease;
  }
  .nav.open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    padding: 12px;
  }
  .hero { padding-top: 28px; }
  .hero-visual, .hero-visual img { min-height: 220px; }
  .sticky-consult {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
    padding: 14px 18px;
  }
}
