/* ==========================================================================
   Yazd Perlite — Design System (mobile-first base)
   Breakpoint overrides live in responsive.css, print rules in print.css
   ========================================================================== */

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

:root {
  /* Colour tokens */
  --c-primary: #174D3B;
  --c-primary-dark: #10382B;
  --c-secondary: #367C5B;
  --c-accent: #E99A35;
  --c-accent-hover: #DB8A22;
  --c-on-accent: #18251F;
  --c-bg: #FAFAF7;
  --c-surface: #FFFFFF;
  --c-mineral: #F1EEE7;
  --c-mineral-deep: #E7E2D7;
  --c-text: #18251F;
  --c-muted: #5D6B63;      /* palette #65736B darkened slightly for AA contrast on mineral */
  --c-border: #E3E8E4;
  --c-border-strong: #CBD5CF;
  --c-tint: #E8F1EC;       /* light primary tint */
  --c-warn-bg: #FDF3E4;
  --c-warn-border: #F0C88E;
  --c-info-bg: #EAF3EE;
  --c-whatsapp: #187A42;   /* darker than WhatsApp brand green: white text needs ≥4.5:1 (5.38) */
  --c-secondary-text: #2E6F50; /* palette #367C5B is 4.32:1 on mineral; this variant is used for small text (≥5.1:1 on all light surfaces) */

  /* Typography */
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.15rem, 1.05rem + .45vw, 1.35rem);
  --fs-h3: clamp(1.12rem, 1.02rem + .4vw, 1.3rem);
  --fs-h2: clamp(1.45rem, 1.2rem + 1.1vw, 2.15rem);
  --fs-h1: clamp(1.85rem, 1.35rem + 2.3vw, 3.25rem);
  --lh-body: 1.9;
  --lh-tight: 1.35;

  /* Spacing */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem; --sp-9: 6rem;
  --section-y: clamp(3rem, 2rem + 4vw, 6rem);
  --gutter: clamp(1rem, .6rem + 1.6vw, 2rem);
  --container: 1240px;
  --container-narrow: 780px;

  /* Shape & depth */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(16, 56, 43, .06);
  --shadow-sm: 0 2px 8px rgba(16, 56, 43, .06), 0 1px 2px rgba(16, 56, 43, .05);
  --shadow-md: 0 12px 32px -12px rgba(16, 56, 43, .18), 0 2px 6px rgba(16, 56, 43, .05);
  --shadow-lg: 0 30px 60px -24px rgba(16, 56, 43, .28);
  --ring: 0 0 0 3px rgba(233, 154, 53, .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--c-primary); text-underline-offset: .25em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-secondary-text); }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 var(--sp-4); font-weight: 800; color: var(--c-text); letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); font-weight: 850; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 750; }
p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-inline-start: 1.4em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(233, 154, 53, .35); }
table { border-collapse: collapse; width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 1000;
  background: var(--c-primary-dark); color: #fff; padding: .7rem 1.1rem; border-radius: var(--r-sm); text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--c-mineral); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--dark { background: var(--c-primary-dark); color: #E6EFEA; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section + .section:not(.section--alt):not(.section--dark) { padding-top: calc(var(--section-y) * .4); }
.section-head { max-width: 760px; margin-bottom: var(--sp-6); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--c-muted); font-size: var(--fs-md); margin-bottom: 0; }
.section-head h2 { margin-bottom: var(--sp-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 700; color: var(--c-secondary-text);
  margin-bottom: var(--sp-3);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--c-accent); border-radius: 2px; }
.section--dark .eyebrow { color: #F3C27F; }

.grid { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr); margin-bottom: var(--sp-5); }
.grid:last-child { margin-bottom: 0; }
.split { display: grid; gap: var(--sp-6); align-items: center; grid-template-columns: minmax(0, 1fr); margin-bottom: var(--sp-5); }
.split:last-child { margin-bottom: 0; }
.split__media figure { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--c-primary); --btn-fg: #fff; --btn-bd: var(--btn-bg);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.35rem; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
  font-weight: 700; font-size: var(--fs-base); line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s, box-shadow .18s, color .18s, border-color .18s;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn .icon { width: 1.2em; height: 1.2em; transition: transform .2s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(-4px); }
.btn--accent { --btn-bg: var(--c-accent); --btn-fg: var(--c-on-accent); }
.btn--accent:hover { --btn-bg: var(--c-accent-hover); }
.btn--primary:hover { --btn-bg: var(--c-primary-dark); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-primary); --btn-bd: var(--c-border-strong); }
.btn--ghost:hover { --btn-bg: var(--c-surface); --btn-bd: var(--c-primary); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--c-primary-dark); --btn-bd: #fff; }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .45); }
.btn--outline-light:hover { --btn-bd: #fff; --btn-bg: rgba(255, 255, 255, .08); }
.btn--whatsapp { --btn-bg: var(--c-whatsapp); --btn-fg: #fff; }
.btn--whatsapp:hover { --btn-bg: #187A41; }
.btn--sm { min-height: 40px; padding: .45rem 1rem; font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--c-primary-dark); color: #CFE0D7; font-size: var(--fs-xs); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { color: #F3C27F; }
.topbar__links { display: flex; gap: var(--sp-5); align-items: center; }
.topbar__addr { display: none; align-items: center; gap: .4rem; }
.topbar .icon { width: 1.05em; height: 1.05em; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 247, .94);
  -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--c-border); box-shadow: 0 6px 24px -18px rgba(16, 56, 43, .35); }
.header__inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--c-text); flex: none; }
.brand:hover { color: var(--c-text); }
.brand__mark { width: 44px; height: 44px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__fa { font-weight: 850; font-size: 1.2rem; color: var(--c-primary-dark); }
.brand__en { font-size: .64rem; letter-spacing: .22em; font-weight: 600; color: var(--c-muted); direction: ltr; text-align: right; }
.brand--light .brand__fa { color: #fff; }
.brand--light .brand__en { color: #A9C3B6; }

.nav-toggle {
  margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-primary-dark);
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon--close { display: none; }
.nav-open .nav-toggle .icon--menu { display: none; }
.nav-open .nav-toggle .icon--close { display: block; }
.header__cta { display: none; }

/* Mobile navigation panel (JS-enhanced). Without JS the nav is shown as a static list. */
.site-nav { width: 100%; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem;
  padding: .8rem .2rem; color: var(--c-text); text-decoration: none; font-weight: 600;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--c-primary); }
.nav-item--has-sub { display: flex; flex-wrap: wrap; align-items: center; }
.nav-item--has-sub > .nav-link { flex: 1; }
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; background: transparent; color: var(--c-muted); border-radius: 10px;
}
.sub-toggle:hover { background: var(--c-tint); color: var(--c-primary); }
.sub-toggle .icon { transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.sub-menu { list-style: none; margin: 0; padding: 0 .8rem .6rem 0; width: 100%; }
.sub-menu a { display: flex; gap: .7rem; align-items: center; padding: .5rem .2rem; color: var(--c-text); text-decoration: none; font-size: var(--fs-sm); }
.sub-menu a:hover { color: var(--c-primary); }
.sub-menu .icon { color: var(--c-secondary); }
.sub-menu__all a { font-weight: 700; color: var(--c-primary); }

.js .site-nav {
  position: fixed; inset: calc(var(--header-h) + var(--topbar-h, 0px)) 0 0 0; z-index: 99;
  background: var(--c-bg); padding: var(--sp-4) var(--gutter) calc(var(--sp-8) + 70px);
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s .22s;
}
.js .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .22s var(--ease), transform .22s var(--ease); }
.js .nav-list > li { border-bottom: 1px solid var(--c-border); }
.js .sub-menu[hidden] { display: none; }
.nav-mobile-cta { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.no-js .header__inner { flex-wrap: wrap; }
.no-js .nav-toggle { display: none; }
.no-js .site-nav { order: 3; padding-bottom: var(--sp-3); }
.no-js .nav-list { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.no-js .sub-menu, .no-js .sub-toggle, .no-js .nav-mobile-cta { display: none; }
body.nav-open { overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--sp-4); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; gap: .35rem; }
.breadcrumb li + li::before { content: ""; width: 6px; height: 6px; border-inline-start: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; margin-inline-end: .25rem; }
.breadcrumb a { color: var(--c-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-primary); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--c-text); font-weight: 600; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; background: var(--c-mineral); padding-block: var(--sp-6) var(--sp-7); overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(23, 77, 59, .09) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); mask-image: linear-gradient(to left, #000, transparent 70%);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero__grid { display: grid; gap: var(--sp-6); align-items: center; }
.page-hero h1 { margin-bottom: var(--sp-3); max-width: 22ch; }
.page-hero__lead { font-size: var(--fs-lg); color: var(--c-muted); max-width: 62ch; margin-bottom: 0; }
.page-hero__media { margin: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: var(--c-mineral-deep); }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--c-muted); }
.page-hero__meta span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Home hero ---------- */
.hero { position: relative; padding-block: var(--sp-6) var(--sp-8); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto auto; width: 70%; height: 100%;
  background: radial-gradient(60% 60% at 70% 30%, rgba(54, 124, 91, .10), transparent 70%);
  pointer-events: none;
}
.hero__grid { display: grid; gap: var(--sp-6); align-items: center; position: relative; }
.hero__badge { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem .35rem .45rem; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-border); font-size: var(--fs-sm); font-weight: 600; color: var(--c-primary); margin-bottom: var(--sp-4); box-shadow: var(--shadow-xs); }
.hero__badge i { width: 26px; height: 26px; border-radius: 50%; background: var(--c-tint); display: inline-grid; place-items: center; font-style: normal; }
.hero h1 { font-size: clamp(1.95rem, 1.3rem + 2.9vw, 3.6rem); line-height: 1.28; margin-bottom: var(--sp-4); }
.hero h1 .hl { color: var(--c-primary); position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; inset-inline: 0; bottom: .08em; height: .18em; background: rgba(233, 154, 53, .45); border-radius: 4px; z-index: -1; }
.hero__lead { font-size: var(--fs-lg); color: var(--c-muted); max-width: 58ch; margin-bottom: var(--sp-5); }
.hero__features { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.hero__features li { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-sm); font-weight: 600; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: .65rem .8rem; }
.hero__features .icon { color: var(--c-secondary); width: 1.35em; height: 1.35em; }
.hero__visual { position: relative; }
.hero__img { margin: 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3.4; box-shadow: var(--shadow-lg); background: var(--c-mineral-deep); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__card {
  position: absolute; background: var(--c-surface); border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: .8rem 1rem; display: flex; align-items: center; gap: .7rem; font-size: var(--fs-sm); line-height: 1.5;
}
.hero__card strong { display: block; font-size: var(--fs-base); color: var(--c-primary-dark); }
.hero__card .icon { width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: 10px; background: var(--c-tint); color: var(--c-primary); }
.hero__card--a { inset-inline-start: -6px; bottom: 18px; }
.hero__card--b { inset-inline-end: -6px; top: 18px; display: none; }
.hero__credit { font-size: var(--fs-xs); color: var(--c-muted); margin-top: .5rem; }

/* ---------- Cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: .2rem;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: var(--sp-5); color: var(--c-text); text-decoration: none; height: 100%;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.section--alt .card { border-color: transparent; box-shadow: var(--shadow-xs); }
.card p { color: var(--c-muted); margin-bottom: 0; font-size: .97rem; line-height: 1.85; }
.card__icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: var(--sp-3);
  background: var(--c-tint); color: var(--c-primary);
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.card__icon .icon { width: 26px; height: 26px; }
.card__title { font-size: var(--fs-h3); margin-bottom: .35rem; }
.card--link:hover, .card:hover { border-color: var(--c-border-strong); }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--c-text); }
.card--link:hover .card__icon { background: var(--c-primary); color: #fff; transform: rotate(-6deg); }
.card__more { margin-top: auto; padding-top: var(--sp-4); display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--c-primary); font-size: var(--fs-sm); }
.card__more::after { content: "←"; transition: transform .2s var(--ease); }
.card--link:hover .card__more::after { transform: translateX(-4px); }
.card--num::before {
  counter-increment: cardnum; content: counter(cardnum, persian);
  position: absolute; inset-inline-end: 1.2rem; top: 1rem; font-size: 2.4rem; font-weight: 900; color: var(--c-mineral-deep); line-height: 1;
}
.grid--counted { counter-reset: cardnum; }

/* Image card */
.img-card {
  display: flex; flex-direction: column; height: 100%; background: var(--c-surface); border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--c-border); text-decoration: none; color: var(--c-text);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.img-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-mineral-deep); }
.img-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.img-card__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.img-card__body h3 { margin-bottom: .35rem; font-size: var(--fs-h3); }
.img-card__body p { color: var(--c-muted); font-size: .95rem; margin-bottom: 0; line-height: 1.8; }
.img-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--c-text); }
.img-card:hover .img-card__media img { transform: scale(1.06); }
.img-card .card__more { padding-top: var(--sp-3); }

/* Application tiles (home) */
.app-tile { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3.2; color: #fff; text-decoration: none; background: var(--c-primary-dark); isolation: isolate; }
.app-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s var(--ease); }
.app-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(12, 40, 31, .92) 0%, rgba(12, 40, 31, .35) 50%, rgba(12, 40, 31, .05) 100%); }
.app-tile__body { position: absolute; inset: auto 0 0 0; padding: var(--sp-5); }
.app-tile__body h3 { color: #fff; margin-bottom: .2rem; font-size: 1.2rem; }
.app-tile__body p { margin: 0; font-size: var(--fs-sm); color: #D8E6DF; line-height: 1.7; }
.app-tile__icon { position: absolute; top: var(--sp-4); inset-inline-start: var(--sp-4); width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; }
.app-tile:hover { color: #fff; }
.app-tile:hover img { transform: scale(1.07); }
.app-tile--svg { background: linear-gradient(150deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); }

/* ---------- Figures ---------- */
.figure { margin: var(--sp-6) 0; }
.figure__frame { border-radius: var(--r-md); overflow: hidden; background: var(--c-mineral-deep); }
.figure img { width: 100%; }
.figure figcaption { font-size: var(--fs-sm); color: var(--c-muted); margin-top: .6rem; line-height: 1.7; display: flex; gap: .5rem; }
.figure figcaption::before { content: ""; flex: none; width: 3px; border-radius: 2px; background: var(--c-accent); margin-top: .2em; height: 1.1em; }
.split .figure { margin: 0; }
.figure--svg .figure__frame { background: var(--c-surface); border: 1px solid var(--c-border); padding: var(--sp-4); }

/* ---------- Prose (long-form text) ---------- */
.prose { font-size: 1.04rem; line-height: 2; max-width: var(--container-narrow); }
.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: var(--sp-7); margin-bottom: var(--sp-4); padding-top: .2rem; }
.prose h3 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: #24332C; }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin-bottom: var(--sp-5); }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--c-secondary-text); font-weight: 700; }
.prose strong { color: var(--c-text); font-weight: 750; }
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(23, 77, 59, .35); }
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote { margin: var(--sp-5) 0; padding: var(--sp-4) var(--sp-5); border-inline-start: 4px solid var(--c-accent); background: var(--c-surface); border-radius: var(--r-sm); color: var(--c-text); font-weight: 500; }
.prose .table-wrap { margin-block: var(--sp-5) var(--sp-6); }
.prose .callout, .prose .steps, .prose .checklist, .prose .facts, .prose .grid { margin-block: var(--sp-5); }
.section .prose { margin-inline: 0; }
.container--narrow .prose { max-width: none; }

/* ---------- Content components ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 var(--sp-4); display: grid; gap: .6rem; }
.checklist li { position: relative; padding-inline-start: 2rem; line-height: 1.85; margin: 0; }
.checklist li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .35em; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--c-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23174D3B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.prose .checklist li::marker { content: none; }

.callout { border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin: 0 0 var(--sp-4); border: 1px solid var(--c-border); background: var(--c-surface); position: relative; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout__title { display: flex; align-items: center; gap: .5rem; font-weight: 800; margin-bottom: .35rem; color: var(--c-primary-dark); }
.callout__title::before { content: ""; width: 1.3rem; height: 1.3rem; flex: none; background: currentColor; -webkit-mask: var(--callout-icon) center / contain no-repeat; mask: var(--callout-icon) center / contain no-repeat; }
.callout--info { background: var(--c-info-bg); border-color: #CFE3D8; --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
.callout--tip { background: #F4F8EC; border-color: #DCE7C6; --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1.1 2.2h5c.1-1 .5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.callout--tip .callout__title { color: #3F5E1E; }
.callout--warn { background: var(--c-warn-bg); border-color: var(--c-warn-border); --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 2.5 20h19L12 3.5z'/%3E%3Cpath d='M12 10v4.5M12 17.5v.01'/%3E%3C/svg%3E"); }
.callout--warn .callout__title { color: #8A4B06; }
.callout:not(.callout--info):not(.callout--tip):not(.callout--warn) .callout__title::before { display: none; }

.steps { list-style: none; padding: 0; margin: 0 0 var(--sp-4); counter-reset: step; display: grid; gap: var(--sp-4); }
.steps > li { counter-increment: step; position: relative; padding: var(--sp-4) var(--sp-5); padding-inline-start: 4.4rem; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); margin: 0; }
.steps > li::before {
  content: counter(step, persian); position: absolute; inset-inline-start: 1.1rem; top: 1.05rem;
  width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: 1.05rem;
}
.steps > li h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.steps > li p { margin: 0; color: var(--c-muted); }
.prose .steps > li::marker { content: none; }

.facts { margin: 0 0 var(--sp-4); display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--c-border); border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; }
.facts > div { background: var(--c-surface); padding: .85rem 1.1rem; display: grid; gap: .15rem; }
.facts dt { font-size: var(--fs-sm); color: var(--c-muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; color: var(--c-text); line-height: 1.7; }

.tags { list-style: none; padding: 0; margin: 0 0 var(--sp-4); display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { margin: 0; padding: .3rem .85rem; border-radius: var(--r-pill); background: var(--c-tint); color: var(--c-primary); font-size: var(--fs-sm); font-weight: 600; }
.prose .tags li::marker { content: none; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--c-border); border-radius: var(--r-md); background: var(--c-surface); margin-bottom: var(--sp-4); }
.table-wrap table { min-width: 560px; font-size: .95rem; line-height: 1.75; }
.table-wrap th, .table-wrap td { padding: .8rem 1rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--c-border); }
.table-wrap thead th { background: var(--c-primary); color: #fff; font-weight: 700; white-space: nowrap; }
.table-wrap tbody tr:nth-child(even) { background: #FBFAF6; }
.table-wrap tbody tr:last-child td, .table-wrap tbody tr:last-child th { border-bottom: 0; }
.table-wrap tbody th { font-weight: 700; color: var(--c-primary-dark); background: #F6F8F6; }
.table-note { font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- CTA boxes ---------- */
.cta-box {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-5);
  background: var(--c-primary); color: #DCEAE2; margin: var(--sp-6) 0; isolation: isolate;
}
.cta-box::before { content: ""; position: absolute; z-index: -1; inset: auto -60px -80px auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(233, 154, 53, .35), transparent 65%); }
.cta-box::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .25; background-image: radial-gradient(rgba(255, 255, 255, .35) 1px, transparent 1.3px); background-size: 16px 16px; -webkit-mask-image: linear-gradient(to right, #000, transparent 60%); mask-image: linear-gradient(to right, #000, transparent 60%); }
.cta-box__title { color: #fff; font-size: 1.35rem; margin-bottom: .4rem; }
.cta-box p { color: #CFE0D7; margin-bottom: var(--sp-4); max-width: 60ch; }
.prose .cta-box p { color: #CFE0D7; }
.cta-box .btn-row { gap: .6rem; }

.availability { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; border: 1.5px dashed var(--c-border-strong); background: var(--c-surface); border-radius: var(--r-md); padding: var(--sp-5); margin: var(--sp-5) 0; }
.availability__text { display: flex; gap: .8rem; align-items: flex-start; }
.availability__text .icon { width: 2.4rem; height: 2.4rem; padding: .5rem; border-radius: 12px; background: var(--c-warn-bg); color: #A35A0B; }
.availability__text strong { display: block; margin-bottom: .1rem; }
.availability__text p { margin: 0; color: var(--c-muted); font-size: .95rem; }

/* Big final CTA (home and pages) */
.final-cta { background: var(--c-primary-dark); color: #D6E5DD; border-radius: var(--r-xl); padding: var(--sp-7) var(--sp-5); position: relative; overflow: hidden; isolation: isolate; text-align: center; }
.final-cta::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; inset: -260px auto auto -160px; background: radial-gradient(circle, rgba(54, 124, 91, .55), transparent 65%); }
.final-cta::after { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; border-radius: 50%; inset: auto -140px -240px auto; background: radial-gradient(circle, rgba(233, 154, 53, .28), transparent 65%); }
.final-cta h2 { color: #fff; max-width: 24ch; margin-inline: auto; }
.final-cta p { max-width: 60ch; margin: 0 auto var(--sp-5); color: #C3D7CD; }
.final-cta .btn-row { justify-content: center; }
.final-cta__grains { position: absolute; inset: 0; z-index: -1; opacity: .5; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: var(--sp-3); }
.faq-item { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; font-weight: 700; line-height: 1.7; border-radius: var(--r-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23174D3B' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 55% no-repeat;
  transition: transform .25s var(--ease), background-color .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); background-color: var(--c-mineral-deep); }
.faq-item summary:hover { color: var(--c-primary); }
.faq-item__a { padding: 0 1.25rem 1.1rem; color: #33443B; line-height: 1.95; }
.faq-item__a p:last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: var(--sp-6); }
.faq-group__title { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; margin-bottom: var(--sp-4); }
.faq-group__title .icon { color: var(--c-secondary); }

/* ---------- Comparison table (home) ---------- */
.compare thead th:first-child { border-start-start-radius: 0; }
.compare td:first-child, .compare th[scope="row"] { font-weight: 700; }
.compare .is-highlight { background: #F3F8F5 !important; }
.compare thead th.is-highlight { background: var(--c-secondary) !important; }

/* ---------- Process (home) ---------- */
.process { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); counter-reset: proc; }
.process li { counter-increment: proc; position: relative; background: var(--c-surface); border-radius: var(--r-lg); padding: var(--sp-5); border: 1px solid var(--c-border); }
.process__num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--c-accent); color: var(--c-on-accent); font-weight: 900; font-size: 1.25rem; margin-bottom: var(--sp-3); }
.process h3 { margin-bottom: .3rem; }
.process p { margin: 0; color: var(--c-muted); font-size: .97rem; }

/* ---------- Raw vs expanded comparison (home) ---------- */
.duo { display: grid; gap: var(--sp-4); grid-template-columns: 1fr 1fr; }
.duo figure { margin: 0; position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--c-mineral-deep); aspect-ratio: 1 / 1; }
.duo img { width: 100%; height: 100%; object-fit: cover; }
.duo figcaption { position: absolute; inset: auto .6rem .6rem .6rem; background: rgba(255, 255, 255, .94); border-radius: 10px; padding: .45rem .7rem; font-size: var(--fs-sm); line-height: 1.5; }
.duo figcaption strong { display: block; color: var(--c-primary-dark); }
.duo__arrow { grid-column: 1 / -1; display: flex; align-items: center; gap: .8rem; font-size: var(--fs-sm); color: var(--c-muted); }
.duo__arrow::before, .duo__arrow::after { content: ""; flex: 1; height: 1px; background: var(--c-border-strong); }
.mini-facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin: var(--sp-5) 0; }
.mini-fact { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: .8rem 1rem; }
.mini-fact strong { display: block; font-size: 1.15rem; color: var(--c-primary); line-height: 1.5; }
.mini-fact span { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.6; display: block; }
.source-note { font-size: var(--fs-xs); color: var(--c-muted); }

/* ---------- Grades (home / products) ---------- */
.grade-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--sp-5); height: 100%; display: flex; flex-direction: column; }
.grade-card__dots { height: 64px; margin-bottom: var(--sp-4); border-radius: var(--r-sm); background: var(--c-mineral); display: flex; align-items: center; justify-content: center; }
.grade-card h3 { margin-bottom: .3rem; }
.grade-card p { color: var(--c-muted); font-size: .96rem; }
.grade-card ul { margin-top: auto; }

/* ---------- Blog cards & listing ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-mineral-deep); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: var(--fs-xs); color: var(--c-muted); margin-bottom: .5rem; }
.post-card__cat { color: var(--c-secondary-text); font-weight: 700; background: var(--c-tint); padding: .15rem .6rem; border-radius: var(--r-pill); }
.post-card__title { font-size: 1.1rem; line-height: 1.6; margin-bottom: .5rem; }
.post-card__title a { color: var(--c-text); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card__title a:hover { color: var(--c-primary); }
.post-card__excerpt { font-size: .94rem; color: var(--c-muted); margin-bottom: 0; line-height: 1.85; }
.post-card__time { display: inline-flex; align-items: center; gap: .3rem; }
.post-card__time .icon { width: 1em; height: 1em; }

.blog-tools { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.search-field { position: relative; }
.search-field input { width: 100%; min-height: 52px; border-radius: var(--r-pill); border: 1px solid var(--c-border-strong); background: var(--c-surface); padding: .7rem 3rem .7rem 1.2rem; }
.search-field input:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--ring); }
.search-field .icon { position: absolute; inset-inline-start: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.filter-chips { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.chip { flex: none; min-height: 42px; padding: .4rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--c-border-strong); background: var(--c-surface); font-weight: 600; font-size: var(--fs-sm); color: var(--c-text); transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip[aria-pressed="true"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.chip span { opacity: .7; margin-inline-start: .25rem; }
.blog-empty { text-align: center; padding: var(--sp-7) var(--sp-4); color: var(--c-muted); background: var(--c-surface); border-radius: var(--r-lg); border: 1px dashed var(--c-border-strong); }
.blog-status { font-size: var(--fs-sm); color: var(--c-muted); margin: 0; }

/* ---------- Article ---------- */
.reading-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 200; background: transparent; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: var(--c-accent); transform-origin: right; transform: scaleX(0); }
.article-hero { padding-block: var(--sp-5) var(--sp-6); background: var(--c-mineral); }
.article-hero h1 { max-width: 28ch; font-size: clamp(1.7rem, 1.25rem + 2vw, 2.85rem); line-height: 1.45; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--c-muted); font-size: var(--fs-sm); }
.article-meta span, .article-meta a { display: inline-flex; align-items: center; gap: .4rem; }
.article-meta a { color: var(--c-secondary-text); font-weight: 700; text-decoration: none; }
.article-cover { margin: 0 auto; max-width: var(--container); padding-inline: var(--gutter); transform: translateY(-1px); }
.article-cover__frame { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 8; background: var(--c-mineral-deep); box-shadow: var(--shadow-md); margin-top: calc(-1 * var(--sp-1)); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover figcaption { font-size: var(--fs-xs); color: var(--c-muted); margin-top: .5rem; }
.article-layout { display: grid; gap: var(--sp-6); padding-block: var(--sp-6) var(--sp-7); }
.article-main { min-width: 0; }
.summary-box { background: var(--c-surface); border: 1px solid var(--c-border); border-inline-start: 5px solid var(--c-primary); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-5); box-shadow: var(--shadow-xs); }
.summary-box__title { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--c-primary); margin-bottom: .4rem; font-size: 1rem; }
.summary-box p { margin: 0; line-height: 1.95; }
.toc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6); }
.toc__title { font-weight: 800; font-size: 1rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: .15rem; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: flex; gap: .6rem; padding: .35rem .5rem; border-radius: 8px; color: var(--c-muted); text-decoration: none; font-size: .93rem; line-height: 1.7; transition: background-color .2s, color .2s; }
.toc a::before { content: counter(toc, persian) "."; color: var(--c-secondary-text); font-weight: 700; min-width: 1.2rem; }
.toc a:hover { background: var(--c-tint); color: var(--c-primary); }
.toc a.is-active { background: var(--c-tint); color: var(--c-primary-dark); font-weight: 700; }
.article-aside { display: none; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--c-border); }
.share__label { font-weight: 700; margin-inline-end: .4rem; }
.share__btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem .95rem; border-radius: var(--r-pill); border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
.share__btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.share__btn.is-done { background: var(--c-tint); border-color: var(--c-secondary); color: var(--c-primary); }
.article-section { margin-top: var(--sp-7); }
.article-section > h2 { font-size: 1.45rem; }
.sources { margin: 0; padding-inline-start: 1.3em; font-size: .94rem; color: var(--c-muted); line-height: 1.85; }
.sources li { margin-bottom: .4rem; }
.sources a { word-break: break-word; }
.dates-note { font-size: var(--fs-sm); color: var(--c-muted); }

/* ---------- Calculator ---------- */
.calc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.calc__tabs { display: flex; gap: .3rem; padding: .5rem; background: var(--c-mineral); overflow-x: auto; }
.calc__tab { flex: 1 0 auto; min-height: 46px; border: 0; border-radius: var(--r-md); background: transparent; padding: .5rem 1rem; font-weight: 700; color: var(--c-muted); font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.calc__tab[aria-selected="true"] { background: var(--c-surface); color: var(--c-primary); box-shadow: var(--shadow-sm); }
.calc__panel { padding: var(--sp-5); }
.calc__panel[hidden] { display: none; }
.calc__desc { color: var(--c-muted); font-size: .95rem; margin-bottom: var(--sp-4); }
.calc__fields { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: var(--fs-sm); }
.field__hint { font-size: var(--fs-xs); color: var(--c-muted); }
.field__control { display: flex; align-items: stretch; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.field__control:focus-within { border-color: var(--c-primary); box-shadow: var(--ring); }
.field__control input, .field__control select { flex: 1; min-width: 0; border: 0; background: transparent; padding: .7rem .9rem; min-height: 48px; outline: none; }
.field__control input { direction: ltr; text-align: right; }
.field__unit { display: grid; place-items: center; padding-inline: .9rem; background: var(--c-mineral); color: var(--c-muted); font-size: var(--fs-sm); font-weight: 600; border-inline-start: 1px solid var(--c-border); white-space: nowrap; }
.field__unit select { padding: .3rem .2rem; min-height: 0; font-weight: 700; color: var(--c-primary-dark); }
.field input.is-invalid, .field .is-invalid { color: #A1260D; }
.field__error { font-size: var(--fs-xs); color: #A1260D; min-height: 1em; }
.field select, .field textarea, .form-field input, .form-field select, .form-field textarea { width: 100%; }
.calc__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.calc__result { margin-top: var(--sp-5); border-radius: var(--r-md); background: var(--c-info-bg); border: 1px solid #CFE3D8; padding: var(--sp-4) var(--sp-5); }
.calc__result[hidden] { display: none; }
.calc__result-title { font-weight: 800; color: var(--c-primary-dark); margin-bottom: .6rem; }
.calc__result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); }
.calc__metric { background: #fff; border-radius: var(--r-sm); padding: .7rem .9rem; }
.calc__metric span { display: block; font-size: var(--fs-xs); color: var(--c-muted); }
.calc__metric strong { font-size: 1.25rem; color: var(--c-primary); }
.calc__note { font-size: var(--fs-sm); color: var(--c-muted); margin: .8rem 0 0; }
.calc__disclaimer { font-size: var(--fs-xs); color: var(--c-muted); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--c-border); background: #FCFBF8; margin: 0; line-height: 1.8; }
.calc noscript p { padding: var(--sp-4) var(--sp-5); margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--sp-5); }
.contact-card { display: flex; gap: var(--sp-4); align-items: flex-start; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--sp-5); color: var(--c-text); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--c-text); }
.contact-card__icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--c-tint); color: var(--c-primary); }
.contact-card__icon .icon { width: 26px; height: 26px; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.contact-card p { margin: 0; color: var(--c-muted); font-size: .96rem; }
.contact-card strong { font-size: 1.15rem; color: var(--c-primary-dark); }
.contact-card--wa .contact-card__icon { background: #E3F4EA; color: var(--c-whatsapp); }
.form { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-xl); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.form__grid { display: grid; gap: var(--sp-4); }
.form-field { display: grid; gap: .35rem; }
.form-field label { font-weight: 700; font-size: var(--fs-sm); }
.form-field label .req { color: #A1260D; }
.form-field input, .form-field select, .form-field textarea { border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: #fff; padding: .7rem .9rem; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.form-field textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--ring); }
.form-field [aria-invalid="true"] { border-color: #C2410C; }
.form__error { color: #A1260D; font-size: var(--fs-xs); min-height: 1em; }
.form__note { font-size: var(--fs-sm); color: var(--c-muted); margin: var(--sp-4) 0 0; line-height: 1.8; }
.form__status { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--c-primary); font-weight: 600; }
.map-card { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-border); background: var(--c-surface); }
.map-card__visual { aspect-ratio: 16 / 9; background: var(--c-mineral); display: grid; place-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-primary-dark); color: #BCD0C6; padding-top: var(--sp-8); font-size: .95rem; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(to left, var(--c-accent), var(--c-secondary) 40%, transparent); }
.footer__grid { display: grid; gap: var(--sp-6); padding-bottom: var(--sp-7); }
.footer__about p { margin: var(--sp-4) 0; line-height: 1.95; max-width: 40ch; }
.footer__title { color: #fff; font-size: 1rem; font-weight: 800; margin-bottom: var(--sp-4); }
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer__list a { color: #BCD0C6; text-decoration: none; transition: color .2s; }
.footer__list a:hover { color: #fff; text-decoration: underline; }
.footer__contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer__contact .icon { color: #F3C27F; margin-top: .3rem; }
.footer__contact a { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: var(--sp-5) calc(var(--sp-5) + 70px); display: flex; flex-direction: column; gap: var(--sp-3); font-size: var(--fs-sm); }
.footer__bottom a { color: #BCD0C6; }
.footer__bottom-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.footer__social { display: flex; gap: .6rem; margin-top: var(--sp-3); }
.footer__social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .2s, transform .2s; }
.footer__social a:hover { background: var(--c-whatsapp); transform: translateY(-2px); }

/* ---------- Floating & mobile CTA ---------- */
.mobile-cta { position: fixed; inset: auto 0 0 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: .4rem; padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--c-border); box-shadow: 0 -8px 24px -16px rgba(16, 56, 43, .35); transition: transform .3s var(--ease); }
.mobile-cta.is-hidden { transform: translateY(110%); }
.mobile-cta a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 52px; border-radius: 12px; text-decoration: none; font-size: .78rem; font-weight: 700; color: var(--c-primary-dark); }
.mobile-cta a .icon { width: 22px; height: 22px; }
.mobile-cta__wa { color: var(--c-whatsapp) !important; }
.mobile-cta__quote { background: var(--c-accent); color: var(--c-on-accent) !important; flex-direction: row !important; gap: .45rem !important; font-size: .9rem !important; }
.wa-float { display: none; }
.to-top { position: fixed; z-index: 89; inset-inline-start: 1rem; bottom: 84px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-primary); box-shadow: var(--shadow-md); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s var(--ease); }
.to-top:hover { background: var(--c-primary); color: #fff; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: var(--sp-8); }
.notfound__code { font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 900; line-height: 1; color: #789686; /* decorative but kept ≥3:1 for large text (3.09:1) */ letter-spacing: -.04em; }
.notfound .btn-row { justify-content: center; }

/* ---------- Reveal animation (only with JS + motion allowed) ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-on .reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Benefits grid (home) ---------- */
.grid--benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.grid--benefits .card { padding: var(--sp-4); }
.grid--benefits .card__icon { width: 44px; height: 44px; border-radius: 12px; }
.grid--benefits .card__icon .icon { width: 22px; height: 22px; }
.grid--benefits .card__title { font-size: 1rem; }
.grid--benefits .card p { font-size: .88rem; line-height: 1.8; }
.grid--benefits .card--num::before { font-size: 1.8rem; inset-inline-end: .9rem; top: .8rem; }
.grade-card__dots svg { width: 100%; height: 100%; }
.figure--small { max-width: var(--fig-w); margin-inline: auto; }
.grid > *, .split > * { min-width: 0; }
/* backdrop-filter makes the header a containing block for position:fixed children,
   which would clip the full-screen mobile nav to the header box — drop it while the menu is open. */
.nav-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--c-bg); }
