/* ==========================================================================
   DZ Coders — site styles
   One family (Readex Pro, Latin + Arabic), indigo ink, atlas blue actions,
   saffron reserved for the Aurès lattice and small highlights.
   Layout uses logical properties throughout so Arabic mirrors for free.
   ========================================================================== */

:root {
  --ink: #1d1f45;          /* deep indigo: dark surfaces, headings */
  --ink-2: #2a2d5c;
  --paper: #f4f5f8;        /* cool page background */
  --surface: #ffffff;
  --text: #22253a;
  --muted: #5d6178;
  --line: #e1e3ec;
  --line-strong: #c9ccda;
  --blue: #3346d3;         /* atlas blue: links, buttons */
  --blue-ink: #2434b0;
  --blue-soft: #e9ecfc;
  --saffron: #e8a33d;      /* Aurès wool: lattice, highlights */
  --saffron-soft: #fbf0dc;
  --on-ink: #eef0fb;
  --on-ink-muted: #a9addb;
  --focus: #e8a33d;

  --font: 'Readex Pro', 'Segoe UI', system-ui, sans-serif;

  /* type scale: 1.25 ratio from 17px body */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.5625rem;
  --fs-xl: clamp(1.75rem, 1.2rem + 2vw, 2.45rem);
  --fs-2xl: clamp(2.2rem, 1.3rem + 3.6vw, 3.8rem);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --r: 6px;
  --r-lg: 14px;
}

:root[data-theme="dark"] {
  --paper: #13142e;
  --surface: #1b1d3d;
  --text: #e4e6f5;
  --muted: #a3a7cc;
  --line: #2c2f5c;
  --line-strong: #3d4178;
  --blue: #8c9bff;
  --blue-ink: #a9b4ff;
  --blue-soft: #262a5c;
  --saffron-soft: #3a2f1f;
  --ink: #0e0f26;
  --ink-2: #1a1c42;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13142e;
    --surface: #1b1d3d;
    --text: #e4e6f5;
    --muted: #a3a7cc;
    --line: #2c2f5c;
    --line-strong: #3d4178;
    --blue: #8c9bff;
    --blue-ink: #a9b4ff;
    --blue-soft: #262a5c;
    --saffron-soft: #3a2f1f;
    --ink: #0e0f26;
    --ink-2: #1a1c42;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 350;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:lang(ar) body, body:lang(ar) { line-height: 1.8; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; color: inherit; text-wrap: balance; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.icon { width: 24px; height: 24px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--saffron); color: var(--ink); padding: 10px 16px; border-radius: var(--r); z-index: 100; font-weight: 500; }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--r);
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-ink); color: #fff; }
:root[data-theme="dark"] .btn--primary { color: #0e0f26; }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(127, 127, 160, .12); color: inherit; }
.btn--saffron { background: var(--saffron); color: var(--ink); }
.btn--saffron:hover { background: #f1b65c; color: var(--ink); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }
[dir="rtl"] .link-arrow .icon { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header--over-ink { background: color-mix(in srgb, var(--ink) 92%, transparent); border-color: rgba(255,255,255,.08); color: var(--on-ink); }
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 600; font-size: 1.05rem; }
.brand img { width: 34px; height: auto; }
.brand .brand__light { display: block; }
.brand .brand__dark { display: none; }
.site-header--over-ink .brand__light, :root[data-theme="dark"] .brand__light { display: none; }
.site-header--over-ink .brand__dark, :root[data-theme="dark"] .brand__dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__light { display: none; }
  :root:not([data-theme="light"]) .brand__dark { display: block; }
}

.nav { margin-inline-start: auto; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: block; padding: 8px 12px; border-radius: var(--r); color: inherit; text-decoration: none; font-size: .975rem; }
.nav__link:hover { background: rgba(127, 127, 160, .12); color: inherit; }
.nav__link[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--saffron); border-radius: 0; }

.header-tools { display: flex; align-items: center; gap: 6px; }
.lang-switch { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.site-header--over-ink .lang-switch { border-color: rgba(255,255,255,.2); }
.lang-switch a { padding: 6px 10px; font-size: .85rem; color: inherit; text-decoration: none; line-height: 1.2; }
.lang-switch a[aria-current="true"] { background: var(--saffron); color: var(--ink); font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r); border: 0; background: none; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(127, 127, 160, .14); }
.icon-btn .icon { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.header-cta { margin-inline-start: 6px; padding: 9px 16px; font-size: .95rem; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    background: var(--surface); color: var(--text);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 24px;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--saffron); padding-inline-start: 12px; }
  [dir="rtl"] .nav__link[aria-current="page"] { box-shadow: inset -3px 0 0 var(--saffron); }
  .nav .btn { margin-top: 18px; width: 100%; justify-content: center; }
}
@media (min-width: 961px) { .nav .btn { display: none; } }

/* ---------- the Aurès lattice ---------- */
.lattice { display: block; width: 100%; height: 100%; }
.lattice .cell { fill: none; stroke: rgba(169, 173, 219, .28); stroke-width: 1; }
.lattice .cell.on { fill: var(--saffron); stroke: var(--saffron); }
.lattice .cell.dim { fill: rgba(232, 163, 61, .22); stroke: rgba(232, 163, 61, .45); }
.lattice .cell.blue { fill: #5a6af0; stroke: #5a6af0; }
.lattice .motif { fill: none; stroke: var(--saffron); stroke-width: 1.4; }
.lattice .cell.on, .lattice .cell.dim, .lattice .cell.blue { animation: cell-in .5s ease-out both; animation-delay: calc(var(--i, 0) * 45ms + 200ms); }
.lattice .cell.pulse { animation: cell-in .5s ease-out both, cell-pulse 3.2s ease-in-out 2.4s infinite; animation-delay: calc(var(--i, 0) * 45ms + 200ms), calc(var(--i, 0) * 45ms + 2.4s); }
.lattice .cell.static { animation: none; }
@keyframes cell-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cell-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .lattice .cell { animation: none !important; }
}

/* ---------- hero (home) ---------- */
.hero { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 96px); }
.hero__place { color: var(--saffron); font-size: var(--fs-sm); margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.hero__place::before { content: ""; width: 10px; height: 10px; background: var(--saffron); transform: rotate(45deg); flex: none; }
.hero h1 { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.025em; max-width: 16ch; }
:lang(ar) .hero h1 { max-width: 18ch; letter-spacing: 0; }
.hero__intro { margin-top: 24px; font-size: var(--fs-md); line-height: 1.6; color: var(--on-ink-muted); max-width: 58ch; font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__visual { aspect-ratio: 1 / 1; max-width: 520px; width: 100%; justify-self: end; }
.hero__offers { border-top: 1px solid rgba(255,255,255,.1); }
.hero__offers-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; margin: 0; padding: 0; }
.hero__offers-list a { display: flex; align-items: center; gap: 14px; padding: 22px 0; padding-inline-end: 24px; color: var(--on-ink); text-decoration: none; font-weight: 500; }
.hero__offers-list li + li a { padding-inline-start: 24px; border-inline-start: 1px solid rgba(255,255,255,.1); }
.hero__offers-list .icon { color: var(--saffron); }
.hero__offers-list a:hover span { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 320px; justify-self: start; order: -1; aspect-ratio: 2 / 1; }
  .hero__offers-list li + li a { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid rgba(255,255,255,.1); }
}

/* ---------- page header (inner pages) ---------- */
.page-head { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.page-head__inner { padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px); position: relative; z-index: 1; max-width: 860px; }
.page-head__eyebrow { color: var(--saffron); font-size: var(--fs-sm); margin-bottom: 16px; display: block; }
.page-head h1 { font-size: var(--fs-xl); letter-spacing: -0.02em; }
.page-head__intro { margin-top: 18px; font-size: var(--fs-md); color: var(--on-ink-muted); font-weight: 300; max-width: 62ch; }
.page-head__lattice { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(42%, 460px); opacity: .9; pointer-events: none; }
[dir="rtl"] .page-head__lattice { transform: scaleX(-1); }
@media (max-width: 760px) { .page-head__lattice { opacity: .25; width: 70%; } }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; font-size: var(--fs-sm); color: var(--on-ink-muted); }
.breadcrumb a { color: var(--on-ink-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--on-ink); text-decoration: underline; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; opacity: .5; }

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: var(--fs-xl); }
.section-head p { color: var(--muted); max-width: 52ch; }
.section-head--single { grid-template-columns: 1fr; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- services on home: two halves, not cards ---------- */
.practices { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
:root[data-theme="dark"] .practices { border-color: var(--line-strong); }
.practice { padding: 36px 0 8px; display: flex; flex-direction: column; gap: 18px; }
.practice:first-child { padding-inline-end: clamp(24px, 4vw, 56px); border-inline-end: 1px solid var(--line); }
.practice:last-child { padding-inline-start: clamp(24px, 4vw, 56px); }
.practice__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border-radius: var(--r); }
.practice__icon .icon { width: 28px; height: 28px; }
.practice h3 { font-size: var(--fs-lg); }
.practice p { color: var(--muted); max-width: 48ch; }
.practice ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.practice li { display: flex; gap: 12px; align-items: baseline; }
.practice li::before { content: ""; width: 7px; height: 7px; background: var(--saffron); transform: rotate(45deg) translateY(-2px); flex: none; }
.practice .link-arrow { margin-top: auto; padding-top: 12px; }
@media (max-width: 760px) {
  .practices { grid-template-columns: 1fr; }
  .practice:first-child { padding-inline-end: 0; border-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 36px; }
  .practice:last-child { padding-inline-start: 0; }
}

/* ---------- work rows ---------- */
.work-list { display: grid; gap: clamp(20px, 3vw, 28px); }
.work-row {
  --accent: var(--blue);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color .2s;
}
.work-row:hover { border-color: var(--accent); color: inherit; }
.work-row:nth-child(even) .work-row__visual { order: 2; }
.work-row__visual { position: relative; min-height: 280px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); display: grid; place-items: center; overflow: hidden; }
.work-row__visual img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-row__visual img.is-contain { object-fit: contain; padding: 28px; }
.work-row__body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; }
.work-row__meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-sm); }
.work-row__logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.work-row h3 { font-size: var(--fs-xl); }
.work-row p { color: var(--muted); max-width: 52ch; }
.work-row .link-arrow { color: var(--accent); margin-top: auto; padding-top: 8px; }
.tech-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tech-list li { font-size: .82rem; padding: 3px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 860px) {
  .work-row { grid-template-columns: 1fr; }
  .work-row:nth-child(even) .work-row__visual { order: 0; }
  .work-row__visual { min-height: 220px; }
}

/* wordmark tile for products without imagery */
.wordmark { width: 100%; height: 100%; min-height: inherit; display: grid; place-items: center; position: relative; background: var(--accent); color: #fff; }
.wordmark span { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -0.03em; position: relative; z-index: 1; }
.wordmark svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; }

/* ---------- numbered process (a real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { position: relative; padding-top: 34px; padding-inline-end: 28px; counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: 0; inset-inline-start: 0; width: 34px; height: 34px; transform: translateY(-50%); display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 600; font-size: .95rem; z-index: 1; }
:root[data-theme="dark"] .step::before { border-color: var(--saffron); }
.step::after { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1.5px; background: var(--line-strong); }
.step:last-child::after { inset-inline-end: 60%; }
.step h3 { font-size: var(--fs-md); margin: 18px 0 8px; }
.step p { color: var(--muted); font-size: .98rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding-top: 0; padding-inline-start: 56px; }
  .step::before { transform: none; }
  .step::after { top: 34px; bottom: -28px; inset-inline-start: 16.5px; inset-inline-end: auto; width: 1.5px; height: auto; }
  .step:last-child::after { display: none; }
  .step h3 { margin-top: 4px; }
}

/* ---------- facts strip ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-block: 1px solid var(--line); }
.fact { padding: 26px 0; padding-inline-end: 20px; }
.fact + .fact { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.fact strong { display: block; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
:root[data-theme="dark"] .fact strong { color: var(--saffron); }
.fact span { color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .fact + .fact { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); } }

/* ---------- feature grid (service/case details) ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; list-style: none; margin: 0; padding: 0; }
.features--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-content: start; }
.feature .icon { grid-row: span 2; color: var(--blue); width: 26px; height: 26px; margin-top: 2px; }
.feature h3 { font-size: var(--fs-md); font-weight: 500; }
.feature p { color: var(--muted); font-size: .98rem; }
@media (max-width: 900px) { .features, .features--two { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- prose ---------- */
.prose { max-width: 68ch; font-size: 1.075rem; line-height: 1.75; }
:lang(ar) .prose, .prose:lang(ar) { line-height: 1.95; font-size: 1.12rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--fs-lg); margin-top: 2em; }
.prose h3 { font-size: var(--fs-md); margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose ul li::marker { color: var(--saffron); }
.prose blockquote { margin-inline: 0; padding-inline-start: 20px; border-inline-start: 3px solid var(--saffron); color: var(--muted); }
.prose figure { margin-block: 1.6em; }
.prose figure img { border-radius: var(--r); }
.prose figure + figure { margin-top: 12px; }
.prose a { word-break: break-word; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(40px, 6vw, 88px); align-items: start; }
.aside-box { position: sticky; top: 96px; display: grid; gap: 22px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.aside-box h2 { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.aside-box dl { margin: 0; display: grid; gap: 16px; }
.aside-box dt { font-size: var(--fs-sm); color: var(--muted); }
.aside-box dd { margin: 2px 0 0; font-weight: 500; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .aside-box { position: static; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: var(--fs-md); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--blue); transition: transform .2s; margin-top: 2px; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--muted); max-width: 70ch; }

/* ---------- call to action band ---------- */
.cta { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.cta__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding-block: clamp(56px, 7vw, 88px); position: relative; z-index: 1; }
.cta h2 { font-size: var(--fs-xl); }
.cta p { color: var(--on-ink-muted); margin-top: 12px; max-width: 56ch; }
.cta__lattice { position: absolute; inset-block: 0; inset-inline-end: -40px; width: 380px; opacity: .55; }
@media (max-width: 760px) { .cta__inner { grid-template-columns: 1fr; } .cta__lattice { opacity: .18; } }

/* ---------- blog ---------- */
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; list-style: none; margin: 0; padding: 0; }
.post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.post-card:hover { color: inherit; }
.post-card:hover h3 { color: var(--blue); }
.post-card__img { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r); background: var(--line); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__img img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .post-card:hover .post-card__img img { transform: none; } }
.post-card h3 { font-size: var(--fs-md); font-weight: 500; line-height: 1.35; }
.post-card p { color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--muted); }
.lang-tag { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--saffron-soft); color: #8a5a12; font-size: .78rem; font-weight: 500; }
:root[data-theme="dark"] .lang-tag { color: var(--saffron); }
.post-list--feature .post-card:first-child { grid-column: span 2; }
.post-list--feature .post-card:first-child h3 { font-size: var(--fs-lg); }
@media (max-width: 960px) { .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .post-list { grid-template-columns: 1fr; } .post-list--feature .post-card:first-child { grid-column: auto; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-strong); text-decoration: none; color: inherit; font-size: .92rem; }
.filters a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
:root[data-theme="dark"] .filters a[aria-current="true"] { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); gap: 16px; }
.pager span { color: var(--muted); font-size: var(--fs-sm); }

.article-head { padding-block: clamp(40px, 6vw, 72px) 32px; }
.article-head h1 { font-size: var(--fs-xl); max-width: 26ch; margin-top: 18px; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; margin-bottom: clamp(32px, 5vw, 56px); max-height: 560px; }
.article-cover img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; }
.article-col { max-width: 820px; margin-inline: auto; }
.article-cover.article-col { max-width: 1000px; }
.article-head h1 { max-width: none; }
.back-link .icon { transform: scaleX(-1); }
.back-link:hover .icon { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .back-link .icon { transform: none; }
[dir="rtl"] .back-link:hover .icon { transform: translateX(-3px); }

/* ---------- case study ---------- */
.case-hero { --accent: var(--blue); background: var(--ink); color: var(--on-ink); overflow: hidden; }
.case-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: clamp(40px, 6vw, 80px); }
.case-hero__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; color: var(--on-ink-muted); font-size: var(--fs-sm); }
.case-hero__brand img { width: 52px; height: 52px; border-radius: 12px; background: #fff; object-fit: cover; }
.case-hero h1 { font-size: var(--fs-2xl); letter-spacing: -0.03em; }
.case-hero__intro { margin-top: 18px; font-size: var(--fs-md); color: var(--on-ink-muted); font-weight: 300; max-width: 50ch; }
.case-hero__visual { border-radius: var(--r-lg); overflow: hidden; background: color-mix(in srgb, var(--accent) 22%, var(--ink)); min-height: 300px; display: grid; place-items: center; }
.case-hero__visual img { width: 100%; }
.case-hero__bar { height: 6px; background: var(--accent); }
@media (max-width: 860px) { .case-hero__grid { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; place-items: center; }
.gallery img { max-height: 520px; width: auto; }
.next-project { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.next-project small { color: var(--muted); display: block; }
.next-project strong { font-size: var(--fs-xl); font-weight: 600; }
.next-project:hover strong { color: var(--blue); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); }
.form h2 { font-size: var(--fs-lg); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: .92rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field .field-error, .field-validation-error { color: #c2410c; font-size: .875rem; }
:root[data-theme="dark"] .field-validation-error { color: #fdba74; }
.input-validation-error { border-color: #c2410c !important; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.consent input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 18px; border-radius: var(--r); font-weight: 500; display: flex; gap: 12px; align-items: flex-start; }
.notice--ok { background: #e7f6ee; color: #12643c; }
.notice--error { background: #fdeee6; color: #9a3412; }
:root[data-theme="dark"] .notice--ok { background: #12352a; color: #86efac; }
:root[data-theme="dark"] .notice--error { background: #3b2016; color: #fdba74; }
.contact-info { display: grid; gap: 28px; }
.contact-info__item { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.contact-info__item .icon { grid-row: span 2; color: var(--blue); margin-top: 2px; }
.contact-info__item span { color: var(--muted); font-size: var(--fs-sm); }
.contact-info__item a, .contact-info__item p { font-weight: 500; font-size: 1.05rem; }

/* legal details table */
.legal-table { width: 100%; border-collapse: collapse; margin-top: 1.4em; font-size: 1rem; }
.legal-table th, .legal-table td { text-align: start; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { color: var(--muted); font-weight: 400; width: 40%; padding-inline-end: 20px; }
.placeholder { color: #b45309; font-style: italic; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding-top: clamp(56px, 7vw, 88px); font-size: .95rem; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-grid h2 { font-size: .9rem; font-weight: 500; color: var(--on-ink); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-brand img { width: 120px; margin-bottom: 18px; }
.footer-brand p { max-width: 36ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem; }
.footer-bottom .made { display: flex; align-items: center; gap: 10px; }
.footer-bottom .made::before { content: ""; width: 8px; height: 8px; background: var(--saffron); transform: rotate(45deg); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- cookie notice ---------- */
.cookie {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; max-width: 520px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); padding: 18px 20px; display: flex; gap: 16px; align-items: center;
  box-shadow: 0 18px 40px -20px rgba(29, 31, 69, .45);
  font-size: .92rem;
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1; }
@media (max-width: 520px) { .cookie { flex-direction: column; align-items: stretch; } }

/* ---------- misc ---------- */
.empty { padding: 48px 0; color: var(--muted); }
.mt-0 { margin-top: 0; }
