/* ==========================================================================
   Inbox Arabia — Base Architecture, Header, Drawers & Footer
   Strict Emil Design Engineering compliance:
     - ZERO transition: all
     - ZERO ease-in on UI
     - ZERO scale(0) entrances
     - :active { transform: scale(0.97) } on pressable controls
     - Hover motion strictly gated in @media (hover: hover) and (pointer: fine)
     - >=44x44px hit targets, break-ui resilience (min-width:0, flex-shrink:0)
   ========================================================================== */

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

html {
  margin: 0;
  padding: 0;
  color-scheme: light;
  background: var(--course);
  scrollbar-color: rgba(10, 20, 96, 0.32) transparent;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--course);
  color: var(--ink);
  font: 400 var(--text-body)/1.55 var(--face);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.drawer-open {
  overflow: hidden;
}

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

[data-surface="chamber"] ::selection {
  background: var(--lagoon);
  color: var(--ink-deep);
}

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

a {
  color: inherit;
  text-underline-offset: 0.24em;
  text-decoration-thickness: 1px;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

button,
a,
[role="button"],
[role="tab"] {
  touch-action: manipulation;
}

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

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

/* ---- Accessibility & Utility Primitives ---- */
.sr,
.live .wallword {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--dur-ui) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.tabular,
.num {
  font-variant-numeric: tabular-nums;
}

.break-anywhere {
  overflow-wrap: anywhere;
}

/* ---- Layout Wrappers & Alternating Architectural Courses ---- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-py);
  border-top: 1px solid var(--border);
}

.band[data-surface="chamber"] {
  background-color: var(--bg);
  background-image: var(--chamber-glow);
}

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.band-head h2 {
  margin: 0;
  font: 350 var(--text-h)/1.08 var(--face);
  font-variation-settings: "SHRP" 100;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.band-head p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: var(--measure);
  justify-self: end;
}

.band-head.band-head-single {
  grid-template-columns: minmax(0, 1fr);
}

.band-head.band-head-single p {
  justify-self: start;
}

/* ---- Typography Hierarchy (Strict 3-Size Body Scale) ---- */
h1 {
  margin: 0;
  font: 300 var(--text-hero)/1.0 var(--face);
  font-variation-settings: "SHRP" 100;
  letter-spacing: -0.036em;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font: 350 var(--text-h)/1.08 var(--face);
  font-variation-settings: "SHRP" 100;
  letter-spacing: -0.028em;
}

h3,
h4 {
  margin: 0;
  font: 600 var(--text-body)/1.3 var(--face);
  font-variation-settings: "SHRP" 100;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.55;
  max-width: var(--measure);
}

small,
.meta {
  font-size: var(--text-sm);
  line-height: 1.4;
}

/* ==========================================================================
   Buttons & Interactive Primitives
   ========================================================================== */
.plate,
.btn-primary,
.btn-secondary,
.btn-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-ui) ease,
    border-color var(--dur-ui) ease,
    color var(--dur-ui) ease;
}

.plate,
.btn-primary {
  isolation: isolate;
  overflow: hidden;
  padding: 13px 22px;
  color: var(--white);
  background: var(--ink);
}

[data-surface="chamber"] .btn-primary {
  background: var(--course);
  color: var(--ink-deep);
}

.plate::before,
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    120% 115% at 50% 140%,
    rgba(20, 199, 174, 0.65),
    rgba(0, 172, 254, 0.24) 48%,
    rgba(0, 172, 254, 0) 76%
  );
  opacity: 0;
  transform: translateY(38%);
  transition:
    opacity var(--dur-ui) ease,
    transform 280ms var(--ease-out);
  pointer-events: none;
}

[data-surface="chamber"] .btn-primary::before {
  background: radial-gradient(
    120% 115% at 50% 140%,
    rgba(39, 217, 99, 0.38),
    rgba(0, 172, 254, 0.20) 52%,
    rgba(0, 172, 254, 0) 80%
  );
}

.plate:active,
.btn-primary:active,
.btn-secondary:active,
.btn-link:active {
  transform: scale(0.97);
}

.btn-secondary {
  padding: 12px 20px;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--border-strong);
}

.btn-link {
  padding: 10px 0;
  color: var(--fg);
  justify-content: flex-start;
  white-space: normal;
  flex-shrink: 1;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.28em;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--dur-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .plate:hover::before,
  .btn-primary:hover::before {
    opacity: 1;
    transform: translateY(0);
  }

  .btn-secondary:hover {
    border-color: var(--fg);
    background: rgba(10, 20, 96, 0.04);
  }

  [data-surface="chamber"] .btn-secondary:hover {
    background: rgba(245, 246, 249, 0.07);
  }

  .btn-link:hover {
    text-decoration-color: currentColor;
  }

  .plate:hover .btn-arrow,
  .btn-primary:hover .btn-arrow,
  .btn-secondary:hover .btn-arrow,
  .btn-link:hover .btn-arrow {
    transform: translateX(4px);
  }
}

/* Emil State-Morphing Button Content (2px blur bridge on status change) */
.btn-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    filter var(--dur-ui) ease,
    opacity var(--dur-ui) ease;
}

.btn-label.is-morphing {
  filter: blur(2px);
  opacity: 0.55;
}

/* ==========================================================================
   Emil Duplicated-Layer Clipped Segmented Control (.seg)
   clip-path is updated directly on .seg-active (never inherited parent vars)
   ========================================================================== */
.seg {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: stretch;
  background: var(--bg-alt);
  box-shadow: var(--shadow-track);
  padding: 3px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.seg::-webkit-scrollbar {
  display: none;
}

.seg-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-touch-callout: none;
  transition:
    color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.seg-btn:active {
  transform: scale(0.97);
}

.seg-btn[aria-selected="true"]:active,
.seg-btn[aria-pressed="true"]:active {
  transform: none;
}

.seg-btn[aria-selected="true"],
.seg-btn[aria-pressed="true"] {
  color: var(--fg);
}

/* Without JS or before JS mounts active clip overlay, highlight active directly */
html:not(.live) .seg-btn[aria-selected="true"],
html:not(.live) .seg-btn[aria-pressed="true"],
.seg:not(.seg-enhanced) .seg-btn[aria-selected="true"],
.seg:not(.seg-enhanced) .seg-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

/* Active duplicated clip overlay created/managed by site.js */
.seg-active {
  position: absolute;
  inset: 3px;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: stretch;
  background: var(--ink);
  color: var(--white);
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-tab) var(--ease-in-out);
}

[data-surface="chamber"] .seg-active {
  background: var(--course);
  color: var(--ink-deep);
}

.seg-active[data-instant] {
  transition-duration: 0ms;
}

.seg-active-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .seg-btn:hover {
    color: var(--fg);
  }
}

/* ==========================================================================
   Sticky Translucent Architectural Header (.plaque) + Inbox Aperture Mark
   ========================================================================== */
.plaque {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--chrome-bg);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  transition:
    background-color var(--dur-ui) ease,
    border-color var(--dur-ui) ease;
  border-bottom: 1px solid transparent;
}

.plaque.scrolled {
  border-bottom-color: var(--line);
}

/* Eased 5-stop scroll edge fade under translucent chrome when scrolled */
.plaque::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 18px;
  background: linear-gradient(
    to bottom,
    rgba(10, 20, 96, 0.075) 0%,
    rgba(10, 20, 96, 0.042) 22%,
    rgba(10, 20, 96, 0.018) 48%,
    rgba(10, 20, 96, 0.005) 74%,
    rgba(10, 20, 96, 0) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-ui) ease;
}

.plaque.scrolled::after {
  opacity: 1;
}

/* Razor-thin 2px Architectural Scroll Progress Thread along header seam */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  z-index: 3;
  background: var(--aperture-gradient);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.plaque.scrolled .scroll-progress {
  opacity: 0.92;
}

html:not(.live) .scroll-progress {
  display: none;
}

.plaque-inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 40px);
  min-height: var(--header-h);
  padding-block: 12px;
}

/* ---- Inbox Arabia Wordmark & Moving Aperture O-Box (screen-hero.js compatible) ---- */
.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 4px;
  margin-left: -4px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:focus-visible {
  outline-offset: 2px;
}

.mark {
  position: relative;
  display: block;
  height: 46px;
  aspect-ratio: 1024 / 477;
  --mark-tilt: -15.22deg;
  --bore: 79.23%;
  --mark-x: 62.744%;
  --mark-y: 39.413%;
  --mark-size: 29.645%;
}

.mark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--brand-blue);
}

.mark-arabia {
  font-family: var(--face);
  font-weight: 300;
  letter-spacing: 0.24em;
  fill: inherit;
}

[data-surface="chamber"] .mark svg {
  fill: var(--course);
}

.mark-box,
.mark-socket {
  position: absolute;
  left: var(--mark-x);
  top: var(--mark-y);
  width: var(--mark-size);
  aspect-ratio: 1;
  translate: -50% -50%;
}

.mark-box {
  --turn: var(--mark-tilt);
}

.mark-lift {
  position: absolute;
  inset: 0;
  transform-origin: var(--mark-x) var(--mark-y);
  transition:
    translate 150ms var(--ease-out),
    scale 150ms var(--ease-out);
}

.mark-lift.heard {
  translate: 0 -3px;
  scale: 1.08;
  transition-duration: 120ms;
}

.mark-box,
.courier-box {
  rotate: var(--turn);
  -webkit-mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--iris) * var(--bore) - var(--soft, 0.25px)),
    #000 calc(var(--iris) * var(--bore) + var(--soft, 0.25px))
  );
  mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--iris) * var(--bore) - var(--soft, 0.25px)),
    #000 calc(var(--iris) * var(--bore) + var(--soft, 0.25px))
  );
}

/* Improved socket visibility so "inb[o]x" stays legible when O is out on wall */
.mark-socket {
  rotate: var(--mark-tilt);
  background: rgba(10, 20, 96, 0.24);
  -webkit-mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--bore) - 0.25px),
    #000 calc(var(--bore) + 0.25px)
  );
  mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--bore) - 0.25px),
    #000 calc(var(--bore) + 0.25px)
  );
  opacity: 0;
  transition: opacity 160ms ease;
}

.courier {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  visibility: hidden;
  pointer-events: none;
}

.courier-box {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--glassy, 0) * 4%);
}

.courier-shade {
  --shade: rgb(40 110 150);
  position: absolute;
  inset: 0;
  z-index: -1;
  rotate: var(--turn);
  border-radius: 4%;
  background: radial-gradient(
    circle closest-side,
    transparent calc(var(--iris) * var(--bore) - 1%),
    var(--shade) calc(var(--iris) * var(--bore) + 1%)
  );
  opacity: 0;
}

.courier.flat .courier-shade {
  --shade: rgb(10 20 96);
}

.mark-light,
.courier-light {
  position: absolute;
  inset: -25%;
  overflow: hidden;
  rotate: calc(var(--turn) * -1);
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0) 44.8%,
      rgba(255, 255, 255, 0.72) 50%,
      rgba(255, 255, 255, 0) 55.2%
    ) var(--glint) 0 / 300% 100% no-repeat,
    linear-gradient(
      210deg,
      rgb(34 211 120) 12%,
      rgb(18 193 191) 52%,
      rgb(0 173 254) 88%
    );
}

.courier-glass {
  position: absolute;
  inset: -25%;
  rotate: calc(var(--turn) * -1);
  opacity: var(--glassy, 0);
  background: linear-gradient(
    193deg,
    rgb(64 210 132) 22.2%,
    rgb(56 197 188) 50%,
    rgb(28 176 215) 77.8%
  );
}

.courier-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: plus-lighter;
  background: radial-gradient(
    circle closest-side,
    rgb(32 90 66 / 0) calc(var(--iris) * var(--bore) * 2 / 3),
    rgb(32 90 66) calc(var(--iris) * var(--bore) * 2 / 3 + 1.3%),
    rgb(32 90 66 / 0) calc(var(--iris) * var(--bore) * 2 / 3 + 12.6%)
  );
  -webkit-mask: linear-gradient(143deg, #000 32%, transparent 50%);
  mask: linear-gradient(143deg, #000 32%, transparent 50%);
}

.courier-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: var(--glassy, 0);
  mix-blend-mode: plus-lighter;
  box-shadow:
    inset 0 0 0 calc(var(--made, 176) * 0.006px) rgb(255 255 255 / 0.32),
    inset 0 0 calc(var(--made, 176) * 0.04px) calc(var(--made, 176) * 0.006px) rgb(255 255 255 / 0.14);
  background:
    radial-gradient(
      circle closest-side,
      rgb(255 255 255 / 0) calc(var(--iris) * var(--bore)),
      rgb(255 255 255 / 0.3) calc(var(--iris) * var(--bore) + 1.5%),
      rgb(255 255 255 / 0) calc(var(--iris) * var(--bore) + 7%)
    ),
    linear-gradient(to left, rgb(24 85 102 / var(--lit-r, 0)) 1.9%, rgb(24 85 102 / 0) 11.3%),
    linear-gradient(to top, rgb(24 85 102 / var(--lit-b, 0)) 1.9%, rgb(24 85 102 / 0) 11.3%),
    linear-gradient(to right, rgb(24 85 102 / var(--lit-l, 0)) 1.9%, rgb(24 85 102 / 0) 11.3%),
    linear-gradient(to bottom, rgb(24 85 102 / var(--lit-t, 0)) 1.9%, rgb(24 85 102 / 0) 11.3%);
}

.courier-glass,
.courier-glass::before,
.courier-box::after {
  --iris: inherit;
}

/* Fallback flat O-box & enquiry parcel flight */
.flatbox {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(10, 20, 96, 0.22));
}

.flatbox span {
  --bore: 79%;
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(calc(206deg + var(--roll, 0deg)), var(--leaf) 12%, var(--sky) 88%);
  -webkit-mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--iris) * var(--bore) - 0.5px),
    #000 calc(var(--iris) * var(--bore) + 0.5px)
  );
  mask: radial-gradient(
    circle closest-side,
    transparent calc(var(--iris) * var(--bore) - 0.5px),
    #000 calc(var(--iris) * var(--bore) + 0.5px)
  );
}

.parcel {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
}

.parcel span {
  display: block;
}

.parcel i {
  display: block;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  rotate: -15deg;
  background: linear-gradient(206deg, var(--leaf) 12%, var(--sky) 88%);
  -webkit-mask: radial-gradient(circle closest-side, transparent 76%, #000 82%);
  mask: radial-gradient(circle closest-side, transparent 76%, #000 82%);
}

/* ---- Desktop Navigation + Gliding Underline ---- */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  margin-left: auto;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 2px;
  font-size: var(--text-sm);
  font-weight: 450;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--dur-ui) ease;
}

.nav-item[aria-current="page"] {
  font-weight: 600;
}

.nav-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--dur-ui) var(--ease-out);
}

.nav-item[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.nav-line {
  position: absolute;
  left: 0;
  bottom: 7px;
  width: 1px;
  height: 1.5px;
  background: var(--ink);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 240ms var(--ease-in-out),
    opacity 150ms var(--ease-out);
}

.nav-line[data-instant] {
  transition-duration: 0ms;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile Menu Toggle Button (Hidden on desktop, >=44x44px on <=1020px) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: var(--white);
  transition:
    transform var(--dur-press) var(--ease-out),
    border-color var(--dur-ui) ease;
}

.menu-toggle:active {
  transform: scale(0.97);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---- Solutions Mega-Panel (Origin-Aware Popover) ---- */
.mega-panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  z-index: 39;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-popover);
  transform-origin: top left;
  opacity: 0;
  transform: scale(0.97) translateY(-6px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--dur-ui-exit) var(--ease-out),
    transform var(--dur-ui-exit) var(--ease-out),
    visibility 0s linear var(--dur-ui-exit);
}

.mega-panel.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out),
    visibility 0s;
}

.mega-panel[data-instant] {
  transition-duration: 0ms;
}

.mega-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
}

.mega-col {
  padding: 28px 32px 32px;
  min-width: 0;
}

.mega-col + .mega-col {
  border-left: 1px solid var(--line);
}

.mega-col:first-child {
  padding-left: 0;
}

.mega-col:last-child {
  padding-right: 0;
}

.mega-col h3 {
  margin-bottom: 14px;
  color: var(--ink);
}

.mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  margin-inline: -10px;
  text-decoration: none;
  color: var(--ink);
  transition:
    background-color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.mega-link::before {
  content: "";
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background:
    radial-gradient(circle closest-side, transparent var(--hole), var(--ink) calc(var(--hole) + 0.6px)),
    linear-gradient(191deg, var(--leaf), var(--sky));
  transition:
    transform 220ms var(--ease-out),
    --hole 220ms var(--ease-out);
}

.mega-link:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .mega-link:hover {
    background: var(--course);
  }

  .mega-link:hover::before {
    transform: rotate(-15deg);
    --hole: 3.8px;
  }
}

.mega-link:focus-visible::before {
  transform: rotate(-15deg);
  --hole: 3.8px;
}

.mega-link-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mega-link-title {
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.25;
}

.mega-link-sub {
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.35;
}

.mega-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.mega-summary p {
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.5;
}

.mega-models {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
}

.mega-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   Slide-Over Drawers: Mobile Navigation & Universal Executive Brief Sheet
   ========================================================================== */
.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear var(--dur-drawer-out);
}

.drawer-root.is-open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  transition: opacity var(--dur-drawer-out) var(--ease-out);
}

.drawer-backdrop.is-dragging {
  transition: none;
}

.drawer-root.is-open .drawer-backdrop {
  opacity: 1;
  transition: opacity var(--dur-drawer-in) var(--ease-out);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 540px);
  display: flex;
  flex-direction: column;
  background: var(--course);
  color: var(--ink);
  box-shadow: var(--shadow-drawer);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(100%);
  transition: transform var(--dur-drawer-out) var(--ease-out);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.drawer-root.is-open .drawer-panel {
  transform: translateX(0);
  transition: transform var(--dur-drawer-in) var(--ease-drawer);
}

.drawer-panel.is-dragging {
  transition: none;
}

.drawer-root[data-instant] .drawer-backdrop,
.drawer-root[data-instant] .drawer-panel {
  transition-duration: 0ms;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}

.drawer-title {
  margin: 0;
  font: 500 var(--text-body)/1.2 var(--face);
  font-variation-settings: "SHRP" 100;
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -8px -10px -8px 0;
  color: var(--ink);
  flex-shrink: 0;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-ui) ease;
}

.drawer-close:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .drawer-close:hover {
    background: var(--stone);
  }
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  display: grid;
  gap: 24px;
  align-content: start;
}

/* Mobile Nav Drawer Contents */
.mobile-nav-group {
  display: grid;
  gap: 4px;
}

.mobile-nav-group + .mobile-nav-group {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav-heading {
  margin-bottom: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-2);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 0;
  font-size: var(--text-body);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(10, 20, 96, 0.08);
  transition: transform var(--dur-press) var(--ease-out);
}

.mobile-nav-link:last-child {
  border-bottom: 0;
}

.mobile-nav-link:active {
  transform: scale(0.985);
}

.mobile-nav-foot {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

/* Executive Brief Form Styles (Shared by Drawer & Inline Contact Forms) */
.brief-desk-bar {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brief-desk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.brief-desk-head strong {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--ink);
}

.brief-desk-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 18px;
  font-size: var(--text-sm);
  color: var(--ink-2);
}

.brief-desk-info a {
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.brief-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg);
}

.form-field {
  position: relative;
  display: flex;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  transition: border-color var(--dur-ui) ease;
}

.form-field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--aperture-gradient);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 280ms var(--ease-out);
  pointer-events: none;
}

.form-field:focus-within {
  border-color: var(--fg);
}

.form-field:focus-within::after {
  transform: scaleX(1);
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 13px 14px;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--fg);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--fg-subtle);
  opacity: 1;
}

.form-field[data-invalid="true"] {
  border-color: var(--danger);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--danger);
  min-height: 0;
}

.form-status {
  padding: 14px 16px;
  font-size: var(--text-sm);
  line-height: 1.5;
  border-left: 2px solid var(--border-strong);
  background: var(--bg-alt);
  color: var(--fg);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity var(--dur-ui) var(--ease-out),
    transform var(--dur-ui) var(--ease-out);
}

.form-status:empty {
  display: none;
}

.form-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-status[data-tone="success"] {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.form-status[data-tone="error"] {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.form-status a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Rolling Station-Board Clock Digits (Riyadh AST)
   ========================================================================== */
.clock {
  color: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.clock-digit {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: top;
  height: 1.25em;
  line-height: 1.25em;
}

.clock-digit > span {
  display: block;
}

.clock-digit > .next {
  position: absolute;
  left: 0;
  top: 100%;
}

/* ==========================================================================
   Executive Architectural Choreography System ([data-choreo] & [data-reveal])
   Always 100% visible without JS and collapsed cleanly under reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .live [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
  }

  .live [data-reveal="clip"] {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 12% 0);
    transition: clip-path var(--dur-reveal) var(--ease-in-out);
  }

  .live [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }

  /* 1. Architectural Masked Baseline Rise on Section Headings
     Never clip to 0x0 at rest (breaks Chromium IntersectionObserver); WAAPI
     performs the inset(0 0 100% 0)->inset(0 0 -18% 0) baseline wipe on entry. */
  .live [data-choreo="heading"]:not(.is-entered) {
    opacity: 0;
    transform: translateY(12px);
  }

  /* 2. Editorial Shutter Curtain Reveal on Documentary Aperture Frames
     Full unclipped layout box at rest; WAAPI performs the shutter wipe on entry. */
  .live [data-choreo="aperture"]:not(.is-entered) {
    opacity: 0;
  }

  .live [data-choreo="aperture"]:not(.is-entered) img {
    transform: scale(1.05);
  }

  /* 3. Non-Uniform Wave Stagger for Editorial & Card Grids (capped at 7th step)
     Released via .choreo-done so child hover/dimmed/filter rules never collide. */
  .live [data-choreo="stagger"]:not(.is-entered) > * {
    opacity: 0;
    transform: translateY(14px);
  }

  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > * {
    transition:
      opacity 380ms var(--ease-out),
      transform 380ms var(--ease-out);
  }

  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(1) { transition-delay: 0ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(2) { transition-delay: 45ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(3) { transition-delay: 82ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(4) { transition-delay: 112ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(5) { transition-delay: 136ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(6) { transition-delay: 155ms; }
  .live [data-choreo="stagger"].is-entered:not(.choreo-done) > *:nth-child(n+7) { transition-delay: 170ms; }

  /* 4. Managed Services Endurance Ledger Bar Sweep (Non-uniform wave) */
  .live [data-choreo="ledger"]:not(.is-entered) .ledger-fill {
    transform: scaleX(0);
  }

  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-fill {
    transition: transform 540ms var(--ease-editorial);
  }

  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(1) .ledger-fill { transition-delay: 0ms; }
  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(2) .ledger-fill { transition-delay: 60ms; }
  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(3) .ledger-fill { transition-delay: 110ms; }
  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(4) .ledger-fill { transition-delay: 150ms; }
  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(5) .ledger-fill { transition-delay: 185ms; }
  .live [data-choreo="ledger"].is-entered:not(.choreo-done) .ledger-row:nth-child(n+6) .ledger-fill { transition-delay: 215ms; }
}

/* ==========================================================================
   Equal-Standing Dual-Market Architectural Footer (.site-footer)
   ========================================================================== */
.site-footer {
  position: relative;
  background-color: var(--bg);
  background-image: var(--chamber-glow);
  color: var(--fg);
  border-top: 1px solid var(--border);
  padding-block: clamp(56px, 6.5vw, 88px) calc(28px + env(safe-area-inset-bottom));
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--aperture-gradient);
  opacity: 0.72;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 40px 52px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.footer-logo-img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 44ch;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: var(--text-sm);
  text-decoration: none;
  transition:
    border-color var(--dur-ui) ease,
    background-color var(--dur-ui) ease,
    transform var(--dur-press) var(--ease-out);
}

.social-link:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .social-link:hover {
    border-color: var(--lagoon);
    background: rgba(20, 199, 174, 0.10);
  }
}

.footer-nav-col {
  min-width: 0;
}

.footer-nav-col h3 {
  margin-bottom: 14px;
  color: var(--fg);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 0;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--dur-ui) ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--fg);
    text-decoration: underline;
  }
}

.footer-offices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding-block: 30px;
  border-bottom: 1px solid var(--border);
}

.footer-office {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  min-width: 0;
}

.footer-office-head {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.footer-office-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}

.footer-office h3 {
  color: var(--fg);
}

.footer-office-role {
  font-size: var(--text-sm);
  color: var(--accent-text);
  font-weight: 500;
  white-space: nowrap;
}

.footer-office p,
.footer-office a {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--fg-muted);
  overflow-wrap: anywhere;
}

.footer-office a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -6px;
  padding-block: 6px;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .footer-office a:hover {
    color: var(--fg);
    text-decoration: underline;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  font-size: var(--text-sm);
  color: var(--fg-subtle);
}

/* ==========================================================================
   Responsive Breakpoints (Header, Mega-Panel, Band Heads, Footer)
   ========================================================================== */
@media (max-width: 1020px) {
  .nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mega-panel {
    display: none;
  }

  .band-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .band-head p {
    justify-self: start;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .plaque-inner {
    gap: 10px;
  }

  .mark {
    height: 40px;
  }

  .footer-logo-img {
    height: 40px;
  }

  .plaque .plate {
    padding: 11px 14px;
    font-size: var(--text-sm);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-office {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .seg-btn,
  .seg-active-item {
    padding: 0 12px;
  }
}

@media (max-width: 360px) {
  .mark {
    height: 35px;
  }

  .footer-logo-img {
    height: 36px;
  }

  .plaque .plate {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   Reduced Motion & Reduced Transparency Overrides
   ========================================================================== */
@media (prefers-reduced-transparency: reduce) {
  .plaque {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--course);
  }
}

@media (prefers-reduced-motion: reduce) {
  .plaque,
  .mega-panel,
  .drawer-panel,
  .drawer-backdrop,
  .plate::before,
  .btn-primary::before,
  .form-field::after,
  .form-status {
    transition-property: opacity, color, background-color, border-color;
  }

  .skip-link,
  .nav-chevron,
  .btn-arrow,
  .mega-link::before,
  .mark-lift,
  .nav-line {
    transition-duration: 0ms;
  }

  .drawer-panel {
    transform: none;
    opacity: 0;
  }

  .drawer-root.is-open .drawer-panel {
    opacity: 1;
  }

  .mega-panel {
    transform: none;
  }

  .plate:active,
  .btn-primary:active,
  .btn-secondary:active,
  .btn-link:active,
  .seg-btn:active,
  .menu-toggle:active {
    transform: none;
  }
}
