/* ═══════════════════════════════════════════
   TAQNIYA v3 — Enterprise Design System
   Sovereign Data Intelligence for the GCC
   ═══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  color-scheme: dark;

  /* Brand ramp — anchored on the calligraphy logo's ink, #212C85 */
  --brand-900: #0B1038;
  --brand-800: #141C5C;
  --brand-700: #212C85;
  --brand-600: #2A38A6;
  --brand-500: #2049CE;
  --brand-400: #2C6BFF;
  --brand-300: #5C97FF;
  --brand-200: #9BC0FF;

  /* Channel triplets — every translucent colour resolves through these,
     so a theme swap only needs to redefine the four lines below. */
  --brand-rgb: 44,107,255;
  --brand2-rgb: 33,44,133;
  --ink-rgb: 255,255,255;
  --bg-rgb: 6,11,24;
  --shadow-rgb: 0,0,0;

  --bg: #060B18;
  --bg-subtle: #080E22;
  --bg-card: #0B1330;
  --surface: rgba(var(--ink-rgb),0.03);
  --surface-border: rgba(var(--ink-rgb),0.06);
  --surface-hover: rgba(var(--ink-rgb),0.07);

  --primary: var(--brand-400);
  --primary-glow: var(--brand-300);
  --primary-dim: rgba(var(--brand-rgb),0.15);
  --accent: var(--brand-300);
  --accent-glow: var(--brand-200);
  --accent-dim: rgba(var(--brand2-rgb),0.12);
  --danger: #F97066;
  --warn: #FBBF24;

  --text: #EEF3FB;
  --text-secondary: #97A6C4;
  --text-muted: #64748B;

  --gradient: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-400) 100%);
  --gradient-text: linear-gradient(135deg, var(--brand-300) 0%, var(--brand-200) 100%);
  --gradient-cta: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 52%, var(--brand-400) 100%);
  --gradient-mesh: linear-gradient(125deg, rgba(var(--brand-rgb),0.14) 0%, rgba(var(--brand2-rgb),0.07) 40%, rgba(var(--brand-rgb),0.05) 100%);

  --glass-bg: rgba(var(--ink-rgb),0.04);
  --glass-border: rgba(var(--ink-rgb),0.09);
  --glass-blur: 20px;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow scale */
  --shadow-1: 0 1px 2px rgba(var(--shadow-rgb),0.28);
  --shadow-2: 0 4px 14px rgba(var(--shadow-rgb),0.30);
  --shadow-3: 0 14px 40px rgba(var(--shadow-rgb),0.36);
  --shadow: var(--shadow-2);
  --shadow-glow: 0 0 40px rgba(var(--brand-rgb),0.18);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 72px;

  /* Texture overlays sit behind content in both themes */
  --grid-line: rgba(var(--ink-rgb),0.035);
  --noise-opacity: 0.035;
  --well: rgba(var(--shadow-rgb),0.25);
}


/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
dl, dt, dd { margin: 0; }

/* Skip link: hidden until focused, for keyboard and screen-reader users */
.skip-link {
  position: absolute;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--text); outline-offset: 2px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
/* Still background: a fine grid that fades out, plus one soft brand light.
   Nothing here moves. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 10%, transparent 70%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 78% 8%, rgba(var(--brand-rgb),0.13), transparent 62%),
    radial-gradient(ellipse 55% 40% at 12% 2%, rgba(var(--brand2-rgb),0.10), transparent 60%);
}
::selection { background: rgba(var(--brand-rgb),0.3); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(var(--ink-rgb),0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--ink-rgb),0.2); }

/* ── Typography ── */
.h1 {
  font-family: var(--font-heading);
  font-size: clamp(40px, 5.5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}
.h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.4vw, 24px);
  font-weight: 600;
  line-height: 1.3;
}
.g, em {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.lede {
  font-size: clamp(16px, 1.2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ── Layout ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; position: relative; }
.sec-head { text-align: center; margin-bottom: 64px; }
.sec-head .lede { margin: 16px auto 0; }

/* ── Glass Component ── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-1);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}
/* Hairline top highlight gives the glass an edge instead of a flat fill */
.glass { position: relative; }
.glass::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(var(--ink-rgb),0.18), transparent);
  pointer-events: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 10px;
  padding: 11px 26px;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(var(--brand-rgb),0.3), inset 0 1px 0 rgba(255,255,255,0.18);
  overflow: hidden;
}
/* Sheen sweeps across on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(var(--brand-rgb),0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(var(--brand-rgb),0.35), inset 0 2px 6px rgba(var(--shadow-rgb),0.25);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(var(--ink-rgb),0.15);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--text);
  background: var(--primary-dim);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--primary-glow);
  outline-offset: 3px;
}

.arr { transition: transform var(--transition); }
.btn:hover .arr { transform: translateX(4px); }

/* ── Icons ── */
/* Sprite symbols carry their own paint mode; these rules only size them. */
.ico {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.ico-sm { width: 15px; height: 15px; }
.arr { width: 17px; height: 17px; transition: transform var(--transition); }
[dir="rtl"] .arr { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(3px); }

/* ── Play Button (hero) ── */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 24px 9px 10px;
  border-radius: 100px;
  border: 1px solid rgba(var(--brand-rgb),0.35);
  background: rgba(var(--brand-rgb),0.10);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: all var(--transition);
}
[dir="rtl"] .btn-play { padding: 9px 10px 9px 24px; }
.btn-play .play-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gradient-cta);
  color: #fff;
  flex: none;
  position: relative;
  transition: transform var(--transition);
}
.btn-play .play-disc .ico { width: 15px; height: 15px; margin-left: 2px; fill: currentColor; }
[dir="rtl"] .btn-play .play-disc .ico { margin: 0 0 0 -2px; }
/* Ring pulses outward so the button reads as the thing to click */
.btn-play .play-disc::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(var(--brand-rgb),0.55);
  animation: play-ping 2.6s var(--ease-out) infinite;
}
.btn-play:hover {
  border-color: rgba(var(--brand-rgb),0.7);
  background: rgba(var(--brand-rgb),0.16);
  transform: translateY(-2px);
}
.btn-play:hover .play-disc { transform: scale(1.06); }
.btn-play:active { transform: translateY(1px); }
.btn-play:focus-visible { outline: 2px solid var(--primary-glow); outline-offset: 3px; }
.btn-play .play-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
@keyframes play-ping {
  0%   { transform: scale(0.9); opacity: 0.9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-play .play-disc::after { animation: none; }
}

/* ── Video Modal ── */
.vmodal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(var(--shadow-rgb),0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vmodal.open { display: flex; animation: vfade 0.25s var(--ease-out); }
.vmodal-panel {
  position: relative;
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: vrise 0.3s var(--ease-out);
}
.vmodal-panel iframe,
.vmodal-panel video { width: 100%; height: 100%; border: 0; display: block; }
/* Shown until a real video URL is set on the trigger */
.vmodal-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--brand-rgb),0.16), transparent 70%);
}
.vmodal-empty .ico { width: 40px; height: 40px; color: var(--primary); }
.vmodal-empty b { font-family: var(--font-heading); font-size: 17px; color: var(--text); }
.vmodal-empty span { font-size: 14px; max-width: 380px; line-height: 1.6; }
.vmodal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--shadow-rgb),0.5);
  border: 1px solid var(--glass-border);
  color: var(--text);
  z-index: 2;
  transition: all var(--transition);
}
[dir="rtl"] .vmodal-close { right: auto; left: 12px; }
.vmodal-close:hover { background: rgba(var(--shadow-rgb),0.75); border-color: var(--primary); }
@keyframes vfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vrise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ── Badge / Tag ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 12px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.5;
  color: var(--text-secondary);
  background: rgba(var(--ink-rgb),0.03);
  border: 1px solid rgba(var(--ink-rgb),0.07);
  margin-bottom: 22px;
}
[dir="rtl"] .badge { padding: 5px 12px 5px 14px; }

.badge .dot, .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.badge .dot { width: 6px; height: 6px; }
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(var(--ink-rgb),0.04);
  border: 1px solid rgba(var(--ink-rgb),0.06);
}

/* ═══════════════════════════
   SECTION 1: NAVIGATION
   ═══════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 24px 0;
  transition: padding var(--transition);
}
/* The bar is a floating capsule that tightens as the page scrolls */
.nav-inner {
  position: relative;
  /* above the mobile sheet, so the logo and close control stay reachable */
  z-index: 1001;
  max-width: 1200px;
  margin: 0 auto;
  height: calc(var(--nav-h) - 12px);
  padding: 0 12px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition), backdrop-filter var(--transition);
}
.nav.scrolled { padding-top: 8px; }
.nav.scrolled .nav-inner {
  background: rgba(var(--bg-rgb),0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--surface-border);
  box-shadow: 0 8px 30px rgba(var(--shadow-rgb),0.35), inset 0 1px 0 rgba(var(--ink-rgb),0.06);
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo svg { height: 38px; width: auto; }
.logo-mark { height: 36px; width: 36px; }
.logo-word { height: 30px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-ar {
  font-family: var(--font-arabic);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 100px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--text); background: rgba(var(--ink-rgb),0.06); }
.nav-links a.on { color: var(--text); }
.nav-links a.on::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-btn {
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--surface-border);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--primary); color: var(--text); }
.nav .btn-primary { padding: 9px 20px; font-size: 13.5px; }

/* Burger */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-burger svg { width: 22px; height: 22px; color: var(--text); }
.nav-burger .ico-close { display: none; }
.nav.open .nav-burger .ico-menu { display: none; }
.nav.open .nav-burger .ico-close { display: block; }

/* Mobile Menu */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(var(--bg-rgb),0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  padding: calc(var(--nav-h) + 24px) 24px 32px;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overscroll-behavior: contain;
}
.nav.open .nav-mobile-overlay { display: flex; animation: sheet-in 0.28s var(--ease-out); }
.nav-sheet { display: flex; flex-direction: column; }
.nav-sheet a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 2px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--surface-border);
  transition: color var(--transition);
}
.nav-sheet a:first-child { border-top: 1px solid var(--surface-border); }
.nav-sheet a .ico {
  width: 18px; height: 18px;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}
[dir="rtl"] .nav-sheet a .ico { transform: scaleX(-1); }
.nav-sheet a:active { color: var(--primary-glow); }
.nav-sheet a:active .ico { color: var(--primary-glow); transform: translateX(3px); }
[dir="rtl"] .nav-sheet a:active .ico { transform: scaleX(-1) translateX(3px); }

.nav-sheet-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-sheet-foot .btn-primary {
  justify-content: center;
  width: 100%;
  padding: 15px 26px;
  font-size: 15px;
}
.nav-sheet-foot .lang-btn {
  text-align: center;
  padding: 13px 16px;
  font-size: 15px;
}
@keyframes sheet-in { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════
   SECTION 2: HERO
   ═══════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy { position: relative; padding: 24px 0; }
/* Soft brand light behind the headline so the type sits on something */
.hero-copy::before {
  content: '';
  position: absolute;
  top: -12%; left: -22%;
  width: 118%; height: 108%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 52% 46% at 30% 38%, rgba(var(--brand-rgb),0.16), transparent 70%);
}
.hero .badge { animation: fadeInUp 0.8s var(--ease-out) both; }
.hero .h1 {
  letter-spacing: -0.035em;
  line-height: 1.02;
  animation: fadeInUp 0.8s 0.15s var(--ease-out) both;
}
.hero .h1 .g { display: inline-block; }
.hero .hero-sub {
  /* Capped so the measure stays ~62 characters instead of growing with the viewport */
  font-size: clamp(16px, 1.05vw, 18px);
  color: var(--text-secondary);
  margin: 22px 0 34px;
  max-width: 30em;
  line-height: 1.68;
  animation: fadeInUp 0.8s 0.3s var(--ease-out) both;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.45s var(--ease-out) both;
}
.stat-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--surface-border);
  animation: fadeInUp 0.8s 0.6s var(--ease-out) both;
}
.stat {
  flex: none;
  padding-inline-end: 24px;
  margin-inline-end: 24px;
  border-inline-end: 1px solid var(--surface-border);
}
.stat:last-child { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
.stat b {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(26px, 2.1vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.stat span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  margin-top: 7px;
}

/* ── Scroll-driven hero ──
   On desktop the hero gets a scroll runway and the stage pins to the
   viewport, so scrolling walks the story through its four beats.
   Below 769px the visual is hidden anyway, so the hero stays a normal
   single screen. */
.hero-stage { width: 100%; }

@media (min-width: 1025px) {
  .hero {
    min-height: 0;
    height: 300vh;
    display: block;
    padding-top: 0;
    overflow: visible;      /* sticky cannot pin inside an overflow-hidden box */
  }
  .hero-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    overflow: hidden;
  }
}

/* Short laptop screens (13" MacBook Air with browser chrome ≈ 660–760px tall):
   tighten the type and spacing so the hero fits without colliding with the nav
   or the scroll hint. */
@media (min-width: 1025px) and (max-height: 780px) {
  .hero-copy { padding: 8px 0; }
  .h1 { font-size: clamp(36px, 4.6vw, 60px); }
  .hero .lede { font-size: 16px; line-height: 1.55; margin-top: 16px; }
  .hero-badge { margin-bottom: 14px; }
  .hero-actions { margin-top: 22px; }
  .stat-row { margin-top: 22px; padding-top: 16px; }
  .stat b { font-size: 26px; }
  .sov { max-width: 400px; }
  .hero-visual { padding-top: 28px; }
  .hero .scroll-hint { display: none !important; }
}
@media (min-width: 1025px) and (max-height: 680px) {
  .h1 { font-size: clamp(32px, 4vw, 50px); }
  .stat-row { display: none; }
  .sov { max-width: 350px; }
  .hero-visual { padding-top: 40px; }
}

/* Hint that there is something to scroll through */
.scroll-hint {
  position: absolute;
  bottom: 14px;
  /* under the copy column, clear of the diagram's boundary label */
  inset-inline-start: max(24px, calc((100% - 1400px) / 2 + 24px));
  display: none;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}
@media (min-width: 1025px) { .scroll-hint { display: flex; } }
.scroll-hint .rail {
  position: relative;
  width: 1px;
  height: 26px;
  background: rgba(var(--ink-rgb),0.16);
  overflow: hidden;
}
.scroll-hint .rail::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: var(--primary-glow);
  animation: hint-run 1.9s var(--ease-out) infinite;
}
/* it retires once the reader has started moving */
.hero.is-scrolling .scroll-hint { opacity: 0; }
@keyframes hint-run {
  0%   { transform: translateY(-12px); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(26px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint .rail::after { animation: none; opacity: 0.7; }
}

/* ── Hero Visual: sovereign layer stack ──
   Three planes, each carrying its own meaning: the agent on top, the
   governance check in the middle, your own data at the base. */
.sov {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 520 / 620;
  margin-inline: auto;
}
.sov-svg { width: 100%; height: 100%; overflow: visible; }

/* Each plane drifts on its own slow cycle — the offsets keep them from
   ever moving as one block. */
.plate  { animation: plate-drift 9s ease-in-out infinite; }
.plate-1 { animation-delay: -0.0s; }
.plate-2 { animation-delay: -3.0s; }
.plate-3 { animation-delay: -6.0s; }

.plate-rim {
  fill: none;
  stroke: #BFD8FF;
  stroke-width: 1.5;
  opacity: 0.85;
}
.plate-check {
  fill: none;
  stroke: #DCEAFF;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 190;
  animation: check-draw 9s var(--ease-out) infinite;
}
.plate-grid path {
  stroke: rgba(255,255,255,0.20);
  stroke-width: 1;
  fill: none;
}

/* Light travelling down the shafts, one plane after the other */
.shaft { opacity: 0.28; }
.sh1 { animation: shaft-pulse 3.6s ease-in-out infinite; }
.sh2 { animation: shaft-pulse 3.6s ease-in-out 0.6s infinite; }

/* Agent core, seated on the top plane */
.sov-core {
  position: absolute;
  top: 17.7%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-cta);
  box-shadow: 0 0 0 9px rgba(var(--brand-rgb),0.14), 0 16px 44px rgba(var(--brand-rgb),0.55);
  animation: plate-drift 9s ease-in-out infinite;
}
.sov-core-glyph {
  font-family: var(--font-arabic);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-top: -2px;
}

/* Source tiles docked into the base plane */
.sov-src {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  white-space: nowrap;
  background: rgba(var(--bg-rgb),0.92);
  border: 1px solid rgba(var(--ink-rgb),0.14);
  box-shadow: var(--shadow-2);
  transform: translate(-50%, -50%);
  animation: plate-drift 9s ease-in-out -6s infinite;
}
.sov-src .ico { width: 17px; height: 17px; color: #BFD8FF; }
.sov-src span { font-size: 11.5px; font-weight: 500; color: var(--text); }
.s1 { top: 74%; left: 30%; }
.s2 { top: 74%; left: 70%; }
.s3 { top: 87%; left: 30%; }
.s4 { top: 87%; left: 70%; }

/* Two words per tag, one per plane: the stack reads "your LLM / your rules /
   your data" at a glance, and the copy column carries the detail. */
.sov-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(var(--bg-rgb),0.86);
  border: 1px solid rgba(var(--ink-rgb),0.12);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.sov-tag .ico { color: var(--primary-glow); }
.st1 { top: 13%;   left: -6%; }
.st2 { top: 45%;   right: -7%; }
.st3 { top: 66%;   left: -12%; }

.sov-boundary {
  position: absolute;
  bottom: -3%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  white-space: nowrap;
}

@keyframes plate-drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
/* the core and the tiles share the drift but keep their own centring */
.sov-core { animation-name: core-drift; }
.sov-src  { animation-name: src-drift; }
@keyframes core-drift {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 10px)); }
}
@keyframes src-drift {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(-50%, calc(-50% - 10px)); }
}
@keyframes shaft-pulse {
  0%, 100% { opacity: 0.20; }
  50%      { opacity: 0.75; }
}
@keyframes check-draw {
  0%      { stroke-dashoffset: 190; }
  22%     { stroke-dashoffset: 0; }
  88%     { stroke-dashoffset: 0; }
  100%    { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .plate, .shaft, .sov-core, .sov-src, .plate-check { animation: none; }
  .plate-check { stroke-dashoffset: 0; }
}

/* ── Hero sequence ──
   The stack walks through the four things Taqniya actually does, so the
   motion explains the product instead of just moving. */
.sov .plate,
.sov .sov-src,
.sov .sov-core { transition: opacity 0.5s var(--ease-out), filter 0.5s var(--ease-out); }


.sov .plate-rim { opacity: 0; transition: opacity 0.5s var(--ease-out); }
.sov[data-step="1"] .plate-1 .plate-rim,
.sov[data-step="4"] .plate-1 .plate-rim { opacity: 0.9; }

.sov[data-step="1"] .sov-core,
.sov[data-step="4"] .sov-core {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(var(--brand-rgb),0.85));
}

.sov[data-step="3"] .s1 { transition-delay: 0s; }
.sov[data-step="3"] .s2 { transition-delay: 0.09s; }
.sov[data-step="3"] .s3 { transition-delay: 0.18s; }
.sov[data-step="3"] .s4 { transition-delay: 0.27s; }

/* the check only draws while governance is the active step */
.plate-check { stroke-dashoffset: 190; transition: stroke-dashoffset 0.9s var(--ease-out); animation: none; }
.sov[data-step="2"] .plate-check,
.sov[data-step="3"] .plate-check,
.sov[data-step="4"] .plate-check { stroke-dashoffset: 0; }

/* travelling light: down on the way to the data, up with the answer */
.beam {
  fill: #DCEAFF;
  opacity: 0;
  filter: drop-shadow(0 0 7px rgba(140,180,255,0.95));
}
.sov[data-step="2"] .b1 { animation: beam-down 0.85s var(--ease-out) forwards; }
.sov[data-step="3"] .b2 { animation: beam-down 0.85s var(--ease-out) forwards; }
.sov[data-step="4"] .b2 { animation: beam-up 0.7s var(--ease-out) forwards; }
.sov[data-step="4"] .b1 { animation: beam-up 0.7s 0.45s var(--ease-out) forwards; }
@keyframes beam-down {
  0%   { opacity: 0;   transform: translateY(-10px); }
  25%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0;   transform: translateY(74px); }
}
@keyframes beam-up {
  0%   { opacity: 0;   transform: translateY(74px); }
  25%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0;   transform: translateY(-10px); }
}

/* the shafts brighten only while something is flowing through them */
.shaft { opacity: 0.18; transition: opacity 0.45s var(--ease-out); animation: none; }
.sov[data-step="2"] .sh1,
.sov[data-step="4"] .sh1 { opacity: 0.7; }
.sov[data-step="3"] .sh2,
.sov[data-step="4"] .sh2 { opacity: 0.7; }

/* the payoff: the answer surfacing back at the top */
.sov-answer {
  position: absolute;
  top: 6.5%; left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: 100px;
  background: rgba(var(--bg-rgb),0.94);
  border: 1px solid rgba(var(--brand-rgb),0.55);
  box-shadow: 0 8px 24px rgba(var(--shadow-rgb),0.45), 0 0 0 5px rgba(var(--brand-rgb),0.09);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  pointer-events: none;
}
.sov-answer .ico { color: var(--primary-glow); }
.sov-answer b { font-family: var(--font-heading); font-size: 13px; font-weight: 700; color: var(--text); }
.sov-answer span { font-family: var(--font-mono); font-size: 11px; color: var(--primary-glow); }
.sov[data-step="4"] .sov-answer { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.75s; }


.sov-boundary { bottom: -4%; }

/* the tag for the active beat picks up the brand ring; the rest stay legible */
.sov[data-step="1"] .st1,
.sov[data-step="4"] .st1,
.sov[data-step="2"] .st2,
.sov[data-step="3"] .st3 {
  border-color: rgba(var(--brand-rgb),0.55);
  box-shadow: var(--shadow-2), 0 0 0 4px rgba(var(--brand-rgb),0.10);
}

/* Reduced motion: the sequence still steps through its four beats (opacity and
   glow only) but nothing travels — no beams, no parallax, no float. */
@media (prefers-reduced-motion: reduce) {
  .beam { display: none; }
}

/* Each source is wired to the query point, so it is visible that Taqniya
   reads from all of them in place rather than moving anything. */
.src-links path {
  fill: none;
  stroke: #7FB2FF;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.src-hub {
  fill: #DCEAFF;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.sov[data-step="3"] .src-links path,
.sov[data-step="4"] .src-links path { opacity: 0.9; }
.sov[data-step="3"] .src-hub,
.sov[data-step="4"] .src-hub { opacity: 1; }
/* pulls inward while the query is running */
.sov[data-step="3"] .src-links path { animation: link-flow 1.1s linear infinite; }
.sov[data-step="3"] .src-hub { animation: hub-beat 1.1s ease-in-out infinite; }
@keyframes link-flow { to { stroke-dashoffset: -24; } }
@keyframes hub-beat {
  0%, 100% { r: 5; opacity: 0.85; }
  50%      { r: 7.5; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .src-links path, .src-hub { animation: none; opacity: 0.7; }
}

/* Between 769 and 1024 the hero is a single centred column, so the labels
   move out of the diagram's path instead of overlapping the source pills. */
@media (max-width: 1024px) {
  .sov { max-width: 420px; }
  .sov-tag { font-size: 10.5px; padding: 7px 12px; }
  .st1 { top: 6%;  left: -22%; right: auto; }
  .st2 { top: 42%; right: -22%; left: auto; }
  .st3 { top: 58%; left: -26%; right: auto; }
}
@media (max-width: 860px) {
  .sov-tag { display: none; }   /* no room left; the copy above carries it */
}

/* On phones the stack still appears: it is the clearest statement of what
   the product does. Compact, tags off, sources kept. */
@media (max-width: 768px) {
  .hero-visual { display: block; margin: 44px auto 0; max-width: 330px; }
  .sov { max-width: 330px; }
  .sov-core { width: 46px; height: 46px; }
  .sov-core-glyph { font-size: 21px; }
  .sov-src { padding: 5px 8px; gap: 5px; border-radius: 8px; }
  .sov-src .ico { width: 13px; height: 13px; }
  .sov-src span { font-size: 9.5px; }
  .sov-ask, .sov-answer { font-size: 11.5px; padding: 7px 12px; }
  .sov-answer b { font-size: 12.5px; }
  .sov-boundary { font-size: 9px; letter-spacing: 0.14em; bottom: -8%; }
}

/* ── Resting state and emphasis ──
   The whole stack is present from the first frame, so a visitor who never
   scrolls still sees what the product does. Scrolling then walks a highlight
   and the flow of light through it. */

/* one-time entrance: the fused slab fades in with the page, then the
   sequencer peels it apart */
.sov { animation: sov-in 0.9s var(--ease-out) 0.15s backwards; }
@keyframes sov-in {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: none; }
}
.sov .shaft { opacity: 0.5; animation: none; }

/* the layer being described lifts and lights; the others stay fully legible */
.sov .plate { transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out); }
.sov .plate-face { transition: filter 0.6s var(--ease-out); }
.sov .plate-rim { opacity: 0; transition: opacity 0.6s var(--ease-out); }

.sov[data-step="1"] .plate-1,
.sov[data-step="4"] .plate-1,
.sov[data-step="2"] .plate-2,
.sov[data-step="3"] .plate-3 {
  filter: drop-shadow(0 10px 36px rgba(var(--brand-rgb),0.65)) brightness(1.12);
}
.sov[data-step="1"] .plate-1 .plate-rim,
.sov[data-step="4"] .plate-1 .plate-rim,
.sov[data-step="2"] .plate-2 .plate-rim,
.sov[data-step="3"] .plate-3 .plate-rim { opacity: 0.95; }

/* the governance check is drawn at rest; it re-strikes on its own beat */
.plate-check { stroke-dashoffset: 0; }
.sov[data-step="2"] .plate-check { animation: check-strike 0.8s var(--ease-out); }
@keyframes check-strike {
  from { stroke-dashoffset: 190; }
  to   { stroke-dashoffset: 0; }
}

/* shafts brighten as the query passes through them */
.sov .shaft { transition: opacity 0.5s var(--ease-out); }
.sov[data-step="2"] .sh1,
.sov[data-step="4"] .sh1 { opacity: 0.95; }
.sov[data-step="3"] .sh2,
.sov[data-step="4"] .sh2 { opacity: 0.95; }

/* sources sit on the plane at rest and light up when queried */
.sov .sov-src { transition: border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.sov[data-step="3"] .sov-src,
.sov[data-step="4"] .sov-src {
  border-color: rgba(var(--brand-rgb),0.6);
  box-shadow: var(--shadow-2), 0 0 0 4px rgba(var(--brand-rgb),0.10);
}

@media (prefers-reduced-motion: reduce) {
  .sov { animation: none; }
  .plate-check { animation: none; stroke-dashoffset: 0; }
}

/* The question and the answer occupy the same seat, so the loop reads as
   one thought: what you asked becomes what you got back. */
/* Anchored to the top edge and lifted by its own height, so it clears the
   agent plane at every container size instead of relying on a percentage. */
.sov-ask,
.sov-answer {
  position: absolute;
  top: 0; left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  /* squared off rather than a capsule, and lighter */
  border-radius: 9px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-58% + 8px)) scale(0.97);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  pointer-events: none;
}
.sov-ask {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-secondary);
  background: rgba(var(--bg-rgb),0.9);
  border: 1px solid rgba(var(--ink-rgb),0.14);
  box-shadow: var(--shadow-2);
}
.sov-ask-q {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-glow);
  line-height: 0;
  position: relative;
  top: 5px;
}
.sov[data-step="1"] .sov-ask { opacity: 1; transform: translate(-50%, -58%) scale(1); }
/* it sinks away as the query descends */
.sov[data-step="2"] .sov-ask { opacity: 0; transform: translate(-50%, calc(-58% + 14px)) scale(0.97); }

.sov[data-step="4"] .sov-answer {
  opacity: 1;
  transform: translate(-50%, -58%) scale(1);
  transition-delay: 0.8s;
}


/* Slower, matched easing everywhere so the beats hand over rather than snap */
.sov .plate,
.sov .sov-src,
.sov .sov-core,
.sov-tag { transition-duration: 0.62s; }

.sov-boundary { bottom: -6.5%; }

@media (prefers-reduced-motion: reduce) {
  .sov-ask, .sov-answer { transition-duration: 0.01s; transition-delay: 0s; }
}

/* ═══════════════════════════
   SECTION 3: PRODUCT SHOWCASE
   ═══════════════════════════ */
.showcase { padding-bottom: 80px; }
.wb-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(10,17,40,0.6);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), var(--shadow-glow);
  max-width: 960px;
  margin: 0 auto;
}
.wb-titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--well);
  border-bottom: 1px solid var(--surface-border);
}
.wb-dots { display: flex; gap: 7px; }
.wb-dots i {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: block;
}
.wb-dots i:nth-child(1) { background: #FF5F57; }
.wb-dots i:nth-child(2) { background: #FFBD2E; }
.wb-dots i:nth-child(3) { background: #28C840; }
.wb-url {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.wb-tabs { display: flex; gap: 4px; }
.wb-tab {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.wb-tab.on { background: var(--primary-dim); color: var(--primary); }
.wb-body { padding: 24px; }
.wb-prompt { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.wb-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.wb-avatar.you { background: var(--primary-dim); color: var(--primary); }
.wb-avatar.ai { background: var(--accent-dim); color: var(--accent); }
.wb-bubble {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 85%;
  color: var(--text-secondary);
}
.wb-bubble.you { background: rgba(var(--brand-rgb),0.08); border: 1px solid rgba(var(--brand-rgb),0.12); color: var(--text); }
.wb-bubble.ai {
  background: rgba(var(--brand2-rgb),0.06);
  border: 1px solid rgba(var(--brand2-rgb),0.1);
  min-height: 52px;
  position: relative;
}
.wb-bubble.ai .cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
.wb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding-left: 44px;
}
.wb-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(var(--ink-rgb),0.03);
  border: 1px solid rgba(var(--ink-rgb),0.06);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s var(--ease-out);
}
.wb-tool.visible { opacity: 1; transform: translateY(0); }
.wb-tool .ic {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.bar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  padding-left: 44px;
}
.wb-tblwrap { overflow-x: auto; }
.wb-tbl {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
}
.wb-tbl-h {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  padding: 10px 14px;
  background: rgba(var(--ink-rgb),0.04);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wb-tbl-r {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  padding: 10px 14px;
  font-size: 13px;
  border-top: 1px solid var(--surface-border);
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s var(--ease-out);
}
.wb-tbl-r.visible { opacity: 1; transform: translateX(0); }
.wb-tbl-r:hover { background: rgba(var(--ink-rgb),0.02); }
.wb-cell-n { color: var(--text); font-weight: 500; }
.wb-cell-d { color: var(--accent); font-weight: 600; }
.wb-cell-warn { color: var(--danger); font-weight: 600; }
.wb-chartwrap { padding: 0 8px; }
.wb-chart-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.wb-chart-h b { font-size: 13px; color: var(--text); }
.wb-chart-h span { font-size: 11px; color: var(--text-muted); }
.wb-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 140px;
}
.wb-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.wb-bar .v { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.wb-bar .h {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--gradient);
  transition: height 1s var(--ease-out);
  min-height: 2px;
}
.wb-bar .l { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.wb-caption {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  font-style: italic;
}

/* ═══════════════════════════
   SECTION 4: ARCHITECTURE
   ═══════════════════════════ */
.arch { overflow: hidden; }
.arch-diagram {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.arch-svg {
  width: 100%;
  height: auto;
}
/* Layer cards for architecture */
.arch-layers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.arch-layer {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--surface-border);
  position: relative;
  transition: none;
}
.arch-layers > .arch-layer:last-of-type { border-bottom: 0; }
.arch-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-glow);
}
.arch-icon .ico { width: 22px; height: 22px; }
.arch-layer-content { flex: 1; }
.arch-layer-content h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.arch-layer-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* Animated flow connector between layers */
.arch-flow-line { display: none; }
.arch-flow-line-unused {
  width: 2px;
  height: 32px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.arch-flow-line::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  animation: dash-flow-vertical 1.5s linear infinite;
}
@keyframes dash-flow-vertical {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
/* VPC Boundary */
.vpc-boundary {
  border: 1px dashed rgba(var(--brand-rgb),0.28);
  border-radius: var(--radius-lg);
  padding: 12px 36px 30px;
  position: relative;
  margin-top: 32px;
}
.vpc-label {
  position: absolute;
  top: -12px; left: 32px;
  background: var(--bg);
  padding: 2px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vpc-sublabel {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.vpc-sublabel .lock { color: var(--accent); font-size: 16px; }

/* ═══════════════════════════
   SECTION 5: CONNECTORS
   ═══════════════════════════ */
.connectors { overflow: hidden; }
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  margin-bottom: 16px;
}
.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scroll-left 40s linear infinite;
}
.carousel-track.reverse { animation: scroll-right 40s linear infinite; }
.carousel-track.paused { animation-play-state: paused; }
.connector-icon {
  width: 80px; height: 80px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
  transition: all var(--transition);
  cursor: default;
}
.connector-icon:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(var(--brand-rgb),0.15);
}
.connector-icon svg { width: 28px; height: 28px; fill: var(--text-secondary); }
.connector-icon .ci-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.connector-icon .ci-icon {
  font-size: 24px;
  line-height: 1;
}
.model-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.model-strip .model-badge {
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
}
.model-strip .model-badge:hover {
  border-color: var(--primary);
  color: var(--text);
}

/* ═══════════════════════════
   SECTION 6: ENTERPRISE DIFF
   ═══════════════════════════ */
.differ-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--surface-border);
}
/* No boxes — the grid lines do the separating */
.differ-card {
  padding: 44px 48px;
  border-bottom: 1px solid var(--surface-border);
  transition: background 0.35s var(--ease-out);
  position: relative;
}
.differ-card:nth-child(odd) { border-inline-end: 1px solid var(--surface-border); }
.differ-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--brand-rgb),0.06) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.differ-card:hover::before { opacity: 1; }
.differ-card:hover { background: rgba(var(--ink-rgb),0.022); }
.differ-icon {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--primary-glow);
}
.differ-icon .ico { width: 26px; height: 26px; }
.differ-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.differ-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════
   SECTION 7: SECURITY
   ═══════════════════════════ */
.security-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
.check-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--surface-border); }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 2px;
  border-bottom: 1px solid var(--surface-border);
}
.check-list > .check-item:last-child { border-bottom: 0; }
.tick {
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-glow);
  margin-top: 2px;
}
.tick svg {
  width: 14px; height: 14px;
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.check-item h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
.check-item b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.check-item span {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.compliance-section { margin-top: 8px; }
.comp-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.comp-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.comp-badge {
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--surface-border);
  transition: all var(--transition);
}
.residency {
  margin-top: 4px;
  padding-inline-start: 18px;
  border-inline-start: 2px solid rgba(var(--brand-rgb),0.5);
}
.residency .comp-title { margin-bottom: 10px; }

.comp-badge:hover {
  border-color: var(--primary);
  color: var(--text);
}

/* ═════��═════════════════════
   SECTION 8: INDUSTRIES
   ═══════════════════════════ */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ind-card {
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: all 0.4s var(--ease-out);
}
.ind-card:hover {
  border-color: rgba(var(--brand-rgb),0.15);
  transform: translateY(-4px);
}
.ind-card .ico {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
  transition: transform 0.4s var(--ease-spring);
}
.ind-card:hover .ico { transform: scale(1.15); }
.ind-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.ind-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════
   SECTION 9: CTA & FOOTER
   ═══════════════════════════ */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--brand-rgb),0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 50% 100%, rgba(var(--brand2-rgb),0.06) 0%, transparent 60%);
  pointer-events: none;
}
.cta-panel {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 64px 48px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  position: relative;
}
.cta-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 16px auto 32px;
  max-width: 520px;
  line-height: 1.7;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.inp {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(var(--ink-rgb),0.04);
  border: 1px solid var(--surface-border);
  color: var(--text);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.inp::placeholder { color: var(--text-muted); }
/* `appearance: none` makes Chrome paint the dropdown popup with its default
   light styling while the options inherit the page's light text, so the list
   renders white-on-white. The options need their own colours stated. */
select.inp {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  /* room for the chevron, mirrored for RTL */
  padding-inline-end: 40px;
  background-color: rgba(var(--ink-rgb),0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397A6C4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
[dir="rtl"] select.inp { background-position: left 14px center; }
select.inp option {
  background-color: #0B1330;
  color: #EEF3FB;
}
.form .btn-primary {
  grid-column: 1 / -1;
  justify-content: center;
  margin-top: 8px;
}
.form-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
#formSuccess {
  color: var(--accent);
  font-weight: 600;
  font-size: 17px;
}

/* Footer */
.footer {
  position: relative;
  border-top: 1px solid var(--surface-border);
  padding: 88px 0 0;
  background: var(--well);
}
/* Brand-tinted hairline picks the footer up off the page */
.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb),0.45), transparent);
}
.f-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px 64px;
}
.f-brand .logo { display: inline-block; }
.f-brand .logo-word { height: 30px; }
.f-brand p {
  margin-top: 20px;
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.75;
}
.f-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.f-col a {
  display: block;
  width: fit-content;
  font-size: 14.5px;
  color: var(--text-secondary);
  padding: 7px 0;
  transition: color var(--transition), transform var(--transition);
}
.f-col a:hover { color: var(--text); transform: translateX(3px); }
[dir="rtl"] .f-col a:hover { transform: translateX(-3px); }
.f-col .f-mail { color: var(--primary-glow); }
.f-col .f-mail:hover { color: var(--text); }

.fbottom {
  max-width: 1200px;
  margin: 64px auto 0;
  padding: 22px 24px 6px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.love {
  font-family: var(--font-arabic);
  color: var(--text-secondary);
}

/* ── Oversized Footer Wordmark ── */
.f-wordmark {
  position: relative;
  margin-top: 24px;
  overflow: hidden;
  height: clamp(90px, 15vw, 210px);
  user-select: none;
  pointer-events: none;
}
.f-wordmark span {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(112px, 19vw, 268px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  white-space: nowrap;
  /* Dot-matrix fill: the halftone grid punches through a brand gradient */
  background-image:
    radial-gradient(circle at center, rgba(var(--shadow-rgb),1) 47%, transparent 48%),
    linear-gradient(105deg, var(--brand-300) 0%, var(--brand-500) 45%, var(--brand-700) 100%);
  background-size: 7px 7px, 100% 100%;
  background-repeat: repeat, no-repeat;
  background-blend-mode: destination-in, normal;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.85;
  /* Fades in from the top-left so the mark reads as texture, not a headline */
  mask-image: linear-gradient(115deg, transparent 2%, #000 46%, #000 100%);
  -webkit-mask-image: linear-gradient(115deg, transparent 2%, #000 46%, #000 100%);
}
/* Arabic sits higher in its em box, so it needs more size and a lift to crop
   at the baseline the way the Latin wordmark does */
.f-wordmark[dir="rtl"] span,
[dir="rtl"] .f-wordmark span {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  font-size: clamp(150px, 25vw, 360px);
  line-height: 0.72;
  top: -0.16em;
  mask-image: linear-gradient(245deg, transparent 2%, #000 46%, #000 100%);
  -webkit-mask-image: linear-gradient(245deg, transparent 2%, #000 46%, #000 100%);
}


/* ═══════════════════════════
   ANIMATIONS
   ═══════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes dash-flow {
  to { stroke-dashoffset: -20; }
}
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
@keyframes draw-check {
  0% { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ── Separator ── */
.section-sep {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--surface-border), transparent);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════
   RTL CORRECTIONS
   ═══════════════════════════ */
/* Tracking and the mono face break Arabic letter joining, so the tracked
   labels fall back to the Arabic face at their natural spacing. */
[dir="rtl"] .kicker,
[dir="rtl"] .sov-boundary,
[dir="rtl"] .sov-tag,
[dir="rtl"] .play-meta,
[dir="rtl"] .stat span,
[dir="rtl"] .f-col h4,
[dir="rtl"] .comp-title,
[dir="rtl"] .vpc-label,
[dir="rtl"] .wb-tbl-h,
[dir="rtl"] .connector-icon .ci-label {
  font-family: var(--font-arabic);
  letter-spacing: normal;
  text-transform: none;
}

/* ═══════════════════════════
   RESPONSIVE
   ═══════════════════════════ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 400px; margin: 0 auto; }
  .stat-row { gap: 24px; }
  .security-grid { grid-template-columns: 1fr; gap: 40px; }
  .differ-grid { gap: 16px; }
  .f-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .f-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .section { padding: 80px 0; }
  .sec-head { margin-bottom: 40px; }

  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta .btn-primary { display: none; }

  .hero { min-height: auto; padding: 120px 0 80px; }
  /* Stacked on small screens, so the rules move to the underside */
  .stat-row { flex-direction: column; gap: 0; }
  .stat {
    width: 100%;
    padding: 0 0 12px;
    margin: 0 0 12px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--surface-border);
  }
  .stat:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }

  .bar-grid { grid-template-columns: 1fr; }
  .wb-tools { padding-left: 0; }
  .bar-grid { padding-left: 0; }

  .differ-grid { grid-template-columns: 1fr; }
  .differ-card { padding: 28px; }

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

  .cta-panel { padding: 40px 24px; }
  .form { grid-template-columns: 1fr; }

  .f-inner { grid-template-columns: 1fr; gap: 24px; }
  .fbottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .h1 { font-size: clamp(32px, 8vw, 40px); }
  .h2 { font-size: clamp(24px, 6vw, 32px); }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .ind-grid { grid-template-columns: 1fr; }
  .connector-icon { width: 64px; height: 64px; }
  .connector-icon .ci-icon { font-size: 20px; }
  .wb-frame { border-radius: var(--radius); }
  .wb-tabs { display: none; }
  .wb-tbl-h, .wb-tbl-r { grid-template-columns: 1.2fr 1fr 0.7fr 0.7fr; font-size: 11px; }
  .arch-layer { padding: 16px; gap: 14px; }
}

/* ── Final overrides ──
   Placed last so they win over the earlier blocks regardless of source order. */

/* ── Stack choreography ──
   Step 0: the three planes are fused into one slab around the middle plane.
   Step 1: the agent plane lifts off            -> "Your LLM"
   Step 2: the data plane drops away, isolating  -> "Your rules"
           the governance plane; the check strikes
   Step 3: the sources dock onto the data plane  -> "Your data"
   Step 4: the answer surfaces; everything lit
   then the stack gathers back to step 0 and the loop replays.
   The SVG is 620 user-units tall; a plane pitch is 190, so a 184 offset
   leaves the 15-unit edges just touching. */
:root { --stack-ease: cubic-bezier(0.22, 0.8, 0.2, 1); }

.sov .plate {
  animation: none;
  transform: translateY(0);
  transition: transform 0.95s var(--stack-ease), filter 0.6s var(--ease-out);
}
/* fused: the planes sit on each other with only their 15-unit edges showing,
   like three tiles in a stack — 175 up/down instead of the full 190 pitch */
.sov[data-step="0"] .plate-1 { transform: translateY(175px); }
.sov[data-step="0"] .plate-3,
.sov[data-step="1"] .plate-3 { transform: translateY(-175px); }

/* the fused slab reads as three layers through its rims and a single glow */
.sov[data-step="0"] .plate { filter: drop-shadow(0 14px 40px rgba(var(--brand-rgb),0.45)); }
.sov[data-step="0"] .plate .plate-rim { opacity: 0.55; }

/* the agent core rides its plane: parked on the slab, then up with it.
   175 SVG units of 620 = 28.2% of the box */
.sov .sov-core {
  top: calc(17.7% + var(--core-k, 0) * 28.2%);
  transition: top 0.95s var(--stack-ease), opacity 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}
.sov[data-step="0"] .sov-core { --core-k: 1; }

/* shafts only exist once there is a gap to span */
.sov .shaft { transition: opacity 0.5s var(--ease-out) 0.35s; }
.sov[data-step="0"] .shaft,
.sov[data-step="1"] .sh2 { opacity: 0; transition-delay: 0s; }

/* sources arrive on the data plane on the data beat */
.sov .sov-src {
  animation: none;
  opacity: 0;
  transform: translate(-50%, -30%);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out),
              border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.sov[data-step="3"] .sov-src,
.sov[data-step="4"] .sov-src { opacity: 1; transform: translate(-50%, -50%); }

/* each label appears as its layer detaches; the active one keeps the ring */
.sov-tag {
  animation: none;
  opacity: 0;
  transform: translateX(var(--tag-dx, -10px));
  transition: opacity 0.5s var(--ease-out) 0.45s, transform 0.5s var(--ease-out) 0.45s,
              border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.st2 { --tag-dx: 10px; }
[dir="rtl"] .st1, [dir="rtl"] .st3 { --tag-dx: 10px; }
[dir="rtl"] .st2 { --tag-dx: -10px; }
.sov[data-step="1"] .st1, .sov[data-step="2"] .st1, .sov[data-step="3"] .st1, .sov[data-step="4"] .st1,
.sov[data-step="2"] .st2, .sov[data-step="3"] .st2, .sov[data-step="4"] .st2,
.sov[data-step="3"] .st3, .sov[data-step="4"] .st3 { opacity: 1; transform: translateX(0); }

/* the question rides up with the agent plane */
.sov[data-step="1"] .sov-ask { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .sov .plate, .sov .sov-core, .sov .sov-src, .sov-tag { transition-duration: 0.01s; transition-delay: 0s; }
}

/* ── Select ──
   The native control stays in the DOM (value holder + no-JS fallback); when
   JS runs it is hidden and this styled listbox takes over, so the options are
   ours to colour instead of the OS popup's. */
.sel-wrap { position: relative; }
.sel-wrap .sel-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  inset: 0;
}
.sel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(var(--ink-rgb),0.04);
  border: 1px solid var(--surface-border);
  color: var(--text);
  font-size: 14px;
  text-align: start;
  cursor: pointer;
  transition: all var(--transition);
}
.sel::after {
  content: '';
  width: 16px; height: 16px;
  flex: none;
  background: currentColor;
  opacity: 0.55;
  transition: transform var(--transition);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sel-wrap.open .sel::after { transform: rotate(180deg); }
.sel:hover { border-color: rgba(var(--brand-rgb),0.4); }
.sel-wrap.open .sel,
.sel:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
  outline: none;
}

.sel-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: var(--radius-sm);
  /* solid, not translucent -- it sits over form fields */
  background: #0B1330;
  border: 1px solid rgba(var(--ink-rgb),0.12);
  box-shadow: 0 16px 40px rgba(var(--shadow-rgb),0.55);
  max-height: 240px;
  overflow-y: auto;
  animation: sel-in 0.16s var(--ease-out);
}
.sel-opt {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.sel-opt:hover,
.sel-opt.on { background: rgba(var(--brand-rgb),0.16); color: var(--text); }
.sel-opt[aria-selected="true"] { color: var(--text); font-weight: 500; }
.sel-opt[aria-selected="true"]::after {
  content: '✓';
  float: inline-end;
  color: var(--primary-glow);
}
@keyframes sel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
