/* ==========================================================================
   azbridge Design System
   Ivory paper, forest green, steel blue. Geist / Noto Kufi Arabic / IBM Plex Sans Arabic.
   ========================================================================== */
:root {
  /* Surfaces */
  --paper:      #F7F5EF;
  --paper-2:    #F0EDE4;
  --white:      #FFFFFF;
  --surface:    #FFFFFF;
  --on-accent:  #FFFFFF;
  --btn:        #165B3E;
  --btn-hover:  #0F4630;
  --forest:     #0B241B;
  --forest-2:   #103126;
  --forest-3:   #174335;

  /* Ink */
  --ink:        #0F1A16;
  --ink-2:      #3F4B46;
  --ink-3:      #6B7671;
  --ink-inv:    #F4F2EC;
  --ink-inv-2:  rgba(244, 242, 236, 0.72);
  --ink-inv-3:  rgba(244, 242, 236, 0.5);

  /* Brand */
  --green:      #165B3E;
  --green-700:  #0F4630;
  --green-50:   #E8F1EB;
  --green-inv:  #8FD3B0;
  --blue:       #3B739E;
  --blue-50:    #E7EFF6;

  /* Lines */
  --line:       #E2DED3;
  --line-2:     #CFCABD;
  --line-inv:   rgba(244, 242, 236, 0.12);
  --line-inv-2: rgba(244, 242, 236, 0.22);

  /* Type */
  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-latin:   "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Shape & depth */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 22, 0.04), 0 2px 8px rgba(15, 26, 22, 0.04);
  --shadow:    0 1px 2px rgba(15, 26, 22, 0.04), 0 12px 32px rgba(15, 26, 22, 0.07);
  --shadow-lg: 0 2px 6px rgba(15, 26, 22, 0.04), 0 28px 64px rgba(15, 26, 22, 0.12);
  --panel-shadow: 0 24px 48px rgba(15, 26, 22, 0.08);

  /* Atmosphere */
  --header-bg:  rgba(247, 245, 239, 0.86);
  --glow-blue:  rgba(63, 127, 182, 0.14);
  --glow-green: rgba(23, 96, 63, 0.10);
  --floor:      rgba(15, 26, 22, 0.18);
  --mark-filter: none;

  color-scheme: light;

  /* Layout & motion */
  --max-w:    1240px;
  --gutter:   32px;
  --header-h: 76px;
  --ease:     cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark theme: explicit choice, or the system preference when no choice is stored */
:root[data-theme="dark"] {
  --paper:      #0B1210;
  --paper-2:    #0F1915;
  --surface:    #141F1B;
  --forest:     #0D271D;
  --ink:        #ECEAE3;
  --ink-2:      #B6BDB8;
  --ink-3:      #89938E;
  --green:      #74C69D;
  --green-50:   rgba(116, 198, 157, 0.12);
  --blue:       #8DBBE0;
  --blue-50:    rgba(141, 187, 224, 0.12);
  --btn:        #23784F;
  --btn-hover:  #2A8A5C;
  --line:       rgba(236, 234, 227, 0.1);
  --line-2:     rgba(236, 234, 227, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow:    0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 28px 64px rgba(0, 0, 0, 0.45);
  --panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --header-bg:  rgba(11, 18, 16, 0.82);
  --glow-blue:  rgba(70, 140, 205, 0.12);
  --glow-green: rgba(46, 150, 104, 0.12);
  --floor:      rgba(0, 0, 0, 0.6);
  --mark-filter: brightness(1.35) saturate(1.05);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0B1210;
    --paper-2:    #0F1915;
    --surface:    #141F1B;
    --forest:     #0D271D;
    --ink:        #ECEAE3;
    --ink-2:      #B6BDB8;
    --ink-3:      #89938E;
    --green:      #74C69D;
    --green-50:   rgba(116, 198, 157, 0.12);
    --blue:       #8DBBE0;
    --blue-50:    rgba(141, 187, 224, 0.12);
    --btn:        #23784F;
    --btn-hover:  #2A8A5C;
    --line:       rgba(236, 234, 227, 0.1);
    --line-2:     rgba(236, 234, 227, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow:    0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 28px 64px rgba(0, 0, 0, 0.45);
    --panel-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    --header-bg:  rgba(11, 18, 16, 0.82);
    --glow-blue:  rgba(70, 140, 205, 0.12);
    --glow-green: rgba(46, 150, 104, 0.12);
    --floor:      rgba(0, 0, 0, 0.6);
    --mark-filter: brightness(1.35) saturate(1.05);

    color-scheme: dark;
  }
}

/* Smooth colour change while the theme toggles (class added for ~400ms by app.js) */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), fill 0.35s var(--ease) !important;
}

html[lang="ar"] {
  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans Arabic", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

::selection {
  background: rgba(22, 91, 62, 0.16);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.section--dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--green-inv);
}

.latin {
  font-family: var(--font-latin);
}

html[dir="rtl"] .icon-dir {
  transform: scaleX(-1);
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  font-weight: 500;
}

.skip-link:focus {
  inset-inline-start: 12px;
}

.shell {
  width: 100%;
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ----------------------------- Type primitives ----------------------------- */
.eyebrow {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 20px;
}

.section--dark .eyebrow {
  color: var(--green-inv);
}

.section-head {
  max-width: 760px;
  margin-bottom: 64px;
}

.section-title,
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 20px;
}

html[lang="ar"] .section-title,
html[lang="ar"] .contact-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.5;
  letter-spacing: 0;
}

.section-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 640px;
}

.section--dark .section-desc {
  color: var(--ink-inv-2);
}

.sub-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

html[lang="ar"] .sub-title {
  letter-spacing: 0;
  font-size: 1.25rem;
}

.sub-desc {
  color: var(--ink-3);
  margin-bottom: 28px;
  max-width: 560px;
}

/* ----------------------------- Buttons & links ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn--sm {
  height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn--lg {
  height: 54px;
  padding: 0 28px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--btn);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--btn-hover);
}

.btn--primary:disabled {
  background: var(--line-2);
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn .icon-dir {
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon-dir {
  transform: translateX(3px);
}

html[dir="rtl"] .btn:hover .icon-dir {
  transform: scaleX(-1) translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--green);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease);
}

html[dir="rtl"] .text-link {
  background-position: 100% 100%;
}

.text-link:hover {
  background-size: 100% 1px;
}

.text-link .icon-dir {
  transition: transform 0.25s var(--ease);
}

.text-link:hover .icon-dir {
  transform: translateX(3px);
}

html[dir="rtl"] .text-link:hover .icon-dir {
  transform: scaleX(-1) translateX(3px);
}

.text-link--lg {
  font-size: 1rem;
}

.text-link--muted {
  color: var(--ink-2);
}

/* ----------------------------- Check list (shared) ----------------------------- */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.check-list .icon-check {
  margin-top: 0.2em;
  color: var(--green);
}

.check-list--dark li {
  color: var(--ink-inv-2);
}

.check-list--dark .icon-check {
  color: var(--green-inv);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.site-header.is-scrolled::after,
.site-header.panel-open::after {
  opacity: 1;
}

.site-header.panel-open,
body.menu-open .site-header {
  background: var(--paper);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.header-bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: auto;
  filter: var(--mark-filter);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-name {
  font-family: var(--font-latin);
}

.primary-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover,
.nav-item.is-open .nav-link {
  color: var(--ink);
}

.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.nav-link.is-current {
  color: var(--ink);
}

.nav-link.is-current::after {
  transform: scaleX(1);
}

.nav-caret {
  transition: transform 0.25s var(--ease);
}

.nav-item.is-open .nav-caret {
  transform: rotate(180deg);
}

/* Mega panels */
.nav-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--panel-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}

.nav-item.is-open .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s;
}

.nav-panel-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  padding-block: 40px 44px;
}

.nav-panel-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-inline-end: 40px;
  border-inline-end: 1px solid var(--line);
}

.nav-panel-lead {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink);
}

.nav-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nav-panel-grid--compact {
  grid-template-columns: repeat(3, 1fr);
}

.panel-link {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r);
  transition: background-color 0.2s var(--ease);
}

.panel-link:hover {
  background: var(--surface);
}

.panel-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green);
}

.panel-icon .icon {
  width: 20px;
  height: 20px;
}

.panel-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.panel-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.panel-text > span {
  font-size: 0.85rem;
  color: var(--ink-3);
  line-height: 1.45;
}

.panel-text .panel-kicker {
  font-size: 0.8rem;
  color: var(--green);
}

/* Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto;
}

.lang-switch {
  height: 40px;
  padding: 0 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s var(--ease);
}

.lang-switch:hover {
  color: var(--ink);
}

#langToggle[lang="ar"] {
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

#langToggle[lang="en"] {
  font-family: var(--font-latin);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 4px;
  font-size: 0.9rem;
  font-weight: 500;
}

.menu-toggle-icon {
  position: relative;
  width: 20px;
  height: 12px;
}

.menu-toggle-icon i {
  position: absolute;
  inset-inline: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-toggle-icon i:first-child { top: 2px; }
.menu-toggle-icon i:last-child  { top: 9px; }

body.menu-open .menu-toggle-icon i:first-child {
  top: 5.5px;
  transform: rotate(45deg);
}

body.menu-open .menu-toggle-icon i:last-child {
  top: 5.5px;
  transform: rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  padding-top: var(--header-h);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  overflow-y: auto;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

.mobile-menu-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding-block: 32px 40px;
}

.mobile-menu-list li {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-out);
}

body.menu-open .mobile-menu-list li {
  opacity: 1;
  transform: none;
}

body.menu-open .mobile-menu-list li:nth-child(2) { transition-delay: 0.04s; }
body.menu-open .mobile-menu-list li:nth-child(3) { transition-delay: 0.08s; }
body.menu-open .mobile-menu-list li:nth-child(4) { transition-delay: 0.12s; }
body.menu-open .mobile-menu-list li:nth-child(5) { transition-delay: 0.16s; }

.mobile-menu-list a {
  display: block;
  padding: 18px 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

html[lang="ar"] .mobile-menu-list a {
  letter-spacing: 0;
  font-size: 1.5rem;
}

.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-menu-mail {
  color: var(--ink-3);
  font-family: var(--font-latin);
}

.mobile-menu-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-3);
  font-family: var(--font-latin);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 48px);
  background:
    radial-gradient(900px 520px at 78% 38%, var(--glow-blue), transparent 70%),
    radial-gradient(700px 480px at 70% 60%, var(--glow-green), transparent 70%),
    var(--paper);
}

html[dir="rtl"] .hero {
  background:
    radial-gradient(900px 520px at 22% 38%, var(--glow-blue), transparent 70%),
    radial-gradient(700px 480px at 30% 60%, var(--glow-green), transparent 70%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
  min-height: min(720px, calc(100vh - var(--header-h) - 150px));
  padding-bottom: 40px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
  margin-bottom: 28px;
}

html[lang="ar"] .hero-title {
  font-size: clamp(2.1rem, 3.7vw, 3.25rem);
  line-height: 1.5;
  letter-spacing: 0;
}

.hero-lead {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 580px;
  margin-bottom: 40px;
}

html[lang="ar"] .hero-lead {
  font-size: 1.125rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-facts {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  max-width: 560px;
}

.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
  padding-inline-end: 24px;
}

.fact + .fact {
  padding-inline-start: 24px;
  border-inline-start: 1px solid var(--line);
}

.fact dd {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.fact dt {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Intro choreography */
.intro {
  opacity: 0;
  transform: translateY(16px);
}

body.is-loaded .intro {
  animation: rise 0.9s var(--ease-out) var(--d, 0s) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   3D logo stage
   ========================================================================== */
.logo-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  justify-self: center;
}

.logo-stage--hero {
  max-width: 560px;
}

.logo-stage--story {
  max-width: 520px;
}

.logo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.logo-stage.is-ready .logo-canvas {
  opacity: 1;
}

.logo-fallback {
  position: absolute;
  inset: 22%;
  width: 56%;
  height: auto;
  margin: auto;
  z-index: 1;
  display: none;
}

.logo-stage.is-fallback .logo-fallback {
  display: block;
}

.logo-stage.is-fallback .logo-canvas {
  display: none;
}

.logo-floor {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 12%;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--floor), transparent 70%);
  filter: blur(4px);
  opacity: 0;
  transition: opacity 1s var(--ease) 0.4s;
}

.logo-stage.is-assembled .logo-floor {
  opacity: 1;
}

.logo-stage--hero.is-assembled .logo-floor {
  animation: floor 5.7s ease-in-out infinite;
}

@keyframes floor {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(0.9); opacity: 0.8; }
}

/* ==========================================================================
   Pillars scroll story
   ========================================================================== */
.pillars {
  position: relative;
  height: 360vh;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.pillars-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.pillars-panels {
  display: grid;
}

/* Panels share one grid cell so the container sizes to the tallest panel. */
.pillar-panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease-out);
}

.pillar-panel.is-past {
  transform: translateY(-28px);
}

.pillar-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.pillar-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 12px;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  text-wrap: balance;
}

html[lang="ar"] .pillar-title {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.5;
  letter-spacing: 0;
}

.pillar-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 24px;
}

.pillars-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.pillars-index li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.3s var(--ease);
}

.pillars-index li.is-active {
  color: var(--ink);
}

.pillars-bar {
  display: block;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.pillars-bar i {
  display: block;
  height: 100%;
  background: var(--green);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
}

html[dir="rtl"] .pillars-bar i {
  transform-origin: right center;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-block: 128px;
}

.section--tint {
  background: var(--paper-2);
}

.section--dark {
  background:
    radial-gradient(800px 500px at 100% 0%, rgba(143, 211, 176, 0.08), transparent 70%),
    var(--forest);
  color: var(--ink-inv);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   App icons & status
   ========================================================================== */
.app-icon {
  --s: 44px;
  position: relative;
  flex-shrink: 0;
  width: var(--s);
  height: var(--s);
  display: grid;
  place-items: center;
  border-radius: calc(var(--s) * 0.26);
}

.app-icon--xs { --s: 22px; }
.app-icon--sm { --s: 32px; }
.app-icon--md { --s: 44px; }
.app-icon--lg { --s: 56px; }

/* Live products: their own logo on a white tile, like an app icon. */
.app-icon--logo {
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(15, 26, 22, 0.08), 0 1px 2px rgba(15, 26, 22, 0.08), 0 4px 12px -6px rgba(15, 26, 22, 0.25);
}

.app-icon--logo img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.app-icon--logo.is-full img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* Products sharing the Lambda mark carry a small badge naming the product. */
.app-badge {
  position: absolute;
  inset-inline-end: -4px;
  bottom: -4px;
  width: 44%;
  height: 44%;
  min-width: 15px;
  min-height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #FFFFFF;
  box-shadow: 0 0 0 2px var(--paper);
}

.app-badge .icon {
  width: 62%;
  height: 62%;
}

.app-icon--xs .app-badge {
  display: none;
}

.app-icon--sm .app-badge {
  inset-inline-end: -5px;
  bottom: -5px;
}

/* Roadmap products: one-tone line icon, no colour of their own. */
.app-icon--line {
  color: var(--ink-2);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.app-icon--line .icon {
  width: 52%;
  height: 52%;
}

.app-icon--xs.app-icon--line .icon {
  width: 64%;
  height: 64%;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--live { color: var(--green); background: var(--green-50); border-color: transparent; }
.status--beta { color: var(--blue); background: var(--blue-50); border-color: transparent; }
.status--dev  { color: var(--ink); }

.section--dark .status--live { color: var(--green-inv); background: rgba(143, 211, 176, 0.12); }
.section--dark .status--beta { color: #9CC4E6; background: rgba(141, 187, 224, 0.12); }

.status--live::before {
  box-shadow: 0 0 0 0 currentColor;
  animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ==========================================================================
   Hero strips: the suite and who it is for
   ========================================================================== */
.suite-strip,
.built-for {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
}

.suite-strip {
  padding-block: 28px;
}

.built-for {
  padding-block: 22px 32px;
}

.suite-strip::before,
.built-for::before,
.footer-base::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: var(--gutter);
  height: 1px;
  background: var(--line);
}

.strip-label {
  flex-shrink: 0;
  min-width: 72px;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.suite-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.suite-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-latin);
  font-size: 0.925rem;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.suite-more {
  border-radius: 12px !important;
}

html[dir="rtl"] .suite-item {
  padding: 5px 5px 5px 14px;
}

.suite-item .app-icon {
  --s: 30px;
}

.suite-item:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.suite-more {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  font-size: 0.875rem;
  color: var(--ink-3);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.suite-more:hover {
  color: var(--green);
  border-color: var(--green);
}

.built-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
}

.built-list li {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}

html[lang="ar"] .built-list li {
  letter-spacing: 0;
  font-size: 0.95rem;
}

/* Product chips inside the pillar story */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-latin);
  font-size: 0.9rem;
  font-weight: 500;
}

html[dir="rtl"] .chip {
  padding: 5px 5px 5px 14px;
}

.chip .app-icon {
  --s: 26px;
}

.chip em {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-3);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--paper-2);
}

/* ==========================================================================
   Products spotlight (dark)
   ========================================================================== */
.section--products {
  padding-bottom: 0;
}

.section--products .section-head {
  margin-bottom: 0;
}

/* One scroll step per product; the stage stays pinned while the track scrolls. */
.spot-track {
  position: relative;
  height: calc(100vh + 5 * 62vh);
}

.spot-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}

.spot-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.spot-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 16px;
  border: 1px solid var(--line-inv);
  border-radius: var(--r);
  text-align: start;
  color: var(--ink-inv-3);
  overflow: hidden;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.spot-tab .app-icon {
  filter: opacity(0.6);
  transition: filter 0.3s var(--ease), transform 0.4s var(--ease-out);
}

.spot-tab:hover {
  color: var(--ink-inv-2);
  border-color: var(--line-inv-2);
}

.spot-tab.is-active {
  color: var(--ink-inv);
  border-color: rgba(143, 211, 176, 0.5);
  background: rgba(244, 242, 236, 0.06);
}

.spot-tab:hover .app-icon,
.spot-tab.is-active .app-icon {
  filter: none;
}

.spot-tab.is-active .app-icon {
  transform: scale(1.06);
}

.spot-tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.spot-tab-text strong {
  font-family: var(--font-latin);
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.spot-tab-text span {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-tab.is-active .spot-tab-text span {
  color: var(--green-inv);
}

/* Progress through each product's scroll step */
.spot-bar {
  position: absolute;
  inset-inline: 12px;
  bottom: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-inv);
  overflow: hidden;
}

.spot-bar i {
  display: block;
  height: 100%;
  background: var(--green-inv);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
}

html[dir="rtl"] .spot-bar i {
  transform-origin: right center;
}

.spot-stage {
  display: grid;
  margin-top: 14px;
}

.spot-pane {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
  padding: 44px;
  border: 1px solid var(--line-inv);
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 360px at 85% 20%, rgba(63, 127, 182, 0.14), transparent 70%),
    #0F2C21;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease-out);
}

html[dir="rtl"] .spot-pane {
  background:
    radial-gradient(600px 360px at 15% 20%, rgba(63, 127, 182, 0.14), transparent 70%),
    #0F2C21;
}

:root[data-theme="dark"] .spot-pane {
  background-color: #10291F;
}

.spot-pane.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Preview animations replay each time a product comes into view. */
.spot-pane:not(.is-active) .mock,
.spot-pane:not(.is-active) .mock * {
  animation: none !important;
}

.spot-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.spot-count {
  margin-inline-start: auto;
  font-size: 0.8rem;
  color: var(--ink-inv-3);
  letter-spacing: 0.04em;
}

.spot-kind {
  font-size: 0.9rem;
  color: var(--green-inv);
  margin-bottom: 10px;
}

.spot-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
  text-wrap: balance;
}

html[lang="ar"] .spot-title {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.55;
  letter-spacing: 0;
}

.spot-copy .check-list li {
  font-size: 1rem;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ----------------------------- Mock windows ----------------------------- */
.mock {
  --m-bg: #FBFAF6;
  --m-ink: #0F1A16;
  --m-2: #4F5C56;
  --m-3: #86908B;
  --m-line: #E6E2D8;
  --m-soft: #F1EEE6;
  --m-code: #0E1A15;
  --m-accent: #1F4E79;
  position: relative;
  min-height: 320px;
  background: var(--m-bg);
  color: var(--m-ink);
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--font-latin), "IBM Plex Sans Arabic", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 60px -10px rgba(0, 0, 0, 0.45);
  animation: mock-in 0.6s var(--ease-out);
}

:root[data-theme="dark"] .mock {
  --m-bg: #17231E;
  --m-ink: #ECEAE3;
  --m-2: #B6BDB8;
  --m-3: #86908B;
  --m-line: rgba(236, 234, 227, 0.1);
  --m-soft: rgba(236, 234, 227, 0.06);
  --m-code: #0B1310;
  --m-accent: #8DBBE0;
}

@keyframes mock-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--m-line);
}

.mock-bar b {
  font-weight: 600;
}

.mock-dots {
  display: inline-flex;
  gap: 5px;
}

.mock-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--m-line);
}

.mock-rec,
.mock-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--m-soft);
  color: var(--m-2);
}

.mock-rec {
  color: #2E8A61;
  background: rgba(46, 138, 97, 0.1);
}

.mock-rec::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.25; }
}

.mock-pill--time {
  font-family: "Geist Mono", ui-monospace, monospace;
  color: var(--m-ink);
}

.mock-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.mock-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--m-line);
  border-radius: 12px;
  background: var(--m-bg);
}

.mock-card--accent {
  border-color: rgba(46, 138, 97, 0.4);
  background: rgba(46, 138, 97, 0.08);
  animation: fade-up 0.6s var(--ease-out) 0.5s backwards;
}

.mock-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2E8A61;
}

.mock-card strong {
  font-size: 14px;
  font-weight: 600;
}

.mock-meta {
  font-size: 12px;
  color: var(--m-3);
}

/* Meet */
.tx-line {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  animation: fade-up 0.5s var(--ease-out) backwards;
}

.tx-line:nth-child(2) { animation-delay: 0.15s; }
.tx-line:nth-child(3) { animation-delay: 0.3s; }

.tx-who {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--h);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
}

.tx-line p {
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 4px 12px 12px 12px;
  background: var(--m-soft);
  display: inline-block;
  unicode-bidi: plaintext;
}

.tx-tags {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.tx-tags i {
  font-style: normal;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--m-line);
  color: var(--m-2);
}

.tx-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.tx-wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--m-3);
  animation: wave 1s ease-in-out infinite;
}

.tx-wave i:nth-child(2) { animation-delay: 0.1s; }
.tx-wave i:nth-child(3) { animation-delay: 0.2s; }
.tx-wave i:nth-child(4) { animation-delay: 0.3s; }
.tx-wave i:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(1); }
}

/* Lab */
.cm-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.cm-progress {
  display: block;
  height: 6px;
  border-radius: 4px;
  background: var(--m-soft);
  overflow: hidden;
}

.cm-progress i {
  display: block;
  height: 100%;
  width: var(--p);
  border-radius: inherit;
  background: linear-gradient(90deg, #165B3E, #3B739E);
  animation: grow 1.2s var(--ease-out) 0.2s backwards;
}

@keyframes grow {
  from { width: 0; }
}

.cm-evidence {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 16px 0 14px;
}

.cm-evidence li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--m-2);
  animation: fade-up 0.5s var(--ease-out) backwards;
}

.cm-evidence li:nth-child(1) { animation-delay: 0.3s; }
.cm-evidence li:nth-child(2) { animation-delay: 0.45s; }
.cm-evidence li:nth-child(3) { animation-delay: 0.6s; }

.cm-evidence code {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--m-3);
}

.ev-src {
  flex-shrink: 0;
  min-width: 62px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  color: var(--m-ink);
  background: var(--m-soft);
  border: 1px solid var(--m-line);
}

.cm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--m-line);
  font-size: 12px;
  color: var(--m-2);
}

.cm-actions {
  display: inline-flex;
  gap: 6px;
}

.cm-actions i {
  font-style: normal;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid var(--m-line);
  font-weight: 500;
}

.cm-actions i.is-primary {
  background: #165B3E;
  border-color: #165B3E;
  color: #fff;
}

/* TeX & Proctor */
.mock-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.mock-split--wide {
  grid-template-columns: 1.25fr 1fr;
}

.tex-src {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--m-code);
  color: #CFE3D8;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre;
  overflow: hidden;
}

.tex-src .k { color: #8FD3B0; }
.tex-src .c { color: #7F978C; }

.tex-out {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--m-line);
  border-radius: 10px;
  font-family: "Latin Modern Roman", "Computer Modern", Georgia, serif;
}

.tex-out b {
  font-size: 15px;
  margin-bottom: 2px;
}

.tex-li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
}

.tex-li::before {
  content: "•";
  position: absolute;
  left: 2px;
}

.tex-ln {
  height: 6px;
  border-radius: 3px;
  background: var(--m-line);
}

.tex-ln--s {
  width: 64%;
}

.tex-agent {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--font-latin);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--m-accent);
  background: color-mix(in srgb, var(--m-accent) 12%, transparent);
  animation: fade-up 0.5s var(--ease-out) 0.5s backwards;
}


.pr-checks {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pr-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--m-soft);
  font-size: 12.5px;
  animation: fade-up 0.45s var(--ease-out) backwards;
}

.pr-checks li:nth-child(2) { animation-delay: 0.1s; }
.pr-checks li:nth-child(3) { animation-delay: 0.2s; }
.pr-checks li:nth-child(4) { animation-delay: 0.3s; }
.pr-checks li:nth-child(5) { animation-delay: 0.4s; }

.pr-checks .is-ok::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2E8A61;
  box-shadow: 0 0 0 3px rgba(46, 138, 97, 0.18);
}

.pr-tests {
  flex-wrap: wrap;
}

.pr-tests > span:first-child {
  color: var(--m-2);
}

.pr-tests b {
  margin-left: auto;
}

.pr-tests .cm-progress {
  width: 100%;
}

/* Identity */
.mock-id {
  display: grid;
  grid-template-columns: 1fr 168px;
  align-items: center;
  gap: 20px;
  min-height: 320px;
  padding: 24px;
}

.id-browser {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  border: 1px solid var(--m-line);
  border-radius: 12px;
  text-align: center;
}

.id-browser .mock-kicker {
  color: var(--m-3);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.id-big {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--m-accent);
  margin: 6px 0;
}

.id-phone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 26px 12px 16px;
  border: 6px solid #13201B;
  border-radius: 28px;
  background: var(--m-bg);
  text-align: center;
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.35);
  animation: fade-up 0.6s var(--ease-out) 0.2s backwards;
}

:root[data-theme="dark"] .id-phone {
  border-color: #33453D;
}

.id-notch {
  position: absolute;
  top: 7px;
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: #13201B;
}

:root[data-theme="dark"] .id-notch {
  background: #33453D;
}

.id-phone .mock-kicker {
  color: var(--m-accent);
}

.id-nums {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}

.id-nums i {
  font-style: normal;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--m-line);
  font-weight: 600;
}

.id-nums .is-match {
  background: #1F4E79;
  border-color: #1F4E79;
  color: #fff;
  animation: match 2.2s var(--ease) infinite;
}

@keyframes match {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 127, 182, 0.5); }
  60%      { box-shadow: 0 0 0 9px rgba(63, 127, 182, 0); }
}

.id-face {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--m-2);
}

.id-face .icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Platform: flow and proof points
   ========================================================================== */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.flow-step {
  position: relative;
  padding: 28px 26px 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* Connector between steps */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  inset-inline-end: -13px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 1.5px solid var(--line-2);
  border-inline-end: 1.5px solid var(--line-2);
  background: var(--paper);
  transform: rotate(45deg);
}

html[dir="rtl"] .flow-step:not(:last-child)::after {
  transform: rotate(-45deg);
}

.flow-step.is-done {
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: var(--green-50);
}

.flow-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.flow-num {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-3);
}

.flow-step h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

html[lang="ar"] .flow-step h3 {
  letter-spacing: 0;
  font-size: 1.15rem;
}

.flow-step p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.flow-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  font-size: 0.95rem;
  color: var(--ink-2);
  text-align: center;
}

.why-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 112px 0 32px;
}

html[lang="ar"] .why-title {
  letter-spacing: 0;
  font-size: 1.25rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.why {
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}

.why-icon {
  display: block;
  color: var(--green);
  margin-bottom: 16px;
}

.why-icon .icon {
  width: 26px;
  height: 26px;
}

.why h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

html[lang="ar"] .why h4 {
  letter-spacing: 0;
  font-size: 1.05rem;
}

.why p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
}

.why-stat {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Roadmap
   ========================================================================== */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.road {
  perspective: 1400px;
}

.road-inner {
  position: relative;
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease-out);
}

.road.is-flipped .road-inner {
  transform: rotateY(180deg);
}

html[dir="rtl"] .road.is-flipped .road-inner {
  transform: rotateY(-180deg);
}

.road-face {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 30px 28px;
  border-radius: var(--r-lg);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Front: hairline gradient border, soft depth, a quiet sheen on hover. */
.road-front {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 92%, var(--paper-2))) padding-box,
    linear-gradient(160deg, color-mix(in srgb, var(--green) 30%, var(--line)), var(--line) 38%, var(--line) 62%, color-mix(in srgb, var(--blue) 30%, var(--line))) border-box;
  box-shadow: 0 1px 2px rgba(15, 26, 22, 0.04), 0 18px 40px -24px rgba(15, 26, 22, 0.28);
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.road-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at 100% 0%, color-mix(in srgb, var(--green) 8%, transparent), transparent 70%);
  pointer-events: none;
}

html[dir="rtl"] .road-front::before {
  background: radial-gradient(420px 200px at 0% 0%, color-mix(in srgb, var(--green) 8%, transparent), transparent 70%);
}

.road:not(.is-flipped):hover .road-front {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(15, 26, 22, 0.05), 0 28px 56px -28px rgba(15, 26, 22, 0.4);
}

.road-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
}

.road .app-icon--line {
  color: var(--green);
  background: linear-gradient(145deg, var(--green-50), var(--blue-50));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 18%, transparent);
}

.road h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.road-kind {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin: 2px 0 14px;
}

.road-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-2);
  padding-inline-end: 44px;
}

/* The (i) button: flips the card to its details. */
.road-flip {
  position: absolute;
  inset-inline-end: 18px;
  bottom: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-2), 0 6px 16px -8px rgba(15, 26, 22, 0.35);
  transition: color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.3s var(--ease);
}

.road-flip:hover {
  color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 8px 20px -8px rgba(15, 26, 22, 0.4);
  transform: scale(1.06);
}

/* Back: the deep forest panel, like the products section. */
.road-back {
  transform: rotateY(180deg);
  color: var(--ink-inv);
  background:
    radial-gradient(360px 220px at 100% 0%, rgba(63, 127, 182, 0.22), transparent 70%),
    linear-gradient(160deg, #123A2B, #0B241B);
  border: 1px solid rgba(143, 211, 176, 0.22);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
}

.road-back-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-inv);
}

.road-back-head .latin {
  font-size: 1.15rem;
  font-weight: 600;
}

.road-back-head .road-kind {
  margin: 0;
  color: var(--green-inv);
}

.road-label {
  font-size: 0.8rem;
  color: var(--ink-inv-3);
  margin-bottom: 12px;
}

.road-back .check-list {
  gap: 9px;
}

.road-back .check-list li {
  font-size: 0.9rem;
}

.road-for {
  margin-top: auto;
  padding-top: 16px;
  padding-inline-end: 44px;
  font-size: 0.9rem;
  font-weight: 500;
}

.road-for span {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink-inv-3);
}

.road-flip--back {
  color: var(--ink-inv);
  background: rgba(244, 242, 236, 0.08);
  box-shadow: 0 0 0 1px var(--line-inv-2);
}

.road-flip--back:hover {
  color: var(--green-inv);
  box-shadow: 0 0 0 1px var(--green-inv);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact {
  background: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: start;
}

.contact-title {
  font-size: clamp(2.4rem, 4.4vw, 3.75rem);
}

.contact-channels {
  margin-top: 44px;
  border-top: 1px solid var(--line-2);
}

.contact-channels div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line-2);
}

.contact-channels dt {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.contact-channels dd {
  font-weight: 500;
}

.contact-channels a {
  font-family: var(--font-latin);
  unicode-bidi: isolate;
  transition: color 0.2s var(--ease);
}

.contact-channels a:hover {
  color: var(--green);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-group legend {
  padding: 0;
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--r);
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.segmented label {
  position: relative;
}

.segmented input,
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.segmented input:focus-visible + span,
.choice:has(input:focus-visible) {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

html[dir="rtl"] .choice {
  padding: 9px 9px 9px 12px;
}

.choice .app-icon {
  --s: 26px;
}

.choice:hover {
  border-color: var(--line-2);
}

.choice:has(input:checked) {
  border-color: var(--green);
  background: var(--green-50);
}

.choice-plus {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.field span {
  font-size: 0.875rem;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 91, 62, 0.12);
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-note {
  max-width: 280px;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--forest);
  color: var(--ink-inv-2);
  padding-top: 88px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 0.8fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
}

.brand--footer {
  color: var(--ink-inv);
  margin-bottom: 20px;
}

.brand--footer .brand-mark {
  filter: none;
  width: 44px;
  padding: 6px;
  background: #F7F5EF;
  border-radius: 10px;
}

.footer-about {
  max-width: 340px;
  line-height: 1.7;
}

.footer-col h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-inv);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--ink-inv);
}

.footer-col a[dir="ltr"] {
  font-family: var(--font-latin);
}

.footer-base {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  font-size: 0.875rem;
  color: var(--ink-inv-3);
}

.site-footer .footer-base::before {
  background: var(--line-inv);
}

.footer-base .text-link {
  color: var(--ink-inv-2);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .spot-tab {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .spot-pane {
    gap: 40px;
    padding: 36px;
  }

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

/* Stacked products: no pinning, each product card appears as it scrolls in.
   Keep this query in sync with STACKED in app.js. */
@media (max-width: 1040px), (max-height: 640px) {
  .section--products {
    padding-bottom: 128px;
  }

  .section--products .section-head {
    margin-bottom: 48px;
  }

  .spot-track {
    height: auto;
  }

  .spot-sticky {
    position: static;
    height: auto;
    display: block;
  }

  .spot-tabs {
    display: none;
  }

  .spot-stage {
    margin-top: 0;
    gap: 20px;
  }

  .spot-pane {
    grid-area: auto;
  }
}

@media (max-width: 1040px) {
  :root {
    --header-h: 68px;
  }

  .spot-pane {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .primary-nav,
  .header-cta {
    display: none;
  }

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

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
  }

  .logo-stage--hero {
    order: -1;
    max-width: 340px;
    margin-bottom: -16px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .logo-stage--story {
    max-width: min(300px, 34vh);
  }

  .pillars-index {
    margin-top: 20px;
  }

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

  .flow-step::after {
    display: none;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

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

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

@media (max-width: 680px) {
  :root {
    --gutter: 20px;
  }

  .section {
    padding-block: 88px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .header-actions {
    gap: 8px;
  }

  .menu-toggle-label {
    display: none;
  }

  .logo-stage--hero {
    max-width: 260px;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  html[lang="ar"] .hero-title {
    font-size: 1.8rem;
  }

  .hero-lead {
    font-size: 1.0625rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 44px;
  }

  .hero-actions .text-link {
    justify-content: center;
  }

  .fact dd {
    font-size: 1.75rem;
  }

  .fact {
    padding-inline-end: 12px;
  }

  .fact + .fact {
    padding-inline-start: 12px;
  }

  .suite-strip,
  .built-for {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .built-list {
    gap: 4px 20px;
  }

  .built-list li {
    font-size: 0.95rem;
  }

  .pillar-desc {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .pillars-index li {
    font-size: 0.75rem;
  }

  .spot-pane {
    padding: 24px 18px;
  }

  .spot-copy .check-list li {
    font-size: 0.95rem;
  }

  .mock {
    min-height: 0;
  }

  .mock-split,
  .mock-split--wide {
    grid-template-columns: 1fr;
  }

  .mock-id {
    grid-template-columns: 1fr 140px;
    gap: 12px;
    padding: 16px;
    min-height: 0;
  }

  .id-big {
    font-size: 40px;
  }

  .flow,
  .why-grid,
  .roadmap-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .why-title {
    margin-top: 80px;
  }

  .why-grid {
    gap: 28px;
  }

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

  .contact-form {
    padding: 24px 20px;
  }

  .segmented span {
    padding: 10px 4px;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .form-foot .btn {
    width: 100%;
  }

  .contact-channels div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 400px) {
  .mock-id {
    grid-template-columns: 1fr;
  }

  .lang-switch {
    font-size: 0.85rem;
  }
}

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

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

  .intro,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Theme toggle
   ========================================================================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.theme-toggle:hover {
  color: var(--ink);
  background: var(--green-50);
}

.theme-icon {
  grid-area: 1 / 1;
  transition: transform 0.5s var(--ease-out), opacity 0.3s var(--ease);
}

/* Light theme shows the moon (go dark); dark theme shows the sun (go light). */
.theme-icon--sun,
:root[data-theme="dark"] .theme-icon--moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

:root[data-theme="dark"] .theme-icon--sun {
  opacity: 1;
  transform: none;
}
