/* Self-hosted fonts (no Google requests — faster & privacy-friendly) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/inter-latin-800-normal.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+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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; }
/* =========================================================
   Mohamed Abdelkhalk — personal brand site
   Dark-first premium theme · light mode via [data-theme="light"]
   ========================================================= */
:root {
  --bg: #060a18;
  --bg-2: #0a1124;
  --surface: #0e1630;
  --surface-2: #131d3b;
  --line: rgba(148, 170, 220, .14);
  --line-2: rgba(148, 170, 220, .24);
  --text: #eaf0fb;
  --muted: #9aa8c4;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-3: #22d3ee;
  --on-accent: #fff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --glow: rgba(59, 130, 246, .35);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -24px rgba(0, 0, 0, .65);
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #eef2fa;
  --surface: #ffffff;
  --surface-2: #f2f5fb;
  --line: rgba(15, 30, 70, .10);
  --line-2: rgba(15, 30, 70, .18);
  --text: #0b1430;
  --muted: #51607d;
  --accent: #1d5fe0;
  --accent-2: #2563eb;
  --glow: rgba(37, 99, 235, .18);
  --shadow: 0 18px 50px -24px rgba(15, 30, 70, .25);
  color-scheme: light;
}
body.rtl { --font: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.rtl { line-height: 1.85; }
img, video, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent-3); }
[data-theme="light"] a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
body.rtl h1, body.rtl h2, body.rtl h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-3); outline-offset: 3px; border-radius: 6px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 40px); }
.center { text-align: center; display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mt { margin-top: 40px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.grad { background: linear-gradient(100deg, var(--accent-2), var(--accent-3) 60%, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin-bottom: 14px; }
body.rtl .kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.ic { flex-shrink: 0; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px;
  border-radius: 999px; border: 1px solid var(--b); font: inherit; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s; color: var(--text); background: transparent;
  text-decoration: none; white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); color: var(--text); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #2563eb 60%, #1d4ed8); border-color: transparent; color: var(--on-accent); box-shadow: 0 10px 30px -10px var(--glow); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 40px -10px var(--glow); }
.btn-ghost { background: color-mix(in srgb, var(--surface) 60%, transparent); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
body.rtl .btn .ic[stroke] { transform: scaleX(-1); }
body.rtl .btn .ic:has(path[d^="M7 4v16"]) { transform: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
body.rtl .link-arrow .ic { transform: scaleX(-1); }
.link-arrow:hover .ic { translate: 4px 0; }
body.rtl .link-arrow:hover .ic { translate: -4px 0; }
.link-arrow .ic { transition: translate .2s; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.site-header.scrolled { border-color: var(--line); }
.nav-wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand img { height: 34px; width: auto; }
[data-theme="light"] .brand img, [data-theme="light"] .footer-brand img { filter: invert(1) brightness(.2); }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); }
.lang-switch:hover { border-color: var(--accent-2); color: var(--text); }
.theme-btn, .menu-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.menu-btn { display: none; }
.mobile-only { display: none !important; }
.theme-btn .moon { display: none; }
[data-theme="light"] .theme-btn .sun { display: none; }
[data-theme="light"] .theme-btn .moon { display: block; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 60px; overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 120%; background:
  radial-gradient(600px 400px at 75% 30%, rgba(59,130,246,.28), transparent 70%),
  radial-gradient(500px 340px at 10% 10%, rgba(34,211,238,.12), transparent 70%); pointer-events: none; }
body.rtl .hero-glow { transform: scaleX(-1); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .88rem; font-weight: 500; color: var(--muted); margin-bottom: 22px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(52,211,153,.18); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } }
.hero h1 { margin-bottom: 20px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-actions.center { justify-content: center; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .93rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .ic { color: var(--good); }
.hero-visual { position: relative; }
.photo-frame { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(37,99,235,.55); aspect-ratio: 1184/1328; background: var(--surface); }
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 65%, rgba(6,10,24,.55)); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); animation: float 6s ease-in-out infinite; }
.float-card small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.2; }
.float-card strong { font-size: .98rem; line-height: 1.3; }
.float-card .ic { color: var(--accent-2); }
.fc-souqly { inset-inline-start: -28px; bottom: 16%; }
.fc-souqly:hover { color: var(--text); border-color: var(--accent-2); }
.fc-exp { inset-inline-end: -18px; top: 9%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- clients marquee ---------- */
.clients { padding: 26px 0 34px; border-block: 1px solid var(--line); background: var(--bg-2); }
.clients-title { text-align: center; color: var(--muted); font-size: .9rem; font-weight: 500; margin-bottom: 18px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 18px; width: max-content; animation: marquee 38s linear infinite; }
body.rtl .marquee-track { animation-name: marquee-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.client-logo { width: 150px; height: 84px; display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 12px 18px; border: 1px solid var(--line); transition: transform .25s; }
.client-logo.dark { background: #0b1022; }
.client-logo:hover { transform: translateY(-3px); }
.client-logo img { max-height: 58px; max-width: 100%; width: auto; object-fit: contain; }

/* ---------- stats ---------- */
.stats { padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat { padding: 26px; border-radius: var(--radius); background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(2rem, 3.6vw, 2.7rem); font-weight: 800; line-height: 1.1; background: linear-gradient(100deg, var(--text), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; unicode-bidi: isolate; }
body.rtl .stat strong { text-align: right; }
.stat span { color: var(--muted); font-size: .95rem; }

/* ---------- sections ---------- */
.section { padding: clamp(60px, 8vw, 110px) 0; }
.section.pt0 { padding-top: 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); }
.ic-wrap { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(34,211,238,.12)); color: var(--accent-2); border: 1px solid rgba(96,165,250,.25); margin-bottom: 18px; }
.svc-card, .feature { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; overflow: hidden; }
.svc-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(59,130,246,.14), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.svc-card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.4); box-shadow: var(--shadow); }
.svc-card:hover::before { opacity: 1; }
.svc-card p, .feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* souqly */
.souqly-band { background: radial-gradient(800px 400px at 0% 50%, rgba(34,211,238,.10), transparent 60%), var(--bg); }
.souqly-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature .ic-wrap { width: 42px; height: 42px; margin-bottom: 12px; }
.feature h3 { font-size: 1.05rem; }
.rounded-img { border-radius: var(--radius); border: 1px solid var(--line); }

/* featured case */
.featured-case { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); margin-bottom: 26px; box-shadow: var(--shadow); }
.fc-info { padding: clamp(24px, 4vw, 44px); }
.fc-info h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.fc-info p { color: var(--muted); }
.fc-chart { position: relative; padding: 28px; background: linear-gradient(160deg, #0b1b44, #08102a); display: flex; flex-direction: column; justify-content: space-between; color: #cbd5e1; min-height: 320px; }
.fc-chart-head { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.fc-chart-head img { height: 44px; width: auto; background: #fff; border-radius: 10px; padding: 4px 8px; }
.spark { width: 100%; height: 200px; }
.fc-chart-foot { display: flex; justify-content: space-between; font-size: .8rem; opacity: .7; direction: ltr; }
.metric-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0 26px; }
.metric-tiles.big { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 34px; }
.metric-tiles div { padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.metric-tiles strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--good); direction: ltr; unicode-bidi: isolate; }
body.rtl .metric-tiles strong { text-align: right; }
.metric-tiles span { font-size: .9rem; color: var(--text); font-weight: 600; }
.metric-tiles small { display: block; color: var(--muted); font-size: .8rem; direction: ltr; unicode-bidi: isolate; }
body.rtl .metric-tiles small { text-align: right; }

/* case cards */
.case-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.case-card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.4); }
.case-card.hidden { display: none; }
.case-card h3 { margin: 6px 0 0; }
.case-card h3 a { color: var(--text); }
.case-card p { color: var(--muted); margin: 0; font-size: .96rem; flex: 1; }
.case-top { display: flex; align-items: center; gap: 12px; }
.case-logo { width: 56px; height: 56px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 6px; flex-shrink: 0; }
.case-logo img { max-height: 44px; width: auto; object-fit: contain; }
.case-client { display: block; font-weight: 700; }
.case-tags { display: block; color: var(--muted); font-size: .85rem; }
.case-metrics { display: flex; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.case-metrics strong { display: block; color: var(--good); font-size: 1.1rem; direction: ltr; unicode-bidi: isolate; }
.case-metrics span { font-size: .8rem; color: var(--muted); }

/* video */
.video-band { background: radial-gradient(700px 400px at 100% 0%, rgba(59,130,246,.16), transparent 60%), var(--bg); }
.video-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.video-stack { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.vid { margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: #000; box-shadow: var(--shadow); }
.vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-tall { grid-row: span 2; aspect-ratio: 9/16; }
.vid-sq { aspect-ratio: 1; }
.vid-wide { aspect-ratio: 16/9; }
.media-wrap { margin-top: 60px; }
.media-card { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.media-frame { aspect-ratio: 16/9; background: #000; position: relative; }
.media-frame video, .media-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-card figcaption { padding: 16px 18px; }
.media-card figcaption span { display: block; color: var(--muted); font-size: .92rem; }
.embed-lite { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; background: #0b1022 center/cover no-repeat; color: #fff; }
.embed-lite .ic { width: 72px; height: 72px; padding: 18px; border-radius: 50%; background: rgba(37,99,235,.9); fill: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.4); transition: transform .2s; }
.embed-lite:hover .ic, .embed-lite:focus-visible .ic { transform: scale(1.08); }
.reel-modal { position: fixed; inset: 0; z-index: 90; background: rgba(2,4,12,.86); display: grid; place-items: center; padding: 20px; backdrop-filter: blur(6px); }
.reel-modal[hidden] { display: none; }
.reel-inner { position: relative; width: min(960px, 100%); }
.reel-inner video { width: 100%; border-radius: 16px; background: #000; }
.reel-close { position: absolute; top: -48px; inset-inline-end: 0; background: none; border: 0; color: #fff; cursor: pointer; }

/* process */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: s; }
.process li { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); position: relative; }
.step-n { display: inline-block; font-size: .85rem; font-weight: 800; color: var(--accent-2); padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,.12); margin-bottom: 14px; }
.process p { color: var(--muted); margin: 0; font-size: .95rem; }
.quote { margin: 0; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.quote blockquote { margin: 0 0 16px; font-size: 1.05rem; }
.quote figcaption span { display: block; color: var(--muted); font-size: .9rem; }

/* tools teaser */
.tools-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: clamp(28px, 4vw, 52px); border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(500px 300px at 100% 100%, rgba(34,211,238,.12), transparent 60%), linear-gradient(160deg, var(--surface), var(--bg-2)); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-list a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .95rem; transition: border-color .2s, transform .2s; }
.tool-list a:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.tool-list .ic { color: var(--accent-2); }

/* posts */
.post-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.post-card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,.4); }
.post-thumb { aspect-ratio: 16/9; overflow: hidden; display: block; background: var(--surface-2); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.thumb-art { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; background: radial-gradient(circle at 20% 20%, rgba(34,211,238,.35), transparent 50%), radial-gradient(circle at 85% 80%, rgba(59,130,246,.55), transparent 55%), #0a1430; }
.thumb-art span { font-weight: 800; font-size: 1.25rem; color: #fff; text-align: center; opacity: .92; }
.post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { font-size: 1.12rem; margin: 10px 0 8px; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--accent-2); }
.post-body p { color: var(--muted); font-size: .94rem; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .84rem; font-weight: 600; background: rgba(59,130,246,.12); color: var(--accent-2); border: 1px solid rgba(96,165,250,.2); white-space: nowrap; cursor: pointer; font-family: inherit; }
.chip small { opacity: .7; }
.chip.active, .chip:hover { background: var(--accent); color: #fff; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { cursor: default; }
.chips .chip:hover { background: rgba(59,130,246,.12); color: var(--accent-2); border-color: rgba(96,165,250,.2); }
.filter-chips { display: flex; gap: 8px; margin-bottom: 26px; }
.blog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.blog-toolbar .filter-chips { margin: 0; flex: 1; min-width: 0; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); min-width: 260px; }
.search input { border: 0; background: transparent; color: var(--text); padding: 11px 0; font: inherit; width: 100%; outline: none; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.pagination a.active, .pagination a:hover { background: var(--accent); color: #fff; border-color: transparent; }

/* page hero */
.page-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 60px); position: relative; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 80% 0%, rgba(59,130,246,.18), transparent 70%); pointer-events: none; }
.page-hero .container { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.case-hero-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: center; }
.case-hero-logo { background: #fff; border-radius: 24px; padding: 30px; display: grid; place-items: center; aspect-ratio: 1; max-width: 280px; justify-self: end; box-shadow: var(--shadow); }
.case-hero-logo img { max-height: 160px; width: auto; }
.souqly-visual { background: linear-gradient(145deg, #0f2a66, #0a1430); color: #fff; max-width: 360px; width: 100%; }
.souqly-visual img { max-height: none; width: 100%; border-radius: 14px; }
.souqly-tile { display: grid; place-items: center; border-radius: 28px; aspect-ratio: 4/3; border: 1px solid var(--line-2); box-shadow: var(--shadow); color: #fff; padding: 30px; justify-self: center; max-width: 460px; }
.souqly-tile:hover { color: #fff; transform: translateY(-3px); }
.souqly-mark small { font-weight: 500; font-size: .9rem; opacity: .75; }
.svc-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 1140px) { .svc-grid { grid-template-columns: repeat(4, 1fr); } }
.souqly-mark { display: grid; place-items: center; gap: 14px; text-align: center; font-weight: 800; font-size: 1.3rem; }
.case-facts { display: flex; flex-wrap: wrap; gap: 26px; margin: 18px 0 0; }
.case-facts dt { color: var(--muted); font-size: .82rem; }
.case-facts dd { margin: 0; font-weight: 600; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.chart-card { margin: 0; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); height: 330px; display: flex; flex-direction: column; }
.chart-card figcaption { font-weight: 700; margin-bottom: 12px; }
.chart-card canvas { flex: 1; min-height: 0; }

/* about */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.about-card { position: sticky; top: 96px; padding: 22px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.about-card img { border-radius: 16px; margin-bottom: 18px; aspect-ratio: 1; object-fit: cover; object-position: top; width: 100%; }
.about-card h2 { font-size: 1.4rem; margin-bottom: 4px; }
.about-card > p { color: var(--muted); }
.about-facts { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; font-size: .93rem; }
.about-facts li { display: flex; gap: 10px; align-items: center; color: var(--muted); word-break: break-word; }
.stack-btns { display: grid; gap: 10px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; position: relative; }
.timeline > li { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.tl-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tl-head > div { flex: 1; min-width: 200px; }
.tl-head h3 { margin: 0; }
.tl-head p { margin: 0; color: var(--muted); }
.tl-logo { width: 56px; height: 56px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 6px; }
.tl-logo img { max-height: 44px; width: auto; }
.tl-period { font-size: .85rem; font-weight: 600; color: var(--accent-2); padding: 6px 12px; border-radius: 999px; background: rgba(59,130,246,.12); white-space: nowrap; }
.timeline ul { margin: 14px 0 0; padding-inline-start: 20px; color: var(--muted); }
.timeline ul li { margin-bottom: 4px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.skill-group { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.skill-group h3 { font-size: 1.02rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.h-sm { font-size: 1.15rem; margin-bottom: 16px; }
.clean-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.clean-list li { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.clean-list span { color: var(--muted); font-size: .92rem; }
.clean-list .ic { color: var(--accent-2); align-self: center; }

/* prose (articles & rich content) */
.prose { font-size: 1.06rem; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 1.8em 0 .6em; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.25rem; margin: 1.5em 0 .5em; scroll-margin-top: 96px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose ul, .prose ol { padding-inline-start: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent-2); }
.prose a { text-decoration: underline; text-decoration-color: rgba(96,165,250,.45); text-underline-offset: 3px; }
.prose img { border-radius: 14px; margin: 1.5em 0; }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-inline-start: 4px solid var(--accent); background: var(--surface); border-radius: 12px; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; direction: ltr; unicode-bidi: isolate; }
.prose pre { background: #050816; color: #dbeafe; padding: 18px; border-radius: 12px; overflow-x: auto; direction: ltr; text-align: left; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
/* content blocks the editor can insert */
.ma-tip, .ma-note, .ma-warn { margin: 1.6em 0; padding: 18px 20px 18px 22px; border-radius: 14px; border: 1px solid; }
.ma-tip { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.35); }
.ma-note { background: rgba(59,130,246,.08); border-color: rgba(96,165,250,.35); }
.ma-warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.35); }
.ma-tip > :last-child, .ma-note > :last-child, .ma-warn > :last-child { margin-bottom: 0; }
.ma-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 1.6em 0; }
.ma-card { padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ma-card h4 { margin: 0 0 6px; font-size: 1.02rem; }
.ma-card p { margin: 0; font-size: .95rem; color: var(--muted); }
.ma-stat { font-size: 1.8rem; font-weight: 800; color: var(--good); display: block; direction: ltr; unicode-bidi: isolate; }
.ma-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), #2563eb); color: #fff !important; font-weight: 600; text-decoration: none !important; margin: .4em 0; }
.ma-btn:hover { box-shadow: 0 12px 30px -10px var(--glow); }
.ma-btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--text) !important; }
.ma-steps { counter-reset: st; list-style: none; padding: 0 !important; }
.ma-steps > li { counter-increment: st; position: relative; padding: 14px 16px 14px 60px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; }
body.rtl .ma-steps > li { padding: 14px 60px 14px 16px; }
.ma-steps > li::before { content: counter(st); position: absolute; inset-inline-start: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }

/* shortcode cards */
.sc-card { margin: 2em 0; padding: clamp(22px, 3vw, 34px); border-radius: 22px; border: 1px solid var(--line-2); background: linear-gradient(150deg, var(--surface), var(--bg-2)); }
.sc-card h3 { font-size: 1.35rem; margin-top: 0; }
.sc-card p { color: var(--muted); }
.sc-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: radial-gradient(500px 240px at 100% 0%, rgba(59,130,246,.3), transparent 70%), linear-gradient(150deg, var(--surface), var(--bg-2)); }
.sc-cta > div:first-child { flex: 1 1 380px; }
.sc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sc-contact { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sc-contact img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; }
.sc-contact > div { flex: 1 1 260px; }
.sc-contact p { margin: 0; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 200px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; }

/* article page */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
body.rtl .read-progress span { margin-inline-start: auto; }
.article-head { padding: clamp(36px, 5vw, 64px) 0 26px; }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: .92rem; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; }
.byline a strong { color: var(--text); }
.byline span { display: block; color: var(--muted); }
.article-cover img { border-radius: 20px; width: 100%; }
.article-grid { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 56px; justify-content: center; padding-bottom: 80px; }
.toc-wrap { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc summary, .share p { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
body.rtl .toc summary, body.rtl .share p { letter-spacing: 0; font-size: .9rem; }
.toc summary { cursor: pointer; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; margin: 0 0 26px; border-inline-start: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; color: var(--muted); font-size: .9rem; line-height: 1.45; margin-inline-start: -2px; border-inline-start: 2px solid transparent; }
.toc a:hover, .toc a.on { color: var(--text); border-color: var(--accent-2); }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share p { width: 100%; }
.share a, .share button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 700; font-family: inherit; }
.share a:hover, .share button:hover { border-color: var(--accent-2); color: var(--accent-2); }
.author-box { display: flex; gap: 18px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-top: 36px; }
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; flex-shrink: 0; }
.author-box h3 { margin: 0 0 6px; }
.author-box .muted { margin: 0; font-size: .85rem; }
.tags { margin-top: 28px; }
.translation-note { display: flex; gap: 8px; align-items: center; margin-top: 22px; color: var(--muted); }

/* tools */
.tool-tabs { display: flex; gap: 8px; margin-bottom: 22px; padding-bottom: 4px; }
.tool-tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tool-tab.active, .tool-tab:hover { color: #fff; background: var(--accent); border-color: transparent; }
.tool-panel[hidden] { display: none; }
.tool-panel h2 { font-size: 1.5rem; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 22px 0; }
.calc-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; color: var(--muted); }
label small { font-weight: 500; }
input, select, textarea { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-weight: 500; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.res { padding: 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.res span { display: block; color: var(--muted); font-size: .85rem; }
.res strong { font-size: 1.55rem; font-weight: 800; direction: ltr; unicode-bidi: isolate; display: block; }
body.rtl .res strong { text-align: right; }
.res em { font-style: normal; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.res .good { color: var(--good); background: rgba(52,211,153,.12); }
.res .ok { color: var(--warn); background: rgba(251,191,36,.12); }
.res .bad { color: var(--bad); background: rgba(248,113,113,.12); }
.utm-out { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px dashed var(--line-2); }
.utm-out code { flex: 1; word-break: break-all; font-size: .92rem; color: var(--accent-3); }
.serp-preview { max-width: 640px; padding: 20px; border-radius: 14px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.sp-site { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 14px; }
.sp-site small { display: block; color: #4d5156; font-size: 12px; }
.sp-fav { width: 28px; height: 28px; border-radius: 50%; background: #0b1430 url(../img/favicon.png) center/cover; }
.sp-title { color: #1a0dab; font-size: 20px; font-weight: 400; margin: 0 0 4px; line-height: 1.3; }
.sp-desc { color: #4d5156; font-size: 14px; margin: 0; line-height: 1.58; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 26px; align-items: start; }
.contact-form { display: grid; gap: 16px; }
.contact-side { display: grid; gap: 12px; }
.contact-tile { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, transform .2s; }
a.contact-tile:hover { border-color: var(--accent-2); transform: translateY(-2px); color: var(--text); }
.contact-tile .ic { color: var(--accent-2); }
.contact-tile small { display: block; color: var(--muted); font-size: .88rem; word-break: break-word; }
.alert { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.alert.ok { background: rgba(52,211,153,.12); color: var(--good); border: 1px solid rgba(52,211,153,.3); }
.alert.err { background: rgba(248,113,113,.12); color: var(--bad); border: 1px solid rgba(248,113,113,.3); }
.toast { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 80; padding: 14px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--good); color: var(--text); box-shadow: var(--shadow); animation: toast 5s forwards; }
body.rtl .toast { transform: translateX(50%); }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; }
.big404 { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; margin: 0; background: linear-gradient(120deg, var(--accent-2), var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .9fr 1.2fr; gap: 36px; }
.footer-brand img { width: 200px; margin-bottom: 14px; }
.site-footer h3 { font-size: 1rem; margin-bottom: 14px; }
.site-footer p { color: var(--muted); font-size: .94rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--muted); font-size: .94rem; }
.site-footer ul a:hover { color: var(--text); }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); font-size: .85rem; font-weight: 600; }
.socials a:hover { border-color: var(--accent-2); color: var(--accent-2); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; color: var(--muted); font-size: .88rem; }
.footer-bottom a { color: var(--muted); }
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,.6); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); color: #fff; }

/* reveal animation */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 9px; font-size: .9rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: minmax(0, 760px); }
  .toc-wrap { position: static; max-height: none; }
  .toc ol { margin-bottom: 18px; }
  .toc { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 18px; }
  .toc summary::after { content: " ▾"; }
}
@media (max-width: 920px) {
  .menu-btn { display: grid; }
  .nav-actions .lang-switch span { display: none; }
  .main-nav { position: fixed; inset: 72px 0 auto; flex-direction: column; gap: 2px; padding: 16px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .35s var(--ease); max-height: calc(100vh - 72px); overflow: auto; }
  .main-nav.open { transform: none; }
  .main-nav a { padding: 12px 14px; font-size: 1.05rem; }
  .mobile-only { display: inline-flex !important; margin-top: 8px; }
  .hero-grid, .souqly-grid, .video-grid, .featured-case, .tools-teaser, .about-grid, .contact-grid, .case-hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .fc-souqly { inset-inline-start: -8px; }
  .fc-exp { inset-inline-end: -6px; }
  .about-card { position: static; }
  .case-hero-logo { justify-self: start; max-width: 200px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .container.narrow { width: calc(100% - 32px); }
  .nav-actions .btn { display: none; }
  .feature-grid, .tool-list, .two-col, .metric-tiles { grid-template-columns: 1fr; }
  .metric-tiles { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .video-stack { grid-template-columns: 1fr 1fr; }
  .author-box { flex-direction: column; }
  .client-logo { width: 120px; height: 70px; }
  .float-card { padding: 9px 12px; }
  .float-card strong { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}
@media print {
  .site-header, .site-footer, .wa-float, .toc-wrap, .read-progress, .sc-card { display: none !important; }
  body { background: #fff; color: #000; }
}
