:root {
  color-scheme: dark;
  --bg: #0a0f1c;
  --bg-2: #151a24;
  --bg-3: #2a3140;
  --ink: #e8edf2;
  --muted: rgba(232, 237, 242, 0.64);
  --muted-dark: rgba(232, 237, 242, 0.42);
  --teal: #00b3b3;
  --teal-soft: rgba(0, 179, 179, 0.14);
  --ember: #ff5c2a;
  --line: rgba(232, 237, 242, 0.1);
  --line-strong: rgba(232, 237, 242, 0.18);
  --card-bg: rgba(21, 26, 36, 0.78);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --section-pad: clamp(4.5rem, 8vw, 7.5rem);
  --gutter: clamp(1.15rem, 4.5vw, 4.5rem);
  --max-width: 1280px;
  --header-height: 76px;
  --font: "Avenir Next", "Helvetica Neue", -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* Extremely soft cinematic atmosphere — never obvious */
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(0, 179, 179, 0.035), transparent 60%),
    radial-gradient(90% 70% at 85% 15%, rgba(255, 92, 42, 0.02), transparent 55%),
    radial-gradient(140% 90% at 50% 115%, rgba(0, 0, 0, 0.55), transparent 60%),
    var(--bg);
}

::selection {
  background: var(--teal);
  color: var(--bg);
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  inset-block-start: 0.75rem;
  inset-inline-start: 50%;
  padding: 0.65rem 1rem;
  translate: -50% -180%;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0.35rem;
}

.skip-link:focus {
  translate: -50% 0;
}

.scroll-progress {
  position: fixed;
  z-index: 1001;
  inset: 0 0 auto;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress i {
  display: block;
  width: 100%;
  height: 100%;
  scale: var(--scroll-progress, 0) 1;
  transform-origin: left center;
  background: var(--teal);
}

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

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  transition: background-color 260ms ease, border-color 260ms ease, backdrop-filter 260ms ease;
}

.site-header.is-scrolled {
  border-block-end: 1px solid var(--line);
  background: rgba(10, 15, 28, 0.78);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
}

.header-shell {
  position: relative;
  /* Always the same physical order (logo left, nav+switch right) in both
     languages — only the page body mirrors for RTL, not the chrome */
  direction: ltr;
  width: min(100%, var(--max-width));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  /* Reserve physical right-side room for the fixed language pill in both
     directions — this is intentionally physical, not logical, so the
     reserved gap never swaps sides when the page flips to RTL */
  padding-right: calc(var(--gutter) + 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.brand span {
  display: grid;
  gap: 0.3rem;
}

.brand b {
  font-size: 0.72rem;
  letter-spacing: 0.19em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.6vw, 1.1rem);
}

.site-nav a {
  padding-block: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  border-block-end: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-block-end-color: var(--teal);
}

.nav-dot {
  color: var(--teal);
  font-size: 0.6rem;
  opacity: 0.75;
}

/* Language switcher pill — pinned to the physical top-right corner always,
   independent of dir="rtl" mirroring, so it never changes position when
   switching languages */
.lang-switch {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  translate: 0 -50%;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--teal) !important;
  font-size: 0.72rem !important;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 220ms ease, color 220ms ease;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background-color: var(--teal);
  color: var(--bg) !important;
  border-color: var(--teal);
}

/* Arabic page uses Noto Kufi Arabic instead of the Latin font stack */
html[lang="ar"] body {
  font-family: "Noto Kufi Arabic", "Segoe UI", var(--font);
}

/* Arabic script must never receive letter-spacing — any tracking (positive
   or negative) breaks the cursive joining between letters, which is why
   the teal eyebrow / footer tagline rendered as disconnected fragments */
html[lang="ar"] * {
  letter-spacing: normal !important;
}

/* The brand wordmark is always Latin script ("Extreme Vision") regardless
   of page language — force the Latin font stack so it keeps the exact same
   metrics/size as the English page instead of picking up Arabic font glyphs */
html[lang="ar"] .brand b,
html[lang="ar"] .footer-brand-block b {
  font-family: var(--font);
}

/* Arabic nav labels run wider than their English equivalents at the same
   size — scale down a touch at every breakpoint so nothing wraps */
html[lang="ar"] .site-nav a {
  font-size: 0.78rem;
}

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

.hero {
  position: relative;
  display: grid;
  min-height: clamp(620px, 96svh, 1060px);
  overflow: hidden;
  background: var(--bg);
}

.hero-video,
.hero-poster,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video,
.hero-poster {
  object-fit: cover;
  object-position: 66% center;
}

.hero-video {
  z-index: 2;
}

.hero-poster {
  z-index: 1;
}

.hero-video[hidden] {
  display: none;
}

.hero-shade {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(85% 65% at 18% 55%, transparent 0%, rgba(10, 15, 28, 0.22) 55%, rgba(10, 15, 28, 0.5) 100%),
    linear-gradient(to right, rgba(10, 15, 28, 0.88) 0%, rgba(10, 15, 28, 0.56) 34%, rgba(10, 15, 28, 0.08) 62%, transparent 78%),
    linear-gradient(to bottom, rgba(10, 15, 28, 0.52) 0%, transparent 22%, transparent 68%, rgba(10, 15, 28, 0.95) 100%);
}

/* Soft cinematic blend into the services section — removes the hard seam */
.hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset-block-end: -1px;
  inset-inline: 0;
  height: clamp(120px, 18vh, 220px);
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block-start: calc(var(--header-height) + 2rem);
  padding-block-end: clamp(3rem, 8vh, 6rem);
  display: grid;
  align-content: center;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin-block-end: 1.2rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.24em;
}

.hero h1 {
  margin-block-end: 1.5rem;
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero h1 .accent {
  color: var(--teal);
}

.hero-supporting {
  margin-block-end: 2.4rem;
}

.hero-supporting p {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 400;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.hero-cta .cta-arrow {
  color: var(--teal);
  transition: transform 250ms var(--ease-out);
}

.hero-cta:hover .cta-arrow,
.hero-cta:focus-visible .cta-arrow {
  transform: translateY(4px);
}

/* Hero load-in reveal */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    opacity: 0;
    translate: 0 16px;
    animation: hero-reveal 700ms var(--ease-out) forwards;
  }

  .hero-copy > *:nth-child(2) { animation-delay: 110ms; }
  .hero-copy > *:nth-child(3) { animation-delay: 220ms; }
  .hero-copy > *:nth-child(4) { animation-delay: 330ms; }
}

@keyframes hero-reveal {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Services ---------- */

.services {
  position: relative;
  padding-block: var(--section-pad);
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(0, 179, 179, 0.045), transparent);
}

.services-shell {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.6rem);
}

.service-card {
  position: relative;
  overflow: hidden;
  border-style: solid;
  border-width: 1px;
  /* Non-uniform edge: brighter near the upper-left, neutral through the sides,
     a faint secondary highlight near the lower-right — not a full teal outline */
  border-color:
    rgba(0, 179, 179, 0.18)
    rgba(232, 237, 242, 0.09)
    rgba(232, 237, 242, 0.08)
    rgba(0, 179, 179, 0.14);
  border-radius: 26px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 22%, transparent 46%),
    linear-gradient(115deg, rgba(28, 35, 46, 0.95) 0%, rgba(17, 24, 33, 0.94) 52%, rgba(9, 15, 23, 0.97) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* Localized ambient light (two off-center glows via offset+negative spread) —
     replaces the old uniform rectangular halo */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -22px 40px rgba(0, 0, 0, 0.12),
    -18px -14px 60px -10px rgba(0, 179, 179, 0.09),
    22px 18px 54px -12px rgba(0, 179, 179, 0.05),
    0 22px 55px rgba(0, 0, 0, 0.26);
  transition:
    opacity 640ms var(--ease-out),
    translate 640ms var(--ease-out),
    transform 320ms var(--ease-out),
    border-color 320ms var(--ease-out),
    box-shadow 320ms var(--ease-out);
}

/* Layered, localized reflections — every layer fades to transparent on its own
   radius, never on a hard background-size box edge (that was the visible
   "square" seam bug) */
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    /* short bright streak near the upper-left corner, fades on all sides */
    radial-gradient(120% 8% at 15% 2%, rgba(255, 255, 255, 0.4), transparent 70%),
    /* long soft reflection, begins upper-left, fades before the far edges */
    radial-gradient(70% 55% at 18% 0%, rgba(255, 255, 255, 0.05), transparent 78%),
    /* diffused secondary reflection, wider blur, low opacity */
    radial-gradient(58% 55% at 46% 8%, rgba(255, 255, 255, 0.03), transparent 75%),
    /* faint reflected highlight near the lower-right radius */
    radial-gradient(42% 34% at 100% 100%, rgba(0, 179, 179, 0.06), transparent 72%);
  background-size: 100% 100%;
  opacity: 0.8;
  transition: opacity 320ms var(--ease-out);
}

/* Light sweep — a single narrow diagonal pass confined to the upper ~20%,
   hover-only, no loop */
.service-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block-start: -6%;
  inset-inline-start: -130%;
  width: 30%;
  height: 24%;
  rotate: -12deg;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16) 48%, transparent 92%);
  opacity: 0;
  transition: inset-inline-start 720ms var(--ease-out), opacity 220ms ease;
  pointer-events: none;
}

@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-3px);
    border-color:
      rgba(0, 179, 179, 0.34)
      rgba(232, 237, 242, 0.16)
      rgba(232, 237, 242, 0.12)
      rgba(0, 179, 179, 0.26);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.075),
      inset 0 -22px 40px rgba(0, 0, 0, 0.14),
      -18px -14px 70px -8px rgba(0, 179, 179, 0.13),
      22px 18px 64px -10px rgba(0, 179, 179, 0.08),
      0 28px 66px rgba(0, 0, 0, 0.3);
  }

  .service-card:hover::after {
    opacity: 1;
  }

  .service-card:hover::before {
    inset-inline-start: 220%;
    opacity: 1;
  }
}

/* Cursor-following spotlight — a thin extra layer of life on top of the
   existing glass/reflection system, teal by default. Hover-capable pointers
   only; touch gets a static low glow; reduced-motion gets none. */
.card-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(280px 280px at var(--mx, 50%) var(--my, 50%), rgba(0, 179, 179, 0.16), transparent 70%);
  transition: opacity 320ms var(--ease-out);
}

/* AI Workshops card gets the ember accent instead of teal */
#education .card-spotlight {
  background: radial-gradient(280px 280px at var(--mx, 50%) var(--my, 50%), rgba(255, 92, 42, 0.16), transparent 70%);
}

@media (hover: hover) {
  .service-card:hover .card-spotlight,
  .contact-card:hover .card-spotlight,
  .contact-card:focus-visible .card-spotlight {
    opacity: 1;
  }
}

/* No pointer to track — a quiet static glow instead of nothing */
@media (hover: none) {
  .card-spotlight {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-spotlight {
    display: none;
  }
}

.card-heading {
  margin: 0;
}

.card-trigger {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2rem);
  width: 100%;
  padding: clamp(2.1rem, 4vw, 3.05rem) clamp(1.4rem, 2.8vw, 2.5rem);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.card-trigger:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -6px;
  border-radius: 22px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-style: solid;
  border-width: 1px;
  border-color:
    rgba(0, 179, 179, 0.22)
    rgba(232, 237, 242, 0.12)
    rgba(232, 237, 242, 0.1)
    rgba(0, 179, 179, 0.16);
  border-radius: 15px;
  color: var(--teal);
  background: rgba(10, 15, 28, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -6px 10px -6px rgba(0, 0, 0, 0.45);
  transition: border-color 320ms var(--ease-out), filter 320ms var(--ease-out), transform 320ms var(--ease-out);
}

@media (hover: hover) {
  .service-card:hover .card-icon {
    border-color:
      rgba(0, 179, 179, 0.42)
      rgba(232, 237, 242, 0.18)
      rgba(232, 237, 242, 0.14)
      rgba(0, 179, 179, 0.3);
    filter: brightness(1.15);
    transform: translateY(-1px);
  }
}

/* Icon stays lit while its card is open — independent of hover/pointer type */
.service-card.is-open .card-icon {
  border-color:
    rgba(0, 179, 179, 0.42)
    rgba(232, 237, 242, 0.18)
    rgba(232, 237, 242, 0.14)
    rgba(0, 179, 179, 0.3);
  filter: brightness(1.15);
}

.card-meta {
  display: grid;
  gap: 0.4rem;
}

.card-number {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.card-title {
  font-size: clamp(1.32rem, 2.1vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.card-desc {
  max-width: 560px;
  color: rgba(232, 237, 242, 0.78);
  font-size: 0.96rem;
  font-weight: 430;
  line-height: 1.7;
  letter-spacing: 0.004em;
}

.card-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-inline-start: clamp(1.2rem, 2.2vw, 2rem);
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 650;
  white-space: nowrap;
}

.card-action::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 8%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(232, 237, 242, 0.12) 22%,
    rgba(0, 179, 179, 0.18) 50%,
    rgba(232, 237, 242, 0.08) 78%,
    transparent
  );
  transition: opacity 320ms var(--ease-out);
}

.card-action span:first-child {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 320ms var(--ease-out);
}

.card-arrow {
  transition: transform 320ms var(--ease-out);
}

@media (hover: hover) {
  .service-card:not(.is-open) .card-trigger:hover .card-arrow {
    transform: translateX(7px);
  }

  .service-card:not(.is-open) .card-trigger:hover .card-action span:first-child {
    color: var(--ink);
  }

  .service-card:not(.is-open) .card-trigger:hover .card-action::before {
    background: linear-gradient(
      180deg,
      transparent,
      rgba(232, 237, 242, 0.16) 20%,
      rgba(0, 179, 179, 0.32) 50%,
      rgba(232, 237, 242, 0.12) 80%,
      transparent
    );
  }
}

.service-card.is-open .card-arrow {
  transform: rotate(90deg);
}

/* ---------- Accordion panel ---------- */

.card-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms var(--ease-out);
}

.card-panel-inner {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s 420ms;
}

.service-card.is-open .card-panel {
  grid-template-rows: 1fr;
}

.service-card.is-open .card-panel-inner {
  visibility: visible;
  transition-delay: 0s;
}

.card-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 2.5rem;
  margin: 0;
  padding: 0 clamp(1.3rem, 2.6vw, 2.4rem) clamp(1.6rem, 2.8vw, 2.2rem);
  list-style: none;
}

.card-services li {
  position: relative;
  padding-block: 0.7rem;
  padding-inline-start: 1.3rem;
  border-block-end: 1px solid rgba(232, 237, 242, 0.06);
  color: var(--muted);
}

.card-services li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 1.28rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

@media (prefers-reduced-motion: no-preference) {
  .service-card.is-open .card-services li {
    animation: item-reveal 380ms var(--ease-out) backwards;
  }

  .service-card.is-open .card-services li:nth-child(2) { animation-delay: 40ms; }
  .service-card.is-open .card-services li:nth-child(3) { animation-delay: 80ms; }
  .service-card.is-open .card-services li:nth-child(4) { animation-delay: 120ms; }
  .service-card.is-open .card-services li:nth-child(5) { animation-delay: 160ms; }
  .service-card.is-open .card-services li:nth-child(6) { animation-delay: 200ms; }
  .service-card.is-open .card-services li:nth-child(7) { animation-delay: 240ms; }
}

@keyframes item-reveal {
  from {
    opacity: 0;
    translate: 0 8px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* transition timing lives on .service-card itself (see Services section)
     so the hover transition list isn't clobbered by this equal-specificity rule */
  [data-reveal] {
    opacity: 0;
    translate: 0 18px;
  }

  [data-reveal].is-visible {
    opacity: 1;
    translate: 0 0;
  }
}

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

.contact {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  background: radial-gradient(ellipse 55% 60% at 50% 100%, rgba(0, 179, 179, 0.055), transparent);
  border-block-start: 1px solid var(--line);
}

.contact-shell {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}

.contact h2 {
  max-width: 760px;
  margin-inline: auto;
  margin-block-end: 2.6rem;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.contact h2 .accent {
  color: var(--teal);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  width: min(100%, 760px);
  margin-inline: auto;
}

.contact-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 92px;
  padding-inline: 1.5rem 1.7rem;
  border-style: solid;
  border-width: 1px;
  border-color:
    rgba(0, 179, 179, 0.18)
    rgba(232, 237, 242, 0.09)
    rgba(232, 237, 242, 0.08)
    rgba(0, 179, 179, 0.14);
  border-radius: 22px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 22%, transparent 46%),
    linear-gradient(115deg, rgba(28, 35, 46, 0.95) 0%, rgba(17, 24, 33, 0.94) 52%, rgba(9, 15, 23, 0.97) 100%);
  color: var(--ink);
  text-align: start;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -22px 40px rgba(0, 0, 0, 0.12),
    -18px -14px 60px -10px rgba(0, 179, 179, 0.09),
    22px 18px 54px -12px rgba(0, 179, 179, 0.05),
    0 22px 55px rgba(0, 0, 0, 0.26);
  transition:
    transform 320ms var(--ease-out),
    border-color 320ms var(--ease-out),
    box-shadow 320ms var(--ease-out);
}

/* Identical layered reflections as .service-card::after */
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(120% 8% at 15% 2%, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(70% 55% at 18% 0%, rgba(255, 255, 255, 0.05), transparent 78%),
    radial-gradient(58% 55% at 46% 8%, rgba(255, 255, 255, 0.03), transparent 75%),
    radial-gradient(42% 34% at 100% 100%, rgba(0, 179, 179, 0.06), transparent 72%);
  background-size: 100% 100%;
  opacity: 0.8;
  transition: opacity 320ms var(--ease-out);
}

/* Identical light sweep as .service-card::before */
.contact-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-block-start: -6%;
  inset-inline-start: -130%;
  width: 30%;
  height: 30%;
  rotate: -12deg;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16) 48%, transparent 92%);
  opacity: 0;
  transition: inset-inline-start 720ms var(--ease-out), opacity 220ms ease;
  pointer-events: none;
}

@media (hover: hover) {
  .contact-card:hover,
  .contact-card:focus-visible {
    transform: translateY(-3px);
    border-color:
      rgba(0, 179, 179, 0.34)
      rgba(232, 237, 242, 0.16)
      rgba(232, 237, 242, 0.12)
      rgba(0, 179, 179, 0.26);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.075),
      inset 0 -22px 40px rgba(0, 0, 0, 0.14),
      -18px -14px 70px -8px rgba(0, 179, 179, 0.13),
      22px 18px 64px -10px rgba(0, 179, 179, 0.08),
      0 28px 66px rgba(0, 0, 0, 0.3);
  }

  .contact-card:hover::after,
  .contact-card:focus-visible::after {
    opacity: 1;
  }

  .contact-card:hover::before,
  .contact-card:focus-visible::before {
    inset-inline-start: 220%;
    opacity: 1;
  }
}

.contact-card-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-style: solid;
  border-width: 1px;
  border-color:
    rgba(0, 179, 179, 0.22)
    rgba(232, 237, 242, 0.12)
    rgba(232, 237, 242, 0.1)
    rgba(0, 179, 179, 0.16);
  border-radius: 14px;
  background: rgba(10, 15, 28, 0.45);
  color: var(--teal);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -6px 10px -6px rgba(0, 0, 0, 0.45);
  transition: border-color 320ms var(--ease-out), filter 320ms var(--ease-out), transform 320ms var(--ease-out);
}

@media (hover: hover) {
  .contact-card:hover .contact-card-icon {
    border-color:
      rgba(0, 179, 179, 0.42)
      rgba(232, 237, 242, 0.18)
      rgba(232, 237, 242, 0.14)
      rgba(0, 179, 179, 0.3);
    filter: brightness(1.15);
    transform: translateY(-1px);
  }
}

.contact-card-text {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.2rem;
  text-align: start;
}

.contact-card-text b {
  font-size: 1.02rem;
  font-weight: 700;
}

.contact-card-text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-card-arrow {
  position: relative;
  z-index: 2;
  margin-inline-start: auto;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 320ms var(--ease-out);
}

@media (hover: hover) {
  .contact-card:hover .contact-card-arrow,
  .contact-card:focus-visible .contact-card-arrow {
    transform: translateX(8px);
  }
}

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

.site-footer {
  background: rgba(5, 9, 16, 0.94);
  border-block-start: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(0, 179, 179, 0.22) 50%, transparent) 1;
}

.footer-shell {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding: 48px var(--gutter) 32px;
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  text-align: center;
}

.footer-brand-block {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
}

.footer-brand-block img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.footer-brand-block b {
  font-size: 0.78rem;
  letter-spacing: 0.19em;
}

.footer-brand-block small {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.footer-divider {
  width: min(100%, 420px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 20%, var(--line-strong) 80%, transparent);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.4vw, 1.8rem);
}

.footer-nav a {
  position: relative;
  padding-block: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 220ms ease, translate 220ms ease;
}

.footer-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 1px;
  background: var(--teal);
  scale: 0 1;
  transform-origin: center;
  transition: scale 220ms var(--ease-out);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--ink);
  translate: 0 -1px;
}

.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  scale: 1 1;
}

.footer-bottom {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  color: var(--muted-dark);
  font-size: 0.82rem;
}

[data-placeholder="true"] {
  color: var(--ember) !important;
  font-weight: 700;
}

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

@media (max-width: 900px) {
  .card-trigger {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .card-action {
    grid-column: 2;
    justify-self: start;
    margin-block-start: 0.4rem;
    padding-inline-start: 0;
  }

  .card-action::before {
    display: none;
  }

  .card-services {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
    --section-pad: 4rem;
  }

  .header-shell {
    padding-right: calc(var(--gutter) + 64px);
  }

  .lang-switch {
    padding: 0.24rem 0.55rem;
    font-size: 0.62rem !important;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .brand b {
    font-size: 0.6rem;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.75rem;
  }

  /* Arabic runs wider than English at the same size — scale everything in
     the header down further so nothing wraps on narrow phones */
  html[lang="ar"] .header-shell {
    padding-right: calc(var(--gutter) + 56px);
  }

  html[lang="ar"] .lang-switch {
    padding: 0.2rem 0.5rem;
    font-size: 0.56rem !important;
  }

  html[lang="ar"] .brand b {
    font-size: 0.52rem;
  }

  html[lang="ar"] .site-nav {
    gap: 0.35rem;
  }

  html[lang="ar"] .site-nav a {
    font-size: 0.66rem;
  }

  .hero {
    min-height: max(82svh, 560px);
  }

  .hero-video,
  .hero-poster {
    object-position: 68% center;
  }

  .hero-shade {
    background:
      linear-gradient(to bottom, rgba(10, 15, 28, 0.62) 0%, rgba(10, 15, 28, 0.28) 34%, rgba(10, 15, 28, 0.35) 62%, rgba(10, 15, 28, 0.96) 100%);
  }

  .hero-inner {
    align-content: end;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 8vw, 3.4rem);
    line-height: 1.12;
  }

  .hero-supporting p {
    font-size: 0.95rem;
  }

  .service-card {
    border-radius: 22px;
  }

  .card-trigger {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1.3rem 1.3rem;
  }

  .card-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .card-icon svg {
    width: 22px;
    height: 22px;
  }

  .card-action {
    grid-column: 1;
    margin-block-start: 0.2rem;
  }

  .card-services {
    padding-inline: 1.3rem;
  }

  .footer-nav {
    row-gap: 0.7rem;
    column-gap: 1.2rem;
  }

  .footer-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Covers every common phone width (375–428px) — brand text was only
   hiding below 390px, leaving a narrow band (391–430px, e.g. 393px)
   where "EXTREME VISION" reappeared and collided with the nav/switch */
@media (max-width: 430px) {
  .brand span {
    display: none;
  }

  .site-nav {
    gap: 0.4rem;
  }

  .site-nav a {
    font-size: 0.68rem;
  }

  html[lang="ar"] .site-nav a {
    font-size: 0.6rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
