/* ==========================================================================
   Sepand Technology Group — Design System
   Custom, dependency-free. RTL-first (fa-IR). Light + dark.
   Flat, editorial, hairline-bordered. Restrained green accent.
   1. Fonts        5. Layout        7. Sections
   2. Tokens       6. Components    8. Motion / Responsive
   3. Reset        4. Typography
   ========================================================================== */

/* 1. Fonts ================================================================ */
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* 2. Tokens =============================================================== */
/* Light is the default palette. Dark applies only via [data-theme="dark"]. */
:root {
  /* surfaces */
  --bg: #fbfbf8;
  --bg-soft: #f3f4ef;
  --panel: #ffffff;
  --panel-2: #f7f8f4;

  /* hairlines */
  --line: #e4e6df;
  --line-strong: #c9cdc3;

  /* text */
  --fg: #141815;
  --fg-muted: #57605a;
  --fg-dim: #7d8780;

  /* interaction surfaces */
  --hover-bg: rgba(20, 24, 21, .05);
  --header-bg: rgba(251, 251, 248, .88);
  --header-bg-solid: #fbfbf8;
  --grid-line: rgba(20, 24, 21, .05);

  /* green accent */
  --accent-text: #14512f;
  --accent-strong: #17683f;
  --accent-btn: #17683f;
  --accent-btn-hover: #14512f;
  --accent-soft-bg: rgba(23, 104, 63, .07);
  --accent-soft-border: rgba(23, 104, 63, .26);
  --accent-glow: rgba(23, 104, 63, .10);

  /* code */
  --code-bg: #f7f8f4;
  --code-fg: #2c332e;
  --code-key: #14512f;
  --code-str: #7a5c12;
  --code-cmt: #8a938c;
  --code-fn: #1c5f86;

  /* geometry — small radii only */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --maxw: 1200px;
  --gutter: clamp(18px, 4vw, 40px);

  --t-fast: .15s ease;
  --t: .25s ease;
  --t-slow: .6s cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* dark — opt-in only; light is the default for every visitor */
:root[data-theme="dark"] {
  --bg: #0c0f0d;
  --bg-soft: #101412;
  --panel: #141917;
  --panel-2: #1a201d;

  --line: #232a26;
  --line-strong: #323b36;

  --fg: #f4f6f3;
  --fg-muted: #9ba49d;
  --fg-dim: #6d7872;

  --hover-bg: rgba(255, 255, 255, .05);
  --header-bg: rgba(12, 15, 13, .88);
  --header-bg-solid: #0c0f0d;
  --grid-line: rgba(255, 255, 255, .03);

  --accent-text: #8ec4a6;
  --accent-strong: #3a9c68;
  --accent-btn: #17683f;
  --accent-btn-hover: #1d7f4d;
  --accent-soft-bg: rgba(58, 156, 104, .09);
  --accent-soft-border: rgba(58, 156, 104, .35);
  --accent-glow: rgba(29, 127, 77, .17);

  --code-bg: #0c0f0d;
  --code-fg: #c3ccc6;
  --code-key: #8ec4a6;
  --code-str: #cfd8a8;
  --code-cmt: #5f6b64;
  --code-fn: #8fd6ff;

  color-scheme: dark;
}

/* 3. Reset ================================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Vazir", system-ui, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--accent-soft-bg); color: var(--fg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); }

.skip-link {
  position: absolute;
  inset-inline: 0;
  top: -100px;
  width: fit-content;
  margin-inline: auto;
  z-index: 999;
  padding: 10px 20px;
  background: var(--accent-btn);
  color: #fff;
  font-weight: 500;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 4. Typography =========================================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.3; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.95rem); line-height: 1.35; }
h3 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem; color: var(--fg-muted); }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 500; color: var(--fg); }

.lead {
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  color: var(--fg-muted);
  line-height: 1.95;
}

.accent-text { color: var(--accent-text); }

.mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .88em;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

/* 5. Layout =============================================================== */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 96px);
}
.section--tight { padding-block: clamp(44px, 5vw, 68px); }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: 14px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--accent-text);
  font-size: .78rem;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.grid { display: grid; gap: clamp(14px, 1.6vw, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 6. Components =========================================================== */

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary {
  background: var(--accent-btn);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-btn-hover); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn--ghost:hover { border-color: var(--accent-strong); color: var(--accent-text); }

.btn--sm { padding: 8px 14px; font-size: .88rem; }
.btn--block { width: 100%; }

/* --- cards --- */
.card {
  padding: clamp(20px, 2.2vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t), background var(--t);
}
.card:hover { border-color: var(--line-strong); background: var(--panel-2); }

.card__icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--accent-text);
}
.card__icon svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: 8px; font-size: 1.02rem; }
.card p { font-size: .92rem; line-height: 1.85; }

/* --- pills --- */
.pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--fg-muted);
  font-size: .79rem;
}
.pill--brand {
  border-color: var(--accent-soft-border);
  background: var(--accent-soft-bg);
  color: var(--accent-text);
}

/* --- check list --- */
.checks { display: grid; gap: 10px; }
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--fg-muted);
  font-size: .92rem;
  line-height: 1.75;
}
.checks svg { width: 16px; height: 16px; flex: none; margin-top: 6px; color: var(--accent-strong); }

/* 7. Sections ============================================================= */

/* --- header --- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}
.site-header.is-stuck {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { display: block; width: 34px; height: 34px; flex: none; }
.brand__logo img { width: 34px; height: 34px; object-fit: contain; }
/* the mark is a solid silhouette: green on light, white on dark */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.brand__name { font-weight: 500; font-size: .98rem; }
.brand__sub {
  display: block;
  font-size: .66rem;
  color: var(--fg-dim);
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.2;
}

.nav { margin-inline-start: auto; min-width: 0; }
.nav__list { display: flex; align-items: center; gap: 2px; }
.nav__list a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  font-size: .9rem;
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__list a:hover { color: var(--fg); background: var(--hover-bg); }
.nav__list a.is-active { color: var(--accent-text); }

.header__actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* theme switch — the icon shows the theme you switch TO */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg-dim); background: var(--hover-bg); }
.theme-toggle svg { width: 17px; height: 17px; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* --- hero --- */
.hero {
  position: relative;
  padding-top: clamp(118px, 15vw, 164px);
  padding-bottom: clamp(60px, 7vw, 90px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(760px 420px at 75% -10%, var(--accent-glow), transparent 66%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 70%);
}
.hero__inner { max-width: 880px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 660px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 46px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.hero__stats > div {
  padding: clamp(16px, 2vw, 22px);
  background: var(--bg);
  text-align: start;
}
/* value first, label under it; the value never breaks across lines */
.hero__stats dd {
  margin: 0 0 2px;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  line-height: 1.5;
}
.hero__stats dt {
  font-size: .78rem;
  color: var(--fg-dim);
  line-height: 1.6;
  text-wrap: balance;
}

/* --- products --- */
.products { display: grid; gap: clamp(14px, 1.6vw, 20px); }

.product {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(22px, 3.5vw, 44px);
  align-items: center;
  padding: clamp(24px, 3vw, 38px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t);
}
.product:hover { border-color: var(--line-strong); }

.product__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.product__mark {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--fg);
}
.product__mark svg { width: 27px; height: 27px; }
.product__title { min-width: 0; }
.product__title h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.product__sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .8rem;
  color: var(--fg-dim);
}
/* in the flow, not floated over the title: it used to overlap a wrapped heading */
.badge {
  padding: 2px 8px;
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--r-xs);
  background: var(--accent-soft-bg);
  color: var(--accent-text);
  font-size: .72rem;
  font-weight: 500;
}

.product__body p { font-size: .95rem; }
.product__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.product__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.product__panel {
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.product__panel h4 {
  margin-bottom: 14px;
  font-size: .78rem;
  color: var(--fg-dim);
  font-weight: 400;
  letter-spacing: .06em;
}

.feature-rows {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel);
  transition: background var(--t);
}
.feature-row:hover { background: var(--panel-2); }
.feature-row__icon {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg-dim);
  transition: color var(--t), border-color var(--t);
}
.feature-row__icon svg { width: 17px; height: 17px; }
.feature-row:hover .feature-row__icon {
  color: var(--accent-text);
  border-color: var(--accent-soft-border);
}
/* the text column must take the remaining width, otherwise it shrinks to the
   widest token (an endpoint path) and the caption wraps against empty space */
.feature-row > span:last-child { flex: 1; min-width: 0; }
.feature-row b { display: block; font-size: .88rem; font-weight: 500; line-height: 1.6; }
.feature-row small { display: block; color: var(--fg-dim); font-size: .77rem; line-height: 1.6; }


/* --- API / pay as you go --- */
.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 3.5vw, 40px);
  align-items: start;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-block__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.code-block__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.code-block__name {
  margin-inline-start: auto;
  color: var(--fg-dim);
  font-size: .75rem;
  font-family: ui-monospace, Consolas, monospace;
}
.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .81rem;
  line-height: 1.8;
  color: var(--code-fg);
}
.c-key { color: var(--code-key); }
.c-str { color: var(--code-str); }
.c-cmt { color: var(--code-cmt); }
.c-fn { color: var(--code-fn); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
}
.price-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.price-table caption {
  padding: 14px 16px 2px;
  color: var(--fg-dim);
  font-size: .8rem;
  text-align: start;
  line-height: 1.7;
}
.price-table th,
.price-table td {
  padding: 12px 16px;
  text-align: start;
  border-bottom: 1px solid var(--line);
}
.price-table thead th {
  color: var(--fg-dim);
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .04em;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: var(--panel-2); }
.price-table td:last-child { color: var(--fg); white-space: nowrap; }

/* --- steps --- */
.steps { counter-reset: step; display: grid; gap: clamp(14px, 1.6vw, 20px); }
.step {
  padding: 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t), background var(--t);
}
.step:hover { border-color: var(--line-strong); background: var(--panel-2); }
.step::before {
  counter-increment: step;
  content: "۰" counter(step, persian);
  display: block;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent-strong);
}
.step h3 { margin-bottom: 7px; font-size: 1rem; }
.step p { font-size: .89rem; }

/* --- marquee --- */
.marquee {
  overflow: hidden;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 44s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  color: var(--fg-dim);
  font-size: .88rem;
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* --- faq --- */
.faq {
  max-width: 860px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq__item { background: var(--panel); }
.faq__item + .faq__item { border-top: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: .95rem;
  list-style: none;
  transition: background var(--t-fast);
}
.faq__item summary:hover { background: var(--panel-2); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  width: 8px; height: 8px;
  flex: none;
  border-inline-end: 1.5px solid var(--fg-dim);
  border-bottom: 1.5px solid var(--fg-dim);
  transform: rotate(45deg);
  transition: transform var(--t);
}
.faq__item[open] summary::after { transform: rotate(-135deg); }
.faq__answer { padding: 0 20px 18px; }
.faq__answer p { font-size: .9rem; }

/* --- contact --- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: clamp(24px, 3.5vw, 44px);
  align-items: start;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .83rem; color: var(--fg-muted); }
.field .req { color: #c2463f; }
.field input,
.field textarea,
.field select {
  padding: 11px 13px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: .91rem;
  transition: border-color var(--t-fast);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--fg-dim); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-strong);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { margin-top: 12px; font-size: .79rem; color: var(--fg-dim); line-height: 1.8; }

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t);
}
.contact-card + .contact-card { margin-top: 10px; }
.contact-card:hover { border-color: var(--line-strong); }
.contact-card__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--accent-text);
}
.contact-card__icon svg { width: 18px; height: 18px; }
.contact-card h4 { margin-bottom: 2px; font-size: .9rem; }
.contact-card p, .contact-card a { font-size: .88rem; color: var(--fg-muted); margin: 0; }
.contact-card a:hover { color: var(--accent-text); }

/* --- cta banner --- */
.cta-banner {
  padding: clamp(32px, 4.5vw, 56px);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.cta-banner h2 { margin-bottom: 12px; }
.cta-banner p { max-width: 580px; margin-inline: auto; margin-bottom: 24px; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* --- footer --- */
.site-footer {
  padding-top: clamp(44px, 5vw, 66px);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: 38px;
}
.footer-grid h4 {
  margin-bottom: 14px;
  font-size: .78rem;
  color: var(--fg-dim);
  font-weight: 400;
  letter-spacing: .06em;
}
.footer-grid li + li { margin-top: 8px; }
.footer-grid a, .footer-grid p { color: var(--fg-muted); font-size: .88rem; }
.footer-grid a { transition: color var(--t-fast); }
.footer-grid a:hover { color: var(--accent-text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: .82rem;
}

.to-top {
  position: fixed;
  inset-inline-end: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--fg-muted);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t), color var(--t), border-color var(--t);
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { border-color: var(--accent-strong); color: var(--accent-text); }
.to-top svg { width: 18px; height: 18px; }

/* 8. Motion / Responsive ================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product { grid-template-columns: minmax(0, 1fr); }
  .api-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below 980px the nav turns into a horizontal scroll rail under the header:
   no hidden menu, every destination stays one tap away. */
@media (max-width: 980px) {
  html { scroll-padding-top: 128px; }

  .site-header__inner { flex-wrap: wrap; height: auto; padding-top: 12px; }
  .site-header.is-stuck { background: var(--header-bg-solid); }

  .nav {
    order: 3;
    width: 100%;
    margin-inline-start: 0;
    margin-top: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top: 1px solid var(--line);
    mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  }
  .nav::-webkit-scrollbar { display: none; }

  .nav__list {
    gap: 6px;
    padding-block: 9px;
    width: max-content;
    scroll-snap-type: x proximity;
  }
  .nav__list li { scroll-snap-align: center; }
  .nav__list a {
    padding: 6px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .86rem;
  }
  .nav__list a.is-active {
    border-color: var(--accent-soft-border);
    background: var(--accent-soft-bg);
    color: var(--accent-text);
  }

  .header__actions { margin-inline-start: auto; }
  .header__cta { display: none; }

  /* the rail makes the header taller — keep the hero clear of it */
  .hero { padding-top: clamp(150px, 20vw, 186px); }

  /* four stat columns on a phone means three-line labels: halve them */
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { width: 100%; }
  .brand__sub { display: none; }

  /* Two table columns in 366px crushed the service name to six lines.
     Stack each row into a small card instead of shrinking the cells. */
  .table-wrap {
    overflow: visible;
    border: 0;
    background: none;
    border-radius: 0;
  }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; }
  .price-table thead { display: none; }
  .price-table caption { display: block; width: 100%; padding: 0 0 14px; }
  .price-table tr {
    padding: 13px 15px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
  }
  .price-table tr + tr { margin-top: 8px; }
  .price-table tr:hover { background: var(--panel); }
  .price-table td {
    padding: 0;
    border: 0;
    white-space: normal;
  }
  .price-table td:first-child { font-weight: 500; color: var(--fg); }
  .price-table td:last-child {
    margin-top: 2px;
    color: var(--fg-muted);
    font-weight: 400;
    font-size: .85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .to-top, .hero__bg, .hero__grid, .marquee { display: none; }
  body { background: #fff; color: #000; }
}
