:root {
  --paper: #f2eee3;
  --paper-2: #e9e2d1;
  --paper-3: #fbf8ee;
  --ink: #111711;
  --ink-2: #223028;
  --green: #0b6e4f;
  --green-2: #0f8b62;
  --terracotta: #bc432e;
  --gold: #9a7b2f;
  --mist: rgba(17, 23, 17, 0.1);
  --muted: rgba(17, 23, 17, 0.64);
  --white: #ffffff;
  --shadow: 0 18px 60px rgba(17, 23, 17, 0.18);
  --header-h: 76px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Kufi Arabic", system-ui, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

body[dir="rtl"],
html[dir="rtl"] body {
  font-family: "Noto Kufi Arabic", "Noto Naskh Arabic", Inter, system-ui, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  margin: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 1000;
}

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--header-h);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
  color: var(--paper-3);
  background: rgba(17, 23, 17, 0.28);
  border-bottom: 1px solid rgba(242, 238, 227, 0.18);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(242, 238, 227, 0.92);
  border-bottom-color: var(--mist);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  position: relative;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  background: var(--terracotta);
  border: 0;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.brand-copy small {
  font-size: 0.72rem;
  color: currentColor;
  opacity: 0.72;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.88rem;
}

.desktop-nav a {
  opacity: 0.88;
}

.desktop-nav a:hover {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.lang-toggle,
.menu-toggle,
.icon-button,
.chat-launcher,
.chat-chips button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.lang-toggle {
  padding: 0.7rem 0.8rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 0.82rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 6px;
  padding: 0.86rem 1rem;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 44px;
  cursor: pointer;
}

.button-dark {
  background: var(--ink);
  color: var(--paper-3);
}

.button-light {
  background: var(--paper-3);
  color: var(--ink);
}

.button-ghost-light {
  border-color: rgba(242, 238, 227, 0.64);
  color: var(--paper-3);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 6px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
}

.mobile-nav {
  display: none;
}

.hero {
  min-height: 86vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 4rem) 2rem 5.5rem;
  color: var(--paper-3);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -5;
  background-image: url("https://commons.wikimedia.org/wiki/Special:Redirect/file/ISS-66%20Medina,%20Saudi%20Arabia%20at%20night.jpg?width=1800");
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  animation: heroDrift 28s ease-in-out infinite alternate;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.68;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(17, 23, 17, 0.92), rgba(17, 23, 17, 0.64) 48%, rgba(17, 23, 17, 0.28)),
    linear-gradient(0deg, rgba(17, 23, 17, 0.82), rgba(17, 23, 17, 0.08) 48%, rgba(17, 23, 17, 0.56));
}

html[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(270deg, rgba(17, 23, 17, 0.92), rgba(17, 23, 17, 0.64) 48%, rgba(17, 23, 17, 0.28)),
    linear-gradient(0deg, rgba(17, 23, 17, 0.82), rgba(17, 23, 17, 0.08) 48%, rgba(17, 23, 17, 0.56));
}

.hero-glyph {
  position: absolute;
  inset-inline-end: 1rem;
  top: 7rem;
  z-index: -2;
  font-family: "Noto Kufi Arabic", sans-serif;
  font-size: 25rem;
  line-height: 1;
  color: rgba(242, 238, 227, 0.08);
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: 940px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--terracotta);
  font-weight: 800;
  font-size: 0.86rem;
}

.hero .eyebrow {
  color: #f2c089;
}

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

h1,
h2 {
  font-family: Fraunces, "Noto Naskh Arabic", serif;
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  font-size: 5.8rem;
  max-width: 11ch;
  margin-block-end: 1.25rem;
}

h2 {
  font-size: 3.8rem;
  margin-block-end: 1rem;
}

h3 {
  font-size: 1.05rem;
  margin-block-end: 0.65rem;
}

.hero-lede {
  max-width: 760px;
  color: rgba(251, 248, 238, 0.82);
  font-size: 1.22rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.fact-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
  color: var(--paper-3);
  border-block: 1px solid rgba(242, 238, 227, 0.16);
}

.fact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 122px;
  padding: 1.5rem 2rem;
  border-inline-end: 1px solid rgba(242, 238, 227, 0.16);
}

.fact:last-child {
  border-inline-end: 0;
}

.fact-k {
  font-family: Fraunces, serif;
  font-size: 3.6rem;
  line-height: 1;
  color: var(--paper);
}

.fact-l {
  color: rgba(251, 248, 238, 0.7);
  font-size: 0.92rem;
}

.section {
  padding: 6.5rem 2rem;
}

.section-head {
  max-width: 960px;
  margin-bottom: 2.5rem;
}

.section-head p,
.section-lede,
.intro-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.intro {
  background: var(--paper-3);
  border-bottom: 1px solid var(--mist);
}

.intro-copy {
  max-width: 720px;
}

.mission-vision {
  background: var(--paper);
  border-bottom: 1px solid var(--mist);
}

.mission-grid,
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--mist);
  border-left: 1px solid var(--mist);
}

html[dir="rtl"] .mission-grid,
html[dir="rtl"] .why-grid {
  border-left: 0;
  border-right: 1px solid var(--mist);
}

.mission-grid article,
.why-grid article {
  min-height: 260px;
  padding: 1.6rem;
  background: rgba(251, 248, 238, 0.72);
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
}

html[dir="rtl"] .mission-grid article,
html[dir="rtl"] .why-grid article {
  border-right: 0;
  border-left: 1px solid var(--mist);
}

.mission-grid h3,
.why-grid h3 {
  margin-top: 1.8rem;
  font-size: 1.2rem;
}

.mission-grid p,
.why-grid p {
  color: var(--muted);
}

.values-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.values-strip span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--mist);
  background: var(--paper-3);
  border-radius: 6px;
  color: var(--ink-2);
  font-weight: 800;
  font-size: 0.84rem;
}

.delivery {
  background: var(--paper);
}

.delivery-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--mist);
  background: var(--paper-3);
}

.delivery-step {
  min-height: 310px;
  padding: 2rem;
  border-inline-end: 1px solid var(--mist);
  display: flex;
  flex-direction: column;
}

.delivery-step:last-child {
  border-inline-end: 0;
}

.step-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--green);
  color: var(--green);
  margin-bottom: auto;
  font-weight: 800;
  font-size: 0.8rem;
}

.delivery-step h3 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.delivery-step p {
  color: var(--muted);
}

.architecture {
  background: var(--ink);
  color: var(--paper-3);
  position: relative;
  overflow: hidden;
}

.architecture::before {
  content: "";
  position: absolute;
  inset-inline-start: -14rem;
  top: -14rem;
  width: 34rem;
  height: 34rem;
  opacity: 0.16;
  border: 1px solid rgba(242, 238, 227, 0.28);
  background: repeating-conic-gradient(from 22deg, transparent 0deg 14deg, rgba(242, 238, 227, 0.45) 14deg 15deg);
  transform: rotate(45deg);
  animation: geometricTurn 52s linear infinite reverse;
}

.architecture .section-kicker {
  color: #f2c089;
}

.architecture .section-lede {
  color: rgba(251, 248, 238, 0.7);
}

.stack-diagram {
  position: relative;
  display: grid;
  gap: 0.55rem;
}

.stack-layer {
  border: 1px solid rgba(251, 248, 238, 0.18);
  background: rgba(251, 248, 238, 0.08);
  padding: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.stack-layer span {
  font-weight: 800;
}

.stack-layer small {
  color: rgba(251, 248, 238, 0.62);
}

.stack-secure {
  background: rgba(11, 110, 79, 0.3);
  border-color: rgba(15, 139, 98, 0.7);
}

.solutions {
  background: var(--paper-3);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--mist);
  border-left: 1px solid var(--mist);
}

html[dir="rtl"] .solution-grid {
  border-left: 0;
  border-right: 1px solid var(--mist);
}

.solution-card {
  min-height: 285px;
  padding: 1.6rem;
  background: var(--paper-3);
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
  position: relative;
  overflow: hidden;
}

html[dir="rtl"] .solution-card {
  border-right: 0;
  border-left: 1px solid var(--mist);
}

.solution-card::after {
  content: "";
  position: absolute;
  width: 8rem;
  height: 8rem;
  inset-inline-end: -4rem;
  bottom: -4rem;
  background: radial-gradient(circle, rgba(11, 110, 79, 0.18), transparent 65%);
}

.solution-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--terracotta);
  border: 1px solid var(--mist);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.solution-card h3 {
  font-size: 1.25rem;
}

.solution-card p {
  color: var(--muted);
}

.capability-library {
  background: var(--paper);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--mist);
  border-left: 1px solid var(--mist);
}

html[dir="rtl"] .capability-grid {
  border-left: 0;
  border-right: 1px solid var(--mist);
}

.capability-card {
  min-height: 190px;
  padding: 1.35rem;
  background: rgba(251, 248, 238, 0.78);
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
}

html[dir="rtl"] .capability-card {
  border-right: 0;
  border-left: 1px solid var(--mist);
}

.capability-group {
  display: inline-flex;
  margin-bottom: 1.1rem;
  color: var(--terracotta);
  font-weight: 800;
  font-size: 0.72rem;
}

.capability-card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.55rem;
}

.capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.madinah {
  min-height: 680px;
  background: var(--paper-2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 4rem;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.madinah-map {
  min-height: 480px;
  border: 1px solid var(--mist);
  background:
    linear-gradient(var(--mist) 1px, transparent 1px),
    linear-gradient(90deg, var(--mist) 1px, transparent 1px),
    radial-gradient(circle at 34% 28%, rgba(188, 67, 46, 0.18), transparent 12%),
    radial-gradient(circle at 58% 48%, rgba(11, 110, 79, 0.18), transparent 16%),
    var(--paper-3);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  position: relative;
}

.madinah-map::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(17, 23, 17, 0.32);
  clip-path: polygon(48% 0, 72% 9%, 86% 26%, 84% 48%, 69% 70%, 46% 91%, 23% 79%, 13% 55%, 16% 28%, 30% 10%);
  background: rgba(17, 23, 17, 0.035);
}

.map-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  background: var(--ink);
  color: var(--paper-3);
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.map-pin::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--terracotta);
  border-radius: 999px;
}

.pin-madinah {
  top: 27%;
  left: 26%;
  background: var(--green);
}

.pin-riyadh {
  top: 48%;
  left: 52%;
}

.pin-jeddah {
  top: 52%;
  left: 23%;
}

.pin-dammam {
  top: 37%;
  left: 69%;
}

.madinah-content {
  max-width: 720px;
}

.madinah-content p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.route-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 2rem;
}

.route-list span {
  padding: 0.95rem 1rem;
  border: 1px solid var(--mist);
  background: rgba(251, 248, 238, 0.58);
  font-weight: 800;
}

.partners {
  background: var(--paper);
}

.partner-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--mist);
  border-left: 1px solid var(--mist);
}

html[dir="rtl"] .partner-list {
  border-left: 0;
  border-right: 1px solid var(--mist);
}

.partner-list span {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background: var(--paper-3);
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
  font-weight: 800;
}

html[dir="rtl"] .partner-list span {
  border-right: 0;
  border-left: 1px solid var(--mist);
}

.use-cases {
  background: var(--ink);
  color: var(--paper-3);
}

.use-cases .section-kicker {
  color: #f2c089;
}

.use-cases .section-head p {
  color: rgba(251, 248, 238, 0.7);
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(251, 248, 238, 0.18);
  border-left: 1px solid rgba(251, 248, 238, 0.18);
}

html[dir="rtl"] .use-grid {
  border-left: 0;
  border-right: 1px solid rgba(251, 248, 238, 0.18);
}

.use-grid article {
  min-height: 210px;
  padding: 1.6rem;
  border-right: 1px solid rgba(251, 248, 238, 0.18);
  border-bottom: 1px solid rgba(251, 248, 238, 0.18);
  background: rgba(251, 248, 238, 0.06);
}

html[dir="rtl"] .use-grid article {
  border-right: 0;
  border-left: 1px solid rgba(251, 248, 238, 0.18);
}

.use-grid h3 {
  color: var(--paper-3);
  font-size: 1.12rem;
}

.use-grid p {
  color: rgba(251, 248, 238, 0.66);
}

.why-bost {
  background: var(--paper-3);
}

.why-grid {
  grid-template-columns: repeat(4, 1fr);
}

.why-grid article {
  min-height: 220px;
}

.team {
  background:
    linear-gradient(90deg, rgba(17, 23, 17, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(17, 23, 17, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--mist);
  border-left: 1px solid var(--mist);
}

html[dir="rtl"] .team-grid {
  border-left: 0;
  border-right: 1px solid var(--mist);
}

.team-card {
  min-height: 360px;
  padding: 1.4rem;
  background: rgba(251, 248, 238, 0.76);
  border-right: 1px solid var(--mist);
  border-bottom: 1px solid var(--mist);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

html[dir="rtl"] .team-card {
  border-right: 0;
  border-left: 1px solid var(--mist);
}

.team-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-3);
  border-radius: 8px;
  font-family: Fraunces, "Noto Naskh Arabic", serif;
  font-size: 1.7rem;
  font-weight: 650;
}

.team-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.team-role {
  margin: -0.55rem 0 0;
  color: var(--terracotta);
  font-weight: 800;
  font-size: 0.85rem;
}

.team-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}

.team-actions a,
.team-actions span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--mist);
  font-size: 0.82rem;
  font-weight: 800;
}

.team-actions a {
  background: var(--ink);
  color: var(--paper-3);
  border-color: var(--ink);
}

.team-actions span {
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 0.75fr);
  gap: 4rem;
  background: var(--paper-3);
  align-items: start;
}

.contact-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.contact-lines a,
.contact-lines span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--mist);
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  font-weight: 800;
}

.contact-lines span {
  color: var(--muted);
  background: var(--paper);
}

.reveal-item {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 620ms ease var(--reveal-delay, 0ms),
    transform 620ms ease var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--mist);
  background: var(--paper);
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
}

.contact-form label span {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ink-2);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(17, 23, 17, 0.18);
  border-radius: 6px;
  background: var(--paper-3);
  color: var(--ink);
  padding: 0.75rem;
}

.contact-form textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  background: var(--ink);
  color: var(--paper-3);
  border-top: 1px solid rgba(251, 248, 238, 0.14);
}

.site-footer p,
.footer-meta {
  color: rgba(251, 248, 238, 0.66);
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
}

.footer-meta {
  display: grid;
  gap: 0.25rem;
  text-align: end;
  max-width: 480px;
}

.chatbot {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
}

.chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--green);
  color: var(--paper-3);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.chat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #84f1b8;
}

.chat-panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: 4rem;
  width: min(400px, calc(100vw - 2rem));
  max-height: min(680px, calc(100vh - 7rem));
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  background: var(--paper-3);
  color: var(--ink);
  border: 1px solid rgba(17, 23, 17, 0.16);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-panel[hidden] {
  display: none;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: var(--ink);
  color: var(--paper-3);
}

.chat-head small {
  display: block;
  color: rgba(251, 248, 238, 0.66);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 1.2rem;
}

.chat-messages {
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message {
  max-width: 88%;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--mist);
  background: var(--paper);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: var(--green);
  color: var(--paper-3);
  border-color: var(--green);
}

html[dir="rtl"] .message.user {
  align-self: flex-start;
}

.chat-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.75rem 1rem 0;
}

.chat-chips button {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--mist);
  border-radius: 6px;
  background: var(--paper);
  font-size: 0.8rem;
  color: var(--ink);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
}

.chat-form textarea {
  resize: none;
  min-height: 46px;
  max-height: 120px;
  border: 1px solid var(--mist);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.7rem;
}

.send-button {
  align-self: end;
  background: var(--ink);
  color: var(--paper-3);
  border-color: var(--ink);
}

.chat-note {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

html[dir="rtl"] .desktop-nav,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .contact-lines,
html[dir="rtl"] .chat-chips {
  direction: rtl;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-actions .button {
    display: none;
  }

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

  .mobile-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    z-index: 70;
    display: none;
    grid-template-columns: 1fr;
    background: rgba(242, 238, 227, 0.96);
    color: var(--ink);
    border-bottom: 1px solid var(--mist);
    padding: 0.5rem 2rem 1rem;
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--mist);
    font-weight: 800;
  }

  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 3.1rem;
  }

  .split,
  .madinah,
  .contact {
    grid-template-columns: 1fr;
  }

  .delivery-rail,
  .solution-grid,
  .use-grid,
  .mission-grid,
  .why-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 0 1rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding: calc(var(--header-h) + 2rem) 1rem 3rem;
  }

  .hero-glyph {
    font-size: 13rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-lede,
  .section-head p,
  .section-lede,
  .intro-copy p,
  .madinah-content p,
  .contact-copy p {
    font-size: 1rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .fact-band,
  .delivery-rail,
  .solution-grid,
  .use-grid,
  .mission-grid,
  .why-grid,
  .team-grid,
  .partner-list,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .fact {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(242, 238, 227, 0.16);
  }

  .fact:last-child {
    border-bottom: 0;
  }

  .delivery-step,
  .solution-card,
  .mission-grid article,
  .why-grid article,
  .capability-card,
  .use-grid article,
  .team-card {
    min-height: auto;
    border-inline-end: 0;
  }

  .madinah-map {
    min-height: 360px;
  }

  .contact {
    gap: 2rem;
  }

  .site-footer {
    display: grid;
  }

  .footer-meta {
    text-align: start;
  }

  .chatbot {
    inset-inline-end: 0.75rem;
    bottom: 0.75rem;
  }

  .chat-launcher {
    width: 54px;
    min-width: 54px;
    padding: 0;
    justify-content: center;
  }

  .chat-launcher [data-i18n] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
    filter: saturate(0.95) contrast(1);
  }
  to {
    transform: scale(1.08) translate3d(-1.6%, 1%, 0);
    filter: saturate(1.08) contrast(1.06);
  }
}

@keyframes geometricTurn {
  from {
    transform: rotate(45deg);
  }
  to {
    transform: rotate(405deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .hero-canvas {
    display: none;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
