/* =============================================================================
   Nimchat design tokens + theme primitives
   Extracted from stage.nim.chat (theme "abri" → style.css). When this template
   is dropped into the theme, this file is redundant: the theme already ships
   every rule below. It exists so the template renders identically standalone.
   ========================================================================== */

:root {
  /* Primary (brand blue — synced with abri style.css v2.3.0, 1404/07/02) */
  --p-50: #eaf1fa;
  --p-75: #b6cfec;
  --p-100: #8cb2e0;
  --p-200: #4a81c4;
  --p-300: #1d5fa8;
  --p-400: #164a83;
  --p-500: #123a66;

  /* Secondary (warm) */
  --s-50: #fef6ef;
  --s-75: #fad9be;
  --s-100: #f9c9a3;
  --s-200: #f6b27c;
  --s-300: #f4a261;
  --s-400: #ab7144;

  /* Neutrals */
  --m-50: #efefef;
  --m-75: #bdbdbd;
  --m-100: #a2a2a2;
  --m-200: #7a7979;
  --m-300: #5f5e5e;
  --m-400: #434242;
  --m-500: #3a3939;

  --brand: var(--p-300);
  --brand-dark: var(--p-400);
  --brand-10: rgba(29, 95, 168, .08);
  --brand-16: rgba(29, 95, 168, .14);
  --brand-30: rgba(29, 95, 168, .3);
  --danger: #d65a4a;
  --danger-10: rgba(214, 90, 74, .08);
  --danger-30: rgba(214, 90, 74, .3);

  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --ink: #1b2b33;
  --ink-soft: var(--m-300);
  --label: var(--m-200);
  --line: #e6ecf0;
  --dark: #10262f;
  --dark-2: #16303b;
  --dark-3: #1c3944;
  --on-dark: #b9c8ce;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 42, 55, .06);
  --shadow: 0 6px 24px rgba(16, 42, 55, .07);
  --shadow-lg: 0 18px 50px rgba(16, 42, 55, .10);
  --glow: 0 8px 20px rgba(29, 95, 168, .28);

  --wrap: 1200px;
  --gutter: 24px;
  --section-y: 88px;
  --header-h: 75px;

  --font: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, sans-serif;
  --font-en: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; color-scheme: light; /* Nim is a light-only brand; every surface paints itself */ }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--p-400); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--p-300); }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.45; font-weight: 800; color: var(--ink); letter-spacing: 0; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); line-height: 1.35; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
/* NB: abri v2.3.0 no longer forces Manrope on Latin text — the brand wordmark, the language
   switch, the quote mark and .ltr all render in Vazirmatn. Components that still want Manrope
   (the mockup chrome in platform.css) ask for var(--font-en) themselves. */
.ltr, code, kbd, samp, pre { direction: ltr; unicode-bidi: isolate; text-align: start; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--p-200); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--p-50); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark .section__head h2 { color: #fff; }
.section--dark .section__head p { color: var(--on-dark); }
.section__head { max-width: 760px; margin-inline: auto; margin-bottom: 56px; text-align: center; }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 700; color: var(--p-400);
  background: var(--p-50); border: 1px solid var(--p-75); padding: 6px 16px;
  border-radius: var(--radius-full); margin-bottom: 18px; line-height: 1.6;
}
.grid { display: grid; gap: 24px; }
.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)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1;
  padding: 15px 30px; border-radius: var(--radius-full); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--p-300); color: #fff; box-shadow: var(--glow); }
.btn--primary:hover { background: var(--p-400); color: #fff; }
.btn--ghost { background: #fff; color: var(--p-400); border-color: var(--p-75); }
.btn--ghost:hover { background: var(--p-50); color: var(--p-500); }
.btn--on-dark { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn--on-dark:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn--sm { padding: 11px 22px; font-size: .93rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: stretch; gap: 28px; min-height: 74px; }
.site-brand { display: flex; align-items: center; flex-shrink: 0; }
.site-brand__lockup { display: inline-flex; align-items: center; gap: 7px; }
.site-brand__mark { display: block; flex-shrink: 0; }
.site-brand__mark svg { width: 34px; height: 34px; display: block; }
.site-brand__name { font-size: 1.5rem; font-weight: 800; color: var(--p-500); line-height: 1; transform: translateY(1px); }
.nav-main { margin-inline-end: auto; display: flex; align-items: stretch; }
.nav-main ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 4px; }
.nav-main > ul > li { display: flex; align-items: center; position: relative; }
.nav-main a, .nav-main .mega__trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--m-400); font-weight: 500; font-size: .97rem; background: none; border: 0; cursor: pointer; line-height: 1.6;
}
.nav-main a:hover, .nav-main .mega__trigger:hover, .nav-main .current-menu-item > a,
.nav-main .mega__trigger[aria-expanded="true"] { color: var(--p-400); background: var(--p-50); }
.mega__caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-actions .btn { padding: 11px 22px; font-size: .93rem; }
.lang-switch__item {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: var(--radius-full);
  color: var(--m-300); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
}
.lang-switch__item:hover { color: var(--ink); background: var(--bg-soft); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; align-self: center; cursor: pointer; place-items: center; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Cards / proof primitives ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--p-75); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-soft); font-size: .96rem; margin: 0; }
.card__icon { width: 52px; height: 52px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--p-50); color: var(--p-300); margin-bottom: 18px; }
.card__icon svg { width: 26px; height: 26px; }
.card:nth-child(3n + 2) .card__icon { background: var(--s-50); color: var(--s-400); }

.logos { padding-block: 48px; border-block: 1px solid var(--line); background: #fff; }
.logos__title { text-align: center; font-size: .93rem; color: var(--m-200); margin: 0; }
/* Marquee: two identical halves inside one track, translated by half its width so the loop has no
   seam. The frame is forced LTR — a block wider than its containing block is positioned by the
   *container's* direction, so under RTL the track would start pinned right and slide off. */
.logos__marquee {
  margin-top: 34px; overflow: hidden; direction: ltr;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.logos__track { display: flex; width: max-content; }
.logos__marquee.is-ready .logos__track { animation: abri-logo-marquee var(--logos-duration, 42s) linear infinite; }
.logos__marquee.is-ready:hover .logos__track { animation-play-state: paused; }
.logos__row { display: flex; flex-wrap: nowrap; align-items: center; gap: 52px; padding-inline-end: 52px; }
.logos__row img { max-height: 40px; width: auto; flex-shrink: 0; filter: grayscale(1); opacity: .62; transition: filter .2s ease, opacity .2s ease; }
.logos__row img:hover { filter: grayscale(0); opacity: 1; }
@keyframes abri-logo-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align: center; box-shadow: var(--shadow-sm); }
.stat__num { font-size: 2.3rem; font-weight: 800; color: var(--p-300); line-height: 1.2; display: block; }
.stat__label { color: var(--ink-soft); font-size: .93rem; }

.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; }
.quote__mark { color: var(--p-100); font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.quote__text { color: var(--m-400); margin-bottom: 22px; flex-grow: 1; }
.quote__who { display: flex; align-items: center; gap: 12px; }
.quote__avatar { width: 46px; height: 46px; border-radius: var(--radius-full); object-fit: cover; background: var(--p-50); flex-shrink: 0; display: grid; place-items: center; color: var(--p-400); font-weight: 800; }
.quote__name { font-weight: 700; font-size: .96rem; }
.quote__role { color: var(--m-200); font-size: .86rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 14px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq__item.is-open { border-color: var(--p-75); box-shadow: var(--shadow-sm); }
.faq__q {
  width: 100%; text-align: start; background: none; border: 0; cursor: pointer; padding: 20px 24px;
  font-weight: 700; font-size: 1rem; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px; line-height: 1.7;
}
.faq__q::after {
  content: ""; flex-shrink: 0; width: 11px; height: 11px; border-right: 2px solid var(--p-300); border-bottom: 2px solid var(--p-300);
  transform: rotate(45deg); transition: transform .22s ease, margin .22s ease; margin-block-start: -5px;
}
.faq__item.is-open .faq__q::after { transform: rotate(-135deg); margin-block-start: 3px; }
.faq__a { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--p-500), var(--p-300)); color: #fff; border-radius: var(--radius-lg);
  padding: 56px 48px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 60ch; margin-inline: auto; }
.cta-band__buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.cta-band .btn--primary { background: #fff; color: var(--p-500); box-shadow: none; }
.cta-band .btn--primary:hover { background: var(--p-50); color: var(--p-500); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--on-dark); padding-block: 64px 0; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer__top { display: grid; grid-template-columns: 1fr minmax(140px, max-content) minmax(140px, max-content); gap: 40px; padding-bottom: 22px; }
.footer__brand-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer__brand-head .site-brand__mark svg { width: 32px; height: 32px; display: block; }
.footer__wordmark { color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; }
.footer__about { font-size: .94rem; margin: 0; max-width: 44ch; }
.footer__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: .94rem; }
.footer__pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; line-height: 1.4;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
a.footer__pill:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .32); }
.footer__pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.footer__bottom-links { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 22px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 22px; }
.footer__copy { font-size: .88rem; color: var(--on-dark); }

/* ---------- Responsive (theme breakpoints: 1024 / 860 / 700) ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 34px; }
}
@media (max-width: 860px) {
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn--ghost, .header-actions .btn--primary { display: none; }
  .site-brand__name { display: none; }
  .nav-toggle { display: grid; }
  .nav-main {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 12px var(--gutter) 22px; display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-main.is-open { display: block; }
  .nav-main > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-main > ul > li { display: block; }
  .nav-main a, .nav-main .mega__trigger { padding: 13px 12px; width: 100%; justify-content: space-between; }
}
@media (max-width: 700px) {
  :root { --section-y: 56px; --gutter: 18px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .section__head { margin-bottom: 36px; }
  .footer__top { grid-template-columns: 1fr; }
}
