/* ═══════════════════════════════════════════════════════════════
   Kasper AI — Marketing home (cinematic redesign)
   "Saudi intelligence. Global possibilities."
   ═══════════════════════════════════════════════════════════════ */

:root {
  --kh-deep: #0B2D3B;
  --kh-ink: #083D3B;
  --kh-emerald: #059669;
  --kh-emerald-2: #10B981;
  --kh-mint: #D9F2E8;
  --kh-mint-2: #A7F3D0;
  --kh-gold: #F59E0B;
  --kh-blue: #3382F6;
  --kh-purple: #885CF6;
  --kh-gray: #647280;
  --kh-cream: #F6F4EE;
  --kh-line: rgba(8, 61, 59, 0.1);
  --kh-nav-h: 76px;
}

/* ── shared primitives ─────────────────────────────────────── */
[hidden] { display: none !important; }

.kh-ic {
  width: 1.35em;
  height: 1.35em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kh-wrap {
  width: min(76rem, 100%);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.kh-wrap--narrow { width: min(54rem, 100%); }

section[id] { scroll-margin-top: calc(var(--kh-nav-h) + 10px); }

.kh-sec { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.kh-sec--soft { background: linear-gradient(180deg, #fff 0%, var(--kh-cream) 18%, var(--kh-cream) 82%, #fff 100%); }
.kh-sec--dark {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(16, 185, 129, 0.16), transparent 60%),
    radial-gradient(900px 480px at 8% 110%, rgba(51, 130, 246, 0.1), transparent 55%),
    linear-gradient(160deg, var(--kh-deep) 0%, var(--kh-ink) 55%, #062a28 100%);
  color: var(--kh-mint);
}
.kh-sec--dark .kh-h2, .kh-sec--dark .kh-head h3 { color: #fff; }
.kh-sec--dark .kh-lead { color: rgba(217, 242, 232, 0.78); }

.kh-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.kh-head--center { margin-inline: auto; text-align: center; }

.kh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kh-emerald);
}
.kh-eyebrow::before {
  content: "";
  width: 1.9rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--kh-emerald-2), transparent);
}
.kh-head--center .kh-eyebrow::after {
  content: "";
  width: 1.9rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, var(--kh-emerald-2), transparent);
}
.kh-eyebrow--gold { color: var(--kh-gold); }
.kh-eyebrow--gold::before { background: linear-gradient(90deg, var(--kh-gold), transparent); }

.kh-h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--kh-ink);
}

.kh-lead {
  margin: 0;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  font-weight: 500;
  line-height: 1.85;
  color: var(--kh-gray);
}

.kh-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.kh-actions--center { justify-content: center; }

/* reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 75ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ═══════════════ HERO ═══════════════ */
.kh-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
  overflow: clip;
  color: var(--kh-mint);
  background: linear-gradient(155deg, #0B2D3B 0%, #083D3B 48%, #052825 100%);
}

.kh-hero__bg { position: absolute; inset: 0; z-index: -1; }

.kh-hero__skyline {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 46%;
  background: url("../brand/kasper-hero-skyline.jpg") center bottom / cover no-repeat;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
  filter: saturate(0.85) hue-rotate(-8deg);
}

.kh-hero__aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}
.kh-hero__aurora--a {
  width: 46rem; height: 46rem;
  top: -18rem; inset-inline-start: -12rem;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), rgba(5, 150, 105, 0.12) 55%, transparent 72%);
  animation: kh-drift-a 16s ease-in-out infinite alternate;
}
.kh-hero__aurora--b {
  width: 40rem; height: 40rem;
  bottom: -16rem; inset-inline-end: -10rem;
  background: radial-gradient(circle, rgba(51, 130, 246, 0.22), rgba(136, 92, 246, 0.1) 55%, transparent 72%);
  animation: kh-drift-b 19s ease-in-out infinite alternate;
}
@keyframes kh-drift-a { to { transform: translate(4rem, 3rem) scale(1.12); } }
@keyframes kh-drift-b { to { transform: translate(-3.5rem, -2.5rem) scale(1.08); } }

.kh-hero__grid {
  position: absolute;
  inset-inline: -20%;
  bottom: -4%;
  height: 52%;
  background:
    repeating-linear-gradient(90deg, rgba(52, 211, 153, 0.14) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(52, 211, 153, 0.12) 0 1px, transparent 1px 52px);
  transform: perspective(640px) rotateX(58deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%);
  mask-image: linear-gradient(180deg, transparent, #000 45%);
  opacity: 0.5;
}

.kh-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.kh-hero__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 8%, transparent 45%, rgba(4, 22, 21, 0.55) 100%),
    linear-gradient(180deg, rgba(4, 22, 21, 0.4), transparent 22%, transparent 70%, rgba(4, 22, 21, 0.6));
}

.kh-hero__inner {
  width: min(76rem, 100%);
  margin-inline: auto;
  padding: calc(var(--kh-nav-h) + 2.5rem) clamp(1.25rem, 4vw, 2.5rem) 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.kh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  backdrop-filter: blur(6px);
  color: var(--kh-mint-2);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.kh-kicker .kh-ic { color: var(--kh-gold); }

.kh-hero__title {
  margin: 0 0 1.3rem;
  font-size: clamp(2.5rem, 5.6vw, 4.3rem);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: #fff;
  text-wrap: balance;
}

.kh-hero__lead {
  margin: 0 0 2.1rem;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  font-weight: 500;
  line-height: 1.9;
  color: rgba(217, 242, 232, 0.85);
}

.kh-hero__note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.6rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(167, 243, 208, 0.75);
}
.kh-hero__note .kh-ic { color: var(--kh-emerald-2); }

/* hero agent visual */
.kh-agent {
  position: relative;
  width: min(100%, 34rem);
  aspect-ratio: 640 / 560;
  margin-inline: auto;
}

.kh-agent__links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kh-agent__links path[data-link],
.kh-mesh__links path[data-link] {
  fill: none;
  stroke: rgba(52, 211, 153, 0.32);
  stroke-width: 1.4;
  stroke-dasharray: 5 7;
  animation: kh-dashflow 2.6s linear infinite;
}
@keyframes kh-dashflow { to { stroke-dashoffset: -48; } }

.kh-pulse {
  fill: #6EE7B7;
  filter: drop-shadow(0 0 6px rgba(110, 231, 183, 0.9));
}

.kh-agent__core {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(7rem, 22%, 9.5rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}
.kh-agent__core img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 34px rgba(16, 185, 129, 0.55)) drop-shadow(0 22px 44px rgba(0, 0, 0, 0.45));
  animation: kh-float 7s ease-in-out infinite;
}
@keyframes kh-float { 50% { transform: translateY(-10px); } }

.kh-agent__ring {
  position: absolute;
  inset: -26%;
  border-radius: 50%;
  border: 1px dashed rgba(110, 231, 183, 0.3);
  animation: kh-spin 26s linear infinite;
}
.kh-agent__ring--b {
  inset: -52%;
  border-style: solid;
  border-color: transparent;
  border-top-color: rgba(16, 185, 129, 0.5);
  border-inline-end-color: rgba(51, 130, 246, 0.3);
  animation-duration: 16s;
  animation-direction: reverse;
}
@keyframes kh-spin { to { transform: rotate(360deg); } }

.kh-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.3);
  background: rgba(8, 61, 59, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(217, 242, 232, 0.1);
  color: var(--kh-mint);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  animation: kh-node-float 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.kh-node .kh-ic { color: var(--kh-mint-2); }
@keyframes kh-node-float { 50% { translate: 0 -9px; } }

.kh-hero__scroll {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid rgba(167, 243, 208, 0.4);
  border-radius: 999px;
  display: grid;
  justify-items: center;
  padding-top: 7px;
}
.kh-hero__scroll span {
  width: 4px; height: 9px;
  border-radius: 4px;
  background: var(--kh-mint-2);
  animation: kh-scroll 1.9s ease-in-out infinite;
}
@keyframes kh-scroll { 55% { transform: translateY(13px); opacity: 0.2; } 100% { transform: translateY(0); opacity: 1; } }

/* ═══════════════ CAPABILITIES SHOWCASE ═══════════════ */
.kh-caps {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}

.kh-caps__list { display: grid; gap: 0.55rem; }

.kh-caps__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--kh-line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  text-align: start;
  cursor: pointer;
  color: var(--kh-ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, translate 0.25s ease;
}
.kh-caps__item:hover { border-color: rgba(5, 150, 105, 0.4); box-shadow: 0 10px 26px rgba(8, 61, 59, 0.1); }
.kh-caps__item.is-active {
  background: linear-gradient(150deg, var(--kh-deep), var(--kh-ink));
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--kh-mint);
  box-shadow: 0 16px 38px rgba(8, 61, 59, 0.28);
}
.kh-caps__num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--kh-emerald);
  min-width: 1.7em;
}
.kh-caps__item.is-active .kh-caps__num { color: var(--kh-gold); }
.kh-caps__item .kh-ic { width: 1.5em; height: 1.5em; color: var(--kh-emerald); }
.kh-caps__item.is-active .kh-ic { color: var(--kh-mint-2); }
.kh-caps__name { font-weight: 700; font-size: 0.98rem; flex: 1; }
.kh-caps__go {
  width: 1.1em; height: 1.1em;
  opacity: 0;
  color: var(--kh-emerald-2);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
[dir="rtl"] .kh-caps__go { transform: scaleX(-1); }
.kh-caps__item.is-active .kh-caps__go { opacity: 1; }

.kh-caps__stage {
  position: sticky;
  top: calc(var(--kh-nav-h) + 1rem);
  border-radius: 22px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background:
    radial-gradient(420px 300px at 50% 0%, rgba(16, 185, 129, 0.18), transparent 70%),
    linear-gradient(160deg, #0d3442, var(--kh-deep));
  color: var(--kh-mint);
  overflow: hidden;
  min-height: 30rem;
}

.kh-caps__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  animation: kh-panel-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes kh-panel-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

.kh-caps__visual {
  position: relative;
  flex: 1;
  min-height: 15rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
}
.kh-caps__halo {
  position: absolute;
  width: 11rem; height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 68%);
  filter: blur(6px);
  animation: kh-breathe 4.5s ease-in-out infinite;
}
@keyframes kh-breathe { 50% { transform: scale(1.18); opacity: 0.75; } }

.kh-caps__big {
  width: 5.4rem; height: 5.4rem;
  color: var(--kh-mint-2);
  stroke-width: 1.3;
  filter: drop-shadow(0 0 22px rgba(110, 231, 183, 0.45));
  z-index: 2;
}
.kh-caps__orbit {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 183, 0.18);
}
.kh-caps__orbit--a { width: 13rem; height: 13rem; border-style: dashed; animation: kh-spin 30s linear infinite; }
.kh-caps__orbit--b { width: 19rem; height: 19rem; opacity: 0.5; }
.kh-caps__dot {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--kh-emerald-2);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
  animation: kh-orbitdot 10.5s linear infinite;
  animation-delay: var(--t, 0s);
}
@keyframes kh-orbitdot {
  from { transform: rotate(0deg) translateX(6.5rem) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(6.5rem) rotate(-360deg); }
}

.kh-caps__text h3 { margin: 0 0 0.6rem; font-size: 1.35rem; font-weight: 800; color: #fff; }
.kh-caps__text p { margin: 0; font-size: 0.98rem; line-height: 1.85; color: rgba(217, 242, 232, 0.75); }
.kh-caps__count {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(167, 243, 208, 0.5);
}

/* ═══════════════ FLOW / STEPS ═══════════════ */
.kh-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.1rem;
  position: relative;
  counter-reset: step;
}
.kh-flow::before {
  content: "";
  position: absolute;
  top: 2.05rem;
  inset-inline: 4%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.55) 12%, rgba(52, 211, 153, 0.55) 88%, transparent);
  background-size: 200% 100%;
  animation: kh-flowline 4s linear infinite;
}
@keyframes kh-flowline { to { background-position: -200% 0; } }

.kh-flow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0 0.35rem;
}
.kh-flow__pin {
  width: 4.1rem; height: 4.1rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--kh-mint-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(217, 242, 232, 0.12);
  z-index: 1;
}
.kh-flow__pin .kh-ic { width: 1.7em; height: 1.7em; }
.kh-flow__num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--kh-gold);
}
.kh-flow__step h3 { margin: 0; font-size: 1rem; font-weight: 800; color: #fff; line-height: 1.45; }
.kh-flow__step p { margin: 0; font-size: 0.85rem; line-height: 1.7; color: rgba(217, 242, 232, 0.6); }

/* ═══════════════ MESH / CONNECTIVITY ═══════════════ */
.kh-mesh {
  position: relative;
  width: min(58rem, 100%);
  margin: 0 auto 2.5rem;
  aspect-ratio: 900 / 520;
}
.kh-mesh__links { position: absolute; inset: 0; width: 100%; height: 100%; }

.kh-mesh__core {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  z-index: 2;
}
.kh-mesh__core img {
  width: clamp(4.5rem, 11%, 6rem);
  filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.6)) drop-shadow(0 14px 30px rgba(0, 0, 0, 0.3));
  animation: kh-float 6.5s ease-in-out infinite;
}
.kh-mesh__core span {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--kh-ink);
  background: rgba(217, 242, 232, 0.9);
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
}

.kh-mesh__node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 7.6rem;
  padding: 0.85rem 0.5rem;
  border-radius: 16px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--kh-line);
  box-shadow: 0 14px 34px rgba(8, 61, 59, 0.12);
  color: var(--kh-ink);
}
.kh-mesh__node .kh-ic {
  width: 1.8em; height: 1.8em;
  color: var(--kh-emerald);
}
.kh-mesh__node span { font-size: 0.76rem; font-weight: 800; line-height: 1.4; }

.kh-mesh__foot { text-align: center; }
.kh-mesh__foot > p { margin: 0 0 0.9rem; font-weight: 800; color: var(--kh-ink); }
.kh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.kh-chip {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(5, 150, 105, 0.35);
  background: rgba(16, 185, 129, 0.07);
  color: var(--kh-ink);
  font-size: 0.82rem;
  font-weight: 700;
  direction: ltr;
}
.kh-mesh__hint { margin: 1rem 0 0 !important; font-size: 0.85rem !important; font-weight: 600 !important; color: var(--kh-gray) !important; }

/* ═══════════════ SECTORS MOSAIC ═══════════════ */
.kh-sectors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
}
.kh-sector {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 1.4rem 1.3rem;
  min-height: 9.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  color: var(--kh-mint);
  background:
    linear-gradient(180deg, rgba(4, 22, 21, 0) 42%, rgba(4, 22, 21, 0.55) 100%),
    radial-gradient(220px 160px at 85% 0%, rgba(16, 185, 129, 0.2), transparent 70%),
    linear-gradient(155deg, #11404f, var(--kh-deep));
  border: 1px solid rgba(52, 211, 153, 0.16);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.kh-sector--wide { grid-column: span 3; }
.kh-sector::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 185, 129, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.kh-sector:hover, .kh-sector:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 22px 44px rgba(8, 61, 59, 0.28);
  outline: none;
}
.kh-sector:hover::before, .kh-sector:focus-visible::before { opacity: 1; }
.kh-sector__icon {
  width: 2rem; height: 2rem;
  color: var(--kh-mint-2);
  margin-bottom: auto;
  transition: color 0.3s ease;
}
.kh-sector:hover .kh-sector__icon { color: var(--kh-gold); }
.kh-sector h3 { margin: 0; font-size: 1.02rem; font-weight: 800; color: #fff; position: relative; }
.kh-sector p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(230, 245, 238, 0.82);
  position: relative;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.35s ease;
}
.kh-sector:hover p, .kh-sector:focus-visible p { max-height: 4em; opacity: 1; }

@media (hover: none) {
  .kh-sector p { max-height: none; opacity: 1; }
}

/* ═══════════════ SAUDI / GLOBAL ═══════════════ */
.kh-saudi {
  position: relative;
  overflow: clip;
  color: var(--kh-mint);
  background: #06231f;
}
.kh-saudi__bg { position: absolute; inset: 0; z-index: 0; }
.kh-saudi__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 62%;
  opacity: 0.5;
}
.kh-saudi__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(6, 30, 32, 0.96) 20%, rgba(8, 45, 59, 0.72) 55%, rgba(6, 30, 32, 0.45) 100%),
    linear-gradient(180deg, rgba(6, 30, 32, 0.5), transparent 30%, rgba(6, 30, 32, 0.85));
}
[dir="ltr"] .kh-saudi__shade {
  background:
    linear-gradient(255deg, rgba(6, 30, 32, 0.96) 20%, rgba(8, 45, 59, 0.72) 55%, rgba(6, 30, 32, 0.45) 100%),
    linear-gradient(180deg, rgba(6, 30, 32, 0.5), transparent 30%, rgba(6, 30, 32, 0.85));
}
.kh-saudi__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.kh-saudi__copy .kh-h2 { color: #fff; }
.kh-saudi__copy .kh-lead { color: rgba(217, 242, 232, 0.82); }
.kh-saudi__vision {
  margin: 1.4rem 0 0;
  padding: 1rem 1.2rem;
  border-inline-start: 3px solid var(--kh-gold);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent 75%);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.8;
  color: rgba(255, 237, 200, 0.88);
}
[dir="ltr"] .kh-saudi__vision { border-radius: 12px 0 0 12px; }

.kh-globe { width: min(100%, 26rem); display: block; margin-inline: auto; }
.kh-globe__arc {
  fill: none;
  stroke: var(--kh-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 60 260;
  animation: kh-arc 4.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  opacity: 0.85;
}
@keyframes kh-arc {
  0% { stroke-dashoffset: 320; opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.kh-globe__pin { fill: var(--kh-emerald-2); }
.kh-globe__pulse {
  fill: none;
  stroke: rgba(52, 211, 153, 0.7);
  stroke-width: 1.5;
  animation: kh-ping 2.6s ease-out infinite;
}
@keyframes kh-ping { from { r: 6; opacity: 1; } to { r: 34; opacity: 0; } }
.kh-globe__dst {
  fill: var(--kh-gold);
  animation: kh-dst 4.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes kh-dst { 0%, 12% { opacity: 0.2; } 45%, 80% { opacity: 1; } 100% { opacity: 0.2; } }

/* ═══════════════ TRUST ═══════════════ */
.kh-trust {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
}
.kh-trust__grid { display: grid; gap: 0.7rem; }
.kh-trust__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.05rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  background: rgba(16, 185, 129, 0.05);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.kh-trust__item:hover { border-color: rgba(52, 211, 153, 0.45); background: rgba(16, 185, 129, 0.1); }
.kh-trust__item .kh-ic { width: 1.6em; height: 1.6em; color: var(--kh-mint-2); margin-top: 0.15rem; }
.kh-trust__item h3 { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 800; color: #fff; }
.kh-trust__item p { margin: 0; font-size: 0.87rem; line-height: 1.7; color: rgba(217, 242, 232, 0.62); }

.kh-pdpl {
  position: sticky;
  top: calc(var(--kh-nav-h) + 1rem);
  padding: 1.6rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background:
    radial-gradient(300px 220px at 90% 0%, rgba(245, 158, 11, 0.14), transparent 70%),
    rgba(9, 42, 45, 0.75);
}
.kh-pdpl__icon { width: 2.2em; height: 2.2em; color: var(--kh-gold); }
.kh-pdpl h3 { margin: 0.9rem 0 0.6rem; font-size: 1.15rem; font-weight: 800; color: #fff; }
.kh-pdpl p { margin: 0; font-size: 0.92rem; line-height: 1.85; color: rgba(217, 242, 232, 0.75); }
.kh-pdpl ul { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.kh-pdpl li {
  position: relative;
  padding-inline-start: 1.4rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: rgba(217, 242, 232, 0.8);
}
.kh-pdpl li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 0.55em; height: 0.55em;
  border-radius: 50%;
  background: var(--kh-emerald-2);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

/* ═══════════════ DEVICE / SCREENS ═══════════════ */
.kh-device { margin-bottom: clamp(3rem, 6vw, 5rem); }
.kh-device__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}
.kh-device__tab {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--kh-line);
  background: #fff;
  color: var(--kh-ink);
  cursor: pointer;
  transition: all 0.25s ease;
}
.kh-device__tab:hover { border-color: rgba(5, 150, 105, 0.4); }
.kh-device__tab.is-active {
  background: var(--kh-ink);
  border-color: var(--kh-ink);
  color: var(--kh-mint);
}

.kh-device__frame {
  border-radius: 22px;
  border: 1px solid rgba(8, 61, 59, 0.25);
  background: linear-gradient(160deg, #0d3442, #072a2b);
  box-shadow: 0 40px 90px rgba(8, 61, 59, 0.32);
  overflow: hidden;
}
.kh-device__chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(217, 242, 232, 0.09);
}
.kh-device__chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(217, 242, 232, 0.22); }
.kh-device__chrome i:first-child { background: rgba(245, 158, 11, 0.75); }
.kh-device__chrome span {
  margin-inline-start: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(217, 242, 232, 0.45);
}
.kh-device__body { position: relative; min-height: 24rem; }

.kh-screen {
  display: grid;
  grid-template-columns: 4rem 1fr;
  min-height: 24rem;
  animation: kh-panel-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.kh-screen__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 0;
  border-inline-end: 1px solid rgba(217, 242, 232, 0.08);
  background: rgba(4, 22, 21, 0.4);
}
.kh-screen__side i {
  width: 1.7rem; height: 1.7rem;
  border-radius: 8px;
  background: rgba(217, 242, 232, 0.1);
}
.kh-screen__side i:first-child { background: var(--kh-emerald-2); box-shadow: 0 0 14px rgba(16, 185, 129, 0.6); }

.kh-screen__main { padding: 1.6rem clamp(1.2rem, 3vw, 2.4rem); display: flex; flex-direction: column; gap: 0.9rem; }
.kh-screen__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--kh-mint);
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(217, 242, 232, 0.09);
  margin-bottom: 0.4rem;
}
.kh-screen__field {
  width: var(--w, 60%);
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(217, 242, 232, 0.09), rgba(217, 242, 232, 0.05));
  border: 1px solid rgba(217, 242, 232, 0.1);
}
.kh-screen__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kh-screen__chip, .kh-screen__perm {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  color: rgba(217, 242, 232, 0.7);
  border: 1px solid rgba(217, 242, 232, 0.16);
  background: rgba(217, 242, 232, 0.05);
}
.kh-screen__chip.is-on, .kh-screen__perm.is-on {
  color: var(--kh-mint-2);
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(16, 185, 129, 0.14);
}
.kh-screen__perm.is-off { color: rgba(245, 158, 11, 0.85); border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.kh-screen__cta {
  align-self: flex-start;
  margin-top: 0.4rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  background: var(--kh-emerald-2);
  color: #052824;
  font-size: 0.85rem;
  font-weight: 800;
}
.kh-screen__list { display: grid; gap: 0.7rem; }
.kh-screen__list > span {
  width: var(--w, 60%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 242, 232, 0.1);
  background: rgba(217, 242, 232, 0.05);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(217, 242, 232, 0.85);
}
.kh-screen__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.kh-screen__dot.is-ok { background: var(--kh-emerald-2); box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
.kh-screen__dot.is-run { background: var(--kh-gold); animation: kh-blink 1.4s ease-in-out infinite; }
.kh-screen__dot.is-off { background: rgba(217, 242, 232, 0.25); }
@keyframes kh-blink { 50% { opacity: 0.3; } }

.kh-screen__main--chat { gap: 0.8rem; }
.kh-screen__bubble {
  max-width: 72%;
  padding: 0.8rem 1.1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.kh-screen__bubble--in {
  align-self: flex-end;
  background: rgba(51, 130, 246, 0.18);
  border: 1px solid rgba(51, 130, 246, 0.3);
  color: #dbe9ff;
  border-end-end-radius: 4px;
}
.kh-screen__bubble--out {
  align-self: flex-start;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--kh-mint);
  border-end-start-radius: 4px;
}
.kh-screen__input {
  margin-top: auto;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 242, 232, 0.14);
  background: rgba(217, 242, 232, 0.06);
  color: rgba(217, 242, 232, 0.4);
  font-size: 0.85rem;
}

.kh-screen__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.kh-screen__stats > span {
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 242, 232, 0.1);
  background: rgba(217, 242, 232, 0.05);
}
.kh-screen__stats b { font-size: 0.75rem; font-weight: 700; color: rgba(217, 242, 232, 0.6); }
.kh-screen__stats i {
  display: block;
  height: 5px;
  width: var(--h, 50%);
  border-radius: 5px;
  background: linear-gradient(90deg, var(--kh-emerald), var(--kh-emerald-2));
}
.kh-screen__bars { display: flex; align-items: flex-end; gap: 0.55rem; height: 6.5rem; margin-top: 0.4rem; }
.kh-screen__bars i {
  flex: 1;
  height: var(--h, 50%);
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(110, 231, 183, 0.85), rgba(16, 185, 129, 0.25));
  animation: kh-bar 3.5s ease-in-out infinite;
}
.kh-screen__bars i:nth-child(2n) { animation-delay: 0.6s; }
.kh-screen__bars i:nth-child(3n) { animation-delay: 1.1s; }
@keyframes kh-bar { 50% { transform: scaleY(0.86); transform-origin: bottom; } }

/* ═══════════════ FILM ═══════════════ */
.film__stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(8, 61, 59, 0.2);
  background: var(--kh-deep);
  box-shadow: 0 30px 70px rgba(8, 61, 59, 0.3);
}
.film__video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.film__caption {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  padding: 1.1rem 1.4rem;
  display: grid;
  gap: 0.15rem;
  color: var(--kh-mint);
  background: linear-gradient(0deg, rgba(4, 22, 21, 0.75), transparent);
  inset-inline-end: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.film.is-playing .film__caption { opacity: 0; }
.film__caption strong { font-size: 1.05rem; font-weight: 800; }
.film__caption span { font-size: 0.85rem; color: rgba(217, 242, 232, 0.72); }
.film__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0;
  border: 0;
  cursor: pointer;
  background: rgba(4, 22, 21, 0.35);
  color: #fff;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.film__play svg {
  width: 5.2rem; height: 5.2rem;
  padding: 1.5rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.9);
  fill: #062e2c;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.25), 0 0 50px rgba(16, 185, 129, 0.5);
  transition: transform 0.3s ease;
}
.film__play:hover svg { transform: scale(1.07); }
.film__play span { position: absolute; bottom: 22%; font-weight: 800; font-size: 1rem; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.film.is-playing .film__play { opacity: 0; visibility: hidden; }
.film__chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.1rem;
}
.film__chapter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--kh-line);
  background: #fff;
  color: var(--kh-ink);
  cursor: pointer;
  transition: all 0.25s ease;
}
.film__chapter em { font-style: normal; font-size: 0.7rem; font-weight: 800; color: var(--kh-emerald); }
.film__chapter:hover { border-color: rgba(5, 150, 105, 0.4); }
.film__chapter.is-active { background: var(--kh-ink); border-color: var(--kh-ink); color: var(--kh-mint); }
.film__chapter.is-active em { color: var(--kh-gold); }
.film.is-error .film__play svg { background: rgba(245, 158, 11, 0.9); }

/* ═══════════════ BENEFITS ═══════════════ */
.kh-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.kh-benefit {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(8, 61, 59, 0.14);
  background: #fff;
  color: var(--kh-ink);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(8, 61, 59, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.kh-benefit:hover { border-color: rgba(5, 150, 105, 0.45); box-shadow: 0 14px 34px rgba(8, 61, 59, 0.14); }
.kh-benefit .kh-ic { color: var(--kh-emerald); }

/* ═══════════════ FAQ ═══════════════ */
.kh-faq { display: grid; }
.kh-faq__item { border-bottom: 1px solid var(--kh-line); }
.kh-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 0.25rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  text-align: start;
  color: var(--kh-ink);
  cursor: pointer;
  transition: color 0.2s ease;
}
.kh-faq__q:hover { color: var(--kh-emerald); }
.kh-faq__q .kh-ic { transition: transform 0.35s ease; color: var(--kh-emerald); }
.kh-faq__q[aria-expanded="true"] .kh-ic { transform: rotate(180deg); }
.kh-faq__a { overflow: hidden; }
.kh-faq__a p {
  margin: 0;
  padding: 0 0.25rem 1.3rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--kh-gray);
  max-width: 44rem;
}

/* ═══════════════ FINAL CTA ═══════════════ */
.kh-cta {
  position: relative;
  overflow: clip;
  padding: clamp(6rem, 12vw, 10rem) 0;
  text-align: center;
  color: var(--kh-mint);
  background:
    radial-gradient(900px 500px at 50% 120%, rgba(16, 185, 129, 0.22), transparent 65%),
    linear-gradient(160deg, #0B2D3B, #062a28);
}
.kh-cta__mark {
  position: absolute;
  top: 50%; left: 50%;
  width: min(46rem, 130vw);
  transform: translate(-50%, -50%);
  opacity: 0.1;
  filter: saturate(1.4) blur(1px);
  animation: kh-cta-mark 40s linear infinite;
}
@keyframes kh-cta-mark { to { transform: translate(-50%, -50%) rotate(360deg); } }
.kh-cta__beams {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg at 50% 55%, transparent 0deg, rgba(52, 211, 153, 0.07) 30deg, transparent 60deg, rgba(51, 130, 246, 0.05) 120deg, transparent 160deg, rgba(245, 158, 11, 0.06) 230deg, transparent 280deg, rgba(52, 211, 153, 0.07) 330deg, transparent 360deg);
  animation: kh-spin 30s linear infinite;
}
.kh-cta__inner { position: relative; z-index: 1; }
.kh-cta__title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.kh-cta__lead {
  margin: 0 auto 2.4rem;
  max-width: 36rem;
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.85;
  color: rgba(217, 242, 232, 0.8);
}

/* ── buttons on dark surfaces (extends kasper-marketing) ───── */
.kh-hero .mkt-btn--ghost, .kh-cta .mkt-btn--ghost {
  border-color: rgba(217, 242, 232, 0.4);
  color: var(--kh-mint);
  background: rgba(217, 242, 232, 0.06);
  backdrop-filter: blur(6px);
}
.kh-hero .mkt-btn--ghost:hover, .kh-cta .mkt-btn--ghost:hover {
  background: rgba(217, 242, 232, 0.14);
  border-color: rgba(217, 242, 232, 0.65);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1080px) {
  .kh-flow { grid-template-columns: repeat(3, 1fr); gap: 2rem 1rem; }
  .kh-flow::before { display: none; }
  .kh-sectors { grid-template-columns: repeat(4, 1fr); }
  .kh-sector, .kh-sector--wide { grid-column: span 2; }
}

@media (max-width: 920px) {
  .kh-hero__inner { grid-template-columns: 1fr; padding-top: calc(var(--kh-nav-h) + 2rem); text-align: center; }
  .kh-hero__copy { display: flex; flex-direction: column; align-items: center; }
  .kh-hero__lead { max-width: 32rem; }
  .kh-actions { justify-content: center; }
  .kh-hero__visual { order: -1; }
  .kh-agent { width: min(26rem, 88vw); }
  .kh-caps { grid-template-columns: 1fr; }
  .kh-caps__stage { position: static; min-height: 26rem; }
  .kh-trust { grid-template-columns: 1fr; }
  .kh-pdpl { position: static; }
  .kh-saudi__inner { grid-template-columns: 1fr; }
  .kh-saudi__visual { order: -1; }
  .kh-globe { width: min(100%, 19rem); }
}

@media (max-width: 640px) {
  .kh-flow { grid-template-columns: 1fr; gap: 1.6rem; }
  .kh-flow__step { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .kh-flow__pin { width: 3.4rem; height: 3.4rem; }
  .kh-flow__step h3 { flex: 1; margin: 0; }
  .kh-flow__step p { flex-basis: 100%; padding-inline-start: 0.5rem; }
  .kh-sectors { grid-template-columns: 1fr 1fr; }
  .kh-sector, .kh-sector--wide { grid-column: span 1; min-height: 8rem; }
  .kh-sector p { max-height: none; opacity: 1; font-size: 0.74rem; }
  .kh-mesh { aspect-ratio: 900 / 780; }
  .kh-mesh__node { width: 6.4rem; padding: 0.6rem 0.35rem; }
  .kh-mesh__node span { font-size: 0.68rem; }
  .kh-screen { grid-template-columns: 3rem 1fr; min-height: 22rem; }
  .kh-device__body { min-height: 22rem; }
  .kh-benefits { justify-content: center; }
  .kh-node span { display: none; }
  .kh-node { padding: 0.55rem; }
}

/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .kh-hero__canvas { display: none; }
  .kh-hero__scroll span { animation: none; }
}
