/* ==========================================================================
   IRRANK — Digital Marketing & SEO Agency
   Design System / Light · Minimal · Professional
   ========================================================================== */

/* ---------- 0. Fonts (self-hosted, no external CDN) ---------------------- */
/* Vazirmatn v33.003 — SIL Open Font License 1.1
   https://github.com/rastikerdar/vazirmatn

   One variable file covers 400–800 (109KB vs 199KB for four static cuts),
   so the whole type system arrives in a single preloaded request.

   font-display: optional — the browser either has the font ready at first
   paint or keeps the fallback for that page load. It never swaps mid-render,
   which is what caused the visible font flash. */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Variable.woff2') format('woff2-variations'),
       url('../fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: optional;
}

/* Metric-matched fallback: keeps line boxes the same size as Vazirmatn so a
   fallback render doesn't reflow the layout. */
@font-face {
  font-family: 'Vazirmatn Fallback';
  src: local('Tahoma'), local('Segoe UI'), local('Arial');
  size-adjust: 96%;
  ascent-override: 92%;
  descent-override: 28%;
  line-gap-override: 0%;
}

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand */
  --brand-600: #2f5bff;
  --brand-500: #4a72ff;
  --brand-400: #7d97ff;
  --brand-100: #e4eaff;
  --brand-50:  #f2f5ff;

  --mint-600: #0fae8f;
  --mint-100: #d9f6ef;
  --mint-50:  #edfbf8;

  --amber-500: #f5a524;
  --amber-100: #fdeed2;

  /* Neutrals */
  --ink-900: #0d1226;
  --ink-800: #171d38;
  --ink-700: #2b3352;
  --ink-500: #5a6485;
  --ink-400: #7d87a6;
  --ink-300: #a8b0c6;

  --line:     #e7eaf3;
  --line-2:   #f0f2f8;
  --surface:  #ffffff;
  --bg:       #fbfcfe;
  --bg-soft:  #f5f7fc;

  /* Shape */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Elevation */
  --sh-1: 0 1px 2px rgba(13, 18, 38, .04), 0 1px 3px rgba(13, 18, 38, .04);
  --sh-2: 0 4px 14px rgba(13, 18, 38, .05), 0 1px 3px rgba(13, 18, 38, .04);
  --sh-3: 0 18px 44px rgba(13, 18, 38, .08), 0 2px 8px rgba(13, 18, 38, .04);
  --sh-brand: 0 12px 30px rgba(47, 91, 255, .22);

  /* Rhythm */
  --wrap: 1180px;
  --wrap-narrow: 860px;
  --gutter: 22px;

  --ff: "Vazirmatn", "Vazirmatn Fallback", "IRANSansX", "IRANSans", "Segoe UI", Tahoma, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 16.5px;
  line-height: 2.15;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink-900); }
ul, ol { padding-inline-start: 1.35rem; }
li { margin-block: .38rem; }

h1, h2, h3, h4, h5 {
  color: var(--ink-900);
  font-weight: 800;
  line-height: 1.62;
  margin: 0 0 .7em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.2rem, .81rem + 1.5vw, 1.89rem); line-height: 1.6; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.35vw, 2.15rem); line-height: 1.5; }
h3 { font-size: clamp(1.18rem, 1.02rem + .6vw, 1.42rem); }
h4 { font-size: 1.08rem; }
p  { margin: 0 0 1.15em; }

::selection { background: var(--brand-100); color: var(--ink-900); }

:focus-visible {
  outline: 3px solid var(--brand-400);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------- 3. Layout helpers -------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(56px, 6vw, 104px); }
.section--soft { background: var(--bg-soft); }
.section--white { background: var(--surface); }
.section--line { border-block: 1px solid var(--line); }

.center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 4. Atoms ----------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 7px 16px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
  line-height: 1.8;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, .14);
}
.eyebrow--mint { color: var(--mint-600); background: var(--mint-50); border-color: var(--mint-100); }
.eyebrow--mint::before { background: var(--mint-600); box-shadow: 0 0 0 4px rgba(15, 174, 143, .14); }

.lead {
  font-size: clamp(1.02rem, .96rem + .35vw, 1.16rem);
  color: var(--ink-500);
  line-height: 2.15;
}

.sec-head { max-width: 720px; margin-bottom: 46px; }
.sec-head.center { margin-inline: auto; }
.sec-head p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
  white-space: nowrap;
  line-height: 1.8;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(47, 91, 255, .3); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink-800);
  border-color: var(--line);
  box-shadow: var(--sh-1);
}
.btn-ghost:hover { color: var(--brand-600); border-color: var(--brand-400); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: .88rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 13px; }

/* ---------- 5. Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(13, 18, 38, .05); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand .logo { height: 42px; width: auto; }

/* inline lockup — the Persian logotype needs the page webfont, so the
   SVG is inlined rather than loaded through <img>.
   direction must stay ltr: under the page's rtl, text-anchor="end"
   flips and the wordmark lands on top of the mark. */
.logo { display: block; direction: ltr; }
.logo-word {
  font-family: var(--ff);
  font-size: 25px;
  font-weight: 800;
  fill: var(--ink-900);
}
.logo-sub {
  font-family: var(--ff);
  font-size: 7.6px;
  font-weight: 700;
  letter-spacing: 1.9px;
  fill: var(--ink-400);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  list-style: none;
  padding: 0;
}
.nav-links li { margin: 0; }
.nav-links a {
  display: block;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink-700);
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink-900); }
.nav-links a.is-active { color: var(--brand-600); background: var(--brand-50); }

/* duplicate of .nav-cta — only surfaces inside the mobile drawer */
.nav-links .m-cta { display: none; }

.nav-cta { flex: none; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 0;
  place-items: center;
  margin-inline-start: auto;
}
.burger span {
  display: block;
  width: 19px; height: 2px;
  background: var(--ink-800);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger span + span { margin-top: 4.5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 6. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(52px, 6vw, 96px) clamp(56px, 6vw, 100px);
  background:
    radial-gradient(760px 420px at 78% -8%, var(--brand-50) 0%, transparent 62%),
    radial-gradient(620px 380px at 12% 6%, var(--mint-50) 0%, transparent 60%),
    var(--surface);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 54px;
  align-items: center;
}
.hero h1 { margin-bottom: .55em; }
.hero h1 .hl {
  background: linear-gradient(120deg, var(--brand-600), var(--mint-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { margin-bottom: 30px; max-width: 44ch; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--ink-500);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--mint-600); flex: none; }

/* Hero visual card */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: 26px;
}
.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 18px;
}
.hero-card-top strong { font-size: .95rem; color: var(--ink-900); }
.pill {
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--mint-50);
  color: var(--mint-600);
  border: 1px solid var(--mint-100);
  line-height: 1.9;
}

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 13px 12px;
  text-align: center;
}
.kpi b { display: block; font-size: 1.22rem; color: var(--ink-900); line-height: 1.7; }
.kpi span { font-size: .72rem; color: var(--ink-400); }

.bars { display: flex; align-items: flex-end; gap: 9px; height: 132px; padding-top: 6px; }
.bars i {
  flex: 1;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
  opacity: .28;
  animation: growBar 1.1s cubic-bezier(.22, 1, .36, 1) both;
}
.bars i:last-child { opacity: 1; background: linear-gradient(180deg, var(--mint-600), #089176); }
@keyframes growBar { from { height: 6% !important; opacity: .08; } }

.bars-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: .74rem;
  color: var(--ink-400);
}

/* ---------- 7. Cards ----------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 27px;
  box-shadow: var(--sh-1);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--brand-100); }
.card h3 { margin-bottom: .55em; }
.card p { color: var(--ink-500); font-size: .95rem; margin-bottom: 0; }

.card-ico {
  width: 50px; height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
}
.card-ico svg { width: 23px; height: 23px; }
.card-ico.mint { background: var(--mint-50); color: var(--mint-600); border-color: var(--mint-100); }
.card-ico.amber { background: var(--amber-100); color: #b9761a; border-color: #f9dfb4; }
.card-ico.ink { background: var(--bg-soft); color: var(--ink-800); border-color: var(--line); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  font-size: .89rem;
  font-weight: 700;
  color: var(--brand-600);
}
.card-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
.card:hover .card-link svg { transform: translateX(-4px); }

.card-list { list-style: none; padding: 0; margin: 18px 0 0; }
.card-list li {
  position: relative;
  padding-inline-start: 24px;
  font-size: .9rem;
  color: var(--ink-500);
  margin-block: .5rem;
}
.card-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .92em;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--brand-400);
}

/* ---------- 8. Stats bar ------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 30px 22px; text-align: center; }
.stat b { display: block; font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.5rem); color: var(--ink-900); line-height: 1.5; letter-spacing: -.02em; }
.stat span { font-size: .87rem; color: var(--ink-400); }

/* ---------- 9. Process --------------------------------------------------- */
.steps { counter-reset: st; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}
.step::before {
  counter-increment: st;
  content: "0" counter(st);
  position: absolute;
  top: 14px;
  inset-inline-start: 18px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--bg-soft);
  line-height: 1;
  letter-spacing: -.04em;
}
.step h3 { font-size: 1.08rem; margin-bottom: .5em; position: relative; }
.step p { font-size: .92rem; color: var(--ink-500); margin: 0; position: relative; }

/* ---------- 10. Page hero (inner) ---------------------------------------- */
.page-hero {
  padding-block: clamp(38px, 4.5vw, 68px) clamp(34px, 4vw, 56px);
  background:
    radial-gradient(700px 340px at 82% -20%, var(--brand-50) 0%, transparent 62%),
    radial-gradient(520px 300px at 6% 0%, var(--mint-50) 0%, transparent 58%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: .45em; }
.page-hero .lead { max-width: 66ch; margin-bottom: 0; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-size: .82rem;
  color: var(--ink-400);
}
.crumbs li { margin: 0; display: flex; align-items: center; gap: 9px; }
.crumbs li:not(:last-child)::after { content: "‹"; color: var(--ink-300); }
.crumbs a { color: var(--ink-500); font-weight: 600; }
.crumbs a:hover { color: var(--brand-600); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 17px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink-700);
  box-shadow: var(--sh-1);
}
.fact svg { width: 15px; height: 15px; color: var(--brand-600); flex: none; }

/* ---------- 11. Article layout ------------------------------------------- */
.doc {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  box-shadow: var(--sh-1);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.toc strong {
  display: block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-400);
  margin-bottom: 14px;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 7px 11px;
  border-radius: var(--r-xs);
  font-size: .855rem;
  font-weight: 600;
  color: var(--ink-500);
  line-height: 1.85;
  border-inline-start: 2px solid transparent;
}
.toc a:hover { background: var(--bg-soft); color: var(--ink-900); }
.toc a.is-active { color: var(--brand-600); background: var(--brand-50); border-inline-start-color: var(--brand-500); }

.article { min-width: 0; }
.article > section { margin-bottom: 52px; scroll-margin-top: 96px; }
.article > section:last-child { margin-bottom: 0; }
.article h2 { position: relative; padding-top: 4px; }
.article h2::after {
  content: "";
  display: block;
  width: 54px; height: 3px;
  border-radius: 3px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--brand-500), var(--mint-600));
}
.article h3 { margin-top: 2em; }
.article p, .article li { color: var(--ink-700); }
.article ul, .article ol { margin-bottom: 1.3em; }
.article strong { color: var(--ink-900); font-weight: 700; }

.article a:not(.btn):not(.card-link) {
  font-weight: 700;
  border-bottom: 1.5px solid var(--brand-100);
  padding-bottom: 1px;
}
.article a:not(.btn):not(.card-link):hover { border-bottom-color: var(--brand-500); }

/* Callouts */
.note {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-inline-start: 4px solid var(--brand-500);
  border-radius: var(--r-md);
  padding: 22px 24px;
  margin: 30px 0;
}
.note p:last-child { margin-bottom: 0; }
.note b, .note strong { color: var(--ink-900); }
.note--mint { background: var(--mint-50); border-color: var(--mint-100); border-inline-start-color: var(--mint-600); }
.note--amber { background: #fffaf0; border-color: var(--amber-100); border-inline-start-color: var(--amber-500); }

.note-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 8px;
  font-size: 1rem;
}
.note-title svg { width: 18px; height: 18px; flex: none; color: var(--brand-600); }
.note--mint .note-title svg { color: var(--mint-600); }
.note--amber .note-title svg { color: var(--amber-500); }

/* Tables */
.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 26px 0;
  box-shadow: var(--sh-1);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
thead th {
  background: var(--bg-soft);
  color: var(--ink-900);
  font-weight: 800;
  text-align: right;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: .88rem;
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink-500); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdff; }
tbody td:first-child { color: var(--ink-900); font-weight: 700; }

/* Checklist */
.check { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 11px; }
.check li {
  position: relative;
  padding: 13px 52px 13px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .93rem;
  margin: 0;
  color: var(--ink-700);
}
.check li::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--mint-50);
  border: 1px solid var(--mint-100);
}
.check li::after {
  content: "";
  position: absolute;
  inset-inline-start: 22px;
  top: 50%;
  width: 8px; height: 4px;
  border-inline-start: 2px solid var(--mint-600);
  border-bottom: 2px solid var(--mint-600);
  transform: translateY(-70%) rotate(-45deg);
}

/* Inline metric strip */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 18px;
  box-shadow: var(--sh-1);
}
.metric b { display: block; font-size: 1.45rem; color: var(--brand-600); line-height: 1.6; }
.metric span { font-size: .84rem; color: var(--ink-400); }

/* ---------- 12. FAQ ------------------------------------------------------ */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px 22px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details[open] { border-color: var(--brand-100); box-shadow: var(--sh-2); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 17px 0;
  font-weight: 700;
  color: var(--ink-900);
  font-size: .99rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.95;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .25s ease, background .25s ease;
  background-image:
    linear-gradient(var(--ink-700), var(--ink-700)),
    linear-gradient(var(--ink-700), var(--ink-700));
  background-size: 9px 1.6px, 1.6px 9px;
  background-position: center, center;
  background-repeat: no-repeat;
}
.faq details[open] summary::after { transform: rotate(135deg); background-color: var(--brand-50); }
.faq details > div { padding: 0 0 20px; color: var(--ink-500); font-size: .94rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- 13. CTA ------------------------------------------------------ */
.cta {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(38px, 5vw, 62px);
  background:
    radial-gradient(520px 320px at 88% 0%, rgba(15, 174, 143, .34) 0%, transparent 60%),
    linear-gradient(135deg, #16224d 0%, #1d2f6d 55%, #24409c 100%);
  color: #e8ecf8;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(13, 18, 38, .2);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 76% 24%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 76% 24%, #000, transparent 72%);
}
.cta > * { position: relative; }
.cta h2 { color: #fff; margin-bottom: .5em; }
.cta h2::after { display: none; }
.cta p { color: #c3ccea; max-width: 60ch; }
.cta .eyebrow { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
.cta .eyebrow::before { background: var(--mint-600); box-shadow: 0 0 0 4px rgba(15, 174, 143, .25); }

.mail-box {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  background: rgba(255, 255, 255, .95);
  border-radius: var(--r-pill);
  padding: 11px 13px 11px 26px;
  margin-top: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
  flex-wrap: wrap;
}
.mail-box .mb-ico {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff;
  flex: none;
}
.mail-box .mb-ico svg { width: 19px; height: 19px; }
.mail-box small { display: block; font-size: .74rem; color: var(--ink-400); line-height: 1.7; }
.mail-box a {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink-900);
  direction: ltr;
  letter-spacing: .01em;
}
.mail-box a:hover { color: var(--brand-600); }

/* ---------- 14. Next pages nav ------------------------------------------- */
.nextnav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nextnav a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 22px;
  box-shadow: var(--sh-1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.nextnav a:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--brand-100); }
.nextnav small { display: block; font-size: .76rem; color: var(--ink-400); margin-bottom: 6px; }
.nextnav b { display: block; color: var(--ink-900); font-size: 1rem; margin-bottom: 6px; }
.nextnav span { font-size: .86rem; color: var(--ink-500); line-height: 1.9; }

/* ---------- 15. Footer --------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(46px, 5vw, 72px) 0;
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
}
.foot-brand .logo { height: 44px; margin-bottom: 20px; }
.foot-brand p { font-size: .92rem; color: var(--ink-500); max-width: 34ch; }
.foot-col h4 {
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-400);
  margin-bottom: 16px;
  font-weight: 700;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-block: .48rem; }
.foot-col a { font-size: .92rem; color: var(--ink-500); font-weight: 600; }
.foot-col a:hover { color: var(--brand-600); }

.foot-mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.foot-mail svg { width: 19px; height: 19px; color: var(--brand-600); flex: none; }
.foot-mail small { display: block; font-size: .73rem; color: var(--ink-400); line-height: 1.7; }
.foot-mail a { font-weight: 800; color: var(--ink-900); direction: ltr; font-size: .97rem; }
.foot-mail a:hover { color: var(--brand-600); }

.foot-bar {
  border-top: 1px solid var(--line);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .85rem;
  color: var(--ink-400);
}
.foot-bar a { font-weight: 700; color: var(--ink-700); }
.foot-bar a:hover { color: var(--brand-600); }
.designer { display: inline-flex; align-items: center; gap: 7px; }
.designer svg { width: 14px; height: 14px; color: var(--brand-500); }

/* ---------- 16. Utilities / motion --------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.reveal.in { opacity: 1; transform: none; }

.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 70;
  background: linear-gradient(90deg, var(--brand-600), var(--mint-600));
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform .12s linear;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  background: var(--ink-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-xs);
  z-index: 100;
}
.skip:focus { inset-inline-start: 12px; color: #fff; }

/* ---------- 17. Responsive ----------------------------------------------- */
@media (max-width: 1024px) {
  .doc { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; max-height: none; }
  .toc ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero-card { max-width: 520px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 880px) {
  .g-4, .g-3, .steps, .nextnav { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: 1fr; }

  .burger { display: grid; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gutter) 22px;
    box-shadow: var(--sh-3);
    margin: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; border-radius: var(--r-sm); font-size: .98rem; }
  .nav-links .m-cta { display: block; margin-top: 10px; }
  .nav-links .m-cta a {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    text-align: center;
  }
}

@media (max-width: 620px) {
  body { font-size: 16px; line-height: 2.1; }
  .g-4, .g-3, .g-2, .steps, .nextnav, .kpi-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .card { padding: 26px 22px; }
  .cta { border-radius: var(--r-lg); }
  .btn { width: 100%; }
  .btn-row { gap: 10px; }
  .mail-box { width: 100%; padding-inline: 13px; }
  .toc ol { grid-template-columns: 1fr; }
  .article > section { margin-bottom: 42px; }
}

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

@media print {
  .site-header, .toc, .cta, .site-footer, .progress, .nextnav { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .doc { grid-template-columns: 1fr; }
}
