/* ==========================================================================
   DahuaNet — base.css
   توکن‌های طراحی، فونت، ریست، تایپوگرافی، چیدمان پایه و حرکت.
   برند: سبزآبی #14b8a6. سطح‌های رنگی سبزآبی عمیق و زنده‌اند تا متن و آیکن سفید روی آن‌ها
   خوانا بماند؛ سبزآبی روشن، فیروزه‌ای و نعنایی فقط درخشش و تأکیدند.
   ========================================================================== */

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

/* زاویه و درصد قابل انیمیشن، برای حلقه‌ی دسته‌ها، لبه‌ی چرخان و حلقه‌ی مشخصات */
@property --dn-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --dn-p { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  /* --- پالت --- */
  --brand: #14b8a6;       /* رنگ اصلی برند */
  --teal: #0d9488;        /* سبزآبی توپر */
  --teal-700: #0f766e;    /* لینک و متن رنگی روی سفید (۵٫۵) */
  --teal-800: #115e59;
  --teal-900: #134e4a;
  --night: #0b5d56;       /* پایه‌ی سطح‌های رنگی؛ متن سفید روی آن ۷ */
  --night-2: #0d7d72;
  --ink: #042f2c;         /* متن و تیتر */
  --aqua: #2dd4bf;        /* درخشش، فوکوس، تأکید روی سطح رنگی */
  --cyan: #22d3ee;
  --emerald: #6ee7b7;
  --mint: #a7f3d0;
  --sky: #5eead4;
  --sky-200: #99f6e4;
  --ice: #ccfbf1;
  --slate: #3d625e;
  --slate-300: #6b8f8a;
  --amber: #f5a524;       /* فقط تخفیف و نقطه‌ی تأکید؛ مکمل گرم سبزآبی */
  --amber-soft: #fff4dc;

  /* --- نقش‌ها --- */
  --fg: var(--ink);
  --fg-muted: var(--slate);
  --fg-subtle: #4a6f6a;
  --bg: #ffffff;
  --bg-soft: #f0fdfa;
  --bg-tint: var(--ice);
  --line: #d5efe9;
  --line-strong: var(--sky-200);
  --ink-solid: #042f2c;    /* سطح تیره در هر دو حالت (راهنما، نوار هشدار) */
  /* متن روی سطح سفید ثابت (دکمه‌ی سفید روی سطح رنگی، نقشه، لوگوی گارانتی)؛ در حالت تیره هم عوض نمی‌شود */
  --on-white-ink: #042f2c;
  --on-white-teal: #0f766e;
  --on-white-muted: #3d625e;
  --surface: #ffffff;      /* کارت و پنل روی زمینه */
  --surface-glass: rgba(255, 255, 255, .94);       /* نوارهای چسبان با blur */
  --surface-glass-soft: rgba(255, 255, 255, .86);
  --grad-icon: linear-gradient(135deg, #e6fbf6 0%, #ccfbf1 100%);
  --primary: var(--teal);
  --primary-strong: var(--teal-700);
  --primary-glow: var(--aqua);
  --on-primary: #ffffff;
  --accent: var(--amber);
  --on-accent: #3b2300;

  /* موفقیت سبز خالص است تا با رنگ اصلی سبزآبی اشتباه نشود */
  --success: #15803d;
  --success-bg: #e7f6ec;
  --danger: #c8281c;
  --danger-bg: #fdecea;
  --warning: #9a4a05;
  --warning-bg: #fff3df;

  /* روی سطح رنگی (هیرو، فوتر، فراخوان، بنر) */
  --on-dark: #ffffff;
  --on-dark-muted: rgba(240, 253, 250, .86);
  --on-dark-accent: var(--mint);
  --dark-line: rgba(255, 255, 255, .2);
  --glass: rgba(255, 255, 255, .12);
  --glass-strong: rgba(255, 255, 255, .2);
  --glass-line: rgba(255, 255, 255, .3);
  --ring-line: rgba(255, 255, 255, .16);   /* حلقه‌های لنز تزئینی روی سطح رنگی */
  --grid-line: rgba(255, 255, 255, .08);   /* شبکه‌ی پس‌زمینه روی سطح رنگی */

  /* دکمه و نشان: سبزآبی پررنگ ← برند ← فیروزه‌ای؛ متن سفید */
  --grad-brand: linear-gradient(120deg, #0f766e 0%, #0d9488 45%, #0e9aa7 100%);
  --grad-brand-hover: linear-gradient(120deg, #0d9488 0%, #14b8a6 55%, #06b6d4 100%);
  /* طیف تزئینی: فیروزه‌ای ← برند ← نعنایی؛ زیر متن به کار نمی‌رود */
  --grad-spectrum: linear-gradient(120deg, #22d3ee 0%, #14b8a6 50%, #6ee7b7 100%);
  --grad-aurora: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 50%, #22d3ee 100%);
  /* متن برجسته روی سفید */
  --grad-text: linear-gradient(120deg, #0f766e 0%, #0d9488 40%, #0891b2 100%);
  /* متن برجسته روی سطح رنگی */
  --grad-text-dark: linear-gradient(120deg, #ffffff 0%, #ccfbf1 45%, #a7f3d0 100%);
  /* سطح‌های رنگی: سبزآبی عمیق و زنده با هاله‌های فیروزه‌ای و نعنایی */
  --grad-night:
    radial-gradient(60% 80% at 0% 0%, rgba(45, 212, 191, .42) 0%, rgba(45, 212, 191, 0) 60%),
    radial-gradient(55% 70% at 100% 100%, rgba(34, 211, 238, .3) 0%, rgba(34, 211, 238, 0) 62%),
    radial-gradient(40% 50% at 70% 0%, rgba(110, 231, 183, .18) 0%, rgba(110, 231, 183, 0) 65%),
    linear-gradient(140deg, #0a524c 0%, #0b6b63 45%, #0c7f76 100%);
  /* بخش‌های روشن: هاله‌ی ملایم سبزآبی و فیروزه‌ای */
  --grad-soft:
    radial-gradient(60% 80% at 100% 0%, rgba(45, 212, 191, .14) 0%, rgba(45, 212, 191, 0) 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(34, 211, 238, .1) 0%, rgba(34, 211, 238, 0) 60%),
    #f0fdfa;
  --grad-media: radial-gradient(circle at 50% 38%, #ffffff 0%, #f0fdfa 50%, #dcfaf3 100%);
  /* بافت دانه‌ای ظریف روی سطح‌های رنگی */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* --- تایپوگرافی --- */
  --font: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  --font-code: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-2xs: .6875rem;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --fs-2xl: clamp(1.45rem, 1.2rem + 1.1vw, 1.95rem);
  --fs-3xl: clamp(1.8rem, 1.35rem + 2vw, 2.75rem);
  --fs-4xl: clamp(2.2rem, 1.5rem + 3.4vw, 4rem);

  /* --- شکل --- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-2xl: 44px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(4, 47, 44, .06), 0 1px 1px rgba(4, 47, 44, .04);
  --sh-2: 0 18px 40px -18px rgba(4, 47, 44, .24), 0 2px 6px -2px rgba(4, 47, 44, .08);
  --sh-3: 0 34px 70px -28px rgba(11, 93, 86, .45);
  --sh-glow: 0 14px 30px -12px rgba(13, 148, 136, .65);
  --sh-glow-lg: 0 22px 48px -16px rgba(20, 184, 166, .7);

  /* --- حرکت --- */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-1: .15s;
  --dur-2: .3s;
  --dur-3: .6s;

  /* --- چیدمان --- */
  --container: 1280px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(56px, 7.5vw, 112px);

  color-scheme: light;
}

/* ============================ حالت تیره ============================
   با <html data-theme="dark"> روشن می‌شود (اسکریپت سر صفحه آن را از انتخاب کاربر یا سیستم می‌گذارد).
   فقط نقش‌ها عوض می‌شوند؛ سطح‌های رنگی (هیرو، فوتر، بنر) همان می‌مانند. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --ink: #e4f5f2;
  --slate: #a6c4bf;
  --slate-300: #7fa39d;
  --teal-700: #5eead4;
  --teal-800: #99f6e4;
  --ice: #133632;
  --sky-200: #2c6b63;
  --amber-soft: #3b2c0e;

  --fg: #e4f5f2;
  --fg-muted: #a6c4bf;
  --fg-subtle: #94b5af;
  --bg: #0f201e;
  --bg-soft: #0a1715;
  --bg-tint: #143a36;
  --line: #1f3c38;
  --line-strong: #2c6b63;
  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --on-primary: #ffffff;

  --success: #4ade80;
  --success-bg: #0f2e1c;
  --danger: #f87171;
  --danger-bg: #3a1614;
  --warning: #fbbf24;
  --warning-bg: #36260b;

  --ink-solid: #021715;
  --surface: #122624;
  --surface-glass: rgba(11, 26, 24, .9);
  --surface-glass-soft: rgba(11, 26, 24, .8);
  --grad-icon: linear-gradient(135deg, #153f3a 0%, #10302d 100%);

  --grad-text: linear-gradient(120deg, #5eead4 0%, #2dd4bf 40%, #22d3ee 100%);
  --grad-soft:
    radial-gradient(60% 80% at 100% 0%, rgba(45, 212, 191, .1) 0%, rgba(45, 212, 191, 0) 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(34, 211, 238, .07) 0%, rgba(34, 211, 238, 0) 60%),
    #0a1715;
  /* عکس محصول‌ها زمینه‌ی سفید دارند؛ قاب عکس روشن می‌ماند ولی کمی کدرتر */
  --grad-media: radial-gradient(circle at 50% 38%, #f4faf9 0%, #e3eeec 55%, #cfdfdc 100%);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 1px rgba(0, 0, 0, .3);
  --sh-2: 0 18px 40px -18px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --sh-3: 0 34px 70px -28px rgba(0, 0, 0, .8);
}
:root[data-theme="dark"] ::selection { background: var(--teal); color: #fff; }
/* تعویض نرم رنگ‌ها هنگام زدن دکمه؛ فقط همان لحظه، تا انیمیشن‌های دیگر کند نشوند */
:root.theme-anim, :root.theme-anim *, :root.theme-anim *::before, :root.theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease !important;
}

/* ---------- ریست ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.85;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--fg);
  font-weight: 800;
  line-height: 1.4;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); font-weight: 900; line-height: 1.25; letter-spacing: -.015em; }
h2 { font-size: var(--fs-3xl); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 700; }

p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--sky-200); color: var(--ink); }

/* ---------- متن ---------- */
/* متن بلند (معرفی محصول، مطلب، برگه، توضیح دسته). محتوا از ویرایشگر و سایت قبلی می‌آید، پس فقط
   روی تگ‌های خام HTML استایل می‌گیرد: تیتر شماره‌دار، فهرست در کادر، جدول، نقل‌قول و تصویر. */
.prose { max-width: 70ch; color: var(--fg); line-height: 2.05; counter-reset: dn-h2; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose p:empty { display: none; }
.prose strong, .prose b { color: var(--ink); font-weight: 800; }
.prose a { color: var(--teal-700); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--sky-200); transition: text-decoration-color var(--dur-2); }
.prose a:hover { text-decoration-color: currentColor; }

/* تیترها: هرگز دوطرفه نه؛ شکستن خط متوازن */
.prose h2, .prose h3, .prose h4 { text-align: start; text-wrap: balance; line-height: 1.7; scroll-margin-top: calc(var(--header-offset, 80px) + 20px); }
.prose h2 strong, .prose h3 strong, .prose h4 strong { color: inherit; font-weight: inherit; }
/* تیتر h2: نشان شماره (۱، ۲، …) و خط تأکید کوتاه زیرش */
/* بلوک ساده، نه flex: تیترهای سایت قبلی چند <strong> پشت هم دارند که در flex ستون‌ستون می‌شدند */
.prose h2 {
  counter-increment: dn-h2;
  position: relative;
  margin-top: 2.2em;
  padding-bottom: 12px;
  padding-inline-start: 46px;
  font-size: var(--fs-xl);
  font-weight: 900;
}
.prose h2::before {
  content: counter(dn-h2, persian);
  position: absolute;
  inset-inline-start: 0;
  top: .05em;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--bg-tint);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--teal-700);
  font-size: var(--fs-sm);
  font-weight: 900;
  line-height: 1;
}
.prose h2::after {
  content: "";
  position: absolute;
  inset-inline-start: 46px;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
}
/* تیتر h3: لوزی کهربایی کوچک */
.prose h3 { position: relative; margin-top: 1.8em; padding-inline-start: 22px; font-size: var(--fs-lg); font-weight: 800; }
.prose h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: .72em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.prose h4 { margin-top: 1.5em; color: var(--teal-800); font-size: var(--fs-md); font-weight: 800; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .8em; }

/* فهرست‌ها: نشانه‌ی رنگی؛ فهرست سطح اول در کادر روشن */
.prose ul, .prose ol { padding-inline-start: 0; list-style: none; }
.prose li { position: relative; padding-inline-start: 26px; line-height: 1.95; }
.prose li + li { margin-top: .3em; }
.prose li > ul, .prose li > ol { margin-top: .45em; }
.prose ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: .78em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--bg-tint);
}
.prose ol { counter-reset: dn-ol; }
.prose ol > li { counter-increment: dn-ol; padding-inline-start: 36px; }
.prose ol > li::before {
  content: counter(dn-ol, persian);
  position: absolute;
  inset-inline-start: 0;
  top: .35em;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: var(--on-primary);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
}
.prose > ul, .prose > ol {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--bg-soft), var(--surface) 70%);
  box-shadow: var(--sh-1);
}
/* فهرستی که فقط یک تیتر را در بر گرفته (محتوای سایت قبلی) فهرست نیست */
.prose ul:has(> li > :is(h2, h3, h4)) { padding: 0; border: 0; background: none; box-shadow: none; }
.prose ul > li:has(> :is(h2, h3, h4)) { padding-inline-start: 0; }
.prose ul > li:has(> :is(h2, h3, h4))::before { content: none; }

/* جدول: کادر گرد، سرستون رنگی، ردیف‌های راه‌راه */
.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  border-spacing: 0;
  border-collapse: separate;
  font-size: var(--fs-sm);
  line-height: 1.9;
}
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose thead th, .prose tr:first-child > th { background: var(--bg-tint); color: var(--ink); font-weight: 800; }
.prose tbody th { color: var(--fg-muted); font-weight: 700; }
.prose tbody tr:nth-child(even) > td { background: var(--bg-soft); }
.prose tr:last-child > th, .prose tr:last-child > td { border-bottom: 0; }

/* نقل‌قول: کادر یادداشت با نشان گیومه */
.prose blockquote {
  position: relative;
  padding: 20px 24px 20px 24px;
  padding-inline-start: 58px;
  border-radius: var(--r-lg);
  border-inline-start: 4px solid var(--brand);
  background: linear-gradient(135deg, var(--bg-tint), var(--bg-soft) 60%, var(--surface));
  color: var(--ink);
  font-weight: 600;
}
.prose blockquote::before {
  content: "”";
  position: absolute;
  inset-inline-start: 18px;
  top: 6px;
  color: var(--brand);
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  opacity: .5;
}
.prose blockquote > :first-child { margin-top: 0; }

.prose img { display: block; height: auto; margin-inline: auto; border-radius: var(--r); box-shadow: var(--sh-2); }
.prose figure { display: grid; gap: 8px; margin: 0; }
.prose figcaption { color: var(--fg-subtle); font-size: var(--fs-xs); text-align: center; }
.prose code { padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); font-family: var(--font-code); font-size: .9em; }
.prose hr { border: 0; border-top: 1px dashed var(--line-strong); }

/* فهرست مطالب (مطلب، برگه، معرفی محصول): تیترهای h2 شماره‌دار، هم‌شماره با نشان تیتر در متن */
.toc { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(160deg, var(--bg-soft), var(--surface) 55%); box-shadow: var(--sh-1); }
.toc__title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-strong); font-size: var(--fs-sm); font-weight: 800; }
.toc__title .icon { color: var(--primary); }
.toc ol { display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; scrollbar-width: thin; counter-reset: dn-toc; list-style: none; padding: 0; margin: 0; }
.toc a {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: var(--fs-xs);
  line-height: 1.8;
  transition: color var(--dur-2), background var(--dur-2);
}
.toc a:not(.is-sub) { counter-increment: dn-toc; color: var(--fg); font-weight: 700; }
.toc a:not(.is-sub)::before {
  content: counter(dn-toc, persian);
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: .15em;
  border-radius: 6px;
  background: var(--bg-tint);
  color: var(--teal-700);
  font-size: var(--fs-2xs);
  font-weight: 900;
  line-height: 1;
}
.toc a.is-sub { padding-inline-start: 38px; }
.toc a:hover { background: var(--bg-soft); color: var(--fg); }
.toc a.is-active { background: var(--bg-tint); color: var(--teal-800); box-shadow: inset -3px 0 0 var(--brand); }
[dir="ltr"] .toc a.is-active { box-shadow: inset 3px 0 0 var(--brand); }
.toc a.is-active::before { background: var(--grad-brand); color: var(--on-primary); }
@media (max-width: 1024px) { .toc ol { max-height: none; } }
/* متن‌های بلند (محتوای برگه، مطلب، محصول، دسته و خلاصه‌ها) دوطرفه چیده می‌شوند؛
   خط آخر هر پاراگراف همان راست‌چین می‌ماند. متن‌های وسط‌چین (سرتیتر بخش‌ها) عمداً در فهرست نیستند. */
.prose p, .prose li, .prose blockquote, .prose dd,
.page-head p, .mag-head p, p.hero__in, .article-head__excerpt, .post-feature__excerpt,
.buy__excerpt, .comment__text, .review__text, .footer-brand__text {
  text-align: justify;
  text-justify: inter-word;
}

.text-muted { color: var(--fg-muted); }
.text-subtle { color: var(--fg-subtle); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.code { font-family: var(--font-code); font-size: .92em; letter-spacing: .01em; }
.num { font-variant-numeric: tabular-nums; }
.hl {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- چیدمان ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.container--narrow { max-width: 880px; }

.section { position: relative; padding-block: var(--section-y); }
.section--soft { background: var(--grad-soft); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }

.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.grid {
  display: grid;
  gap: var(--gap, 24px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 240px)), 1fr));
}
.grid > *, .stack > *, .cluster > * { min-width: 0; }

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

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink-solid);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- آیکن ---------- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.6em; height: 1.6em; }
.icon--flip { transform: scaleX(-1); }

/* ---------- نوار پیشرفت اسکرول ----------
   فقط مرورگرهایی که انیمیشن وابسته به اسکرول دارند؛ بقیه آن را نمی‌بینند. */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 150;
    display: block;
    height: 3px;
    background: var(--grad-spectrum);
    transform-origin: right center;
    transform: scaleX(0);
    animation: dn-progress linear both;
    animation-timeline: scroll(root);
    pointer-events: none;
  }
  [dir="ltr"] .scroll-progress { transform-origin: left center; }
}
@keyframes dn-progress { to { transform: scaleX(1); } }

/* ---------- ظهور هنگام اسکرول ----------
   بدون جاوااسکریپت همه‌چیز دیده می‌شود؛ کلاس js روی html فقط حالت شروع را پنهان می‌کند. */
.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(32px);
}
.js [data-reveal="fade"]:not(.is-in) { transform: none; }
.js [data-reveal="zoom"]:not(.is-in) { transform: scale(.92); }
.js [data-reveal="start"]:not(.is-in) { transform: translateX(40px); }
.js [data-reveal="end"]:not(.is-in) { transform: translateX(-40px); }
.js [data-reveal="blur"]:not(.is-in) { transform: translateY(18px) scale(.98); filter: blur(12px); }
.js [data-reveal="tilt"]:not(.is-in) { transform: perspective(900px) rotateX(16deg) translateY(36px); transform-origin: 50% 100%; }
/* clip: حالت پنهان فقط شفافیت است (نه clip-path)، چون عنصری که با clip-path کاملاً بریده شده
   برای IntersectionObserver دیده نمی‌شود و هرگز ظاهر نمی‌شد؛ بریدن به‌صورت انیمیشن پس از ورود اجرا می‌شود */
.js [data-reveal="clip"]:not(.is-in) { transform: none; }
.js [data-reveal="clip"].is-in { animation: dn-clip-in 1.1s var(--ease-out) calc(var(--i, 0) * 90ms) both; }
@keyframes dn-clip-in { from { opacity: 1; clip-path: inset(0 0 100% 0 round var(--r-xl)); } to { opacity: 1; clip-path: inset(0 0 0 0 round var(--r-xl)); } }
.js [data-reveal="pop"]:not(.is-in) { transform: scale(.6); }
/* .js تا ترنزیشن ظهور بر ترنزیشن خود جزء (هاور) پیروز شود؛ پس از ظهور data-reveal برداشته می‌شود */
.js [data-reveal] {
  transition:
    opacity .8s var(--ease-out) calc(var(--i, 0) * 90ms),
    transform 1s var(--ease-out) calc(var(--i, 0) * 90ms),
    filter .9s var(--ease-out) calc(var(--i, 0) * 90ms),
    clip-path 1.1s var(--ease-out) calc(var(--i, 0) * 90ms);
}
.js [data-reveal="pop"] { transition-timing-function: var(--ease-spring); }

/* تیترهای واژه‌به‌واژه (data-split): هر واژه از زیر خط بالا می‌آید */
.split-word {
  display: inline-block;
  white-space: nowrap;
  transition:
    opacity .7s var(--ease-out) calc(var(--w, 0) * 70ms + var(--split-delay, 0ms)),
    transform .9s var(--ease-out) calc(var(--w, 0) * 70ms + var(--split-delay, 0ms)),
    filter .7s var(--ease-out) calc(var(--w, 0) * 70ms + var(--split-delay, 0ms));
}
.js [data-split]:not(.is-in) .split-word { opacity: 0; transform: translateY(.6em) rotate(3deg); filter: blur(6px); }

@keyframes dn-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes dn-spin { to { transform: rotate(360deg); } }
@keyframes dn-spin-angle { to { --dn-angle: 360deg; } }
@keyframes dn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes dn-shimmer { to { background-position: -200% 0; } }
@keyframes dn-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, -8%) scale(1.08); }
  66% { transform: translate(-5%, 6%) scale(.95); }
}
@keyframes dn-gradient-pan { to { background-position: 200% 50%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; filter: none; }
  .js [data-split]:not(.is-in) .split-word { opacity: 1; transform: none; filter: none; }
  .scroll-progress { display: none; }
}
