/* ==========================================================================
   Amilcar Legal Consultancy — site styles
   Brand: navy #072a80 (logo), deep ink navy, steel blue #74a0b8, ivory paper.
   ========================================================================== */

:root {
  --ink: #2a4163;
  --navy-900: #2a4163;
  --navy-800: #2a4163;
  --navy-700: #546784;
  --brand: #2a4163;
  --brand-2: #546784;
  --steel: #8191a3;
  --steel-soft: rgba(255, 255, 255, .72);
  --ivory: #f3f4f6;
  --paper: #ffffff;
  --white: #ffffff;
  --text: #2a4163;
  --muted: #546784;
  --line: rgba(42, 65, 99, .14);
  --line-light: rgba(255, 255, 255, .14);
  --wa: #2a4163;

  --f-display: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --radius: 2px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
  --header-h: 84px;
}

html[lang="ar"] {
  --f-display: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
  --f-body: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}
html[lang="ar"] body { font-size: 17px; line-height: 1.95; }
body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brand); color: #fff; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--dark { background: var(--navy-900); color: rgba(255, 255, 255, .9); }
.section--paper { background: var(--ivory); }
.muted { color: var(--muted); }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200; background: var(--brand); color: #fff; padding: 10px 16px; }
.skip:focus { top: 16px; }

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

/* ---------- Type ---------- */

.display {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--navy-800);
}
html[lang="ar"] .display { font-weight: 700; line-height: 1.35; letter-spacing: 0; font-size: clamp(1.9rem, 3.8vw, 3rem); }
.section--dark .display, .cta-band .display { color: #fff; }
.h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; font-size: clamp(1.25rem, 1.8vw, 1.55rem); color: var(--navy-800); margin-bottom: .8em; }
html[lang="ar"] .h3 { font-weight: 700; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--brand-2); margin-bottom: 22px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.eyebrow::before { content: ""; width: 38px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--light { color: var(--steel-soft); }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; }
.section--dark .lead { color: rgba(255, 255, 255, .72); }

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

.btn {
  --bg: transparent; --fg: var(--navy-800); --bd: var(--navy-800);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 30px;
  border: 1px solid var(--bd); background: var(--bg); color: var(--fg);
  font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: color .45s var(--ease), border-color .45s var(--ease);
  border-radius: var(--radius);
}
html[lang="ar"] .btn { letter-spacing: 0; font-size: .98rem; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--hover-bg, var(--navy-800));
  transform: scaleX(0); transform-origin: var(--origin, left);
  transition: transform .55s var(--ease-out);
}
[dir="rtl"] .btn::before { --origin: right; }
.btn:hover::before { transform: scaleX(1); }
.btn:hover { color: var(--hover-fg, #fff); }
.btn--sm { min-height: 42px; padding: 0 20px; font-size: .74rem; }
.btn--block { width: 100%; }
.btn--solid { --bg: var(--brand); --fg: #fff; --bd: var(--brand); --hover-bg: var(--navy-900); }
.btn--light { --bg: #fff; --fg: var(--navy-900); --bd: #fff; --hover-bg: var(--steel); --hover-fg: var(--navy-900); }
.btn--ghost-light { --fg: #fff; --bd: rgba(255, 255, 255, .45); --hover-bg: #fff; --hover-fg: var(--navy-900); }
.btn--line { --fg: #fff; --bd: rgba(255, 255, 255, .4); --hover-bg: #fff; --hover-fg: var(--navy-900); }
.btn--wa { --bg: var(--wa); --fg: #fff; --bd: var(--wa); --hover-bg: #546784; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.arrow { display: inline-block; width: 26px; height: 1px; background: currentColor; position: relative; transition: width .4s var(--ease); vertical-align: middle; }
.arrow::after { content: ""; position: absolute; inset-inline-end: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-inline-end: 1px solid currentColor; transform: rotate(45deg); }
[dir="rtl"] .arrow::after { transform: rotate(-45deg); }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; font-weight: 600; color: var(--brand); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
html[lang="ar"] .link-arrow { letter-spacing: 0; font-size: 1rem; }
.link-arrow:hover .arrow { width: 42px; }
.link-arrow--light { color: #fff; }

/* ---------- Preloader ---------- */

.preloader {
  position: fixed; inset: 0; z-index: 500; background: var(--ink);
  display: grid; place-items: center; align-content: center; gap: 28px;
  transition: clip-path .8s var(--ease-out), visibility 0s .9s;
  clip-path: inset(0 0 0 0);
}
.preloader__mark { width: 74px; color: #fff; opacity: 0; transform: translateY(14px); animation: pl-in .9s var(--ease-out) .1s forwards; }
.preloader__line { width: 140px; height: 1px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.preloader__line span { display: block; height: 100%; background: var(--steel); transform: scaleX(0); transform-origin: left; animation: pl-bar 1.1s var(--ease) .2s forwards; }
[dir="rtl"] .preloader__line span { transform-origin: right; }
.is-loaded .preloader { clip-path: inset(0 0 100% 0); visibility: hidden; }
@keyframes pl-in { to { opacity: 1; transform: none; } }
@keyframes pl-bar { to { transform: scaleX(1); } }

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

.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100; height: var(--header-h);
  color: #fff; transition: background .5s var(--ease), height .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease);
}
.header.is-scrolled {
  --header-h: 70px;
  background: rgba(42, 65, 99, .86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-light);
}
.header.is-hidden { transform: translateY(-100%); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo { display: flex; align-items: center; gap: 14px; }
.header__icon { width: 40px; flex: none; transition: transform .6s var(--ease-out); }
.header__logo:hover .header__icon { transform: rotate(-6deg) scale(1.05); }
.header__word { display: flex; flex-direction: column; line-height: 1; font-family: "Manrope", sans-serif; }
.header__word strong { font-weight: 500; letter-spacing: .32em; font-size: 1.05rem; }
.header__word small { font-size: .55rem; letter-spacing: .34em; margin-top: 6px; opacity: .8; }

.nav { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav__link { position: relative; font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding-block: 8px; opacity: .85; transition: opacity .3s; }
html[lang="ar"] .nav__link { letter-spacing: 0; font-size: 1rem; }
.nav__link::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 100%; height: 1px; background: var(--steel); transform: scaleX(0); transform-origin: var(--o, left); transition: transform .5s var(--ease-out); }
[dir="rtl"] .nav__link::after { --o: right; }
.nav__link:hover, .nav__link.is-active { opacity: 1; }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { font-size: .82rem; font-weight: 600; letter-spacing: .1em; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-light); border-radius: 50%; transition: background .3s, color .3s; }
.lang-switch:hover { background: #fff; color: var(--navy-900); }
html[lang="en"] .header .lang-switch { font-family: "Cairo", sans-serif; letter-spacing: 0; font-size: .85rem; }

.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; padding: 0; }
.burger span { position: absolute; inset-inline: 10px; height: 1.5px; background: currentColor; transition: transform .45s var(--ease-out), top .45s var(--ease-out); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 90; background: var(--ink); color: #fff;
  clip-path: circle(0 at var(--cx, 100%) 0); transition: clip-path .8s var(--ease-out); visibility: hidden;
}
[dir="rtl"] .drawer { --cx: 0%; }
.drawer.is-open { clip-path: circle(150% at var(--cx, 100%) 0); visibility: visible; }
.drawer__inner { position: relative; height: 100%; display: flex; flex-direction: column; gap: 28px; padding: calc(var(--header-h) + 24px) var(--gutter) calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; }
.drawer__nav { display: flex; flex-direction: column; border-top: 1px solid var(--line-light); }
.drawer__nav a {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; border-bottom: 1px solid var(--line-light);
  font-family: var(--f-display); font-weight: 500; font-size: 1.45rem; letter-spacing: -.01em; color: rgba(255, 255, 255, .78);
  transition: color .3s, padding .4s var(--ease-out);
}
html[lang="ar"] .drawer__nav a { font-weight: 600; font-size: 1.35rem; letter-spacing: 0; }
.drawer__nav a::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 0; height: 2px; background: var(--steel); transform: translateY(-50%); transition: width .4s var(--ease-out); }
.drawer__nav a.is-active, .drawer__nav a:hover { color: #fff; padding-inline-start: 22px; }
.drawer__nav a.is-active::before, .drawer__nav a:hover::before { width: 12px; }
.drawer__chev { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
[dir="rtl"] .drawer__chev { transform: scaleX(-1); }
.drawer__actions { display: grid; gap: 12px; }
.drawer__quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; }
.drawer__quick a { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius); font-size: .95rem; font-weight: 500; transition: background .3s, border-color .3s; }
.drawer__quick a:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.drawer__quick svg, .drawer__lang svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drawer__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: rgba(255, 255, 255, .6); }
.drawer__lang { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 20px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.drawer__mark { position: absolute; inset-inline-end: -30px; bottom: 60px; width: 180px; color: rgba(255, 255, 255, .04); pointer-events: none; }
/* Staggered entrance */
.drawer__nav a, .drawer__actions, .drawer__foot { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out), color .3s, padding .4s var(--ease-out); }
.drawer.is-open .drawer__nav a, .drawer.is-open .drawer__actions, .drawer.is-open .drawer__foot { opacity: 1; transform: none; transition-delay: calc(.2s + var(--i) * .06s), calc(.2s + var(--i) * .06s), 0s, 0s; }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: var(--ink); color: #fff; overflow: hidden; padding-block: calc(var(--header-h) + 40px) 120px;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 115%; object-fit: cover; transform: scale(1.12); transition: transform 2.6s var(--ease-out); will-change: transform; }
.is-loaded .hero__media img { transform: scale(1); }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--veil-dir, 90deg), rgba(42, 65, 99, .94) 0%, rgba(42, 65, 99, .72) 42%, rgba(42, 65, 99, .25) 100%),
    linear-gradient(0deg, rgba(42, 65, 99, .9) 0%, transparent 35%);
}
[dir="rtl"] .hero__veil { --veil-dir: 270deg; }
.hero__grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; pointer-events: none; }
.hero__grid i { border-inline-start: 1px solid rgba(255, 255, 255, .05); transform: scaleY(0); transform-origin: top; transition: transform 1.6s var(--ease-out); }
.hero__grid i:last-child { border-inline-end: 1px solid rgba(255, 255, 255, .05); }
.is-loaded .hero__grid i { transform: scaleY(1); }
.is-loaded .hero__grid i:nth-child(2) { transition-delay: .1s; }
.is-loaded .hero__grid i:nth-child(3) { transition-delay: .2s; }
.is-loaded .hero__grid i:nth-child(4) { transition-delay: .3s; }

.hero__content { position: relative; z-index: 2; }
.hero__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 1.06; letter-spacing: -.035em; margin-bottom: 34px; }
html[lang="ar"] .hero__title { font-weight: 700; font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.3; letter-spacing: 0; }
.hero__title em { font-style: normal; font-weight: 300; color: var(--steel-soft); }
html[lang="ar"] .hero__title em { font-style: normal; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
html[lang="ar"] .line { padding-block: .1em .3em; margin-block: -.1em -.3em; }
.line > span { display: inline-block; }
.hero__text { max-width: 54ch; font-size: 1.1rem; color: rgba(255, 255, 255, .82); font-weight: 300; margin-bottom: 40px; }
html[lang="ar"] .hero__text { font-weight: 400; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__side { position: absolute; inset-inline-end: var(--gutter); bottom: 120px; z-index: 2; width: clamp(80px, 9vw, 130px); color: rgba(255, 255, 255, .1); }
.hero__scroll { position: absolute; z-index: 2; bottom: 34px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
[dir="rtl"] .hero__scroll { transform: translateX(50%); letter-spacing: 0; font-size: .85rem; }
.hero__scroll i { width: 1px; height: 54px; background: rgba(255, 255, 255, .2); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset-inline: 0; top: -40%; height: 40%; background: #fff; animation: scrollline 2.2s var(--ease) infinite; }
@keyframes scrollline { to { top: 100%; } }

/* Intro choreography: elements marked data-intro rise in after the preloader. */
[data-intro] { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.line > [data-intro] { opacity: 1; transform: translateY(110%); }
.is-loaded [data-intro] { opacity: 1; transform: none; }
.is-loaded [data-intro="1"] { transition-delay: .35s; }
.is-loaded [data-intro="2"] { transition-delay: .45s; }
.is-loaded [data-intro="3"] { transition-delay: .55s; }
.is-loaded [data-intro="4"] { transition-delay: .65s; }
.is-loaded [data-intro="5"] { transition-delay: .85s; }
.is-loaded [data-intro="6"] { transition-delay: 1s; }
.is-loaded [data-intro="7"] { transition-delay: 1.2s; }
.is-loaded .hero__scroll[data-intro] { transform: translateX(-50%); }
[dir="rtl"] .is-loaded .hero__scroll[data-intro] { transform: translateX(50%); }

/* ---------- Inner page hero ---------- */

.page-hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding: calc(var(--header-h) + clamp(70px, 10vw, 130px)) 0 clamp(60px, 8vw, 100px); min-height: 62vh; display: flex; align-items: flex-end; }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img { width: 100%; height: 115%; object-fit: cover; opacity: .55; transform: scale(1.08); transition: transform 2.4s var(--ease-out); }
.is-loaded .page-hero__media img { transform: scale(1); }
.page-hero__veil { position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink) 0%, rgba(42, 65, 99, .55) 55%, rgba(42, 65, 99, .7) 100%); }
.page-hero__content { position: relative; z-index: 2; }
.page-hero__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(2.1rem, 4.6vw, 4rem); line-height: 1.1; letter-spacing: -.03em; max-width: 20ch; margin-bottom: 22px; }
html[lang="ar"] .page-hero__title { font-weight: 700; line-height: 1.35; }
.page-hero__text { max-width: 58ch; color: rgba(255, 255, 255, .82); font-size: 1.08rem; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: rgba(255, 255, 255, .6); margin-bottom: 28px; }
.crumbs a:hover { color: #fff; }

/* ---------- Marquee ---------- */

.marquee { background: #fff; color: var(--navy-800); overflow: hidden; padding-block: 22px; border-bottom: 1px solid var(--line); }
.marquee__track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 60s linear infinite; }
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
.marquee span { font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; font-size: clamp(1.05rem, 1.6vw, 1.35rem); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--steel); font-size: .8rem; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- Intro / about teaser ---------- */

.intro__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.intro__media { position: relative; aspect-ratio: 4 / 5; }
.intro__media img { width: 100%; height: 100%; object-fit: cover; }
.intro__media::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1px solid var(--steel); z-index: -1; }
[dir="rtl"] .intro__media::before { inset: 22px 22px -22px -22px; }
.intro__badge { position: absolute; inset-inline-end: -28px; bottom: 40px; background: var(--navy-900); color: #fff; padding: 22px 26px; display: flex; align-items: center; gap: 16px; font-size: .72rem; letter-spacing: .22em; box-shadow: 0 30px 60px -20px rgba(42, 65, 99, .5); }
.intro__badge-icon { width: 34px; color: var(--steel-soft); }
.intro__text p { color: var(--muted); font-size: 1.05rem; }
.intro__text .display { margin-bottom: 28px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(70px, 9vw, 120px); border-top: 1px solid var(--line); }
.stat { padding: 36px 24px 0; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.stat strong { display: block; font-family: var(--f-display); font-weight: 300; letter-spacing: -.04em; font-size: clamp(2.8rem, 4.6vw, 4rem); line-height: 1; color: var(--brand); margin-bottom: 12px; font-variant-numeric: lining-nums; }
.stat span { color: var(--muted); font-size: .92rem; display: block; max-width: 22ch; }

/* ---------- Section heads ---------- */

.section-head { margin-bottom: clamp(48px, 6vw, 80px); max-width: 760px; }
.section-head .display { margin-bottom: 20px; }
.section-head--center { text-align: center; margin-inline: auto; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .eyebrow::after { content: ""; width: 38px; height: 1px; background: currentColor; opacity: .7; }
.section-head--split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: end; max-width: none; }

/* ---------- Service cards ---------- */

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.svc-grid--light { background: var(--line); border-color: var(--line); }
.svc-card { position: relative; display: flex; flex-direction: column; background: var(--navy-900); color: rgba(255, 255, 255, .9); overflow: hidden; min-height: 420px; }
.svc-grid--light .svc-card { background: var(--paper); color: var(--text); }
.svc-card__media { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.svc-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(42, 65, 99, .96) 10%, rgba(42, 65, 99, .55) 100%); }
.svc-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s var(--ease-out); }
.svc-card:hover .svc-card__media { opacity: 1; }
.svc-card:hover .svc-card__media img { transform: scale(1); }
.svc-card__body { position: relative; z-index: 1; padding: 40px 36px; display: flex; flex-direction: column; height: 100%; flex: 1; transition: color .5s; }
.svc-card:hover .svc-card__body { color: #fff; }
.svc-card__num { position: absolute; top: 36px; inset-inline-end: 36px; font-size: .78rem; letter-spacing: .14em; color: var(--steel); }
.svc-card__icon { width: 46px; height: 46px; margin-bottom: auto; color: var(--steel-soft); }
.svc-grid--light .svc-card__icon { color: var(--brand); }
.svc-card:hover .svc-card__icon { color: #fff; }
.svc-card__icon svg, .svc-detail__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.svc-card h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.015em; font-size: 1.35rem; line-height: 1.3; margin: 70px 0 14px; color: #fff; transition: transform .6s var(--ease-out); }
html[lang="ar"] .svc-card h3 { font-weight: 700; font-size: 1.55rem; line-height: 1.5; }
.svc-grid--light .svc-card h3 { color: var(--navy-800); }
.svc-grid--light .svc-card:hover h3 { color: #fff; }
.svc-card p { font-size: .95rem; opacity: .75; margin-bottom: 26px; max-width: 34ch; }
.svc-card__more { display: inline-flex; align-items: center; gap: 12px; font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--steel-soft); }
html[lang="ar"] .svc-card__more { letter-spacing: 0; font-size: .92rem; }
.svc-grid--light .svc-card__more { color: var(--brand); }
.svc-card:hover .svc-card__more { color: #fff; }
.svc-card:hover .arrow { width: 42px; }
.svc-card::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%; background: var(--steel); transform: scaleX(0); transform-origin: var(--o, left); transition: transform .7s var(--ease-out); z-index: 2; }
[dir="rtl"] .svc-card::after { --o: right; }
.svc-card:hover::after { transform: scaleX(1); }

.svc-card--help, .svc-grid--light .svc-card--help { background: var(--brand); color: rgba(255, 255, 255, .9); }
.svc-card--help .svc-card__icon, .svc-grid--light .svc-card--help .svc-card__icon { color: #fff; width: 44px; }
.svc-card--help h3, .svc-grid--light .svc-card--help h3 { color: #fff; }
.svc-card--help .svc-card__more, .svc-grid--light .svc-card--help .svc-card__more { color: #fff; }
.svc-card--help:hover { background: var(--brand-2); }
/* ---------- Values ---------- */

.values__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 48px); }
.value { padding-top: 30px; border-top: 1px solid var(--line); position: relative; }
.value::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 48px; height: 1px; background: var(--brand); transition: width .7s var(--ease-out); }
.value:hover::before { width: 100%; }
.value__num { font-family: var(--f-display); font-size: 1.1rem; color: var(--steel); }
.value h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; font-size: 1.3rem; color: var(--navy-800); margin: 14px 0 12px; }
html[lang="ar"] .value h3 { font-weight: 700; font-size: 1.5rem; }
.value p { color: var(--muted); font-size: .97rem; }
.values__grid--dark .value { border-color: var(--line-light); }
.values__grid--dark .value::before { background: var(--steel); }
.values__grid--dark .value h3 { color: #fff; }
.values__grid--dark .value p { color: rgba(255, 255, 255, .72); }

/* ---------- Process ---------- */

.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; counter-reset: step; }
.process__steps::before { content: ""; position: absolute; top: 28px; inset-inline: 12.5%; height: 1px; background: var(--line); }
.process__steps::after { content: ""; position: absolute; top: 28px; inset-inline-start: 12.5%; width: 75%; height: 1px; background: var(--brand); transform: scaleX(var(--progress, 0)); transform-origin: var(--o, left); transition: transform .2s linear; }
[dir="rtl"] .process__steps::after { --o: right; }
.step { text-align: center; position: relative; z-index: 1; }
.step__dot { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ivory); border: 1px solid var(--brand); color: var(--brand); font-family: var(--f-display); font-size: 1.4rem; margin-bottom: 26px; transition: background .5s, color .5s; }
.step:hover .step__dot { background: var(--brand); color: #fff; }
.step h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; color: var(--navy-800); margin-bottom: 10px; }
html[lang="ar"] .step h3 { font-weight: 700; font-size: 1.35rem; }
.step p { color: var(--muted); font-size: .95rem; max-width: 26ch; margin-inline: auto; }

/* ---------- Consultation form ---------- */

.consult__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.consult__intro .display { margin-bottom: 22px; }
.consult__intro > p { color: var(--muted); max-width: 44ch; }
.consult__card { background: #fff; padding: clamp(28px, 4vw, 52px); box-shadow: 0 40px 80px -40px rgba(42, 65, 99, .28); border-top: 2px solid var(--brand); }
.consult__card > .h3 { margin-bottom: 8px; }
.consult__card > .muted { margin-bottom: 28px; }

.quick-contact { margin-top: 40px; display: grid; gap: 4px; }
.quick-contact a { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease-out); }
.quick-contact a:hover { padding-inline-start: 10px; }
.quick-contact small, .contact-cards small { display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .quick-contact small, html[lang="ar"] .contact-cards small { letter-spacing: 0; font-size: .85rem; }
.quick-contact b, .contact-cards b { font-weight: 500; color: var(--navy-800); font-size: 1.05rem; }
.qc__icon { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); transition: background .4s, color .4s; }
.qc__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
a:hover > .qc__icon { background: var(--brand); color: #fff; }

.consult-form { position: relative; display: grid; gap: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { position: relative; }
.field input, .field select, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid rgba(129, 145, 163, .55); background: transparent; padding: 22px 0 10px; font-size: 1rem; border-radius: 0; outline: none;
  transition: border-color .35s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 110px; }
.field label { position: absolute; inset-inline-start: 0; top: 22px; color: var(--muted); pointer-events: none; transition: transform .35s var(--ease-out), color .35s, font-size .35s; transform-origin: var(--o, left) top; }
[dir="rtl"] .field label { --o: right; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field label.is-static { transform: translateY(-22px) scale(.8); color: var(--brand-2); }
.field::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 1px; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: var(--o, left); transition: transform .5s var(--ease-out); }
[dir="rtl"] .field::after { --o: right; }
.field:focus-within::after { transform: scaleX(1); }
.field--select select { cursor: pointer; padding-inline-end: 28px; }
.field--select::before { content: ""; position: absolute; inset-inline-end: 4px; top: 30px; width: 8px; height: 8px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.field.is-invalid input { border-color: #b3261e; }

.pref { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pref legend { font-size: .85rem; color: var(--muted); margin-bottom: 10px; padding: 0; width: 100%; }
.pref label { cursor: pointer; }
.pref input { position: absolute; opacity: 0; pointer-events: none; }
.pref span { display: inline-block; padding: 8px 18px; border: 1px solid rgba(129, 145, 163, .55); font-size: .88rem; transition: all .3s; border-radius: 40px; }
.pref input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pref input:focus-visible + span { outline: 2px solid var(--steel); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .86rem; color: var(--muted); cursor: pointer; }
.consent input { accent-color: var(--brand); width: 17px; height: 17px; margin-top: 4px; flex: none; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-error { color: #b3261e; font-size: .9rem; margin: 0; }

.form-success { position: absolute; inset: -6px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; animation: fadein .6s var(--ease-out); }
.form-success[hidden] { display: none; }
.form-success h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.6rem; color: var(--navy-800); margin: 24px 0 10px; }
html[lang="ar"] .form-success h3 { font-weight: 700; }
.form-success p { color: var(--muted); max-width: 32ch; }
.form-success__icon svg { width: 76px; height: 76px; fill: none; stroke: var(--brand); stroke-width: 1.5; }
.form-success__icon circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 1s var(--ease-out) forwards; }
.form-success__icon path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s var(--ease-out) .7s forwards; stroke-linecap: round; stroke-linejoin: round; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }

/* ---------- FAQ ---------- */

.faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.faq-wrap .section-head { position: sticky; top: calc(var(--header-h) + 30px); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:first-child { border-top: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; font-family: var(--f-display); font-weight: 500; font-size: 1.12rem; color: var(--navy-800); transition: color .3s; }
html[lang="ar"] .faq__item summary { font-weight: 600; font-size: 1.1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--brand); }
.faq__plus { width: 18px; height: 18px; flex: none; position: relative; }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; top: 50%; inset-inline: 0; height: 1px; background: currentColor; transition: transform .4s var(--ease-out); }
.faq__plus::after { transform: rotate(90deg); }
.faq__item[open] .faq__plus::after { transform: rotate(0); }
.faq__a { overflow: hidden; }
.faq__a p { color: var(--muted); padding-bottom: 28px; max-width: 60ch; margin: 0; }

/* ---------- CTA band ---------- */

.cta-band { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding-block: clamp(90px, 12vw, 160px); text-align: center; }
.cta-band__bg { position: absolute; inset: 0; opacity: .55; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(84, 103, 132, .35), rgba(42, 65, 99, .85) 70%); z-index: 1; }
.cta-band__inner { position: relative; z-index: 2; max-width: 820px; }
.cta-band__mark { display: inline-block; width: 56px; color: var(--steel-soft); margin-bottom: 30px; }
.cta-band .display { margin-bottom: 20px; }
.cta-band p { color: rgba(255, 255, 255, .82); font-size: 1.1rem; margin-bottom: 40px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

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

.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.about__mark { display: block; width: 60px; color: var(--brand); margin-bottom: 30px; }
.about__big { font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; font-size: clamp(1.45rem, 2.5vw, 2.1rem); line-height: 1.45; color: var(--navy-800); }
html[lang="ar"] .about__big { font-weight: 700; line-height: 1.7; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.about__body { padding-top: 90px; }
.about__body p { color: var(--muted); font-size: 1.05rem; }
.about__body .btn { margin-top: 18px; }

.svc-list { border-top: 1px solid var(--line); columns: 2; column-gap: 60px; }
.svc-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.svc-list a { display: flex; align-items: center; gap: 22px; padding: 24px 0; transition: padding .45s var(--ease-out), color .3s; }
.svc-list a:hover { padding-inline-start: 14px; color: var(--brand); }
.svc-list__num { font-size: .8rem; color: var(--steel); width: 24px; }
.svc-list__title { flex: 1; font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; color: var(--navy-800); }
html[lang="ar"] .svc-list__title { font-weight: 700; font-size: 1.15rem; }
.svc-list a:hover .arrow { width: 40px; }

/* ---------- Service detail ---------- */

.svc-detail { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.svc-detail__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.svc-detail__icon { width: 64px; height: 64px; color: var(--brand); }
.svc-detail__num { font-family: var(--f-display); font-size: 1.2rem; color: var(--steel); }
.svc-detail__intro { font-family: var(--f-display); font-weight: 400; letter-spacing: -.015em; font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.55; color: var(--navy-800); margin-bottom: 60px; }
html[lang="ar"] .svc-detail__intro { font-weight: 400; line-height: 1.85; font-size: clamp(1.3rem, 2.1vw, 1.7rem); }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-bottom: 60px; border-top: 1px solid var(--line); }
.checklist li { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.checklist__tick { flex: none; width: 22px; height: 22px; border: 1px solid var(--brand); border-radius: 50%; margin-top: 4px; position: relative; }
.checklist__tick::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border-right: 1.5px solid var(--brand); border-bottom: 1.5px solid var(--brand); transform: rotate(45deg); }
.svc-detail__figure { margin: 0 0 60px; aspect-ratio: 3 / 2; overflow: hidden; }
.svc-detail__figure img { width: 100%; height: 100%; object-fit: cover; }
.approach blockquote { margin: 0; padding-inline-start: 30px; border-inline-start: 2px solid var(--brand); font-size: 1.12rem; color: var(--text); }
.svc-detail__side { position: sticky; top: calc(var(--header-h) + 24px); }
.side-card { background: #fff; padding: clamp(26px, 3vw, 40px); box-shadow: 0 40px 80px -40px rgba(42, 65, 99, .28); border-top: 2px solid var(--brand); }
.side-card > p { color: var(--muted); font-size: .95rem; }
.side-card__or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: .85rem; }
.side-card__or::before, .side-card__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

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

.contact-cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-cards li > a, .contact-cards li > div { display: block; background: var(--paper); padding: 30px; transition: background .4s; }
.contact-cards li > a:hover { background: #fff; }
.contact-cards .qc__icon { margin-bottom: 18px; }
.contact-cards__hours { margin-top: 10px; text-transform: none !important; letter-spacing: 0 !important; }
.map { height: 460px; filter: grayscale(1) contrast(1.05) brightness(.95); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- 404 ---------- */

.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--ivory); padding: 140px 0 80px; }
.notfound__mark { display: block; width: 64px; color: var(--brand); margin: 0 auto 20px; }
.notfound__code { font-family: var(--f-display); font-size: clamp(6rem, 18vw, 12rem); line-height: 1; color: var(--brand); opacity: .15; display: block; }
.notfound .display { margin: -30px 0 16px; }
.notfound p { color: var(--muted); margin-bottom: 30px; }

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

.footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding-top: clamp(70px, 9vw, 110px); font-size: .95rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr .8fr 1fr; gap: clamp(30px, 5vw, 70px); padding-bottom: 60px; border-bottom: 1px solid var(--line-light); }
.footer__logo { width: 210px; color: #fff; margin-bottom: 26px; }
.footer__brand p { max-width: 34ch; }
.footer h3 { font-size: .74rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #fff; margin-bottom: 24px; }
html[lang="ar"] .footer h3 { letter-spacing: 0; font-size: .95rem; }
.footer ul { display: grid; gap: 12px; }
.footer a { transition: color .3s; }
.footer a:hover { color: #fff; }
.footer__more { color: var(--steel-soft); }
.socials { display: flex; gap: 16px; margin-top: 22px; font-size: .85rem; }
.socials a { border-bottom: 1px solid var(--line-light); padding-bottom: 2px; }
.footer__credit a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .3); padding-bottom: 1px; }
.footer__credit a:hover { border-color: #fff; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; padding-block: 28px calc(100px + env(safe-area-inset-bottom)); font-size: .82rem; color: rgba(255, 255, 255, .55); }

/* ---------- Chat widget (replaces the floating WhatsApp / call buttons) ---------- */

.chat { --chat-red: #d93a3a; position: fixed; z-index: 120; bottom: calc(22px + env(safe-area-inset-bottom)); inset-inline-end: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease-out) 1.2s, transform .6s var(--ease-out) 1.2s; font-family: var(--f-body); }
.is-loaded .chat { opacity: 1; transform: none; }
.is-loaded.is-locked .chat { opacity: 0; pointer-events: none; transition-delay: 0s; }

.chat__launcher { position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 18px 40px -12px rgba(42, 65, 99, .6), 0 0 0 1px rgba(255, 255, 255, .12) inset; transition: transform .4s var(--ease-out), background .3s; }
.chat__launcher:hover { transform: translateY(-3px); background: var(--brand-2); }
.chat__launcher::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--steel); animation: chat-ring 2.8s var(--ease) infinite; }
.chat.is-open .chat__launcher::before { animation: none; opacity: 0; }
@keyframes chat-ring { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
.chat__ico { position: absolute; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease-out), opacity .3s; }
.chat__ico--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chat.is-open .chat__ico--open { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat.is-open .chat__ico--close { opacity: 1; transform: none; }

.chat__badge { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--chat-red); color: #fff; font: 700 .75rem/22px "Manrope", sans-serif; text-align: center; border: 2px solid #fff; animation: badge-pop .5s var(--ease-out); }
.chat__badge[hidden] { display: none; }
@keyframes badge-pop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

.chat__teaser { position: relative; max-width: 290px; animation: chat-up .5s var(--ease-out); }
.chat__teaser[hidden] { display: none; }
.chat__teaser-body { display: flex; gap: 12px; align-items: center; text-align: start; background: #fff; border: 0; padding: 14px 16px; border-radius: 16px; border-end-end-radius: 4px; box-shadow: 0 20px 50px -18px rgba(42, 65, 99, .45); cursor: pointer; color: var(--text); font-size: .92rem; line-height: 1.5; }
.chat__teaser-body b { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.chat__teaser-x { position: absolute; top: -10px; inset-inline-start: -10px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; z-index: 1; }

.chat__panel { width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100svh - 130px)); background: #fff; border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(42, 65, 99, .6), 0 0 0 1px rgba(42, 65, 99, .08); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; animation: chat-up .45s var(--ease-out); }
[dir="rtl"] .chat__panel { transform-origin: bottom left; }
.chat__panel[hidden] { display: none; }
@keyframes chat-up { from { opacity: 0; transform: translateY(16px) scale(.96); } }

.chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--brand); color: #fff; }
.chat__avatar { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); display: grid; place-items: center; color: #fff; }
.chat__avatar svg { width: 24px; }
.chat__avatar--sm { width: 38px; height: 38px; background: var(--brand); border: 0; }
.chat__avatar--sm svg { width: 20px; }
.chat__online { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.chat__who { flex: 1; min-width: 0; line-height: 1.35; }
.chat__who b { display: block; font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__who small { font-size: .78rem; opacity: .75; }
.chat__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); cursor: pointer; position: relative; flex: none; }
.chat__close:hover { background: rgba(255, 255, 255, .2); }
.chat__close span { position: absolute; left: 11px; right: 11px; top: 17px; height: 1.5px; background: #fff; transform: rotate(45deg); }
.chat__close span + span { transform: rotate(-45deg); }

.chat__log { flex: 1; overflow-y: auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 8px; background: var(--ivory); scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { max-width: 82%; animation: msg-in .35s var(--ease-out); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; }
.msg--bot p { background: #fff; color: var(--text); border-end-start-radius: 4px; box-shadow: 0 1px 2px rgba(42, 65, 99, .08); }
.msg--me { align-self: flex-end; }
.msg--me p { background: var(--brand); color: #fff; border-end-end-radius: 4px; }
.msg--typing { display: flex; gap: 4px; padding: 14px 16px; background: #fff; border-radius: 16px; border-end-start-radius: 4px; width: max-content; }
.msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--steel); animation: typing 1.1s infinite; }
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.msg__link { display: inline-block; margin-top: 6px; padding: 8px 14px; border-radius: 20px; background: var(--brand); color: #fff; font-weight: 600; font-size: .92rem; }
.msg__tick { display: block; width: 26px; height: 26px; margin-top: 8px; border-radius: 50%; background: var(--brand); position: relative; }
.msg__tick::after { content: ""; position: absolute; left: 9px; top: 6px; width: 6px; height: 11px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }

.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 12px; background: var(--ivory); max-height: 190px; overflow-y: auto; }
.chat__chips[hidden], .chat__chips:empty { display: none; }
.chat__chips .chip { border: 1px solid var(--steel); background: #fff; color: var(--brand); border-radius: 20px; padding: 7px 14px; font-size: .86rem; font-weight: 500; cursor: pointer; transition: background .25s, color .25s, border-color .25s; animation: msg-in .35s var(--ease-out); }
.chat__chips .chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.chat__chips .chip--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.chat__chips .chip--primary:hover { background: var(--brand-2); border-color: var(--brand-2); }

.chat__input { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat__input input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 22px; padding: 0 16px; font-size: 16px; outline: none; background: #fff; transition: border-color .2s; }
.chat__input input:focus { border-color: var(--brand-2); }
.chat__input input:disabled { background: var(--ivory); }
.chat__input button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .2s, opacity .2s; }
.chat__input button:disabled { opacity: .35; cursor: default; }
.chat__input button svg { width: 20px; height: 20px; fill: currentColor; }
[dir="rtl"] .chat__input button svg { transform: scaleX(-1); }
.chat__secure { margin: 0; padding: 0 12px 10px; background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .72rem; color: var(--muted); }
.chat__secure svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Soft light that follows the pointer on dark sections (desktop only). */
.cursor-glow { position: fixed; z-index: 1; top: 0; left: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(129, 145, 163, .14), transparent 65%); opacity: 0; transition: opacity .5s; mix-blend-mode: screen; }
.cursor-glow.is-on { opacity: 1; }

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(46px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--mask { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-out); }
.reveal--mask img { transform: scale(1.25); transition: transform 1.8s var(--ease-out); }
.reveal--mask.is-in { clip-path: inset(0 0 0 0); }
.reveal--mask.is-in img { transform: scale(1); }
.intro__media.reveal--mask { clip-path: none; }
.intro__media.reveal--mask img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-out), transform 1.8s var(--ease-out); }
.intro__media.reveal--mask.is-in img { clip-path: inset(0 0 0 0); }

/* Word-by-word heading reveal (words wrapped by main.js). */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--d, 0ms) + var(--wi) * 35ms); }
[data-split].is-in .w > span { transform: none; }
[data-split].reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .values__grid { grid-template-columns: repeat(2, 1fr); row-gap: 50px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .nav, .header__cta { display: none; }
  .burger { display: block; }
  .intro__grid, .consult__grid, .faq-wrap, .about__grid, .svc-detail, .section-head--split { grid-template-columns: 1fr; }
  .faq-wrap .section-head, .svc-detail__side { position: static; }
  .intro__media { max-width: 520px; }
  .about__body { padding-top: 0; }
  .stat { padding-bottom: 30px; }
  .process__steps { grid-template-columns: 1fr 1fr; row-gap: 50px; }
  .process__steps::before, .process__steps::after { display: none; }
  .hero__side { display: none; }
}

@media (max-width: 640px) {
  html[lang="ar"] body { font-size: 16px; }
  .svc-grid, .values__grid, .checklist, .field-row { grid-template-columns: 1fr; }
  .svc-card { min-height: 340px; }
  .svc-card h3 { margin-top: 44px; }
  .svc-card__body { padding: 32px 26px; }
  .svc-card__num { top: 30px; inset-inline-end: 26px; }
  .svc-card__media { opacity: .35; }
  .process__steps { grid-template-columns: 1fr; }
  .svc-list { columns: 1; }
  .footer__top { grid-template-columns: 1fr; }
  .hero { padding-bottom: 110px; }
  .hero__actions .btn { width: 100%; }
  .intro__media::before { inset: 14px -14px -14px 14px; }
  [dir="rtl"] .intro__media::before { inset: 14px 14px -14px -14px; }
  .intro__badge { inset-inline-end: -8px; padding: 16px 18px; }
  .header__word small { display: none; }
  .header__icon { width: 34px; }
  .stat span { font-size: .85rem; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat:first-child { border-inline-start: 0; padding: 24px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; }
  .stat strong { margin: 0; min-width: 2.6em; }
  .chat { inset-inline-end: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chat.is-open { inset: 0; padding: 0; }
  body.chat-open { overflow: hidden; }
  .chat.is-open .chat__panel { width: 100%; height: 100%; border-radius: 0; }
  .chat.is-open .chat__launcher { display: none; }
  .chat__teaser { max-width: calc(100vw - 100px); }
  .map { height: 340px; }
}

@media (hover: none) {
  .chat__launcher:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal, [data-intro], .line > [data-intro] { opacity: 1; transform: none; }
  [data-split] .w > span { transform: none; }
  .marquee__track { animation: none; }
}
