/* ---------- Self-hosted fonts (assets/fonts, SIL OFL 1.1) ----------
   font-display: swap => text paints immediately with the system fallback,
   then swaps when the local woff2 arrives — zero external requests.
   unicode-range => the browser fetches only the subset the page uses. */

/* IBM Plex Mono — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans Arabic — arabic subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* IBM Plex Sans Arabic — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans Arabic — arabic subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* IBM Plex Sans Arabic — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans Arabic — arabic subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* IBM Plex Sans Arabic — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans Arabic — arabic subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}

/* IBM Plex Sans Arabic — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Space Grotesk — latin subset, SIL OFL 1.1, self-hosted */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =====================================================================
   Abdallah Tech — design system & responsive framework
   Brand: charcoal #1C1C1C · bone #EDE6D8 · barber red #B3261E · white
   Breakpoint system (spec §30.1) — applied by layout need, mobile-first:
     small mobile: 320–374  (max-width guard below)
     mobile:       375–639  (default)
     large mobile: 640–767  (@media min-width: 640px)
     tablet:       768–1023 (@media min-width: 768px)
     laptop:       1024–1279(@media min-width: 1024px)
     desktop:      1280–1535(@media min-width: 1280px)
     large desktop:1536+    (@media min-width: 1536px)
   RTL: logical properties everywhere; [dir="rtl"] handled automatically.
   ===================================================================== */

:root {
  /* palette */
  --charcoal: #1C1C1C;
  --charcoal-2: #262626;
  --charcoal-3: #303030;
  --bone: #EDE6D8;
  --bone-soft: #F5F0E6;
  --red: #B3261E;
  --red-deep: #8F1D17;
  --white: #FFFFFF;
  --ink: #1C1C1C;
  --ok: #1B6E4A;

  /* semantic */
  --text: #232323;
  --text-2: #55524B;
  --text-inv: var(--bone);
  --text-inv-2: #C9C2B4;
  --line: rgba(28, 28, 28, .12);
  --line-strong: rgba(28, 28, 28, .22);
  --line-inv: rgba(237, 230, 216, .15);
  --line-inv-strong: rgba(237, 230, 216, .28);

  /* type */
  --font-body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fs-hero: clamp(2.35rem, 4.6vw + 1.2rem, 4.35rem);
  --fs-h1: clamp(1.9rem, 3vw + 1rem, 3rem);
  --fs-h2: clamp(1.4rem, 1.4vw + 1rem, 1.9rem);
  --fs-h3: 1.12rem;
  --fs-body: clamp(1rem, .25vw + .95rem, 1.06rem);
  --fs-small: .9rem;
  --lh: 1.7;

  /* spacing & layout */
  --wrap: 1240px;
  --gutter: clamp(1rem, 3vw, 1.6rem);
  --sec-y: clamp(3rem, 7vw, 5.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --tap: 44px;

  --shadow: 0 1px 2px rgba(28, 28, 28, .06), 0 6px 18px rgba(28, 28, 28, .07);
  --shadow-inv: 0 2px 4px rgba(0, 0, 0, .22), 0 14px 40px rgba(0, 0, 0, .32);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lock { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bone);
}
[dir="rtl"] body { font-family: var(--font-arabic); }
img, svg, video { max-width: 100%; height: auto; display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-flip { transform: scaleX(var(--flip, 1)); }
/* composed flip + rotate: the icon-only "back" control points to the
   reading start in BOTH directions (EN ← / AR →) */
.ic-back { transform: scaleX(var(--flip, 1)) rotate(180deg); }
[dir="ltr"] .ic-flip { --flip: 1; }
[dir="rtl"] .ic-flip { --flip: -1; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .6em; color: var(--ink); }
/* Tight tracking on LATIN headings only — Arabic script is cursive and
   must never be letter-spaced (the [dir="rtl"] reset below enforces it). */
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -.015em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--font-arabic); letter-spacing: 0; }
/* Figures get compared column-to-column: keep digits on a fixed grid. */
.tbl .num, .kv dd, .kpi b { font-variant-numeric: tabular-nums; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-color: rgba(179, 38, 30, .5); text-underline-offset: 3px; }
a:hover { color: var(--red); }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.3em; }
button { font: inherit; }

/* accessibility */
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; inset-inline-start: 1rem; top: -100%;
  background: var(--charcoal); color: var(--bone); padding: .7em 1.2em;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 200; transition: top .2s;
}
.skip:focus { top: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- layout primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--sec-y); }
.sec-alt { background: var(--bone-soft); }
.sec-sub { color: var(--text-2); max-width: 62ch; margin-top: -.4em; }
.top-gap { margin-top: 1.6em; }
.sec-head { margin-bottom: 2rem; max-width: 70ch; }
.sec-head h2 { margin-bottom: .35em; }
.kicker {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; color: var(--red);
  margin: 0 0 .8em;
}
[dir="rtl"] .kicker { letter-spacing: 0; font-family: var(--font-arabic); }
.note { color: var(--text-2); font-size: var(--fs-small); margin: 1.2em 0; }
.body-p { max-width: 72ch; }
.count { font-family: var(--font-mono); font-size: .85rem; color: var(--text-2); }

.grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }

.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 2.5vw, 1.8rem); box-shadow: var(--shadow);
}
.panel h2, .panel h3 { margin-top: 0; }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .65em 0; border-bottom: 1px solid var(--line); font-size: .95rem;
}
.spec-list li:last-child { border-bottom: 0; }
.spec-list span { color: var(--text-2); }
.spec-list b { font-weight: 600; text-align: end; }

.chips { display: flex; flex-wrap: wrap; gap: .5em; }
.chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  background: rgba(179, 38, 30, .08); color: var(--red);
  border: 1px solid rgba(179, 38, 30, .25); border-radius: 999px; padding: .3em .85em;
}
[dir="rtl"] .chip { font-family: var(--font-arabic); }
.chip-lg { font-size: .86rem; background: var(--white); color: var(--text); border-color: var(--line-strong); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--tap); padding: .6em 1.35em;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); color: var(--white); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--red); color: var(--red); background: rgba(179, 38, 30, .05); }
.btn-sm { min-height: 38px; padding: .35em .95em; font-size: .92rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(28, 28, 28, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-inv); color: var(--text-inv);
}
.head-in { display: flex; align-items: center; gap: 1rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.logo-mark { width: 44px; height: 37px; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; white-space: nowrap; }
.brand-txt i { font-style: normal; font-size: .72rem; color: var(--text-inv-2); }

.nav { display: none; align-items: center; gap: .2rem; margin-inline-start: auto; }
.nav > a:not(.btn) {
  padding: .55em .8em; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 500; color: var(--text-inv);
  min-height: var(--tap); display: inline-flex; align-items: center;
}
.nav > a:not(.btn):hover { background: var(--charcoal-2); color: var(--white); }
.nav > a.active { color: var(--white); box-shadow: inset 0 -2.5px 0 var(--red); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.head-tools { display: flex; align-items: center; gap: .4rem; margin-inline-start: auto; }
/* auto on BOTH sides: nav floats centered between brand and tools,
   and the tool cluster hugs the end edge on every width (nav display:none
   on mobile used to leave it bunched next to the brand) */
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--radius-sm);
  border: 1px solid var(--line-inv); background: transparent; color: inherit;
  cursor: pointer; text-decoration: none;
  transition:
    background var(--m-t-hover) var(--m-ease),
    color var(--m-t-hover) var(--m-ease),
    transform var(--m-t-hover) var(--m-ease);
}
.tool-btn:hover { background: var(--charcoal-2); color: var(--white); }
.lang-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 .6em;
  border: 1px solid var(--line-inv); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-weight: 600; font-size: .85rem;
  color: var(--text-inv); text-decoration: none;
}
.lang-tag:hover { background: var(--charcoal-2); color: var(--white); }
.burger { display: inline-flex; }

@media (min-width: 1024px) {
  .nav { display: flex; }
  /* .head-tools raises specificity (0,2,0): buttons.css loads after this file
     and its .tool-btn { display: inline-flex } would otherwise re-show it */
  .head-tools .burger { display: none; }
}

/* laptop band: 8 nav links + brand + tools + wrap padding exceed 1024px —
   compact nav paddings/type here only; desktop (1280+) keeps full spacing */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .head-in { gap: .75rem; }
  .nav { gap: .1rem; }
  .nav > a:not(.btn) { padding: .5em .55em; font-size: .9rem; }
  .head-in .btn { padding-inline: .9em; }
}

/* ---------- drawer (spec §30.4) ---------- */
.drawer-root { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.drawer-root.open { visibility: visible; }
.drawer[hidden] { display: none !important; }
.drawer-backdrop {
  position: absolute; inset: 0; background: rgba(10, 10, 10, .55);
  opacity: 0; transition: opacity var(--m-t-panel, .26s) var(--m-ease, ease-out);
}
.drawer-root.open .drawer-backdrop { opacity: 1; }
.drawer {
  position: absolute; inset-block: 0; inset-inline-start: 0;
  width: min(360px, 88vw);
  background: var(--charcoal); color: var(--text-inv);
  display: flex; flex-direction: column;
  transform: translateX(calc(-100% - 40px));
  transition: transform var(--abtn-dur-slow, .28s) var(--abtn-ease, cubic-bezier(.22, 1, .36, 1));
  box-shadow: var(--shadow-inv);
  overscroll-behavior: contain;
}
[dir="rtl"] .drawer { transform: translateX(calc(100% + 40px)); }
.drawer-root.open .drawer { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem; border-bottom: 1px solid var(--line-inv);
}
.brand-drawer { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; }
.drawer-nav { display: flex; flex-direction: column; padding: .8rem 1rem; gap: .1rem; overflow-y: auto; flex: 1; }
.drawer-nav > a:not(.btn) {
  display: flex; align-items: center; min-height: var(--tap);
  padding: .55em .9em; border-radius: var(--radius-sm);
  color: var(--text-inv); text-decoration: none; font-weight: 500;
  border-inline-start: 3px solid transparent;
}
.drawer-nav > a:not(.btn):hover { background: var(--charcoal-2); }
.drawer-nav > a.active {
  background: var(--charcoal-2); border-inline-start-color: var(--red); color: var(--white);
}
.drawer-cta { margin-top: 1rem; }
.drawer-foot { padding: 1rem; border-top: 1px solid var(--line-inv); display: grid; gap: .5rem; font-size: .92rem; }
.drawer-foot > a { display: flex; align-items: center; gap: .6em; color: var(--text-inv); text-decoration: none; }
.drawer-social { display: flex; gap: .4rem; margin-top: .4rem; }

/* ---------- hero ---------- */
/* Company hero background — swap the file assets/images/hero-bg.jpg (same
   name, ~1920×880, dark image recommended) and it updates site-wide.
   The gradient overlay keeps headline contrast ≥ AA on any photo. */
.hero {
  background:
    linear-gradient(rgba(16, 13, 11, .66), rgba(16, 13, 11, .62) 42%, rgba(16, 13, 11, .72)),
    url("/assets/images/hero-bg.jpg") center / cover no-repeat,
    var(--charcoal);
  color: var(--text-inv); padding-block: clamp(3.5rem, 9vw, 7rem);
}
.hero .kicker { color: var(--red); }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero-sub { color: var(--text-inv-2); max-width: 58ch; font-size: 1.08rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero .btn-ghost { border-color: var(--line-inv-strong); color: var(--text-inv); }
.hero .btn-ghost:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,.06); }

.page-hero { background: var(--charcoal); color: var(--text-inv); padding-block: clamp(2.4rem, 6vw, 4rem); }
.page-hero h1 { color: var(--white); max-width: 26ch; }
.page-hero .lead { color: var(--text-inv-2); max-width: 62ch; font-size: 1.05rem; }
.page-hero .kicker { color: var(--red); align-items: center; }
.page-hero .svc-icon { background: var(--charcoal-2); color: var(--red); }
.page-hero .btn-ghost { border-color: var(--line-inv-strong); color: var(--text-inv); }
.page-hero .btn-ghost:hover { color: var(--white); border-color: var(--white); }

.crumbs { margin-bottom: 1.4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .35em; margin: 0; padding: 0; font-size: .85rem; color: var(--text-inv-2); }
.crumbs a { color: var(--text-inv-2); text-decoration: none; }
.crumbs a:hover { color: var(--white); }
.crumbs .ic { width: 1em; height: 1em; }
.crumbs [aria-current] { color: var(--white); font-weight: 600; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1536px) { .svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.svc-card {
  display: flex; flex-direction: column; gap: .7rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; text-decoration: none; color: var(--ink);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.svc-card:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); box-shadow: var(--shadow); transform: translateY(-2px); }
.svc-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(179, 38, 30, .09); color: var(--red); font-size: 1.3rem;
}
.svc-body { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.svc-body b { font-size: 1.06rem; font-family: var(--font-display); }
[dir="rtl"] .svc-body b { font-family: var(--font-arabic); }
.svc-body span { color: var(--text-2); font-size: .93rem; }
.svc-more { display: inline-flex; align-items: center; gap: .4em; color: var(--red); font-weight: 600; font-size: .9rem; }
/* micro-interaction: the arrow nudges toward the reading direction on hover */
.svc-more .ic { transition: transform var(--abtn-dur-fast, .15s) var(--abtn-ease, cubic-bezier(.22, 1, .36, 1)); }
:is(.svc-card, .blog-card, .prod-card):hover .svc-more .ic { transform: scaleX(var(--flip, 1)) translateX(2px); }

/* product cards */
.prod-grid { align-items: stretch; }
.prod-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.prod-card:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); box-shadow: var(--shadow); transform: translateY(-2px); }
.prod-cover { aspect-ratio: 16 / 10; background: var(--charcoal); }
.prod-cover img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem 1.2rem 1.3rem; flex: 1; }
.prod-body b { font-size: 1.05rem; font-family: var(--font-display); }
[dir="rtl"] .prod-body b { font-family: var(--font-arabic); }
.prod-short { color: var(--text-2); font-size: .92rem; flex: 1; }
.prod-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: center; }
.prod-ver { font-family: var(--font-mono); font-size: .78rem; color: var(--text-2); }
.prod-price { font-weight: 700; color: var(--red); font-size: .95rem; }

/* project cards */
.proj-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.proj-card:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); box-shadow: var(--shadow); transform: translateY(-2px); }
.proj-cover { aspect-ratio: 16 / 10; background: var(--charcoal); }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proj-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem 1.2rem 1.3rem; }
.proj-body b { font-size: 1.08rem; font-family: var(--font-display); }
[dir="rtl"] .proj-body b { font-family: var(--font-arabic); }
.proj-url { display: inline-flex; align-items: center; gap: .5em; color: var(--text-2); font-family: var(--font-mono); font-size: .8rem; }
.proj-shot { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }

/* category cards */
.cat-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; text-decoration: none; color: var(--ink);
}
.cat-card:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); }
.cat-card .ic { width: 1.6em; height: 1.6em; color: var(--red); }
.cat-card b { font-family: var(--font-display); font-size: 1.05rem; }
[dir="rtl"] .cat-card b { font-family: var(--font-arabic); }
.cat-card > span:last-child { color: var(--text-2); font-size: .88rem; }
.cat-empty { background: var(--bone); border-style: dashed; }

/* why + process */
.why-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.why-item { display: flex; gap: .8rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.why-item .ic { color: var(--red); margin-top: .3em; }
.why-item b { display: block; margin-bottom: .25em; }
.why-item p { color: var(--text-2); font-size: .93rem; margin: 0; }

.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.process-step {
  display: flex; gap: 1.1rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.process-n {
  font-family: var(--font-mono); font-weight: 600; color: var(--red);
  border: 1.5px solid rgba(179, 38, 30, .4); border-radius: 10px;
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
}
.process-step b { display: block; margin-bottom: .2em; }
.process-step p { color: var(--text-2); font-size: .95rem; margin: 0; }
@media (min-width: 1280px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* check / problem lists */
.check-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check-grid li { display: flex; gap: .7em; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8em 1em; font-size: .97rem; }
.check-grid .ic { color: var(--ok); margin-top: .25em; }
.prob-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.prob-list li { display: flex; gap: .7em; align-items: flex-start; font-size: .97rem; }
.prob-x { color: var(--red); margin-top: .3em; width: 1.1em; height: 1.1em; }
.req-list .ic { color: var(--text-2); margin-top: .3em; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--charcoal); color: var(--text-inv); padding-block: var(--sec-y); }
.cta-card {
  display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start;
  border: 1px solid var(--line-inv); border-radius: var(--radius);
  background: var(--charcoal-2); padding: clamp(1.4rem, 4vw, 2.6rem);
}
.cta-card h2 { color: var(--white); margin-bottom: .3em; }
.cta-card p { color: var(--text-inv-2); margin: 0; max-width: 58ch; }
.cta-card .btn { flex: none; }
@media (min-width: 768px) { .cta-card { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- intro (home) ---------- */
.intro-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .intro-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.intro-copy p { color: var(--text-2); max-width: 70ch; }
.sec-actions { margin-top: 1.8rem; display: flex; }

/* ---------- catalog (spec §30.5) ---------- */
.catalog { display: grid; gap: 1.4rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .catalog { grid-template-columns: 250px minmax(0, 1fr); } }
.catalog-side { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
@media (min-width: 1024px) {
  .catalog-side { position: sticky; top: 82px; }
}
.side-title { font-size: 1rem; margin-bottom: .8em; }
.filter-group { display: flex; flex-wrap: wrap; gap: .45rem; }
@media (min-width: 1024px) { .filter-group { flex-direction: column; align-items: stretch; } }
.filter-btn {
  min-height: var(--tap); text-align: start;
  padding: .5em 1em; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  cursor: pointer; font-size: .95rem; transition: all .15s;
}
.filter-btn:hover { border-color: var(--red); color: var(--red); }
.filter-btn.active { background: var(--charcoal); border-color: var(--charcoal); color: var(--bone); }
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.sort-label { display: inline-flex; align-items: center; gap: .6em; font-size: .92rem; color: var(--text-2); }
.sort-label select {
  min-height: 40px; padding: .4em .8em; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--white); color: var(--text); font: inherit; font-size: .92rem;
}
.empty {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 2.2rem 1.5rem; text-align: center; color: var(--text-2);
  display: grid; gap: .5rem; justify-items: center;
}
.empty b { color: var(--ink); }

/* ---------- product detail ---------- */
.product-grid { display: grid; gap: 1.8rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .product-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.product-media img { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }
.media-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.price-line { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 1.2rem; }
.price-line b { font-family: var(--font-display); font-size: 1.7rem; color: var(--red); }
.price-line span { color: var(--text-2); font-size: .9rem; }
.prod-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 .4rem; }
.prod-ver-inline { font-family: var(--font-mono); color: var(--text-inv-2); }

/* sticky mobile purchase bar (spec §30.6 optional) */
.buy-bar { display: none; }
@media (max-width: 767px) {
  .buy-bar {
    display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
    background: var(--charcoal); color: var(--text-inv);
    border-top: 1px solid var(--line-inv);
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom, 0px));
  }
  body.has-dialog .buy-bar, body:has([data-status]:not(:empty)) .buy-bar { display: none; }
  .buy-bar-in { display: flex; align-items: center; gap: .8rem; }
  .buy-bar-in b { flex: 1; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); }
  [dir="rtl"] .buy-bar-in b { font-family: var(--font-arabic); }
  .buy-bar-in span { color: var(--red); font-weight: 700; font-size: .9rem; }
  body:has(.buy-bar) { padding-bottom: 64px; }
}

/* ---------- forms ---------- */
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: .4em; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > span { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0;
  min-height: var(--tap); padding: .55em .85em;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bone-soft); color: var(--text); font: inherit;
  transition: border-color .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: none; }
.field input[readonly] { background: var(--bone); color: var(--text-2); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field .err { color: var(--red); font-size: .82rem; }
.hp { position: absolute; inset-inline-start: -9999px; height: 0; opacity: 0; }
.form-foot { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; }
.privacy-note { color: var(--text-2); font-size: .84rem; max-width: 46ch; margin: 0; }
.form-status { margin-top: 1rem; }
.form-status:empty { display: none; }
.status { border-radius: var(--radius-sm); padding: 1em 1.2em; font-size: .95rem; }
.status-ok { background: rgba(27, 110, 74, .08); border: 1px solid rgba(27, 110, 74, .35); color: var(--ok); }
.status-warn { background: rgba(179, 38, 30, .06); border: 1px solid rgba(179, 38, 30, .3); color: var(--ink); }
.status-err { background: rgba(179, 38, 30, .08); border: 1px solid rgba(179, 38, 30, .4); color: var(--red); }
.status b { display: block; margin-bottom: .3em; }
.status .btn { margin-top: .8rem; }
.ref-panel { max-width: 560px; margin-bottom: 2rem; }
.ref-code { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--red); letter-spacing: .04em; }

/* contact channels */
.contact-channels { display: grid; gap: .8rem; align-content: start; }
.chan {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s;
}
.chan:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); }
.chan .ic { width: 1.6em; height: 1.6em; color: var(--red); }
.chan > span { min-width: 0; }
.chan span span:last-child { overflow-wrap: anywhere; }
.chan b { display: block; font-size: .85rem; color: var(--text-2); font-weight: 600; }
.chan span span:last-child { font-weight: 600; }
.chan-static { display: flex; gap: 1rem; padding: 1rem 1.2rem; color: var(--text-2); font-size: .93rem; }
.chan-static .ic { width: 1.6em; height: 1.6em; color: var(--red); margin-top: .2em; }
.chan-social { display: flex; gap: .5rem; margin-top: .4rem; }
.chan-social .tool-btn { border-color: var(--line-strong); color: var(--ink); }
.chan-social .tool-btn:hover { background: var(--charcoal); color: var(--bone); border-color: var(--charcoal); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: .7rem; max-width: 860px; }
.faq {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1em 1.2em; font-weight: 600; min-height: var(--tap);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--red); }
.faq[open] summary .ic { transform: rotate(180deg); }
.faq > p { padding: 0 1.2em 1.1em; color: var(--text-2); margin: 0; }

/* ---------- blog feed ---------- */
.blog-cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1.4rem; }
@media (min-width: 768px) { .blog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .blog-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blog-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.3rem; text-decoration: none; color: var(--ink);
}
.blog-card:hover { color: var(--ink); border-color: rgba(179, 38, 30, .45); }
.blog-card time { font-family: var(--font-mono); font-size: .78rem; color: var(--text-2); }
.blog-card b { font-size: 1rem; font-family: var(--font-display); line-height: 1.4; }
[dir="rtl"] .blog-card b { font-family: var(--font-arabic); }
.blog-card p { color: var(--text-2); font-size: .9rem; margin: 0; flex: 1; }
.blog-card .svc-more { font-size: .85rem; }

/* ---------- search ---------- */
.search-form { margin-bottom: 1rem; }
.search-bar {
  display: flex; align-items: center; gap: .7rem;
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  padding: .3em .9em;
}
.search-bar:focus-within { border-color: var(--red); }
.search-bar .ic { color: var(--text-2); }
.search-bar input { flex: 1; min-width: 0; min-height: 50px; border: 0; background: transparent; font: inherit; color: var(--text); }
.search-bar input:focus { outline: none; }
.search-results { display: grid; gap: .7rem; }
.sr-item { display: flex; flex-direction: column; gap: .2rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9em 1.1em; text-decoration: none; }
.sr-item:hover { border-color: rgba(179, 38, 30, .45); }
.sr-item b { color: var(--ink); }
.sr-item b mark { background: rgba(179, 38, 30, .15); color: var(--red); }
.sr-item span { color: var(--text-2); font-size: .9rem; }
.sr-item i { font-style: normal; font-family: var(--font-mono); font-size: .75rem; color: var(--red); }

/* ---------- footer ---------- */
.site-foot { background: var(--charcoal); color: var(--text-inv); padding-top: clamp(2.5rem, 6vw, 4rem); border-top: 4px solid var(--red); }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-bottom: 2.4rem; }
@media (min-width: 640px)  { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.foot-brand p { color: var(--text-inv-2); font-size: .93rem; max-width: 44ch; }
.foot-social { display: flex; gap: .5rem; margin-top: 1rem; }
.foot-col { display: flex; flex-direction: column; gap: .55rem; }
.foot-col h2, .foot-col h3 { color: var(--white); font-size: .95rem; margin-bottom: .3em; }
.foot-col a { color: var(--text-inv-2); font-size: .93rem; min-height: 24px; display: inline-flex; align-items: center;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: color var(--m-t-hover) var(--m-ease), text-decoration-color var(--m-t-hover) var(--m-ease); }
.foot-col a:hover { color: var(--white); text-decoration-color: currentColor; }
.foot-social .tool-btn:hover { transform: translateY(-2px); }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line-inv); padding-block: 1.2rem;
  font-size: .85rem; color: var(--text-inv-2);
}
.foot-bottom p { margin: 0; }
.foot-bottom a { color: var(--text-inv-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.foot-bottom a:hover { color: var(--white); text-decoration-color: currentColor; }

/* ---------- legal ---------- */
.legal-body { max-width: 820px; }
.legal-body h2 { margin-top: 1.8em; font-size: 1.25rem; }
.legal-body p { color: var(--text-2); }
.legal-body p:first-of-type { color: var(--text); }

/* 375-439px: brand + head-tools + wrap padding need ~2px less than 390px
   viewports give — shrink the brand wordmark and lang switch, hide tagline */
@media (max-width: 439px) {
  .brand-txt i { display: none; }
  .brand-txt b { font-size: .92rem; letter-spacing: .01em; }
  .head-tools .lang-tag { font-size: .82rem; }
}

/* ---------- small mobile guard (320–374px, spec §30.1) ---------- */
@media (max-width: 374px) {
  :root { --fs-h1: 1.75rem; }
  .brand-txt { display: none; }
  .head-in { gap: .5rem; }
  .head-tools { gap: .3rem; }
  .head-tools .tool-btn, .head-tools .lang-tag { width: 40px; min-width: 40px; height: 40px; }
  .drawer-nav > a:not(.btn) .ic { margin-inline-end: .5em; }
  .hero-cta .btn, .cta-card .btn { width: 100%; }
  .prod-cta .btn, .media-links .btn { width: 100%; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- large desktop polish (1536+) ---------- */
@media (min-width: 1536px) {
  :root { --wrap: 1320px; }
  .hero-in { padding-block: 2rem; }
}

/* ---------- print ---------- */
@media print {
  .site-head, .drawer-root, .buy-bar, .cta-band, .site-foot { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- motion system (2026) — transform/opacity only ----------
   Micro 130ms · hover 180ms · panel 260ms · reveal 340ms (coarse
   pointers run shorter). easeOutQuint for entrances/panels, swift
   for hovers. Desktop hover effects are guarded by (hover:hover)+
   (pointer:fine); touch gets instant press feedback instead. The
   global reduced-motion block above kills everything, and the JS
   reveal module never tags anything when the user prefers calm. */
:root {
  --m-ease: cubic-bezier(.22, 1, .36, 1);      /* easeOutQuint */
  --m-ease-soft: cubic-bezier(.4, 0, .2, 1);   /* swift */
  --m-t-micro: 130ms;
  --m-t-hover: 180ms;
  --m-t-panel: 260ms;
  --m-t-reveal: 340ms;
  --m-rise: 14px;
  --m-head: 78px; /* sticky header (66px) + breathing room */
}
@media (pointer: coarse) {
  :root { --m-t-reveal: 260ms; --m-t-panel: 220ms; --m-rise: 10px; }
}

/* in-page anchors must clear the sticky header */
html { scroll-padding-top: var(--m-head); }
[id] { scroll-margin-top: var(--m-head); }

/* cross-document page transitions — progressive, zero JS, disabled
   for reduced-motion users via the wrapper query */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* scroll reveal — the .rv class is added BY JS ONLY, so without JS
   (or with reduced motion) content is simply visible. Classes are
   removed again after the transition, restoring the original
   cascade (card hover transitions etc. stay untouched). */
.rv {
  opacity: 0;
  transform: translateY(var(--m-rise));
  transition:
    opacity var(--m-t-reveal) var(--m-ease),
    transform var(--m-t-reveal) var(--m-ease);
  transition-delay: var(--rv-d, 0ms);
  will-change: opacity, transform;
}
.rv.rv-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.rv-in { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* drawer — items stagger in with the panel, from the panel's side;
   the close button rotates into place (the burger itself is covered
   by the overlay while open, so the close affordance is the target
   of the "transform into a close button" motion) */
.drawer-nav > * {
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity var(--m-t-panel) var(--m-ease),
    transform var(--m-t-panel) var(--m-ease);
}
[dir="rtl"] .drawer-nav > * { transform: translateX(10px); }
.drawer-root.open .drawer-nav > * { opacity: 1; transform: none; }
.drawer-root.open .drawer-nav > *:nth-child(1) { transition-delay: 70ms; }
.drawer-root.open .drawer-nav > *:nth-child(2) { transition-delay: 105ms; }
.drawer-root.open .drawer-nav > *:nth-child(3) { transition-delay: 140ms; }
.drawer-root.open .drawer-nav > *:nth-child(4) { transition-delay: 175ms; }
.drawer-root.open .drawer-nav > *:nth-child(5) { transition-delay: 210ms; }
.drawer-root.open .drawer-nav > *:nth-child(6) { transition-delay: 245ms; }
.drawer-root.open .drawer-nav > *:nth-child(7) { transition-delay: 280ms; }
.drawer-root.open .drawer-nav > *:nth-child(8) { transition-delay: 315ms; }
.drawer-root.open .drawer-nav > *:nth-child(n + 9) { transition-delay: 340ms; }
/* drawer-foot joins the same stagger, entering after the nav finishes */
.drawer-foot > * {
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity var(--m-t-panel) var(--m-ease),
    transform var(--m-t-panel) var(--m-ease);
}
[dir="rtl"] .drawer-foot > * { transform: translateX(10px); }
.drawer-root.open .drawer-foot > * { opacity: 1; transform: none; }
.drawer-root.open .drawer-foot > *:nth-child(1) { transition-delay: 340ms; }
.drawer-root.open .drawer-foot > *:nth-child(2) { transition-delay: 380ms; }
.drawer-root.open .drawer-foot > *:nth-child(n + 3) { transition-delay: 420ms; }
.drawer-head .tool-btn {
  opacity: 0; transform: rotate(-90deg) scale(.85);
  transition:
    opacity var(--m-t-panel) var(--m-ease),
    transform var(--m-t-panel) var(--m-ease);
}
.drawer-root.open .drawer-head .tool-btn { opacity: 1; transform: none; transition-delay: 130ms; }
@media (prefers-reduced-motion: reduce) {
  .drawer-nav > *, .drawer-foot > *, .drawer-head .tool-btn { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* icon micro-motion on header tools */
.tool-btn svg { transition: transform var(--m-t-micro) var(--m-ease); }
.tool-btn:active svg { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) {
  .tool-btn:hover svg { transform: scale(1.08); }
}

/* touch: no sticky hover-lift on cards; instant press feedback */
@media (hover: none) {
  :is(.svc-card, .blog-card, .prod-card, .cat-card, .proj-card):hover { transform: none; }
  :is(.svc-card, .blog-card, .prod-card, .cat-card, .proj-card):active {
    transform: scale(.985);
    transition: transform var(--m-t-micro) var(--m-ease);
  }
}

/* cover images zoom subtly inside a clipped box on true-hover devices
   (overflow hidden added — box has fixed aspect ratio, no layout shift) */
.prod-cover, .proj-cover { overflow: hidden; }
.prod-cover img, .proj-cover img { transition: transform 320ms var(--m-ease); }
@media (hover: hover) and (pointer: fine) {
  :is(.prod-card, .proj-card):hover :is(.prod-cover, .proj-cover) img { transform: scale(1.045); }
}
