/* ==========================================================================
   Rowad Al-Naseem Contracting (RNC) — shared stylesheet
   Plain CSS, custom properties, logical properties for LTR/RTL.
   ========================================================================== */

:root {
  --accent: #E05A0A;
  --accent-dark: #B84A08;
  --accent-tint: #FFF4ED;
  --ink: #111518;
  --body: #4A555F;
  --muted: #78848F;
  --line: #E8EBED;
  --surface: #FFFFFF;
  --canvas: #F8F9FA;
  --deep: #16191C;

  --danger: #B42318;
  --danger-tint: #FEF3F2;

  --radius-card: 14px;
  --radius-ctl: 8px;
  --shadow: 0 1px 2px rgba(17, 21, 24, .04), 0 8px 24px rgba(17, 21, 24, .04);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease: var(--ease-out);
  --dur-fast: 180ms;
  --dur: 280ms;
  --dur-slow: 520ms;

  --header-h: 72px;
  --section-y: 56px;
  --gutter: 24px;

  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Inter", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font: var(--font-latin);
}

html[dir="ltr"] { --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html[dir="rtl"] { --font: "IBM Plex Sans Arabic", "Inter", system-ui, "Segoe UI", Tahoma, sans-serif; }

@media (min-width: 768px) {
  :root { --section-y: 88px; }
}

/* ---------- Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--surface);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body { line-height: 1.9; }

/* Prevents a flash of English text before the Arabic dictionary is applied */
html.i18n-pending body { opacity: 0; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
[hidden] { display: none !important; }

/* Arabic: never letter-space, never uppercase, never justify */
html[dir="rtl"] *,
html[dir="rtl"] *::before,
html[dir="rtl"] *::after {
  letter-spacing: 0 !important;
  text-transform: none !important;
}
html[dir="rtl"] p, html[dir="rtl"] li { text-align: start; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent-tint); color: var(--ink); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }

h1 {
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
}

h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

html[lang="ar"] h1 { line-height: 1.5; }
html[lang="ar"] h2 { line-height: 1.6; }
html[lang="ar"] h3 { line-height: 1.7; }

p { text-wrap: pretty; }

.caption { font-size: 13.5px; line-height: 1.6; }

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.latin {
  font-family: var(--font-latin);
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- Layout ---------- */

.container {
  width: min(100% - (var(--gutter) * 2), 1160px);
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--canvas { background: var(--canvas); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { margin-top: 14px; font-size: 17.5px; }

.grid { display: grid; gap: 20px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .grid--4.grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Icons (inline SVG) ---------- */

svg.ico {
  display: inline-block;
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.ico.icon-sm { width: 18px; height: 18px; }
svg.ico.icon-lg { width: 22px; height: 22px; }
html[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
}

/* Two glass layers: the resting one is always on, the scrolled one fades in
   over it. Only opacity animates, so the blur "deepening" costs nothing. */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.site-header::before {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.site-header::after {
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(32px);
  backdrop-filter: saturate(180%) blur(32px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
}
.site-header.is-scrolled::after { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  padding-bottom: 4px;
  direction: ltr;
}
.mark::after {
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-name { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.brand-tag { font-size: 12.5px; color: var(--body); }
html[lang="ar"] .brand-text { line-height: 1.5; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }

.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-ctl);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--body);
}
.nav a:hover { color: var(--ink); background: var(--canvas); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-toggle, .menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
}
.lang-toggle { padding-inline: 14px; }
.lang-toggle[lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.lang-toggle[lang="en"] { font-family: "Inter", system-ui, sans-serif; }
.lang-toggle:hover, .menu-btn:hover { background: var(--canvas); }

.menu-btn { display: none; width: 40px; padding: 0; }

.menu-bars { position: relative; display: block; width: 18px; height: 14px; }
.menu-bars span {
  position: absolute;
  inset-inline: 0;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.menu-bars span:nth-child(1) { top: 0; }
.menu-bars span:nth-child(2) { top: 6px; }
.menu-bars span:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
.menu-btn[aria-expanded="true"] .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .brand-tag { display: none; }
  .nav {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav a { padding: 12px 14px; font-size: 16px; }
  .nav a[aria-current="page"]::after { inset-inline: 14px; bottom: 6px; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 14px; }
  .mark { width: 36px; height: 36px; }
  .mark::after { inset-inline: 9px; bottom: 7px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-ctl);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

/* accent-dark is used for button fills so white text passes AA contrast */
.btn--primary { background: var(--accent-dark); color: #fff; }
.btn--primary:hover { background: color-mix(in srgb, var(--accent-dark) 86%, #000); }

.btn--outline {
  background: var(--surface);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 28%, #fff);
}
.btn--outline:hover { background: var(--canvas); border-color: var(--ink); }

.btn[disabled] { opacity: 0.65; cursor: not-allowed; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero & page heads ---------- */

.wash {
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + 56px);
  background: linear-gradient(180deg, #FFF7F2 0%, #FFFFFF 100%);
}

.hero { position: relative; overflow: hidden; padding-bottom: var(--section-y); }
.hero > .container { position: relative; z-index: 1; }

.hero-art {
  display: none;
  position: absolute;
  z-index: 0;
  inset-block: 0;
  inset-inline-end: -6%;
  width: min(62%, 820px);
  pointer-events: none;
}
.hero-art svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
  opacity: 0.12;
}
.hero-art svg * { vector-effect: non-scaling-stroke; }
html[dir="rtl"] .hero-art svg { transform: scaleX(-1); }
@media (min-width: 900px) {
  .hero-art { display: block; }
}
.page-head { padding-bottom: 56px; }
@media (min-width: 768px) {
  .wash { padding-top: calc(var(--header-h) + 72px); }
  .page-head { padding-bottom: 72px; }
}

.hero-copy { max-width: 800px; }
.hero-copy h1 { max-width: 18ch; }
html[lang="ar"] .hero-copy h1 { max-width: 20ch; }

.lead {
  margin-top: 24px;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.75;
}
html[lang="ar"] .lead { line-height: 1.9; }

.hero .actions { margin-top: 36px; }

.page-head .lead { margin-top: 20px; }
.page-head h1 { max-width: 20ch; }
html[lang="ar"] .page-head h1 { max-width: none; }

/* ---------- Stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 64px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.stat { padding: 28px 28px 26px; background: var(--surface); }
.stat-value {
  display: block;
  font-family: var(--font-latin);
  direction: ltr;
  text-align: start;
  font-size: clamp(30px, 3.6vw, 38px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--ink);
}
html[dir="rtl"] .stat-value { text-align: right; }
.stat-label { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.5; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 48px; }
  .stat { padding: 20px 14px; }
  .stat-label { font-size: 13.5px; }
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px;
}

.icon-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent);
}

.app-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent);
}
.app-icon svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Hairline with a centre diamond. The node sits in a nested zero-width svg at
   50%, so it stays undistorted and centred at any width. */
.divider {
  position: relative;
  z-index: 1;
  margin-block: calc(var(--section-y) * -0.25);
  pointer-events: none;
}
.divider svg { display: block; width: 100%; height: 24px; }
.divider line, .divider polygon { stroke: var(--line); stroke-width: 1; }
.divider polygon { fill: var(--surface); }

.line-card { display: flex; flex-direction: column; }
.line-card-top { display: flex; align-items: center; justify-content: space-between; }
.line-num {
  font-family: var(--font-latin);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--body);
  direction: ltr;
}
.line-card h3 { margin-top: 28px; }
.line-card p { margin-top: 8px; font-size: 15.5px; line-height: 1.7; }
html[lang="ar"] .line-card p { line-height: 1.9; }

.why-card .why-icon { color: var(--accent); margin-bottom: 18px; }
.why-card p { margin-top: 10px; font-size: 16px; }

/* ---------- Brand tiles ---------- */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 999px) { .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.brand-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-latin);
  direction: ltr;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink);
}
.brand-tile:hover { border-color: color-mix(in srgb, var(--accent) 30%, #fff); }
/* Brand names are Latin script, so the Arabic reset must not strip their tracking */
html[dir="rtl"] .brand-tile {
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* ---------- Legal notice ---------- */

.notice {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--canvas);
  font-size: 13px;
  line-height: 1.7;
  color: var(--body);
}
html[lang="ar"] .notice { line-height: 1.9; }
.notice-label { font-weight: 700; color: var(--ink); }

/* ---------- Clients marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee + .marquee { margin-top: 14px; }
.marquee-track { display: flex; width: max-content; }
.marquee-list { display: flex; flex: none; }

.client-tile {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 84px;
  min-width: 200px;
  margin-inline-end: 14px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.client-logo {
  display: block;
  max-height: 34px;
  max-width: 150px;
  width: auto;
  object-fit: contain;
  margin-bottom: 6px;
  filter: grayscale(1) opacity(0.62);
  transition: filter var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.client-tile:hover .client-logo {
  filter: grayscale(0) opacity(1);
  transform: translateY(-1px);
}
/* Until a logo has really loaded it takes no space, so no alt text or gap shows. */
.client-logo:not(.is-loaded) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
/* The text name is hidden only where :has() is supported; elsewhere it always stays visible. */
@supports selector(:has(*)) {
  .client-tile:has(.client-logo.is-loaded) .client-name { display: none; }
}
.client-name {
  display: block;
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
}
.client-sector {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--muted) 78%, var(--ink));
  white-space: nowrap;
}
html[lang="ar"] .client-sector { font-size: 12px; line-height: 1.7; }

/* ---------- Closing band ---------- */

.band {
  padding-block: var(--section-y);
  background: var(--deep);
  text-align: center;
}
.band-inner { max-width: 640px; margin-inline: auto; }
.band h2 { color: #fff; }
.band p { margin-top: 16px; font-size: 17.5px; color: rgba(255, 255, 255, 0.74); }
.band .btn { margin-top: 32px; }
.band .btn--primary { background: var(--accent-dark); }
.band .btn--primary:hover { background: color-mix(in srgb, var(--accent-dark) 86%, #fff); }

/* ---------- Products ---------- */

.product-card { display: flex; flex-direction: column; padding: 36px; }
.product-card .icon-box { width: 48px; height: 48px; }
.product-card h3 { margin-top: 24px; }
.product-card .summary { margin-top: 8px; font-size: 16px; }

.check-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}
html[lang="ar"] .check-list li { line-height: 1.8; }
.check-list .tick { margin-top: 3px; color: var(--accent); }
.check-list svg.ico.tick { width: 18px; height: 18px; }

.brandline {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--body);
}
.product-card .check-list { margin-bottom: 28px; }
.brandline-label { font-weight: 600; color: var(--ink); margin-inline-end: 6px; }
.brandline-list { font-family: var(--font-latin); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step { padding-top: 28px; border-top: 1px solid var(--line); }
.step-num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}
.step h3 { margin-top: 20px; }
.step p { margin-top: 8px; font-size: 16px; }
.steps-cta { margin-top: 56px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- About ---------- */

.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 64px;
  align-items: start;
}
.prose p + p { margin-top: 20px; }
.prose .prose-lead {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
}
html[lang="ar"] .prose .prose-lead { line-height: 1.8; }
.prose h2 { margin-bottom: 24px; }

.tint-card {
  padding: 32px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, #fff);
  border-radius: var(--radius-card);
  background: var(--accent-tint);
}
.tint-card h3 { margin-bottom: 8px; }
.tint-card .check-list { margin-top: 20px; gap: 16px; }
.tint-card .tick { color: var(--accent-dark); }

@media (max-width: 960px) {
  .about-split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

.region-card .region-icon { color: var(--accent); margin-bottom: 18px; }
.region-card p { margin-top: 10px; font-size: 16px; }

.serve-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  box-shadow: none;
}
.serve-card .serve-icon { color: var(--ink); }
.serve-card span { font-size: 15.5px; font-weight: 500; line-height: 1.5; color: var(--ink); }

/* ---------- Contact ---------- */

.contact-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 960px) {
  .contact-split { grid-template-columns: minmax(0, 1fr); }
}

.form-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
@media (max-width: 480px) { .form-card { padding: 24px 20px; } }

.form-grid { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr); } }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14.5px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.field .optional { margin-inline-start: 6px; font-weight: 400; font-size: 13.5px; color: var(--body); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, #fff);
  border-radius: var(--radius-ctl);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
textarea.input { min-height: 148px; padding: 12px 14px; resize: vertical; }
.input:hover { border-color: color-mix(in srgb, var(--ink) 45%, #fff); }
.input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-ltr { direction: ltr; text-align: start; }
html[dir="rtl"] .input-ltr { text-align: right; }

.field-error { min-height: 0; font-size: 13.5px; line-height: 1.5; color: var(--danger); }
.field-error:empty { display: none; }

/* Honeypot — real users never reach it, bots fill it. Never display:none. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions { margin-top: 4px; }

.alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}
.alert h3 { font-size: 17px; }
.alert p { margin-top: 4px; font-size: 15.5px; line-height: 1.7; }
.alert--success { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 20%, #fff); }
.alert--success .alert-icon { color: var(--accent-dark); }
.alert--error { margin-bottom: 20px; background: var(--danger-tint); border-color: color-mix(in srgb, var(--danger) 30%, #fff); color: #7A271A; }
.alert--error .alert-icon { color: var(--danger); }
.alert--error a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.alert-icon { margin-top: 2px; }

/* Submit button: label and a self-drawing check share one cell */
.btn-submit { position: relative; }
.btn-label { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  opacity: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-check path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.btn.is-done[disabled] { opacity: 1; cursor: default; }
.btn.is-done .btn-label { opacity: 0; }
.btn.is-done .btn-check { opacity: 1; }
.btn.is-done .btn-check path { animation: draw-check 420ms var(--ease-ios) 120ms forwards; }

.side-stack { display: flex; flex-direction: column; gap: 20px; }

.info-list { margin-top: 20px; }
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.info-row:first-child { border-top: 0; padding-top: 0; }
.info-row:last-child { padding-bottom: 0; }
.info-icon { margin-top: 3px; color: var(--accent); }
.info-label { display: block; font-size: 13.5px; line-height: 1.5; color: var(--body); }
.info-value { display: block; font-size: 16px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.info-value a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.info-value .latin { display: inline-block; }

.include-card .sub { margin-top: 6px; font-size: 15.5px; }
.include-card .check-list { margin-top: 20px; }

.client-card .client-icon { color: var(--accent); margin-bottom: 18px; }
.client-card .client-role { font-size: 14.5px; color: var(--body); }
.client-card h3 { margin-top: 4px; font-size: 18px; }
.client-card a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--deep);
  color: rgba(255, 255, 255, 0.74);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding-block: 64px;
}
.site-footer .brand-name { color: #fff; }
.site-footer .mark { background: #fff; color: var(--ink); }
.footer-desc { margin-top: 20px; max-width: 380px; line-height: 1.75; }
.footer-title {
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.footer-list svg.ico { width: 18px; height: 18px; margin-top: 3px; color: var(--muted); }
.footer-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bar { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bar-inner { padding-block: 20px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 48px; }
}

/* ---------- Motion (all animation lives here) ---------- */

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}
@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.input.is-shaking { animation: shake 320ms var(--ease-ios); }
#form-success:not([hidden]), #form-error:not([hidden]) { animation: panel-in var(--dur) var(--ease-ios); }

@media (prefers-reduced-motion: no-preference) {

  /* Scroll reveal: the hidden state is only applied once JS has tagged the node,
     and the keyframe uses fill-mode backwards so hover transforms work afterwards. */
  .js .reveal:not(.is-visible) { opacity: 0; transform: translateY(16px) scale(0.985); }
  .js .reveal.is-visible {
    animation: reveal-in var(--dur-slow) var(--ease-ios) var(--stagger, 0ms) backwards;
  }

  /* Pressable surfaces */
  .btn {
    transition:
      transform var(--dur-fast) var(--ease-ios),
      background-color var(--dur-fast) var(--ease-ios),
      border-color var(--dur-fast) var(--ease-ios),
      opacity var(--dur-fast) var(--ease-ios);
  }
  .lang-toggle, .menu-btn {
    transition: background-color var(--dur-fast) var(--ease-ios), transform var(--dur-fast) var(--ease-ios);
  }
  .lang-toggle:active, .menu-btn:active { transform: scale(0.96); }

  .brand-tile {
    transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  }
  .card {
    transition:
      transform var(--dur) var(--ease-out),
      box-shadow var(--dur) var(--ease-out),
      border-color var(--dur) var(--ease-out);
  }
  .btn:active, .brand-tile:active, .card:active {
    transform: scale(0.96);
    transition-duration: var(--dur-fast);
    transition-timing-function: var(--ease-ios);
  }

  @media (hover: hover) {
    .brand-tile:hover { transform: translateY(-2px); }
    .card:hover {
      transform: translateY(-3px);
      box-shadow: 0 2px 4px rgba(17, 21, 24, 0.03), 0 18px 40px rgba(17, 21, 24, 0.06);
    }
    .btn:active, .brand-tile:active, .card:active { transform: scale(0.96); }
  }

  .input { transition: border-color var(--dur-fast) var(--ease-ios); }
  .btn-label, .btn-check { transition: opacity var(--dur-fast) var(--ease-ios); }

  /* Header glass */
  .site-header::after { transition: opacity var(--dur) var(--ease-ios); }

  /* Hamburger to X */
  .menu-bars span {
    transition: transform var(--dur) var(--ease-ios), opacity var(--dur-fast) var(--ease-ios);
  }

  /* Mobile menu slide */
  @media (max-width: 860px) {
    .nav {
      transition:
        opacity var(--dur) var(--ease-ios),
        transform var(--dur) var(--ease-ios),
        visibility 0s linear var(--dur);
    }
    .nav.is-open { transition-delay: 0s; }
  }

  /* Language crossfade: out in 160ms, back in 220ms */
  main, .site-footer, .brand-text { transition: opacity 220ms var(--ease-ios); }
  .nav a {
    transition:
      background-color var(--dur-fast) var(--ease-ios),
      color var(--dur-fast) var(--ease-ios),
      opacity 220ms var(--ease-ios);
  }
  html.lang-out main,
  html.lang-out .site-footer,
  html.lang-out .brand-text { opacity: 0; transition-duration: 160ms; }
  html.lang-out .nav a { opacity: 0; transition: opacity 160ms var(--ease-ios); }

  /* Clients marquee */
  .marquee-track { animation: scroll-x 45s linear infinite; will-change: transform; }
  .marquee--reverse .marquee-track { animation-direction: reverse; }
  .marquee:hover .marquee-track,
  .marquee:focus-within .marquee-track { animation-play-state: paused; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-list[aria-hidden="true"] { display: none; }
  .client-tile:hover .client-logo { transform: none; }
}
