/* ==========================================================================
   امداد خودرو اردستان — Design System
   iOS-inspired glass UI · Light & Dark · RTL · No external dependencies
   ========================================================================== */

/* 1. Font ---------------------------------------------------------------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens -------------------------------------------------------------- */
:root {
  color-scheme: light;

  --font: "Vazirmatn", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;

  --bg: #f2f2f7;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: rgba(118, 118, 128, 0.07);
  --text: #1c1c1e;
  --text-2: #48484a;
  --muted: #6c6c70;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.26);

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.75);

  --accent: #ff9f0a;
  --accent-2: #b45309;
  --accent-soft: rgba(255, 159, 10, 0.14);
  --accent-ink: #1c1c1e;
  --call: #34c759;
  --call-soft: rgba(52, 199, 89, 0.14);
  --wa: #25d366;
  --link: #0b63ce;
  --danger: #ff3b30;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 18px 50px -16px rgba(16, 24, 40, 0.28);
  --shadow-amber: 0 12px 30px -10px rgba(255, 139, 0, 0.55);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --container: 1120px;
  --header-h: 64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --fs-display: clamp(2.15rem, 1.2rem + 4.2vw, 3.9rem);
  --fs-h2: clamp(1.55rem, 1.1rem + 1.9vw, 2.4rem);
  --fs-h3: clamp(1.05rem, 0.98rem + 0.3vw, 1.22rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --fs-body: 1.02rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --bg-2: #0b0b0f;
  --surface: rgba(28, 28, 30, 0.66);
  --surface-solid: #161619;
  --surface-soft: rgba(118, 118, 128, 0.16);
  --text: #f5f5f7;
  --text-2: #d1d1d6;
  --muted: #98989f;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);

  --glass: rgba(20, 20, 24, 0.6);
  --glass-strong: rgba(28, 28, 32, 0.82);
  --glass-border: rgba(255, 255, 255, 0.11);

  --accent: #ffb020;
  --accent-2: #ff9500;
  --accent-soft: rgba(255, 176, 32, 0.16);
  --call: #30d158;
  --call-soft: rgba(48, 209, 88, 0.16);
  --link: #409cff;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 24px 60px -18px rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #000000;
    --bg-2: #0b0b0f;
    --surface: rgba(28, 28, 30, 0.66);
    --surface-solid: #161619;
    --surface-soft: rgba(118, 118, 128, 0.16);
    --text: #f5f5f7;
    --text-2: #d1d1d6;
    --muted: #98989f;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);

    --glass: rgba(20, 20, 24, 0.6);
    --glass-strong: rgba(28, 28, 32, 0.82);
    --glass-border: rgba(255, 255, 255, 0.11);

    --accent: #ffb020;
    --accent-2: #ff9500;
    --accent-soft: rgba(255, 176, 32, 0.16);
    --call: #30d158;
    --call-soft: rgba(48, 209, 88, 0.16);
    --link: #409cff;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 30px rgba(0, 0, 0, 0.45);
    --shadow-2: 0 24px 60px -18px rgba(0, 0, 0, 0.85);
  }
}

/* 3. Reset --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100svh;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

img { height: auto; }

a {
  color: var(--link);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

ul, ol { padding: 0; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent-soft); }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* 4. Layout -------------------------------------------------------------- */
.container {
  width: min(var(--container), 100% - 2.4rem);
  margin-inline: auto;
}

.section { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }
.section--alt { background: var(--bg-2); }

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--surface-solid);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  font-weight: 700;
  transition: inset-block-start 0.2s var(--ease);
}
.skip:focus { inset-block-start: 0.75rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 4b. Icons -------------------------------------------------------------- */
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  vertical-align: -0.15em;
}

/* 5. Buttons ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-solid);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: var(--shadow-1);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn .ico { width: 20px; height: 20px; flex: none; }

.btn--primary {
  --btn-bg: linear-gradient(180deg, var(--accent), var(--accent-2));
  --btn-fg: var(--accent-ink);
  box-shadow: var(--shadow-amber);
}
.btn--wa {
  --btn-bg: var(--wa);
  --btn-fg: #fff;
  box-shadow: 0 12px 30px -12px rgba(37, 211, 102, 0.65);
}
.btn--dark {
  --btn-bg: #1c1c1e;
  --btn-fg: #fff;
}
:root[data-theme="dark"] .btn--dark { --btn-bg: #f5f5f7; --btn-fg: #1c1c1e; }
.btn--ghost {
  --btn-bg: color-mix(in srgb, var(--text) 6%, transparent);
  border-color: var(--line);
  box-shadow: none;
}
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.88rem; }

/* 6. Header -------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 90;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Header floating over the dark photo hero (light theme, at page top) */
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .brand { color: #fff; }
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .brand__text span { color: rgba(255, 255, 255, 0.82); }
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .brand__logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5); }
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .nav a { color: rgba(255, 255, 255, 0.92); }
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .nav a:hover,
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .icon-btn,
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .theme-switch {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .theme-switch button { color: rgba(255, 255, 255, 0.78); }
:root:not([data-theme="dark"]) .site-header--over:not(.is-scrolled):not(.is-solid) .theme-switch button[aria-pressed="true"] {
  background: #fff;
  color: #1c1c1e;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  margin-inline-end: auto;
}
.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}
.brand__text { display: grid; line-height: 1.25; }
.brand__text b { font-size: 0.98rem; font-weight: 800; }
.brand__text span { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav a {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: var(--surface-soft); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme switch */
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  height: 38px;
}
.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  border-radius: var(--r-pill);
  color: var(--muted);
  transition: background 0.25s var(--ease), color 0.25s, box-shadow 0.25s;
}
.theme-switch button .ico { width: 16px; height: 16px; }
.theme-switch button[aria-pressed="true"] {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.icon-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}
.icon-btn .ico { width: 20px; height: 20px; }

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding-inline: 0.95rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: var(--shadow-amber);
  white-space: nowrap;
}
.header-call .ico { width: 16px; height: 16px; }

/* 7. Mobile sheet -------------------------------------------------------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-content: end;
  visibility: hidden;
  pointer-events: none;
}
.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.sheet__panel {
  position: relative;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--glass-border);
  padding: 0.6rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom));
  transform: translateY(102%);
  transition: transform 0.42s var(--ease);
  max-height: 88svh;
  overflow: auto;
}
.sheet__grab {
  width: 38px;
  height: 5px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 0.35rem auto 0.9rem;
}
.sheet.is-open { visibility: visible; pointer-events: auto; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translateY(0); }

.sheet__links { display: grid; gap: 0.15rem; margin-block: 0.4rem 0.9rem; }
.sheet__links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.75rem;
  border-radius: var(--r-md);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.sheet__links a:last-child { border-bottom: 0; }
.sheet__links a:active { background: var(--surface-soft); }
.sheet__links .ico { width: 20px; height: 20px; color: var(--muted); }
.sheet__actions { display: grid; gap: 0.6rem; }

/* 8. Tab bar (mobile) ---------------------------------------------------- */
.tabbar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 85;
  display: none;
  padding: 0.35rem 0.75rem calc(0.35rem + env(safe-area-inset-bottom));
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--line);
}
.tabbar__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  max-width: 520px;
  margin-inline: auto;
}
.tabbar a {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0.35rem 0;
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}
.tabbar a .ico { width: 22px; height: 22px; }
.tabbar a.is-call { color: var(--call); }
.tabbar a.is-wa { color: var(--wa); }
.tabbar a:active { background: var(--surface-soft); }

/* 9. Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--header-h) + 2.5rem) clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(0, 0, 0, 0.15), transparent 60%),
    linear-gradient(180deg, rgba(6, 8, 12, 0.78) 0%, rgba(6, 8, 12, 0.62) 45%, var(--bg) 100%);
}
:root:not([data-theme="dark"]) .hero::after {
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(0, 0, 0, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(8, 12, 20, 0.76) 0%, rgba(8, 12, 20, 0.64) 55%, rgba(8, 12, 20, 0.66) 84%, rgba(8, 12, 20, 0.5) 94%, var(--bg) 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: clamp(420px, 62svh, 620px);
}
.hero__copy { color: #fff; }
.hero .eyebrow { color: #fff; }
.hero h1 {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.18;
  margin-block: 0.9rem 0.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero__sub {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  max-width: 46ch;
  margin-block-end: 1.6rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-end: 1.4rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  list-style: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}
.hero__meta li { display: inline-flex; align-items: center; gap: 0.35rem; }
.hero__meta .ico { width: 15px; height: 15px; color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--muted);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--call);
  box-shadow: 0 0 0 4px var(--call-soft);
  animation: breathe 2.6s var(--ease) infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px var(--call-soft); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

/* Glass quick card */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-2);
}
.quick {
  border-radius: var(--r-xl);
  padding: 1.35rem;
  color: var(--text);
}
.quick__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-end: 0.9rem;
}
.quick__head b { font-size: 1.05rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--call);
  background: var(--call-soft);
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
}
.status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.quick__phone {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--text);
  direction: ltr;
  text-align: right;
  margin-block-end: 0.15rem;
}
.quick__note { font-size: 0.8rem; color: var(--muted); margin-block-end: 0.9rem; }
.quick__actions { display: grid; gap: 0.5rem; }
.quick__rows {
  display: grid;
  gap: 0.55rem;
  margin-block-start: 1rem;
  padding-block-start: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--muted);
}
.quick__rows > div { display: flex; align-items: flex-start; gap: 0.5rem; }
.quick__rows .ico { width: 16px; height: 16px; color: var(--accent); margin-block-start: 5px; flex: none; }

/* 10. Trust strip -------------------------------------------------------- */
.trust {
  position: relative;
  z-index: 2;
  margin-block-start: -1.5rem;
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--r-md);
}
.trust__item + .trust__item { border-inline-start: 1px solid var(--line); }
.trust__item .ico { width: 22px; height: 22px; color: var(--accent); flex: none; }
.trust__item b { display: block; font-size: 0.9rem; line-height: 1.4; }
.trust__item span { font-size: 0.75rem; color: var(--muted); }

/* 11. Headings ----------------------------------------------------------- */
.section-head {
  max-width: 62ch;
  margin-block-end: clamp(1.6rem, 3vw, 2.6rem);
}
.section-head--center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  margin-block-end: 0.7rem;
}
:root[data-theme="dark"] .kicker { color: var(--accent); }
.section-head h2 {
  font-size: var(--fs-h2);
  margin-block-end: 0.55rem;
}
.section-head p { color: var(--muted); font-size: var(--fs-lead); }

/* 12. Cards / grids ------------------------------------------------------ */
.grid { display: grid; gap: 0.9rem; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}
a.card { color: inherit; }
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-block-end: 0.35rem;
}
:root[data-theme="dark"] .card__icon { color: var(--accent); }
.card__icon .ico { width: 24px; height: 24px; }
.card h3 { font-size: var(--fs-h3); font-weight: 800; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.85; }
.card__link {
  margin-block-start: auto;
  padding-block-start: 0.5rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
:root[data-theme="dark"] .card__link { color: var(--accent); }
.card__link .ico { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.card:hover .card__link .ico { transform: translateX(-3px); }

/* Feature list with checks */
.checks {
  list-style: none;
  display: grid;
  gap: 0.7rem;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-2);
}
.checks .ico {
  width: 20px; height: 20px;
  flex: none;
  color: var(--call);
  margin-block-start: 4px;
}

/* 13. Steps -------------------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.steps li {
  position: relative;
  counter-increment: step;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.steps li::before {
  content: counter(step, persian);
  position: absolute;
  inset-block-start: -14px;
  inset-inline-start: 1.25rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: var(--shadow-amber);
}
.steps h3 { font-size: 1rem; margin-block: 0.4rem 0.3rem; }
.steps p { font-size: 0.88rem; color: var(--muted); }

/* 14. Chips / areas ------------------------------------------------------ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}
.chips .ico { width: 14px; height: 14px; color: var(--accent); }

/* 15. Reviews ------------------------------------------------------------ */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.review {
  padding: 1.3rem;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars .ico { width: 15px; height: 15px; }
.review p { font-size: 0.92rem; color: var(--text-2); line-height: 1.95; }
.review footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-block-start: auto;
  padding-block-start: 0.4rem;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.85rem;
  flex: none;
}
:root[data-theme="dark"] .avatar { color: var(--accent); }
.review cite { font-style: normal; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.review small { display: block; font-size: 0.72rem; color: var(--muted); }

/* 16. FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: 0.6rem; max-width: 860px; }
.faq details {
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: clip;
}
.faq summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico {
  width: 18px; height: 18px;
  margin-inline-start: auto;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
  flex: none;
}
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details[open] summary { color: var(--accent-2); }
:root[data-theme="dark"] .faq details[open] summary { color: var(--accent); }
.faq .faq__body {
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.faq .faq__body > * + * { margin-block-start: 0.6rem; }

/* 17. Gallery ------------------------------------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.gallery button {
  position: relative;
  display: block;
  padding: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}
.gallery button:hover img { transform: scale(1.05); }
.gallery button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35));
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery button:hover::after { opacity: 1; }
.gallery button:first-child { grid-column: span 2; aspect-ratio: 2 / 1.5; }

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1000px, 94vw);
  max-height: 90svh;
  border-radius: var(--r-lg);
  overflow: visible;
}
dialog.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
dialog.lightbox img {
  width: 100%;
  max-height: 88svh;
  object-fit: contain;
  border-radius: var(--r-lg);
}
dialog.lightbox .lb-close {
  position: absolute;
  inset-block-start: -14px;
  inset-inline-end: -14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #1c1c1e;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-2);
}
dialog.lightbox .lb-close .ico { width: 20px; height: 20px; }

/* 18. CTA band ----------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(1.8rem, 4vw, 3rem);
  color: #fff;
  background:
    radial-gradient(120% 140% at 85% 0%, rgba(255, 176, 32, 0.28), transparent 55%),
    linear-gradient(135deg, #14161b 0%, #23262d 55%, #3a2a12 100%);
  box-shadow: var(--shadow-2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.4rem;
}
.cta-band h2 { font-size: var(--fs-h2); margin-block-end: 0.5rem; color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.78); max-width: 52ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta-band::before {
  content: "";
  position: absolute;
  inset-block-start: -60%;
  inset-inline-start: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 159, 10, 0.25), transparent 70%);
  pointer-events: none;
}

/* 19. Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 4vw, 3.5rem) 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-block: 0.8rem 1rem;
  max-width: 34ch;
}
.footer-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  margin-block-end: 0.8rem;
  letter-spacing: 0;
}
.footer-list { list-style: none; display: grid; gap: 0.5rem; }
.footer-list a, .footer-list span {
  color: var(--muted);
  font-size: 0.87rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.footer-list a:hover { color: var(--accent-2); }
:root[data-theme="dark"] .footer-list a:hover { color: var(--accent); }
.footer-list .ico { width: 15px; height: 15px; opacity: 0.8; }

.socials { display: flex; gap: 0.5rem; margin-block-start: 1rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), color 0.2s, background 0.2s;
}
.socials a:hover { transform: translateY(-2px); color: var(--accent-2); }
:root[data-theme="dark"] .socials a:hover { color: var(--accent); }
.socials .ico { width: 19px; height: 19px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-start: 2.2rem;
  padding-block-start: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}
.footer-bottom p { margin: 0; }
.footer-credit {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-credit a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-credit a:hover { color: var(--accent-2); border-bottom-color: currentColor; }
:root[data-theme="dark"] .footer-credit a:hover { color: var(--accent); }
.footer-credit .ico { width: 15px; height: 15px; }

/* 20. Breadcrumbs -------------------------------------------------------- */
.crumbs {
  padding-block: calc(var(--header-h) + 1.2rem) 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.crumbs li { display: inline-flex; align-items: center; gap: 0.35rem; }
.crumbs .ico { width: 13px; height: 13px; opacity: 0.6; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-2); }
.crumbs [aria-current="page"] { color: var(--text-2); font-weight: 600; }

/* 21. Page hero (inner pages) -------------------------------------------- */
.page-hero {
  padding-block: clamp(1.2rem, 3vw, 2rem) clamp(1.8rem, 4vw, 3rem);
  background:
    radial-gradient(90% 120% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-block: 0.5rem 0.75rem;
  max-width: 24ch;
}
.page-hero p {
  color: var(--muted);
  font-size: var(--fs-lead);
  max-width: 62ch;
}
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-block-start: 1.3rem; }

/* 22. Article ------------------------------------------------------------ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.2rem;
  align-items: start;
  padding-block: clamp(2rem, 4vw, 3rem);
}
.article {
  max-width: 72ch;
  font-size: 1.02rem;
  line-height: 2.05;
  color: var(--text-2);
}
.article > * + * { margin-block-start: 1.05rem; }
.article h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
  color: var(--text);
  margin-block-start: 2.2rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.article h3 {
  font-size: 1.12rem;
  color: var(--text);
  margin-block-start: 1.6rem;
}
.article p { margin: 0; }
.article a { font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 4px; }
.article a:hover { text-decoration-color: currentColor; }
.article ul, .article ol { padding-inline-start: 1.3rem; display: grid; gap: 0.4rem; }
.article li::marker { color: var(--accent-2); font-weight: 700; }
.article img { border-radius: var(--r-md); margin-block: 1.4rem; box-shadow: var(--shadow-1); }
.article blockquote {
  margin: 0;
  padding: 1rem 1.2rem;
  border-inline-start: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.95rem;
}
.article figure { margin: 1.4rem 0; }
.article figcaption { font-size: 0.78rem; color: var(--muted); text-align: center; margin-block-start: 0.5rem; }
.article strong { color: var(--text); font-weight: 800; }

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  margin-block: 1.4rem;
}
.article th, .article td {
  padding: 0.7rem 0.9rem;
  text-align: start;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
}
.article th { background: var(--surface-soft); font-weight: 800; color: var(--text); }
.article tr:last-child td { border-bottom: 0; }

.note {
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 0.92rem;
  color: var(--text-2);
}
.note b { color: var(--text); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-block: 0.9rem 1.4rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.article-meta .ico { width: 14px; height: 14px; }

/* Sidebar */
.side { display: grid; gap: 0.9rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.side__card {
  padding: 1.1rem;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.side__card h3 { font-size: 0.9rem; margin-block-end: 0.7rem; }
.side__card .toc { list-style: none; display: grid; gap: 0.35rem; font-size: 0.83rem; }
.side__card .toc a { color: var(--muted); display: block; padding-inline-start: 0.6rem; border-inline-start: 2px solid var(--line); line-height: 1.7; }
.side__card .toc a:hover { color: var(--accent-2); border-color: var(--accent); }
.side__cta {
  text-align: center;
  padding: 1.3rem;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #1b1d22, #2a2118);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-2);
}
.side__cta h3 { color: #fff; font-size: 1rem; margin-block-end: 0.4rem; }
.side__cta p { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; margin-block-end: 0.9rem; }
.side__cta .btn { width: 100%; }

/* Related posts */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.post-card img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.post-card__body { padding: 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.post-card__cat { font-size: 0.7rem; font-weight: 800; color: var(--accent-2); }
:root[data-theme="dark"] .post-card__cat { color: var(--accent); }
.post-card h3 { font-size: 0.95rem; line-height: 1.6; }
.post-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.8; }
.post-card time { font-size: 0.72rem; color: var(--muted); margin-block-start: auto; padding-block-start: 0.4rem; }

/* 23. Blog index --------------------------------------------------------- */
.blog-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.blog-featured img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }
.blog-featured__body { padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.blog-featured__body h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
.blog-featured__body p { color: var(--muted); font-size: 0.94rem; }

/* 24. Pricing rows ------------------------------------------------------- */
.rows { display: grid; gap: 0.5rem; }
.row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--line);
}
.row .ico { width: 20px; height: 20px; color: var(--accent-2); flex: none; margin-block-start: 4px; }
:root[data-theme="dark"] .row .ico { color: var(--accent); }
.row b { display: block; font-size: 0.92rem; }
.row span { font-size: 0.84rem; color: var(--muted); }

/* 25. Reveal animation --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.06s; }
.reveal[data-delay="2"] { transition-delay: 0.12s; }
.reveal[data-delay="3"] { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 26. Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .icon-btn { display: inline-flex; }
  .header-call { display: none; }
  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .quick { display: none; }
  .hero { padding-block-start: calc(var(--header-h) + 3rem); }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__item:nth-child(3) { border-inline-start: 0; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery button:first-child { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .side__card:not(.side__cta) { display: none; }
  .related { grid-template-columns: repeat(2, 1fr); }
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured img { min-height: 220px; }
  .cta-band { grid-template-columns: 1fr; }
  body { padding-block-end: 72px; }
  .tabbar { display: block; }
}

@media (max-width: 620px) {
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .trust__grid { grid-template-columns: 1fr; }
  .trust__item + .trust__item { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__meta { font-size: 0.78rem; gap: 0.4rem 0.8rem; }
  .related { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery button:first-child { grid-column: auto; aspect-ratio: 4 / 3; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .breadcrumb { font-size: 0.75rem; }
}

/* 27. Fallbacks / enhancements ------------------------------------------ */
@supports not (backdrop-filter: blur(1px)) {
  .site-header.is-scrolled,
  .site-header.is-solid,
  .tabbar { background: var(--surface-solid); }
  .quick { background: var(--surface-solid); }
}

@supports (padding: max(0px)) {
  .site-footer { padding-block-end: max(1.5rem, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-transparency: reduce) {
  .glass, .site-header, .tabbar, .sheet__panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--surface-solid);
  }
}

/* Content-visibility for long pages (keeps first paint fast) */
.section--defer { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Print */
@media print {
  .site-header, .tabbar, .site-footer, .cta-band, .side, .breadcrumb { display: none !important; }
  body { background: #fff; color: #000; }
}
