/* ==========================================================================
   Web Egypt — Digital Engineering Core
   Design tokens per uploads/DESIGN.md
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand */
  --primary: #08A89F;
  --primary-2: #00A99D;
  --accent: #8BC63E;
  --primary-soft: rgba(8, 168, 159, .08);
  --primary-line: rgba(8, 168, 159, .35);
  --mint: #5BDAD0;
  --brand-gradient: linear-gradient(135deg, #08A89F 0%, #00A99D 55%, #8BC63E 100%);

  /* Surfaces — a five-step elevation ladder. A dark site can't lean on the
     light/dark section rhythm the original palette had, so separation comes
     from tone steps plus hairline borders instead. Deepest first. */
  --darker: #07090A;        /* footer                                   */
  --dark: #0A0D0F;          /* hero, process, stats, contact, about     */
  --page: #101417;          /* base sections: work, quotes, blog        */
  --white: #171B1F;         /* panels & cards: clients, services, blog  */
  --muted-surface: #1F252A; /* chips, inset surfaces                    */
  --border: rgba(255, 255, 255, .10);
  --border-solid: #232A2F;  /* where a transparent border would bleed   */

  /* Text */
  --ink: #C4CACF;
  --ink-strong: #F3F5F6;
  --ink-soft: #8B9299;
  --on-dark: #fff;
  --on-dark-soft: rgba(255, 255, 255, .78);
  --on-dark-faint: rgba(255, 255, 255, .62);

  /* Geometry */
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 32px);
  --header-h: 76px;
  --section-y: clamp(64px, 8vw, 112px);

  /* Elevation — on dark, shadows read as depth only when they are much
     stronger, and a teal rim does more work than a blur for hover. */
  --sh-rest: 0 6px 22px -6px rgba(0, 0, 0, .55);
  --sh-hover: 0 18px 38px -10px rgba(0, 0, 0, .65), 0 0 0 1px rgba(8, 168, 159, .3);
  --sh-media: 0 34px 64px -24px rgba(0, 0, 0, .8);

  /* Motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .6s;

  --font-ar: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  /* Fix: the source design smooth-scrolled anchors underneath the fixed header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-ar);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Locked while the preloader or the mobile drawer is open */
body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }

/* Author `display` declarations outrank the UA rule for [hidden], so make it stick. */
[hidden] { display: none !important; }

a { color: var(--primary); text-decoration: none; }

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: rgba(8, 168, 159, .35); color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.num { font-family: var(--font-en); font-variant-numeric: tabular-nums; }

/* ---------- 3. Shared type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-en);
  font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before,
.eyebrow.is-centered::after {
  content: ""; width: 28px; height: 2px; background: var(--accent);
  display: inline-block; flex: none;
  transform: scaleX(var(--dash, 1));
}
.eyebrow::before { transform-origin: right center; }
.eyebrow.is-centered::after { transform-origin: left center; }
.eyebrow.on-dark { color: var(--mint); }

.h-section {
  margin-top: 18px;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink-strong);
  text-wrap: balance;
}
.h-section.on-dark { color: var(--on-dark); }

.lede { color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.lede.on-dark { color: var(--on-dark-soft); }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
}
.section-head--center { display: block; text-align: center; max-width: 720px; margin-inline: auto; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding-inline: 24px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .3s, border-color .3s, color .3s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
@media (min-width: 768px) { .btn { height: 44px; } .btn--lg { height: 52px; padding-inline: 28px; font-size: 16px; } }
.btn--lg { height: 52px; padding-inline: 28px; font-size: 16px; }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-2); color: #fff; transform: scale(1.02); }

.btn--gradient {
  background: var(--brand-gradient); color: #fff;
  box-shadow: 0 12px 32px -6px rgba(8, 168, 159, .45);
}
.btn--gradient:hover {
  color: #fff; transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 40px -6px rgba(8, 168, 159, .6);
}

.btn--outline { background: var(--white); border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

.btn--ghost-dark {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .25); color: #fff;
}
.btn--ghost-dark:hover { border-color: var(--primary); color: var(--mint); background: rgba(8, 168, 159, .1); }

/* Text link with a trailing arrow. RTL: forward reads leftward. */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 16px; color: var(--primary);
}
.link-arrow .arw { transition: transform .3s var(--ease); }
.link-arrow:hover .arw { transform: translateX(-6px); }
.link-arrow.on-dark { color: var(--accent); }

.btn .arw { transition: transform .3s var(--ease); }
.btn:hover .arw { transform: translateX(-4px); }

/* ---------- 5. Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--dark);
  display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
.preloader__inner { display: grid; justify-items: center; gap: 28px; padding: 24px; }
.preloader__mark { width: 74px; height: auto; animation: markPulse 1.8s var(--ease) infinite; }
.preloader__bar {
  width: min(240px, 60vw); height: 2px;
  background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden;
}
.preloader__fill {
  display: block; height: 100%; width: 0;
  background: var(--brand-gradient);
  transition: width .25s linear;
}
.preloader__pct {
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; color: var(--on-dark-faint);
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes markPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-8px) scale(1.04); opacity: .78; }
}

/* ---------- 6. Scroll progress ---------- */
.progress {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  height: 2px; z-index: 60; pointer-events: none;
  background: transparent;
}
.progress__bar {
  height: 100%; width: 100%;
  background: var(--brand-gradient);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .1s linear;
}

/* ---------- 7. Header ---------- */
.header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0);
  transition: background .45s var(--ease), backdrop-filter .45s var(--ease), box-shadow .45s var(--ease);
}
.header.is-stuck {
  background: rgba(10, 13, 15, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.header__bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.header__logo { display: flex; align-items: center; flex: none; }
.header__logo img { height: 42px; width: auto; }
/* Over the dark hero the light lockup is used; swap once the bar goes frosted. */
/* Every header state is dark now, so the light-surface lockup never shows. */
.header__logo .logo-dark { display: block; }
.header__logo .logo-light { display: none; }

.nav { display: none; position: relative; align-items: center; gap: 2px; }
@media (min-width: 1024px) { .nav { display: flex; } }

.nav__link {
  position: relative; z-index: 1;
  padding: 10px 14px; border-radius: var(--r);
  font-weight: 500; font-size: 15px;
  color: var(--ink);
  transition: color .3s;
}
.nav__link { color: rgba(255, 255, 255, .82); }
.nav__link:hover,
.nav__link.is-active { color: var(--primary); }
.nav__link:hover,
.nav__link.is-active { color: var(--mint); }

/* Sliding pill that tracks the active section */
.nav__pill {
  /* `left` stays physical so the JS can position it with offsetLeft in RTL. */
  position: absolute; inset-block: 4px; left: 0; z-index: 0;
  border-radius: var(--r);
  background: var(--primary-soft);
  opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
  will-change: transform, width;
}
.nav__pill { background: rgba(255, 255, 255, .09); }
.nav__pill.is-on { opacity: 1; }

.header__cta { display: none; }
@media (min-width: 1024px) { .header__cta { display: inline-flex; } }

/* Burger */
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color .3s, background .3s;
}
.burger { border-color: rgba(255, 255, 255, .25); }
@media (min-width: 1024px) { .burger { display: none; } }
.burger span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--ink-strong);
  transition: transform .35s var(--ease), opacity .25s;
}
.burger span { background: #fff; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 8. Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 49;
  background: var(--dark);
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
  overflow-y: auto;
}
.drawer.is-open { opacity: 1; visibility: visible; }
@media (min-width: 1024px) { .drawer { display: none; } }

.drawer__nav { display: flex; flex-direction: column; gap: 4px; }
.drawer__link {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff; font-size: 22px; font-weight: 600;
  opacity: 0; transform: translateY(18px);
}
.drawer.is-open .drawer__link { animation: drawerIn .5s var(--ease) forwards; }
.drawer__link .n {
  font-family: var(--font-en); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; color: var(--accent);
}
.drawer__link.is-active { color: var(--mint); }
.drawer__foot { margin-top: auto; padding-top: 32px; display: grid; gap: 14px; }
.drawer__contact { color: var(--on-dark-soft); font-family: var(--font-en); font-size: 15px; }
@keyframes drawerIn { to { opacity: 1; transform: none; } }

/* ---------- 9. Reveal system ---------- */
html.gsap [data-reveal] { transition: none; }
[data-reveal] {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal="right"] { transform: translateX(56px); }
[data-reveal="left"] { transform: translateX(-56px); }
[data-reveal="scale"] { transform: scale(.93); }
[data-reveal="fade"] { transform: none; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Word-cascade heading reveal */
/* `.w` is the transient measuring pass the splitter uses to find line breaks. */
.mask-lines .w { display: inline-block; }
.mask-lines .line { display: block; }
.mask-lines .wd {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  padding-bottom: .14em; margin-bottom: -.14em;
}
.mask-lines .wd > i {
  display: inline-block; font-style: inherit;
  transform: translateY(112%);
  transition: transform .95s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--ld, 0s);
}
.mask-lines.is-in .wd > i { transform: none; }

/* ---------- 10. Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(540px, 80svh, 840px);
  background: var(--dark);
  display: flex; align-items: center;
  overflow: hidden;
  padding-block: calc(var(--header-h) + 36px) 92px;
  isolation: isolate;
}

/* Mouse-reactive chevron field + breathing contour rings */
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 75% at 50% 45%, rgba(10,13,15,0) 30%, rgba(10,13,15,.72) 78%, var(--dark) 100%),
    linear-gradient(180deg, rgba(10,13,15,.9) 0%, rgba(10,13,15,0) 22%, rgba(10,13,15,0) 62%, var(--dark) 100%);
}

/* Structural hairlines — the "technical canvas" motif from the design system */
.hero__rule-v {
  position: absolute; inset-block: 0; width: 1px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.12) 26%, rgba(8,168,159,.22) 50%, rgba(255,255,255,.12) 74%, transparent);
}
.hero__rule-v--1 { inset-inline-start: max(var(--gutter), calc((100% - min(1560px, 94vw)) / 2)); }
.hero__rule-v--2 { inset-inline-end: max(var(--gutter), calc((100% - min(1560px, 94vw)) / 2)); }
@media (max-width: 1023px) { .hero__rule-v { display: none; } }

/* The hero column runs wider than the standard 1280px grid so the headline
   can breathe now that the stats row is gone. */
.hero__inner { position: relative; z-index: 2; max-width: min(1560px, 94vw); }

.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--primary-line); border-radius: var(--r);
  background: rgba(8, 168, 159, .1);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--mint);
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.hero__badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 rgba(139, 198, 62, .6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(139,198,62,.55); opacity: 1; }
  70% { box-shadow: 0 0 0 10px rgba(139,198,62,0); opacity: .7; }
  100% { box-shadow: 0 0 0 0 rgba(139,198,62,0); opacity: 1; }
}

/* ---- Headline ---- */
.hero__title {
  margin-top: 22px;
  color: #fff; font-weight: 700;
  font-size: clamp(46px, min(8.6vw, 13.5svh), 132px);
  line-height: 1.08; letter-spacing: -.02em;
}
.hero__row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  column-gap: .26em; row-gap: .02em;
}

/* Masked per-word reveal. Arabic is cursive, so splitting stops at word level —
   per-character spans would break letter joining. */
.hero__title .ln { display: inline-block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero__title .ln__i {
  display: inline-block;
  transform: translateY(108%) rotate(3deg);
  opacity: 0;
}
.hero.is-ready .ln__i {
  animation: lnUp 1.05s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: var(--hd, 0s);
}
@keyframes lnUp { to { transform: none; opacity: 1; } }

/* ---- Rotating word ---- */
.slot {
  position: relative; display: inline-block;
  vertical-align: baseline;
  width: var(--slot-w, 4.6em);
  transition: width .6s cubic-bezier(.16, 1, .3, 1);
  opacity: 0;
}
.hero.is-ready .slot { animation: lnUp .9s cubic-bezier(.16,1,.3,1) .46s forwards; }
.slot__sizer { visibility: hidden; pointer-events: none; white-space: nowrap; }
.slot__w {
  position: absolute; inset-block-start: 0; inset-inline-start: 0;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--mint) 0%, var(--primary) 42%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(.5em) scale(.94); filter: blur(10px);
  transition: opacity .5s var(--ease), transform .6s cubic-bezier(.16,1,.3,1), filter .5s var(--ease);
}
.slot__w.is-on { opacity: 1; transform: none; filter: blur(0); }
.slot__w.is-out { opacity: 0; transform: translateY(-.5em) scale(1.04); filter: blur(10px); }
/* Underline that re-draws on every word change */
.slot::after {
  content: ""; position: absolute; inset-block-end: -.04em; inset-inline: 0;
  height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(var(--slot-line, 1)); transform-origin: right center;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
  opacity: .85;
}

.hero__lede {
  margin-top: 28px; max-width: 820px;
  color: var(--on-dark-soft);
  font-size: clamp(17px, 1.5vw, 22px); line-height: 1.7;
}
.hero__actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }


.hero__scroll {
  position: absolute; inset-block-end: 20px; inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--on-dark-faint);
  font-family: var(--font-en); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  transition: color .3s;
}
.hero__scroll:hover { color: var(--mint); }
.hero__mouse {
  width: 22px; height: 36px; padding-top: 6px;
  border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 12px;
  display: flex; justify-content: center;
}
.hero__mouse i { width: 4px; height: 8px; border-radius: 2px; background: var(--accent); animation: scrollDot 1.8s infinite; }
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(18px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@media (max-height: 700px) { .hero__scroll { display: none; } }

/* Short, wide viewports (laptops at 1280x600 and the like): the hero would
   otherwise run taller than the screen it sits on. */
@media (max-height: 780px) and (min-width: 768px) {
  .hero { min-height: clamp(460px, 72svh, 700px); padding-block: calc(var(--header-h) + 24px) 56px; }
  .hero__title { margin-top: 16px; }
  .hero__lede { margin-top: 18px; font-size: 17px; }
  .hero__actions { margin-top: 24px; }
}

/* Very short windows: drop the height floor entirely and let content set it. */
@media (max-height: 640px) and (min-width: 768px) {
  .hero { min-height: 0; padding-block: calc(var(--header-h) + 16px) 40px; }
}

.js .hero [data-hero] { opacity: 0; }
.js .hero.is-ready [data-hero] { animation: heroUp .95s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--hd, 0s); }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }


/* ---------- 11. Clients marquee ---------- */
.clients { background: var(--white); border-bottom: 1px solid var(--border); padding-block: 36px; overflow: hidden; }
.clients__head { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; }
.clients__head span {
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  flex: none;
}
.clients__head i { flex: 1; height: 1px; background: var(--border); }

/* Forced LTR so the track anchors at x=0 and a negative translate always
   pulls fresh content in from the right, whatever the page direction. */
.marquee { position: relative; direction: ltr; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; inset-block: 0; width: clamp(60px, 12vw, 160px); z-index: 2; pointer-events: none;
}
.marquee::before { inset-inline-end: 0; background: linear-gradient(to left, var(--white), rgba(23, 27, 31, 0)); }
.marquee::after { inset-inline-start: 0; background: linear-gradient(to right, var(--white), rgba(23, 27, 31, 0)); }

.marquee__track {
  display: flex; gap: clamp(40px, 5vw, 72px); width: max-content;
  padding-block: 4px;
  animation: marquee var(--mq-dur, 38s) linear infinite;
}
.marquee__group { display: flex; gap: clamp(40px, 5vw, 72px); align-items: center; }
.marquee:hover .marquee__track { animation-play-state: paused; }
/* JS sets --mq-shift to exactly one group + one gap, so the loop is seamless. */
@keyframes marquee { to { transform: translateX(calc(var(--mq-shift, 50%) * -1)); } }

/* Logo strip on a dark surface. The placeholders ship in light ink so they
   read at rest; a real colour logo that is dark-on-transparent will need
   `filter: brightness(0) invert(1)` added to the rest state. */
.client { display: inline-flex; align-items: center; flex: none; }
.client img {
  height: clamp(30px, 3.4vw, 40px); width: auto;
  filter: grayscale(1);
  opacity: .46;
  transition: opacity .35s var(--ease), filter .35s var(--ease), transform .35s var(--ease);
}
.client:hover img { opacity: 1; filter: none; transform: translateY(-2px); }

/* ---------- 12. About ---------- */
/* Inverted on purpose: it sits between the white client strip and the image
   band, and the page needed a dark beat there. It also lets the band below
   emerge out of darkness instead of cutting into it. */
.about {
  position: relative; overflow: hidden;
  background: var(--dark);
  padding-block: var(--section-y);
}
.about__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 82% 18%, rgba(8, 168, 159, .16), transparent 62%),
    radial-gradient(ellipse 45% 50% at 8% 92%, rgba(139, 198, 62, .10), transparent 62%);
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}
.about__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 25%, transparent 100%);
}
.about .container { position: relative; }

.about__grid {
  display: grid; gap: clamp(40px, 6vw, 84px);
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
}
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }

/* ---- Media: a 45° corner cut, straight from the brand mark's geometry ---- */
.about__media { position: relative; margin: 0; }
.about__cut {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 4.1;
  border-radius: var(--r-xl);
  /* The notch is a physical top-left cut — decorative, so it stays put in RTL. */
  clip-path: polygon(0 clamp(48px, 9%, 96px), clamp(48px, 9%, 96px) 0, 100% 0, 100% 100%, 0 100%);
  background: #0F1214;
}
.about__cut img {
  width: 100%; height: 118%; object-fit: cover;
  filter: saturate(.82) contrast(1.04) brightness(.86);
  will-change: transform;
}
/* Brand wash so the photo belongs to the palette rather than sitting on top. */
.about__cut::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(160deg, rgba(8, 168, 159, .30), transparent 46%),
    linear-gradient(0deg, rgba(20, 23, 26, .88), rgba(20, 23, 26, .05) 55%);
}
/* Hairline that traces the cut edge */
.about__cut::before {
  content: ""; position: absolute; z-index: 2;
  inset-block-start: 0; inset-inline-start: 0;
  width: clamp(68px, 13%, 136px); height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: rotate(-45deg); transform-origin: left top;
  translate: 0 clamp(48px, 9%, 96px);
}
@media (max-width: 900px) { .about__cut { aspect-ratio: 16 / 11; } }

.about__badge {
  position: absolute; inset-block-end: 22px; inset-inline-start: 22px; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  background: rgba(20, 23, 26, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.about__badge .k {
  font-family: var(--font-en); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--on-dark-faint);
}
.about__badge .v {
  font-family: var(--font-en); font-size: clamp(28px, 3vw, 38px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1; color: #fff;
}

/* Three skewed bars echoing the logo, tucked against the opposite corner */
.about__ticks {
  position: absolute; inset-block-end: 30px; inset-inline-end: 24px; z-index: 3;
  display: flex; gap: 7px;
}
.about__ticks i { width: 30px; height: 9px; transform: skewX(-30deg); border-radius: 2px; }
.about__ticks i:nth-child(1) { background: var(--primary); }
.about__ticks i:nth-child(2) { background: var(--primary-2); }
.about__ticks i:nth-child(3) { background: var(--accent); }

/* The grid column already sets the measure; extra caps just left a gap. */
.about__copy .h-section { max-width: 19ch; }
.about__copy .lede { max-width: none; }

/* ---- Principles: a hairline row, not boxes -------------------------------- */
.principles {
  position: relative;
  display: grid; gap: clamp(24px, 3vw, 44px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  margin-top: clamp(48px, 6vw, 84px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.principle { position: relative; padding-inline-start: 22px; }
.principle::before {
  content: ""; position: absolute; inset-block: 2px auto; inset-inline-start: 0;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(8, 168, 159, 0));
  transform: scaleY(.35); transform-origin: top center;
  transition: transform .55s var(--ease);
}
.principle:hover::before { transform: scaleY(1); }
.principle__n {
  display: block;
  font-family: var(--font-en); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; color: var(--accent);
}
.principle h3 { margin-top: 14px; font-size: clamp(19px, 1.6vw, 22px); font-weight: 700; color: #fff; }
.principle p { margin-top: 10px; color: var(--on-dark-soft); font-size: 15px; line-height: 1.7; }


/* ---------- 13. Full-bleed band ---------- */
.band {
  position: relative;
  height: clamp(440px, 62vw, 760px);
  overflow: hidden;
  background: var(--dark);
}
.band__img {
  position: absolute; inset: -14% 0; width: 100%; height: 128%;
  object-fit: cover; will-change: transform;
}

/* Three stacked layers instead of one four-stop ramp. A two-stop fade between
   an opaque colour and a transparent one shows a hard edge where the alpha
   curve breaks; these eased multi-stop fades dissolve into the light sections
   above and below, and the dark scrim sits on its own layer so tuning the
   quote's contrast never disturbs the blend. */
.band__veil {
  position: absolute; inset: 0;
  background:
    /* legibility scrim, confined to the middle */
    linear-gradient(180deg,
      rgba(6, 8, 10, .30) 30%,
      rgba(6, 8, 10, .52) 46%,
      rgba(6, 8, 10, .52) 60%,
      rgba(6, 8, 10, .26) 76%,
      rgba(6, 8, 10, 0) 92%),
    /* melt out of the dark About above */
    linear-gradient(180deg,
      var(--dark) 0%,
      rgba(10, 13, 15, .985) 3.5%,
      rgba(10, 13, 15, .94) 7%,
      rgba(10, 13, 15, .85) 11%,
      rgba(10, 13, 15, .70) 15%,
      rgba(10, 13, 15, .50) 19%,
      rgba(10, 13, 15, .28) 24%,
      rgba(10, 13, 15, .11) 29%,
      rgba(10, 13, 15, 0) 35%),
    /* melt into the section below (--white) */
    linear-gradient(0deg,
      var(--white) 0%,
      rgba(23, 27, 31, .985) 3%,
      rgba(23, 27, 31, .94) 6%,
      rgba(23, 27, 31, .85) 9%,
      rgba(23, 27, 31, .70) 13%,
      rgba(23, 27, 31, .50) 17%,
      rgba(23, 27, 31, .28) 21%,
      rgba(23, 27, 31, .11) 26%,
      rgba(23, 27, 31, 0) 31%);
}
.band__quote {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; text-align: center;
  padding: var(--gutter);
}
.band__quote p {
  max-width: 900px; color: #fff;
  font-size: clamp(21px, 3vw, 42px); font-weight: 700; line-height: 1.35;
  letter-spacing: -.02em; text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.band__quote .accent { color: var(--accent); }


/* ---------- 14. Services ---------- */
.services { background: var(--white); border-bottom: 1px solid var(--border); padding-block: var(--section-y); }
.services .section-head { margin-bottom: clamp(40px, 5vw, 60px); }

.services__grid {
  display: grid; gap: clamp(16px, 1.6vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.service {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  gap: 14px;
  padding: clamp(26px, 2.6vw, 34px);
  background: var(--page);                 /* one step below the section */
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition: transform .45s var(--ease), border-color .45s, background .45s, box-shadow .45s;
}
.service:hover {
  transform: translateY(-5px);
  border-color: var(--primary-line);
  background: var(--muted-surface);
  box-shadow: var(--sh-hover);
}

/* Accent rule along the top edge, drawn on hover */
.service::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0); transform-origin: right center;
  transition: transform .55s var(--ease);
}
.service:hover::before { transform: scaleX(1); }

.service__n {
  position: absolute; inset-block-start: clamp(22px, 2.4vw, 30px); inset-inline-end: clamp(24px, 2.6vw, 32px);
  font-family: var(--font-en); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; color: var(--ink-soft);
  transition: color .4s;
}
.service:hover .service__n { color: var(--accent); }

.service__icon {
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(8, 168, 159, .20), rgba(139, 198, 62, .14));
  border: 1px solid rgba(8, 168, 159, .26);
  color: var(--mint);
  transition: color .4s, border-color .4s, transform .5s var(--ease);
}
.service:hover .service__icon { color: var(--accent); border-color: var(--primary-line); transform: translateY(-2px); }

.service h3 {
  margin-top: 6px;
  font-size: clamp(19px, 1.5vw, 21px); font-weight: 700;
  color: var(--ink-strong); line-height: 1.35;
  padding-inline-end: 34px;                /* clear of the index number */
}
.service p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; flex: 1; }

/* Kept out of `.service` on purpose: the chips are a general-purpose label and
   used to live in the old tabbed-services block that no longer exists. */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--muted-surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .05em;
  padding: 5px 11px; border-radius: var(--r-sm);
  white-space: nowrap;
}
.service:hover .chip { border-color: rgba(8, 168, 159, .28); }

.service .chips { margin-top: 4px; }

.service__btn {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding-inline: 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink); font-weight: 600; font-size: 15px;
  transition: border-color .3s, color .3s, background .3s;
}
.service__btn .arw { transition: transform .3s var(--ease); }
.service__btn:hover {
  border-color: var(--primary);
  color: var(--mint);
  background: rgba(8, 168, 159, .1);
}
.service__btn:hover .arw { transform: translateX(-5px); }


/* ---------- 15. Process ---------- */
.process { background: var(--dark); padding-block: var(--section-y); position: relative; overflow: hidden; }
.process__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(8,168,159,.14), transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 90%, rgba(139,198,62,.09), transparent 60%);
}
.process__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 100%);
}
.process .container { position: relative; }
.steps {
  display: grid; gap: 20px; margin-top: 64px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.step {
  position: relative; overflow: hidden; height: 100%;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  transition: background .5s var(--ease), border-color .5s, transform .5s var(--ease);
}
.step:hover { background: rgba(8, 168, 159, .09); border-color: rgba(8, 168, 159, .45); transform: translateY(-6px); }
.step__n {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-en); font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--accent);
}
.step__n i { flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
.step h3 { margin-top: 28px; color: #fff; font-size: 22px; font-weight: 600; }
.step p { margin-top: 12px; color: var(--on-dark-soft); font-size: 15px; line-height: 1.7; }
.step__motif {
  position: absolute; inset-block-end: -30px; inset-inline-start: -30px;
  width: 110px; height: 110px;
  border: 1px solid rgba(8, 168, 159, .22); transform: rotate(45deg); border-radius: var(--r-lg);
  pointer-events: none;
  transition: border-color .5s, transform .7s var(--ease);
}
.step:hover .step__motif { border-color: rgba(139, 198, 62, .35); transform: rotate(60deg) scale(1.1); }

/* ---------- 16. Portfolio ---------- */
/* A mosaic of image tiles. The 12-column track plus fixed row heights keeps
   every tile edge aligned no matter how long the Arabic title runs — an
   aspect-ratio per tile would leave ragged bottoms in the same row. */
.work { background: var(--page); padding-block: var(--section-y); }
.work .section-head { margin-bottom: clamp(32px, 3.6vw, 46px); }

.pgrid {
  display: grid;
  gap: clamp(12px, 1.3vw, 18px);
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(196px, 18vw, 262px);
}
/* Order matters: the modifiers carry the same weight as the base rule, so the
   default span has to be declared first or it would win over both. */
.pcard { grid-column: span 4; }
.pcard--feature { grid-column: span 7; grid-row: span 2; }
.pcard--half { grid-column: span 5; }

.pcard {
  position: relative; isolation: isolate; overflow: hidden;
  display: block; color: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: var(--white);
  transition: transform .55s var(--ease), border-color .5s, box-shadow .55s var(--ease);
}
.pcard:hover, .pcard:focus-visible {
  transform: translateY(-6px);
  border-color: var(--primary-line);
  box-shadow: 0 32px 64px -28px rgba(8, 168, 159, .5);
}

.pcard img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(.82) brightness(.72);
  transition: transform 1.3s var(--ease), filter .6s var(--ease);
}
.pcard:hover img, .pcard:focus-visible img { transform: scale(1.09); filter: saturate(1) brightness(.84); }

.pcard__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 10, .58) 0%, rgba(7, 9, 10, .12) 34%, rgba(7, 9, 10, .55) 74%, rgba(7, 9, 10, .9) 100%),
    linear-gradient(200deg, rgba(8, 168, 159, .22), transparent 55%);
}

.pcard__top {
  position: absolute; inset-block-start: 0; inset-inline: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: clamp(14px, 1.4vw, 20px);
}
.pcard__cat {
  background: rgba(10, 13, 15, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: var(--r-sm); padding: 5px 10px;
  font-family: var(--font-en); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
  transition: color .4s, border-color .4s;
}
.pcard:hover .pcard__cat { color: #fff; border-color: var(--primary-line); }
.pcard__year {
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; color: rgba(255, 255, 255, .62);
  font-variant-numeric: tabular-nums;
}

.pcard__body {
  position: absolute; inset-block-end: 0; inset-inline: 0;
  padding: clamp(16px, 1.6vw, 26px);
  transform: translateY(0);
  transition: transform .55s var(--ease);
}
.pcard:hover .pcard__body { transform: translateY(-4px); }

.pcard__client {
  display: block;
  font-family: var(--font-en); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}
.pcard__title {
  margin-top: 7px;
  font-size: clamp(17px, 1.35vw, 20px); font-weight: 700; line-height: 1.35;
  color: #fff; text-wrap: balance;
}
.pcard--feature .pcard__title { font-size: clamp(21px, 2.1vw, 30px); }

/* The call to action keeps its space at every state: fading it in without
   reserving room would make the whole caption jump on hover. */
.pcard__go {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 11px;
  color: var(--accent); font-weight: 600; font-size: 14.5px;
  opacity: 0; transform: translateY(9px);
  transition: opacity .4s var(--ease), transform .45s var(--ease);
}
.pcard:hover .pcard__go, .pcard:focus-visible .pcard__go { opacity: 1; transform: translateY(0); }
.pcard__go .arw { transition: transform .3s var(--ease); }
.pcard:hover .pcard__go .arw { transform: translateX(-5px); }

/* Two columns: the feature keeps the full width, everything else pairs up. */
@media (max-width: 1000px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(190px, 25vw, 250px); }
  .pcard, .pcard--half { grid-column: span 1; grid-row: span 1; }
  .pcard--feature { grid-column: span 2; grid-row: span 1; }
  /* Six tiles over two columns leave the last one alone in its row; widening
     it closes the hole instead of leaving a gap beside it. */
  .pcard:last-child { grid-column: span 2; }
}
@media (max-width: 620px) {
  .pgrid { grid-template-columns: 1fr; grid-auto-rows: clamp(210px, 52vw, 280px); }
  .pcard, .pcard--half, .pcard--feature { grid-column: span 1; }
  /* Nothing to hover on a touch screen, so the link shows up front. */
  .pcard__go { opacity: 1; transform: none; }
}
@media (hover: none), (pointer: coarse) {
  .pcard__go { opacity: 1; transform: none; }
}

/* ---------- 17. Stats ---------- */
.stats {
  position: relative; overflow: hidden;
  background: var(--dark);
  border-block: 1px solid rgba(255, 255, 255, .07);
  padding-block: clamp(56px, 7vw, 96px);
}
.stats::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 70% at 78% 0%, rgba(8,168,159,.16), transparent 62%),
    radial-gradient(ellipse 40% 60% at 12% 100%, rgba(139,198,62,.1), transparent 62%);
}
.stats .container { position: relative; }
.stats__grid {
  /* The column gap is named so the divider can sit exactly in its middle. */
  --divider-gap: clamp(26px, 3.2vw, 56px);
  display: grid; gap: clamp(34px, 4vw, 46px) var(--divider-gap);
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
/* One hairline per boundary, not one per figure: it hangs off the inline-start
   of every item except the first, so it always lands between two of them.
   A pseudo-element rather than a border, so it can still scale on reveal. */
.stat { position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; inset-block: 2px;
  inset-inline-start: calc(var(--divider-gap) / -2);
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--accent) 22%, var(--primary) 78%, transparent);
  transform: scaleY(var(--rule, 1)); transform-origin: center;
}
.stat__v {
  /* dir="ltr" in the markup keeps "+300" in that order. */
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
  font-family: var(--font-en); font-size: clamp(44px, 5vw, 72px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1;
}
.stat__v { color: #fff; }
.stat__v .pre { color: var(--accent); font-size: .6em; }
.stat__l { margin-top: 14px; color: var(--on-dark-soft); font-size: 16px; font-weight: 500; }

/* Two columns: only the second of each pair carries a divider, otherwise the
   third figure would draw one against the outer edge of a new row. */
@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat::before { display: none; }
  .stat:nth-child(even)::before { display: block; }
}
@media (max-width: 520px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat:nth-child(even)::before { display: none; }
}

/* ---------- 18. Testimonials ---------- */
/* A centre-weighted deck: the active quote sits at full size and the
   neighbours fall back behind it. Every card is positioned by JS with a
   transform rather than by scrolling, so the RTL direction is one sign in one
   place instead of a scroll axis that behaves differently per browser. */
.quotes { background: var(--page); padding-block: var(--section-y); }

.qcar { position: relative; margin-top: clamp(38px, 4.4vw, 58px); }
.qcar__stage {
  position: relative;
  min-height: 300px;              /* replaced by JS with the tallest card */
  overflow: hidden;
  padding-block: 10px;
  /* Softens where the neighbouring cards run off the edge, instead of a hard
     vertical cut through their text. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.qcard {
  position: absolute; top: 10px; left: 50%;
  width: min(86vw, 540px);
  margin: 0;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(26px, 2.6vw, 38px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-rest);
  /* The base centring; JS appends the offset and the scale. */
  transform: translateX(-50%);
  transition: transform .7s var(--ease), opacity .55s var(--ease), border-color .5s;
  will-change: transform, opacity;
}
.qcard.is-active { border-color: var(--primary-line); box-shadow: var(--sh-hover); }

.qcard__mark {
  font-family: var(--font-en); font-size: 54px; line-height: .55;
  font-weight: 800; color: var(--accent); height: 22px;
}
.qcard blockquote { margin: 0; }
.qcard p { color: var(--ink); font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.8; }
.qcard.is-active p { color: var(--ink-strong); }

.qcard__who {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid var(--border); padding-top: 18px; margin-top: auto;
}
.qcard__ph {
  width: 56px; height: 56px; flex: none;
  border-radius: 50%; object-fit: cover;
  border: 2px solid transparent;
  background: var(--muted-surface);
  transition: border-color .5s;
}
.qcard.is-active .qcard__ph { border-color: var(--primary); }
.qcard__who b { display: block; font-weight: 600; color: var(--ink-strong); }
/* Class-scoped on purpose: a bare `.qcard__who span` outranks the photo rules. */
.qcard__who .role { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 3px; }

/* ---- Controls -------------------------------------------------------------- */
.qcar__nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: clamp(22px, 2.4vw, 32px);
}
.qnav {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--white); color: var(--ink);
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.qnav:hover { border-color: var(--primary); color: var(--mint); background: var(--muted-surface); }
.qnav:active { transform: scale(.94); }

.qcar__dots { display: flex; align-items: center; gap: 8px; }
.qdot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .22);
  transition: width .45s var(--ease), background .45s;
}
.qdot:hover { background: rgba(255, 255, 255, .42); }
.qdot[aria-selected="true"] { width: 26px; background: var(--brand-gradient); }

@media (max-width: 700px) {
  .qcard { width: min(90vw, 460px); padding: 24px; gap: 15px; }
  .qcard__ph { width: 48px; height: 48px; }
}

/* Without JS every card would sit on top of the others, so let them stack. */
html:not(.js) .qcar__stage { min-height: 0; overflow: visible; }
html:not(.js) .qcard {
  position: relative; top: auto; left: auto;
  transform: none; width: 100%; margin-bottom: 18px;
}
html:not(.js) .qcar__nav { display: none; }

@media (prefers-reduced-motion: reduce) {
  .qcard { transition-duration: .01ms; }
}

/* ---------- 19. Blog ---------- */
.blog { background: var(--white); border-top: 1px solid var(--border); padding-block: var(--section-y); }
.blog__grid { display: grid; gap: 24px; margin-top: 48px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.post {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl);
  color: inherit;
  transition: transform .5s var(--ease), border-color .5s, box-shadow .5s;
}
.post:hover { transform: translateY(-3px); border-color: var(--primary-line); box-shadow: var(--sh-hover); }
.post__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--muted-surface); }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post__media img { transform: scale(1.06); }
.post__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post__meta { display: flex; gap: 10px; align-items: center; font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.post__cat { background: var(--primary-soft); color: var(--primary); padding: 5px 10px; border-radius: var(--r-sm); }
.post__date { color: var(--ink-soft); }
.post h3 { font-size: 20px; font-weight: 600; color: var(--ink-strong); line-height: 1.4; }
.post p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; flex: 1; }
.post .link-arrow { font-size: 15px; }

/* ---------- 20. Contact ---------- */
.contact { background: var(--dark); padding-block: var(--section-y); position: relative; overflow: hidden; }
.contact__glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 50% 60% at 15% 30%, rgba(8,168,159,.15), transparent 60%); }
.contact__motif {
  position: absolute; inset-block-start: -80px; inset-inline-start: -80px;
  width: 360px; height: 360px; border: 1px solid rgba(8, 168, 159, .16);
  transform: rotate(45deg); border-radius: 24px; pointer-events: none;
}
.contact .container { position: relative; }
.contact__grid { display: grid; gap: clamp(40px, 6vw, 96px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }

.contact__lines { display: flex; flex-direction: column; gap: 18px; margin-top: 40px; }
.contact__line { display: flex; align-items: center; gap: 16px; color: #fff; transition: color .3s; }
.contact__line:hover { color: var(--mint); }
.contact__line .ic {
  width: 44px; height: 44px; flex: none; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .14);
  display: grid; place-items: center; color: var(--accent);
  transition: border-color .3s, background .3s;
}
.contact__line:hover .ic { border-color: var(--primary); background: rgba(8, 168, 159, .1); }
.contact__line .val { font-family: var(--font-en); font-size: 16px; }

.offices { margin-top: 48px; }
.offices__k { font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-faint); }
.offices__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px; }
.office {
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-lg); padding: 20px;
  transition: border-color .4s, background .4s, transform .4s var(--ease);
}
.office:hover { border-color: rgba(8, 168, 159, .45); background: rgba(8, 168, 159, .07); transform: translateY(-3px); }
.office .c { color: var(--accent); font-family: var(--font-en); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.office .city { color: #fff; font-weight: 600; margin-top: 8px; font-size: 17px; }
.office .addr { color: var(--on-dark-soft); font-size: 14px; margin-top: 6px; line-height: 1.6; }

/* Form */
.form {
  background: var(--white); border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 40px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink); min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > span { font-weight: 500; }
.field .req { color: var(--primary); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 46px;
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px 16px; font-size: 15px; color: var(--ink-strong); background: var(--page);
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8, 168, 159, .15);
}
.field input::placeholder, .field textarea::placeholder { color: #6E767D; }
.field .err { color: #BA1A1A; font-size: 13px; min-height: 0; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #BA1A1A; }
.field.is-invalid input:focus, .field.is-invalid textarea:focus { box-shadow: 0 0 0 3px rgba(186, 26, 26, .15); }

.form__submit { grid-column: 1 / -1; width: 100%; border: 0; }
.form__note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 13px; margin: 0; }
.form__status { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--primary); }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- 21. Footer ---------- */
.footer { background: var(--darker); border-top: 1px solid rgba(255, 255, 255, .06); padding-block: 64px 32px; }
.footer__grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.footer__logo img { height: 46px; width: auto; }
.footer__about { margin-top: 20px; color: var(--on-dark-soft); font-size: 15px; line-height: 1.7; max-width: 320px; }
.socials { display: flex; gap: 10px; margin-top: 24px; }
.social {
  width: 40px; height: 40px; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .14);
  display: grid; place-items: center; color: #fff;
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.social:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-3px); }
.footer__k { font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.footer__links { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.footer__links a { color: var(--on-dark-soft); font-size: 15px; transition: color .3s, padding-inline-start .3s; }
.footer__links a:hover { color: var(--mint); padding-inline-start: 6px; }
.footer__news { margin-top: 20px; color: var(--on-dark-soft); font-size: 14px; line-height: 1.6; }
.news-form { display: flex; gap: 8px; margin-top: 16px; }
.news-form input {
  flex: 1; min-width: 0; min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04);
  color: #fff; border-radius: var(--r); padding: 12px 14px; font-size: 14px;
  transition: border-color .25s, box-shadow .25s;
}
.news-form input::placeholder { color: rgba(255, 255, 255, .45); }
.news-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8, 168, 159, .18); }
.news-form button { background: var(--primary); color: #fff; border: 0; border-radius: var(--r); padding-inline: 18px; min-height: 44px; font-weight: 600; transition: background .3s; }
.news-form button:hover { background: var(--primary-2); }
.news-status { margin-top: 10px; font-size: 13px; color: var(--accent); min-height: 18px; }

.footer__base {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: rgba(255, 255, 255, .5); font-size: 13px;
}

/* ---------- 22. Floating actions ---------- */
.dock {
  /* Sits on the left in RTL, clear of the side where the text column starts. */
  position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 45;
  display: flex; flex-direction: column-reverse; gap: 12px;
}
.dock__btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; color: #fff;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .35);
  transition: transform .3s var(--ease), box-shadow .3s, opacity .3s, visibility .3s;
}
.dock__btn:hover { transform: translateY(-4px) scale(1.05); }
.dock__btn--wa { background: #25D366; }
.dock__btn--tel { background: var(--primary); }
.dock__btn--top { background: var(--dark); opacity: 0; visibility: hidden; }
.dock__btn--top.is-on { opacity: 1; visibility: visible; }

/* ---------- 23. Reticle cursor ---------- */
/* Four corner brackets that trail the pointer and snap to whatever it focuses. */
.reticle {
  /* Physical top/left on purpose: JS positions this with translate3d in page
     coordinates, and inset-inline-start would anchor it to the right edge in RTL. */
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 38px; height: 38px;
  pointer-events: none; opacity: 0;
  transition: opacity .35s;
  will-change: transform, width, height;
}
.reticle i {
  position: absolute; width: 11px; height: 11px;
  border: 1.5px solid var(--mint);
  transition: border-color .3s, width .3s var(--ease-out), height .3s var(--ease-out);
}
.reticle i:nth-child(1) { inset-block-start: 0; inset-inline-start: 0; border-inline-end: 0; border-block-end: 0; }
.reticle i:nth-child(2) { inset-block-start: 0; inset-inline-end: 0; border-inline-start: 0; border-block-end: 0; }
.reticle i:nth-child(3) { inset-block-end: 0; inset-inline-start: 0; border-inline-end: 0; border-block-start: 0; }
.reticle i:nth-child(4) { inset-block-end: 0; inset-inline-end: 0; border-inline-start: 0; border-block-start: 0; }

.reticle.is-on { opacity: 1; }
.reticle.is-locked i { border-color: var(--accent); width: 16px; height: 16px; }
.reticle.on-dark i { border-color: var(--mint); }
.reticle.on-dark.is-locked i { border-color: var(--accent); }

.reticle__dot {
  position: fixed; top: 0; left: 0; z-index: 151;
  width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: var(--accent);
  pointer-events: none; opacity: 0;
  transition: opacity .35s, transform .12s linear;
}
.reticle__dot.is-on { opacity: 1; }

html.has-reticle, html.has-reticle * { cursor: none; }
/* Text entry still needs a real caret affordance. */
html.has-reticle input, html.has-reticle textarea { cursor: text; }

@media (hover: none), (pointer: coarse) { .reticle, .reticle__dot { display: none; } }


/* ---------- 24. Responsive ---------- */
@media (max-width: 1023px) {
  :root { --header-h: 68px; }
  .hero { padding-block: calc(var(--header-h) + 28px) 68px; min-height: clamp(480px, 74svh, 720px); }
}
@media (max-width: 767px) {
  :root { --section-y: 60px; --gutter: 20px; }
  .section-head { align-items: flex-start; }
  .form { box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .5); }
  .dock { inset-block-end: 16px; inset-inline-end: 16px; }
  .dock__btn { width: 44px; height: 44px; }
}

/* ---------- 25. Reduced motion ---------- */
/* The source design had no reduced-motion path at all: a permanent rAF canvas,
   an infinite marquee, parallax and float loops all ran regardless. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .mask-lines .wd > i { transform: none !important; }
  .js .hero [data-hero], .hero__title .ln__i, .slot { opacity: 1 !important; transform: none !important; }
  .slot__w { filter: none !important; }
  .hero__field, .reticle, .reticle__dot, .hero__scroll { display: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
}

/* ---------- 26. No-JS fallback ---------- */
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
html:not(.js) .preloader { display: none; }
html:not(.js) .mask-lines .wd > i { transform: none; }
html:not(.js) .hero__title .ln__i, html:not(.js) .slot { opacity: 1; transform: none; }
html:not(.js) .slot__w:not(.is-on) { display: none; }
html:not(.js) .slot { width: auto; }
html:not(.js) .slot__sizer { display: none; }
html:not(.js) .slot__w.is-on { position: static; filter: none; }

/* ==========================================================================
   27. Pointer-reactive surfaces
   A spotlight that tracks the cursor across cards. Desktop/fine-pointer only.
   ========================================================================== */
.principle, .step, .post, .office, .service { position: relative; }

.principle, .step, .post, .office { overflow: hidden; }

.principle::after, .post::after, .office::after, .step::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0;
  transition: opacity .45s var(--ease);
  background: radial-gradient(260px circle at var(--px, 50%) var(--py, 50%), rgba(8, 168, 159, .14), transparent 68%);
}
.step::after, .office::after {
  background: radial-gradient(260px circle at var(--px, 50%) var(--py, 50%), rgba(139, 198, 62, .16), transparent 68%);
}
.principle:hover::after, .post:hover::after,
.office:hover::after, .step:hover::after { opacity: 1; }

/* Keep card content above the spotlight wash. */
.principle > *, .post > *, .office > * , .step > * { position: relative; z-index: 2; }

@media (hover: none), (pointer: coarse) {
  .principle::after, .post::after,
  .office::after, .step::after { display: none; }
}

/* Nav underline that draws in on hover */
.nav__link::after {
  content: ""; position: absolute; inset-inline: 14px; inset-block-end: 4px;
  height: 2px; border-radius: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: right center;
  transition: transform .35s var(--ease-out);
}
/* Hover only — the sliding pill already marks the active section, and showing
   both at once just makes the bar noisy. */
.nav__link:hover::after { transform: scaleX(1); }

/* Footer + drawer links get the same treatment via padding shift (already set) */
