/* ============================================================
   MOFACO Engineering Consulting — shared stylesheet (AR/EN)
   Charcoal #2B2A29 · Gold #B7902C · RTL-first (logical props)
   ============================================================ */

:root {
  --ink: #2b2a29;
  --ink-deep: #211f1e;
  --ink-soft: #3a3836;
  --gold: #b7902c;
  --gold-strong: #96751f;
  --gold-soft: #d4b263;
  --gold-text: #8a6b1c; /* darkened gold for small text on light backgrounds (WCAG AA) */
  --sand: #f4efe4;
  --paper: #ffffff;
  --paper-warm: #faf8f2;
  --text-on-dark: #efede8;
  --muted-on-dark: #c9c4bb;
  --muted-on-light: #6b675f;
  --line-on-light: #e5dfd0;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 14px 40px rgba(33, 31, 30, 0.10);
  --shadow-card-dark: 0 16px 44px rgba(0, 0, 0, 0.35);
  --font-ar: "Tajawal", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-en: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="en"] body { font-family: var(--font-en); }

body {
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] .latin,
html[lang="ar"] .stat__num,
html[lang="ar"] .svc-card__num { font-family: var(--font-en); }
html[lang="en"] .arabic { font-family: var(--font-ar); }

img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--gold);
  color: var(--ink-deep);
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(33, 31, 30, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(183, 144, 44, 0.28);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-inline-end: auto;
}
.brand img { height: 48px; width: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.main-nav a {
  display: block;
  padding: 0.55rem 0.8rem;
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--gold-soft); background: rgba(183, 144, 44, 0.12); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(239, 237, 232, 0.35);
  border-radius: 999px;
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-switch:hover, .lang-switch:focus-visible { border-color: var(--gold); color: var(--gold-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: 0 0 auto; }

.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover, .btn--gold:focus-visible { background: var(--gold-strong); color: #fff; }

.btn--outline { border-color: rgba(239, 237, 232, 0.55); color: var(--text-on-dark); }
.btn--outline:hover, .btn--outline:focus-visible { border-color: var(--gold); color: var(--gold-soft); }

.btn--wa { background: #1fa855; color: #fff; }
.btn--wa:hover, .btn--wa:focus-visible { background: #17853f; color: #fff; }

.btn--sm { padding: 0.5rem 1.1rem; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(239, 237, 232, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.nav-toggle .bars {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-on-dark);
  position: relative;
}
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 22px; height: 2px;
  background: var(--text-on-dark);
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-on-dark);
  background:
    linear-gradient(115deg, rgba(28, 26, 25, 0.96) 0%, rgba(28, 26, 25, 0.82) 45%, rgba(28, 26, 25, 0.55) 100%),
    url("../assets/img/hero.jpg") center / cover no-repeat;
  isolation: isolate;
  overflow: hidden;
  padding-block: 5.5rem 8rem;
}

/* gold + white angular sweep echoing the profile cover */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  inset-inline-end: -12%;
  top: -30%;
  width: 55%;
  height: 80%;
  background: linear-gradient(200deg, var(--gold) 0%, var(--gold-strong) 100%);
  clip-path: polygon(20% 0, 100% 0, 100% 62%, 55% 100%, 0 38%);
  opacity: 0.9;
}
.hero::after {
  inset-inline-end: -14%;
  top: -34%;
  width: 42%;
  height: 60%;
  background: rgba(255, 255, 255, 0.94);
  clip-path: polygon(35% 0, 100% 0, 100% 55%, 48% 100%, 12% 30%);
}

.hero__content { max-width: 780px; position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold-soft);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin-block-end: 1rem;
}
.eyebrow::before {
  content: "";
  width: 42px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.25;
  font-weight: 800;
  color: #fff;
}
.hero h1 .gold { color: var(--gold-soft); }

.hero__sub {
  margin-block-start: 1.1rem;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--muted-on-dark);
  max-width: 620px;
}
.hero__sub .latin { font-size: 0.95em; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-block-start: 2rem;
}

/* stats strip */
.hero__stats {
  margin-block-start: 3.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 900px;
}
.stat {
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 1rem;
}
.stat__num {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.stat__num span { color: var(--gold-soft); }
.stat__label { color: var(--muted-on-dark); font-size: 0.95rem; margin-block-start: 0.2rem; }

/* diagonal cut at hero bottom */
.hero .hero__cut {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: clamp(46px, 6vw, 90px);
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
html[dir="rtl"] .hero .hero__cut { clip-path: polygon(0 100%, 100% 100%, 0 0); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background:
    linear-gradient(115deg, rgba(28, 26, 25, 0.95) 0%, rgba(28, 26, 25, 0.8) 60%, rgba(28, 26, 25, 0.65) 100%),
    url("../assets/img/hero.jpg") center / cover no-repeat;
  color: var(--text-on-dark);
  padding-block: 4.2rem 6rem;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -10%;
  top: -60%;
  width: 42%;
  height: 130%;
  background: linear-gradient(200deg, var(--gold) 0%, var(--gold-strong) 100%);
  clip-path: polygon(30% 0, 100% 0, 100% 70%, 55% 100%, 0 30%);
  opacity: 0.35;
}
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; color: #fff; }
.crumbs { margin-block-start: 0.6rem; font-size: 0.95rem; color: var(--muted-on-dark); font-weight: 500; }
.crumbs a { color: var(--gold-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { margin-inline: 0.45rem; opacity: 0.6; }
.page-hero .hero__cut {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: clamp(36px, 4.5vw, 64px);
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
html[dir="rtl"] .page-hero .hero__cut { clip-path: polygon(0 100%, 100% 100%, 0 0); }

/* active nav item */
.main-nav a[aria-current="page"] { color: var(--gold-soft); background: rgba(183, 144, 44, 0.14); }

/* ---------- Compact services strip (home) ---------- */
.svc-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.svc-mini {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.svc-mini:hover { border-color: var(--gold); transform: translateY(-3px); }
.svc-mini svg { color: var(--gold-text); flex: 0 0 auto; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(100deg, rgba(28, 26, 25, 0.96), rgba(28, 26, 25, 0.88)),
    url("../assets/img/method-bg.jpg") center / cover no-repeat;
  color: var(--text-on-dark);
  padding-block: 3.6rem;
}
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; color: #fff; }
.cta-band p { color: var(--muted-on-dark); margin-block-start: 0.3rem; }

/* ---------- Feature band (services page) ---------- */
.feature-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.feature-item { text-align: center; padding: 1.4rem 1rem; }
.feature-item .f-icon {
  width: 54px; height: 54px;
  margin-inline: auto;
  margin-block-end: 0.8rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(183, 144, 44, 0.16);
  color: var(--gold-soft);
}
.feature-item h3 { color: #fff; font-size: 1.05rem; font-weight: 800; }
.feature-item p { color: var(--muted-on-dark); font-size: 0.88rem; margin-block-start: 0.3rem; }

@media (max-width: 920px) {
  .svc-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-band { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .svc-mini-grid { grid-template-columns: 1fr; }
  .feature-band { grid-template-columns: 1fr; }
}

/* ---------- Generic sections ---------- */
.section { padding-block: 5.5rem; position: relative; }
.section--dark { background: var(--ink); color: var(--text-on-dark); }
.section--deep { background: var(--ink-deep); color: var(--text-on-dark); }
.section--sand { background: var(--sand); }
.section--warm { background: var(--paper-warm); }

/* diagonal seams between sections */
.diag {
  height: clamp(46px, 6vw, 90px);
  position: relative;
  z-index: 1;
}
.diag--to-dark { background: var(--ink); clip-path: polygon(0 100%, 100% 100%, 100% 0); margin-block-start: -1px; }
.diag--to-light { background: var(--paper); clip-path: polygon(0 100%, 100% 100%, 0 0); margin-block-start: -1px; }
html[dir="rtl"] .diag--to-dark { clip-path: polygon(0 100%, 100% 100%, 0 0); }
html[dir="rtl"] .diag--to-light { clip-path: polygon(0 100%, 100% 100%, 100% 0); }

.section-head { max-width: 720px; margin-block-end: 3rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.3;
}
.section-head .en-sub {
  display: block;
  color: var(--gold-text);
  font-family: var(--font-en);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-block-start: 0.45rem;
}
.section--dark .section-head .en-sub,
.section--deep .section-head .en-sub { color: var(--gold-soft); }
/* On the EN page the sub-headings are Arabic: no tracking/uppercase, Arabic font, align with heading */
html[lang="en"] .en-sub {
  font-family: var(--font-ar) !important;
  letter-spacing: 0;
  text-transform: none;
  text-align: inherit;
  font-size: 1rem;
}
.section-head .lede { margin-block-start: 1rem; color: var(--muted-on-light); font-size: 1.08rem; }
.section--dark .section-head .lede, .section--deep .section-head .lede { color: var(--muted-on-dark); }

.kicker {
  display: inline-block;
  background: rgba(183, 144, 44, 0.14);
  color: var(--gold-text);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-block-end: 0.9rem;
}
.section--dark .kicker, .section--deep .kicker { background: rgba(183, 144, 44, 0.2); color: var(--gold-soft); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}
.about-grid p + p { margin-block-start: 1rem; }
.about-grid .latin-block {
  margin-block-start: 1.4rem;
  padding-inline-start: 1.2rem;
  border-inline-start: 3px solid var(--gold);
  color: var(--muted-on-light);
  font-size: 0.98rem;
}

.frame {
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.frame img { border-radius: calc(var(--radius-lg) - 9px); width: 100%; height: 100%; object-fit: cover; }
.about-grid .frame { transform: rotate(1.5deg); }
html[dir="rtl"] .about-grid .frame { transform: rotate(-1.5deg); }

/* ---------- Vision / Mission ---------- */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
.vm-card {
  background: var(--ink-soft);
  border: 1px solid rgba(183, 144, 44, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
}
.vm-card::after {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  bottom: -40px;
  width: 140px; height: 140px;
  background: rgba(183, 144, 44, 0.14);
  clip-path: polygon(0 35%, 60% 0, 100% 100%, 20% 100%);
}
.vm-card__icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(183, 144, 44, 0.16);
  color: var(--gold-soft);
  margin-block-end: 1.1rem;
}
.vm-card h3 { font-size: 1.45rem; font-weight: 800; color: #fff; }
.vm-card h3 .en-sub {
  display: block;
  font-family: var(--font-en);
  color: var(--gold-soft);
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-block-start: 0.3rem;
}
.vm-card p { margin-block-start: 0.9rem; color: var(--muted-on-dark); }

/* ---------- Values ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  margin-block-start: 2.6rem;
}
.value-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.value-card:hover { transform: translateY(-4px); border-color: rgba(183, 144, 44, 0.6); }
.value-card__icon {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(183, 144, 44, 0.16);
  color: var(--gold-soft);
}
.value-card h3 { font-size: 1.08rem; font-weight: 700; color: #fff; }
.value-card p {
  font-family: var(--font-en);
  color: var(--muted-on-dark);
  font-size: 0.85rem;
  margin-block-start: 0.25rem;
}
html[lang="en"] .value-card p { font-family: var(--font-ar); }

/* ---------- Goals ---------- */
.goals-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.2rem;
  align-items: center;
}
.goal-list { display: grid; gap: 1.2rem; }
.goal-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 8px 26px rgba(33, 31, 30, 0.06);
}
.goal-item img { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; }
.goal-item h3 { font-size: 1.12rem; font-weight: 700; }
.goal-item p { color: var(--muted-on-light); font-size: 0.95rem; margin-block-start: 0.3rem; }

/* ---------- Services (icon cards) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.3rem;
  box-shadow: 0 8px 26px rgba(33, 31, 30, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.svc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(183, 144, 44, 0.55);
  box-shadow: 0 18px 44px rgba(33, 31, 30, 0.12);
}
.svc-card__icon {
  width: 62px; height: 62px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(183, 144, 44, 0.12);
  border: 1px solid rgba(183, 144, 44, 0.35);
  color: var(--gold-text);
}
.svc-card h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.5; }
.svc-card p { color: var(--muted-on-light); font-size: 0.9rem; line-height: 1.65; }

/* ---------- Methodology ---------- */
.section--method {
  background:
    linear-gradient(rgba(30, 28, 27, 0.93), rgba(30, 28, 27, 0.93)),
    url("../assets/img/method-bg.jpg") center / cover no-repeat;
  color: var(--text-on-dark);
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
  counter-reset: step;
  position: relative;
  margin-block-start: 2.6rem;
}
.step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.2rem;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.step:hover { border-color: rgba(183, 144, 44, 0.65); transform: translateY(-4px); }
.step__badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.7rem;
  margin-block-end: 0.9rem;
}
.step h3 { font-size: 1.08rem; font-weight: 700; color: #fff; }
.step .en-sub {
  display: block;
  font-family: var(--font-en);
  font-size: 0.8rem;
  color: var(--muted-on-dark);
  font-weight: 600;
  margin-block-start: 0.35rem;
}
html[lang="en"] .step .en-sub { font-family: var(--font-ar); }
.step::after {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline-end: -1.05rem;
  width: 1rem;
  height: 2px;
  background: var(--gold);
  opacity: 0.7;
}
.step:last-child::after { display: none; }

.method-note {
  margin-block-start: 2.4rem;
  background: rgba(183, 144, 44, 0.12);
  border: 1px solid rgba(183, 144, 44, 0.45);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.8rem;
  color: var(--text-on-dark);
}
.method-note .latin-block {
  margin-block-start: 0.8rem;
  color: var(--muted-on-dark);
  font-size: 0.95rem;
}

/* ---------- Projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-end: 2.2rem;
}
.filter-btn {
  border: 1.5px solid var(--line-on-light);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold-strong); }
.filter-btn.is-active { background: var(--gold); border-color: var(--gold); color: #fff; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.project-card {
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(33, 31, 30, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.35s ease;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(33, 31, 30, 0.14); }
.project-card.is-hidden { display: none; }

.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-block-end: 2px solid var(--gold);
  background: #dcd8cf;
}
.project-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__media img { transform: scale(1.05); }

.project-card__tag {
  position: absolute;
  top: 0.9rem;
  inset-inline-start: 0.9rem;
  background: rgba(33, 31, 30, 0.85);
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.project-card__num {
  position: absolute;
  bottom: 0.9rem;
  inset-inline-end: 0.9rem;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
}

.project-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.8rem; flex: 1; }
.project-card__body h3 { font-size: 1.18rem; font-weight: 800; line-height: 1.4; }
.project-card__type { color: var(--muted-on-light); font-size: 0.95rem; }

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  background: var(--sand);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 0.22rem 0.75rem;
}
.project-card__scope {
  margin-block-start: auto;
  padding-block-start: 0.8rem;
  border-block-start: 1px dashed var(--line-on-light);
  color: var(--muted-on-light);
  font-size: 0.9rem;
}
.project-card__scope strong { color: var(--gold-text); font-weight: 700; }

/* ---------- Partners ---------- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
}
.partner-card {
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: grid;
  place-items: center;
  min-height: 120px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.partner-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.partner-card img {
  max-height: 74px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.partner-card figcaption {
  margin-block-start: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted-on-light);
  text-align: center;
  font-weight: 600;
}

/* ---------- Licenses ---------- */
.licenses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.license-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.license-card:hover { border-color: rgba(183, 144, 44, 0.6); transform: translateY(-4px); }
.license-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(183, 144, 44, 0.16);
  color: var(--gold-soft);
  margin-block-end: 1rem;
}
.license-card h3 { color: #fff; font-size: 1.02rem; font-weight: 700; line-height: 1.5; }
.license-card .issuer { color: var(--muted-on-dark); font-size: 0.88rem; margin-block-start: 0.4rem; }
.license-card .ref {
  display: inline-block;
  margin-block-start: 0.8rem;
  font-family: var(--font-en);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  background: rgba(183, 144, 44, 0.13);
  border: 1px solid rgba(183, 144, 44, 0.4);
  padding: 0.22rem 0.7rem;
  border-radius: 8px;
  direction: ltr;
  unicode-bidi: embed;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.6rem;
  align-items: start;
}
.contact-info { display: grid; gap: 1.1rem; }
.contact-line {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
}
.contact-line__icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(183, 144, 44, 0.14);
  color: var(--gold-strong);
}
.contact-line h3 { font-size: 1.02rem; font-weight: 700; }
.contact-line p, .contact-line a { color: var(--muted-on-light); font-size: 0.97rem; text-decoration: none; }
.contact-line a:hover { color: var(--gold-strong); }
.contact-line .ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.contact-form h3 { font-size: 1.3rem; font-weight: 800; margin-block-end: 0.4rem; }
.contact-form .form-hint { color: var(--muted-on-light); font-size: 0.92rem; margin-block-end: 1.4rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-block-end: 1rem; }
.field label { display: block; font-weight: 700; font-size: 0.95rem; margin-block-end: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-warm);
  border: 1.5px solid var(--line-on-light);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(183, 144, 44, 0.18);
}
.form-status { margin-block-start: 0.9rem; font-weight: 700; color: var(--gold-text); min-height: 1.4em; }

/* service-type picker (radio cards) */
.req-field { border: 0; padding: 0; margin: 0 0 1rem; }
.req-field legend { font-weight: 700; font-size: 0.95rem; margin-block-end: 0.5rem; padding: 0; }
.req-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.req-field .req-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  text-align: center;
  background: var(--paper-warm);
  border: 1.5px solid var(--line-on-light);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.req-card svg { color: var(--gold-text); flex: 0 0 auto; }
.req-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.req-card:has(input:checked) {
  border-color: var(--gold);
  background: rgba(183, 144, 44, 0.13);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(183, 144, 44, 0.18);
}
.req-card:has(input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.map-wrap {
  margin-block-start: 3rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--muted-on-dark);
  padding-block: 4rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-block-end: 2.5rem;
}
.site-footer h3 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-block-end: 1rem;
}
.site-footer img.footer-logo { height: 64px; width: auto; margin-block-end: 1rem; }
.site-footer p { font-size: 0.95rem; }
.footer-links { display: grid; gap: 0.5rem; }
.footer-links a { color: var(--muted-on-dark); text-decoration: none; font-size: 0.95rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--gold-soft); }
.footer-contact { display: grid; gap: 0.55rem; font-size: 0.95rem; }
.footer-contact a { color: var(--muted-on-dark); text-decoration: none; }
.footer-contact a:hover { color: var(--gold-soft); }
.footer-contact .ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

.footer-bottom {
  border-block-start: 1px solid rgba(255, 255, 255, 0.09);
  padding-block: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  font-size: 0.88rem;
}
.footer-bottom .cr { color: var(--gold-soft); font-weight: 700; }
.footer-bottom .cr .latin { direction: ltr; unicode-bidi: embed; }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal-body { max-width: 820px; }
.legal-body h2 { font-size: 1.3rem; font-weight: 800; margin-block: 1.9rem 0.6rem; }
.legal-body h2:first-of-type { margin-block-start: 0; }
.legal-body p { color: var(--muted-on-light); line-height: 1.9; margin-block-end: 0.8rem; }
.legal-body ul { list-style: disc; padding-inline-start: 1.3rem; margin-block: 0.4rem 1rem; }
.legal-body li { color: var(--muted-on-light); line-height: 1.85; margin-block-end: 0.35rem; }
.legal-body a { color: var(--gold-text); }
.legal-body .updated {
  display: inline-block;
  color: var(--gold-text);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(183, 144, 44, 0.12);
  border: 1px solid rgba(183, 144, 44, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-block-end: 1.6rem;
}

/* footer legal links */
.footer-legal { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-legal a { color: var(--muted-on-dark); text-decoration: none; }
.footer-legal a:hover { color: var(--gold-soft); }

/* ---------- Cookie / analytics consent banner ---------- */
.consent-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(33, 31, 30, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-block-start: 1px solid rgba(183, 144, 44, 0.4);
  color: var(--text-on-dark);
  padding: 1rem clamp(1rem, 3vw, 2.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.consent-banner p { font-size: 0.95rem; color: var(--muted-on-dark); margin: 0; }
.consent-banner a { color: var(--gold-soft); text-decoration: underline; }
.consent-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* keep the floating WhatsApp clear of the consent banner when both show */
body:has(.consent-banner) .wa-float { bottom: 6rem; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  bottom: 1.4rem;
  inset-inline-end: 1.4rem;
  z-index: 90;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #1fa855;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}
.wa-float:hover, .wa-float:focus-visible { transform: scale(1.08); background: #17853f; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-card, .svc-card, .value-card, .step, .license-card, .partner-card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a { padding-inline: 0.55rem; font-size: 0.92rem; }
  .partners-grid { grid-template-columns: repeat(4, 1fr); }
  .licenses-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step:nth-child(3n)::after { display: none; }
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .main-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--ink-deep);
    border-block-start: 1px solid rgba(183, 144, 44, 0.3);
    display: none;
    padding: 0.8rem 1.2rem 1.2rem;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.1rem; }
  .main-nav a { padding: 0.8rem 0.9rem; font-size: 1.05rem; }
  .header-actions .btn--cta-header { display: none; }

  .about-grid, .goals-grid, .contact-grid, .vm-grid { grid-template-columns: 1fr; }
  .goals-grid .frame { order: -1; max-width: 520px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
}

@media (max-width: 620px) {
  .section { padding-block: 3.8rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .req-types { grid-template-columns: repeat(2, 1fr); }
  .licenses-grid { grid-template-columns: 1fr 1fr; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding-block: 3.5rem 6rem; }
  .brand img { height: 40px; }
}

@media (max-width: 420px) {
  .licenses-grid { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
}
