/* =====================================================================
   Venomers — index.css  v2.0  "The Clinical Masterpiece"
   Landing canvas + Hero section — 100% self-contained.
   ZERO dependency on global.css.
   ─────────────────────────────────────────────────────────────────────
   Architecture:
   • CSS Logical Properties everywhere (LTR/RTL DRY by design)
   • GPU-composited animations only (transform, opacity, clip-path)
   • LCP guardrail: background-image on .hero-visual-outer,
     no <img> LCP candidate in the visual column → CLS = 0
   • prefers-reduced-motion respected in Section 13
   ===================================================================== */

/* ─────────────────────────────────────────────
   §1 — Self-Hosted Variable Fonts
   ───────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  src: url("/en/font/Inter/Inter-VariableFont_opsz,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/en/font/Inter/Inter-Italic-VariableFont_opsz,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/en/font/Space_Grotesk/SpaceGrotesk-VariableFont_wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/en/font/Source_Serif_4/SourceSerif4-VariableFont_opsz,wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/en/font/Source_Serif_4/SourceSerif4-Italic-VariableFont_opsz,wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Arabic VF";
  src: url("/ar/font/Noto_Sans_Arabic/NotoSansArabic-VariableFont_wdth,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Readex Pro VF";
  src: url("/ar/font/Readex_Pro/ReadexPro-VariableFont_HEXP,wght.woff2") format("woff2"),
       url("/fa/font/Readex_Pro/ReadexPro-VariableFont_HEXP,wght.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Naskh Arabic VF";
  src: url("/ar/font/Noto_Naskh_Arabic/NotoNaskhArabic-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* === FA: Yekan Bakh FaNum (400, 500, 600, 700, 800, 300) === */
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Regular.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Medium.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-SemiBold.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Bold.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-ExtraBold.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Light.woff2") format("woff2"),
       url("/fa/font/Yekan_Bakh/YekanBakhFaNum-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────────
   §2 — Design Tokens (Page-Scoped)
   ───────────────────────────────────────────── */
:root {
  /* Typography */
  --idx-ff-display: "Space Grotesk", system-ui, sans-serif;
  --idx-ff-body:    "Source Serif 4", georgia, serif;
  --idx-ff-ui:      "Inter", system-ui, sans-serif;

  /* Pharmaceutical Teal & Cyber Cyan & Clinical Sage palette */
  --idx-teal:         #0F766E;
  --idx-cyan:         #38BDF8;
  --idx-sage:         #99B8BA;
  --idx-sage-soft:    rgb(153 184 186 / 12%);
  --idx-sage-border:  rgb(153 184 186 / 38%);
  --idx-teal-soft:    rgb(15 118 110 / 2%);
  --idx-teal-medium:  rgb(15 118 110 / 4%);
  --idx-teal-border:  rgb(15 118 110 / 5%);
  --idx-navy:         #0F172A;
  --idx-slate:        #334155;
  --idx-muted:        #64748B;
  --idx-surface:      #F8FAFC;
  --idx-white:        #FFF;
  --idx-border:       rgb(15 23 42 / 7%);
  --idx-border-soft:  rgb(15 23 42 / 5%);

  /* Geometry */
  --idx-r-xl:   40px;
  --idx-r-lg:   28px;
  --idx-r-md:   16px;
  --idx-r-sm:   10px;
  --idx-r-cap:  999px;

  /* Shadows */
  --idx-shadow-hero:  0 32px 80px rgb(15 23 42 / 12%),
                      0 8px 24px  rgb(15 23 42 / 7%);
  --idx-shadow-inner: 0 12px 32px rgb(15 23 42 / 18%),
                      0 4px  12px rgb(15 23 42 / 10%);
  --idx-shadow-card:  0 8px 32px  rgb(15 23 42 / 4%);
  --idx-shadow-badge: 0 8px 24px  rgb(15 23 42 / 14%);

  /* Motion */
  --idx-ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --idx-ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --idx-speed:      0.26s;
  --idx-speed-slow: 0.50s;
  --idx-intro:      0.70s;
}

/* RTL: swap typography stacks and reverse physical animations */
:root[dir="rtl"] {
  --dir-factor: -1;
  --idx-ff-display: "Readex Pro VF", "Noto Sans Arabic VF", system-ui, sans-serif;
  --idx-ff-body:    "Noto Naskh Arabic VF", serif;
  --idx-ff-ui:      "Readex Pro VF", "Noto Sans Arabic VF", system-ui, sans-serif;
}

/* Persian: Full Yekan Bakh FaNum System for Display, Body, UI & Digits (eliminates glyph breaking) */
:root:lang(fa),
:root[dir="rtl"]:lang(fa),
html[lang="fa"] {
  --idx-ff-display: "Yekan Bakh FaNum", "Yekan Bakh", system-ui, -apple-system, sans-serif;
  --idx-ff-body:    "Yekan Bakh FaNum", "Yekan Bakh", system-ui, -apple-system, sans-serif;
  --idx-ff-ui:      "Yekan Bakh FaNum", "Yekan Bakh", system-ui, -apple-system, sans-serif;
}

/* ─────────────────────────────────────────────
   §3 — Global Canvas Base
   ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  text-size-adjust: 100%;
  text-rendering: optimizelegibility;
  max-inline-size: 100%;
  overflow-x: clip;
}

body {
  background: var(--idx-white);
  color: var(--idx-navy);
  margin: 0;
  padding: 0;
  font-family: var(--idx-ff-body);
  font-optical-sizing: auto;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-x: clip;
}

main {
  /* Clear fixed capsule nav height + establish stacking context */
  position: relative;
  padding-block-start: clamp(80px, 10vh, 100px);
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: clip;
}



/* ─────────────────────────────────────────────
   §4 — Keyframes (GPU-composited only)
   ───────────────────────────────────────────── */
@keyframes idx-glow-pulse {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

@keyframes idx-text-rise {
  from { opacity: 0; transform: translate3d(0, 32px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes idx-label-fade {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes idx-visual-reveal {
  from {
    opacity: 0;
    transform: scale3d(0.90, 0.90, 1);
    clip-path: inset(5% 5% 5% 5% round 40px);
  }

  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
    clip-path: inset(0% 0% 0% 0% round 40px);
  }
}

@keyframes idx-inner-float {
  from { opacity: 0; transform: translate3d(0, 20px, 0) scale3d(0.92, 0.92, 1); }
  to   { opacity: 1; transform: translate3d(0, 0, 0)  scale3d(1, 1, 1); }
}

@keyframes idx-metric-float {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ─────────────────────────────────────────────
   §5 — Hero Outer Shell
   ───────────────────────────────────────────── */
.home-hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding-block: clamp(60px, 8vw, 130px);
}

/* Desktop safe-zone: breathing room for the cinematic scorpion stage */
@media (width >= 1024px) {
  .home-hero {
    margin-block-end: 0 !important; /* Gap is now handled by .spatial-scorpion-stage */
  }
}

/* Ambient biological glow — two radial gradients */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 82% 18%, rgb(13 148 136 / 4%) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 16% 80%, rgb(14 165 233 / 2.8%) 0%, transparent 55%);
  will-change: opacity, transform;
  animation: idx-glow-pulse 10s var(--idx-ease) infinite;
}

/* ─────────────────────────────────────────────
   §6 — Hero Split Grid
   ───────────────────────────────────────────── */
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;

  /* LTR: [text | visual]  RTL: [visual | text] via logical order */
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  
  /* Lock width for ultrawide */
  max-inline-size: 1480px;
  margin-inline: auto;
  
  /* Bulletproof safe-zone for mobile/tablet */
  padding-inline: clamp(24px, 6vw, 64px);
  
  /* Spacing between text and visual */
  gap: clamp(40px, 6vw, 100px);
}

/* ─────────────────────────────────────────────
   §7 — Typographic Column
   ───────────────────────────────────────────── */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: idx-text-rise var(--idx-intro) var(--idx-ease-out) both;
}

/* Category label capsule */
.hero-label {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  background: var(--idx-teal-soft);
  color: var(--idx-teal);
  font-family: var(--idx-ff-ui);
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding-block: 5px;
  padding-inline: 14px;
  border-radius: var(--idx-r-cap);
  border: 1px solid var(--idx-teal-border);
  animation: idx-label-fade var(--idx-intro) var(--idx-ease-out) 0.08s both;
}

:root[dir="rtl"] .hero-label {
  align-self: flex-start; /* stays at inline-start in RTL too */
  letter-spacing: 0;
}

/* H1 — hero heading */
.hero-text h1 {
  margin: 0;
  font-family: var(--idx-ff-display);
  font-size: clamp(2.6rem, 4.4vw, 4.8rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--idx-navy);
}

:root[dir="rtl"] .hero-text h1 {
  letter-spacing: 0;
  line-height: 1.22;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
}

:root:lang(fa) .hero-text h1,
html[lang="fa"] .hero-text h1 {
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  font-size: clamp(1.75rem, 2.55vw, 3.05rem);
}

:root:lang(fa) .hero-title-line,
html[lang="fa"] .hero-title-line {
  display: block;
}

/* Trailing period or accent word */
.hero-text h1 .accent {
  color: var(--idx-navy); /* same dark navy */
}

/* Hero description — B2B formal paragraph */
.hero-text p {
  font-family: var(--idx-ff-body);
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--idx-slate);
  margin: 0;
  max-inline-size: 58ch;
  text-wrap: pretty;
}

:root[dir="rtl"] .hero-text p {
  max-inline-size: 64ch;
  font-weight: 400; /* Noto Naskh reads better at 400 */
  line-height: 1.65;
}

/* CTA row */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(12px, 1.5vw, 18px);
}

/* Primary CTA — Cyber Cyan filled capsule */
.hero-cta-primary {
  position: relative;
  display: inline-flex;
  border-radius: var(--idx-r-cap);
  text-decoration: none;
  transition: transform var(--idx-speed) var(--idx-ease);
  color: var(--idx-white);
  /* Liquid Glass Base Colors - Teal */
  --btn-bg: rgb(15 118 110 / 85%);
  --btn-bg-hover: rgb(15 118 110 / 95%);
  --btn-shadow: 0 8px 24px rgb(15 118 110 / 30%);
  --btn-shadow-hover: 0 16px 36px rgb(15 118 110 / 40%);
  --btn-border: rgba(255, 255, 255, 0.2);
  --btn-border-hover: rgba(255, 255, 255, 0.3);
  --btn-rim: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  --btn-rim-hover: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-cta-primary:hover {
  transform: translate3d(0, -2px, 0);
}

.hero-cta-primary svg {
  flex-shrink: 0;
  transition: transform var(--idx-speed) var(--idx-ease);
  will-change: transform;
}

.hero-cta-primary:hover svg {
  transform: translate3d(4px, 0, 0);
}

/* RTL mirror for arrow */
:root[dir="rtl"] .hero-cta-primary svg {
  transform: scaleX(-1);
}

:root[dir="rtl"] .hero-cta-primary:hover svg {
  transform: translate3d(-4px, 0, 0) scaleX(-1);
}

:root[dir="rtl"] .hero-cta-primary { letter-spacing: 0; }

/* Secondary CTA — ghost outline */
.hero-cta-secondary {
  position: relative;
  display: inline-flex;
  border-radius: var(--idx-r-cap);
  text-decoration: none;
  transition: transform var(--idx-speed) var(--idx-ease);
  color: var(--idx-navy);
  /* Liquid Glass Base Colors - Ghost */
  --btn-bg: rgb(255 255 255 / 40%);
  --btn-bg-hover: rgb(255 255 255 / 70%);
  --btn-shadow: 0 4px 12px rgb(15 23 42 / 5%);
  --btn-shadow-hover: 0 8px 24px rgb(15 23 42 / 10%);
  --btn-border: rgba(255, 255, 255, 0.5);
  --btn-border-hover: rgba(255, 255, 255, 0.8);
  --btn-rim: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --btn-rim-hover: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-cta-secondary:hover {
  transform: translate3d(0, -2px, 0);
}

/* ─────────────────────────────────────────────
   §7.5 — Shared CTA Liquid Glass Logic
   ───────────────────────────────────────────── */
.hero-cta-primary .nav-pill-glass-container,
.hero-cta-secondary .nav-pill-glass-container {
  box-shadow: var(--btn-shadow);
  transition: box-shadow var(--idx-speed) var(--idx-ease);
}
.hero-cta-primary:hover .nav-pill-glass-container,
.hero-cta-secondary:hover .nav-pill-glass-container {
  box-shadow: var(--btn-shadow-hover);
}

.hero-cta-primary .liquid-backdrop,
.hero-cta-secondary .liquid-backdrop {
  background: var(--btn-bg);
  transition: background var(--idx-speed) var(--idx-ease);
}
.hero-cta-primary:hover .liquid-backdrop,
.hero-cta-secondary:hover .liquid-backdrop {
  background: var(--btn-bg-hover);
}

.hero-cta-primary .liquid-specular-rim,
.hero-cta-secondary .liquid-specular-rim {
  border: 1px solid var(--btn-border);
  box-shadow: var(--btn-rim);
  transition: border-color var(--idx-speed) var(--idx-ease), box-shadow var(--idx-speed) var(--idx-ease);
}
.hero-cta-primary:hover .liquid-specular-rim,
.hero-cta-secondary:hover .liquid-specular-rim {
  border-color: var(--btn-border-hover);
  box-shadow: var(--btn-rim-hover);
}

.hero-cta-primary .liquid-content,
.hero-cta-secondary .liquid-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--idx-ff-ui);
  font-size: clamp(13px, 0.95vw, 15px);
  z-index: 3;
}
.hero-cta-primary .liquid-content {
  padding-block: clamp(12px, 1.3vw, 15px);
  padding-inline: clamp(24px, 2.6vw, 38px);
  font-weight: 600;
  letter-spacing: 0.08px;
}
.hero-cta-secondary .liquid-content {
  padding-block: clamp(11px, 1.2vw, 14px);
  padding-inline: clamp(22px, 2.4vw, 34px);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   §8 — Visual Masterpiece Column
   ───────────────────────────────────────────── */
.hero-visual {
  position: relative;
  aspect-ratio: 5 / 6;
  animation: idx-visual-reveal var(--idx-intro) var(--idx-ease-out) 0.14s both;
  will-change: transform, opacity;
}

/* Outer lab capsule — full uncropped laboratory scene */
.hero-visual-outer {
  position: absolute;
  inset: 0;
  border-radius: var(--idx-r-xl); /* 32px */
  overflow: hidden;
  background-image: url("/assets/hero/biotech-monitoring-and-breeding.webp");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  box-shadow: var(--idx-shadow-hero);
  will-change: transform;
}

/* State 2 Background (Cross-fade on hover) */
.hero-visual-outer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("/assets/hero/hottentotta-schach-venom-droplet.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale3d(1.05, 1.05, 1);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  will-change: opacity, transform;
}

.hero-visual:hover .hero-visual-outer::before {
  opacity: 1;
  transform: scale3d(1, 1, 1);
}

/* Bottom vignette — deep hardware-accelerated linear-gradient for text legibility */
.hero-visual-outer::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgb(10 16 30 / 25%) 0%,
    transparent 40%
  );
  z-index: 2;
}

/* ── Floating Overlay Metrics ─────────────────
   Pure typography over the canvas, dynamic two-state interaction.
   ───────────────────────────────────────────── */
.hero-overlay-metrics {
  position: absolute;
  inset-block-end: clamp(24px, 6.5%, 48px);
  inset-inline-start: clamp(24px, 6.5%, 40px);
  display: flex;
  flex-direction: column;
  animation: idx-metric-float var(--idx-intro) var(--idx-ease-out) 0.38s both;
  z-index: 3;
}

.metric-state-1,
.metric-state-2 {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Slightly increased gap for better separation */
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}

.metric-state-2 {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.hero-visual:hover .metric-state-1 {
  opacity: 0;
  transform: translateY(-12px);
}

.hero-visual:hover .metric-state-2 {
  opacity: 1;
  transform: translateY(0);
}

.hero-overlay-metrics .om-value {
  font-family: var(--idx-ff-display);
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 700;
  color: var(--idx-white);
  line-height: 1;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 12px rgb(10 16 30 / 45%);
}

:root[dir="rtl"] .hero-overlay-metrics .om-value {
  letter-spacing: 0;
}

.hero-overlay-metrics .om-label {
  font-family: var(--idx-ff-ui);
  font-size: clamp(10px, 0.82vw, 13px);
  font-weight: 500;
  color: rgb(255 255 255 / 80%);
  text-transform: uppercase;
  letter-spacing: 0.55px;
  text-shadow: 0 1px 6px rgb(10 16 30 / 55%);
}

:root[dir="rtl"] .hero-overlay-metrics .om-label {
  letter-spacing: 0;
}

/* ─────────────────────────────────────────────
   §9 — Metrics: Bento-Split Laboratory Dashboard
   ───────────────────────────────────────────── */
.metrics {
  position: relative;
  z-index: 10;
  max-inline-size: 1320px;
  margin-inline: auto;
  padding-block-start: clamp(48px, 6vw, 96px);
  padding-inline: clamp(16px, 4vw, 48px);
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

/* 1. Animated grid mesh & ambient glow blobs */
.metrics::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: 
    linear-gradient(to right, rgb(15 118 110 / 4%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(15 118 110 / 4%) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  pointer-events: none;
}

.metrics::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 50%, rgb(15 118 110 / 5%) 0%, transparent 40%),
    radial-gradient(circle at 80% 50%, rgb(56 189 248 / 4%) 0%, transparent 40%);
  filter: blur(60px);
  pointer-events: none;
  animation: float-blobs 15s ease-in-out infinite alternate;
}

@keyframes float-blobs {
  0% { transform: translateY(0); }
  100% { transform: translateY(20px); }
}

.metrics > h2 {
  margin: 0 0 clamp(20px, 2.6vw, 36px);
  font-family: var(--idx-ff-display);
  font-size: clamp(1.4rem, 1.9vw, 2rem);
  font-weight: 700;
  color: var(--idx-navy);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
:root[dir="rtl"] .metrics > h2 { letter-spacing: 0; }

/* ── Outer Bento container ── */
.metrics-list {
  display: grid;
  grid-template-columns: 1fr; /* Single column wrapper forces Spotlight to Row 3 */
  gap: clamp(16px, 2.5vw, 24px);
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.metrics-quad-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .metrics-quad-matrix {
    grid-template-columns: 1fr; /* Clean single-column stack on mobile & small tablets */
  }
}

/* 2. Clinical Glassmorphism */

.metric .value, .metric h3, .metric .unit {
  font-family: inherit;
}

/* فعالسازی قابلیت فونت عددی منظم Space Grotesk */
.metric .value {
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 700;
  color: var(--idx-navy);
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: start;
  transition: color 0.3s ease;
}

/* زنده کردن کارتهای شیشهای با جزییات آزمایشگاهی */
.metric {
  position: relative;
  border-radius: 24px;
  overflow: visible; /* CRITICAL: Must be visible to cast drop shadow. nav-pill-glass-container handles clipping. */
  box-sizing: border-box;
  width: 100%;
  
  /* Liquid Glass Variables for 4 core cards (Transparent & Beautiful) */
  --metric-bg: rgba(255, 255, 255, 0.6);
  --metric-blur: blur(24px) saturate(160%);
  --metric-border: rgba(15, 118, 110, 0.2);
  --metric-rim-shadow: inset 0 2px 10px rgba(255, 255, 255, 1), inset 0 -4px 12px rgba(15, 118, 110, 0.06);
  
  /* 3D Physics Setup */
  --hover-lift: 0px;
  --tilt-x: 0deg;
  --tilt-y: 0deg;

  transform-style: preserve-3d;
  
  /* Hardware-Accelerated Safe Directional Scroll Entry Animation */
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: transform, opacity, box-shadow;

  /* Base Box Shadow for Glass Cards */
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.12), 0 6px 16px -4px rgba(15, 23, 42, 0.06);

  /* Ensure physics transition doesn't conflict with entry transition initially */
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Safe Base entry translations for all 5 cards */
#metric-area, #metric-scorpions, #metric-species, #metric-venom-capacity, #metric-ready-stock {
  transform: translate3d(0, 28px, 0);
}

#metric-ready-stock {
  /* Liquid Glass Variables for 5th card (Matte/Frosted) */
  --metric-bg: rgba(255, 255, 255, 0.85);
  --metric-blur: blur(32px) saturate(200%);
  --metric-border: rgba(15, 118, 110, 0.3);
  --metric-rim-shadow: inset 0 2px 12px rgba(255, 255, 255, 1), inset 0 -4px 16px rgba(15, 118, 110, 0.1);
}

/* Glass Architecture Logic for Metrics */
.metric.physics-ready:hover {
  box-shadow: 0 32px 80px -16px rgba(15, 23, 42, 0.2), 0 8px 24px -8px rgba(15, 23, 42, 0.1);
}

.metric .liquid-backdrop {
  background: var(--metric-bg);
  /* CSS Fallbacks for robust blurring if SVG filter fails */
  backdrop-filter: var(--metric-blur);
  -webkit-backdrop-filter: var(--metric-blur);
  /* Progressive SVG filter */
  backdrop-filter: url(#liquid-glass-refraction-ca) var(--metric-blur);
  -webkit-backdrop-filter: url(#liquid-glass-refraction-ca) var(--metric-blur);
  transition: background 0.4s ease;
}

.metric .liquid-specular-rim {
  border: 1px solid var(--metric-border);
  box-shadow: var(--metric-rim-shadow);
  transition: border-color 0.4s ease;
}
.metric.physics-ready:hover .liquid-specular-rim {
  border-color: rgba(255, 255, 255, 0.8);
}

.metric .liquid-content {
  padding: clamp(24px, 3.5vw, 40px) clamp(18px, 2.8vw, 32px) clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%; /* Ensure it fills the card for clipping */
  overflow: hidden; /* CRITICAL: Clips the animating SVG waveforms to the card boundary */
  border-radius: inherit;
  box-sizing: border-box;
}

.metric.animate-entry {
  opacity: 1;
  transform: translate3d(0, 0, 0) !important;
}

/* Re-enable hover/tilt transitions strictly AFTER entry animation completes */
.metric.physics-ready {
  /* Restore the CSS vars-based transform so hover works */
  transform: perspective(1000px) translateY(var(--hover-lift)) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) !important;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), 
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s ease;
}

/* Subtext Styling */
.metric-subtext {
  font-size: 0.85rem;
  color: #64748B;
  font-weight: 400;
  margin: 0;
  line-height: 1.4;
  position: relative;
  z-index: 2; /* keep above waveforms */
}

/* اضافه کردن براکتهای آزمایشگاهی در گوشههای کارت برای حس مهندسی و لوکس */
.metric::after {
  content: '';
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  inline-size: 12px;
  block-size: 12px;
  border-block-start: 2px solid rgb(15 118 110 / 20%);
  border-inline-end: 2px solid rgb(15 118 110 / 20%);
  transition: all 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.metric:hover::after {
  border-color: rgb(15 118 110 / 80%);
  transform: translate(var(--bracket-x, 2px), -2px);
}

:root[dir="rtl"] .metric:hover::after {
  --bracket-x: -2px;
}

/* ایجاد اتمسفر زنده: یک هاله نوری متحرک بیوتک در پشت کارت هنگام هاور */
.metric::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgb(15 118 110 / 5%), transparent 40%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.metric:hover::before {
  opacity: 1;
}

/* Ensure inner content sits above the light halo */
.metric > * {
  position: relative;
  z-index: 2;
}

.metric h3 {
  color: var(--idx-sage);
}

.metric-icon {
  color: var(--idx-sage);
  transition: color 0.3s ease;
}

.metric:hover .metric-icon {
  color: var(--idx-teal);
}

/* Hover Triggers & Physics */
.metric:hover {
  --hover-lift: -8px;

  border-color: rgb(15 118 110 / 30%);
  box-shadow: 0 30px 60px -15px rgb(15 118 110 / 8%),
              inset 0 0 20px rgb(15 118 110 / 2%);
}

/* ۳. دگرگونی انیمیشن و جایگاه نمودارها (Waveforms) */
.metric-waveform-canvas {
  position: absolute;
  inset-block-end: -10px;
  inset-inline: 0;
  inline-size: 100%;
  block-size: 60px;
  opacity: 0.15;
  transition: all 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.metric:hover .metric-waveform-canvas {
  opacity: 0.6;
  inset-block-end: 0;
  transform: scaleY(1.1);
}

.metric-waveform-canvas path {
  stroke: var(--idx-teal);
  stroke-width: 1.8px;
  transition: stroke-dashoffset 2.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#key-metrics .value:not(:empty) ~ .metric-waveform-canvas path,
.metric:hover .metric-waveform-canvas path {
  stroke-dashoffset: 0;
}

/* ==========================================================================
   اصلاح ساختاری کارت ویژه (Ready-to-Deliver) - حذف برفک شدید و ایجاد ظاهر پرمیوم
   ========================================================================== */

/* ۴. لوکس‌سازی و دگرگونی کامل کارت ویژه تیره (Spotlight Card) */
#metric-ready-stock {
  background: linear-gradient(135deg, rgb(153 184 186 / 25%) 0%, rgb(153 184 186 / 8%) 100%), rgb(255 255 255 / 45%) !important;
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
  border: 1px solid var(--idx-sage-border) !important;
  box-shadow: 0 25px 50px -12px rgb(15 23 42 / 10%);
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* Clinical Live Radar Tag (Positioned cleanly via CSS Logical Properties) */
#metric-ready-stock h3::before {
  content: 'STATUS: HPLC_VERIFIED // LIVE';
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: clamp(18px, 2.8vw, 32px);
  font-family: var(--idx-ff-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--idx-teal);
  letter-spacing: 0.1em;
  opacity: 0.7;
  z-index: 2;
  white-space: nowrap;
  background: transparent;
  border: none;
  display: block;
}

:root[dir="rtl"] #metric-ready-stock h3::before {
  letter-spacing: 0;
  content: 'الحالة: HPLC_VERIFIED // مباشر';
  font-family: var(--idx-ff-ui);
}

:root:lang(fa) #metric-ready-stock h3::before,
html[lang="fa"] #metric-ready-stock h3::before {
  content: 'وضعیت: HPLC_VERIFIED // تاییدشده';
  font-family: var(--idx-ff-ui);
}

#metric-ready-stock::after,
:root[dir="rtl"] #metric-ready-stock::after,
:root:lang(fa) #metric-ready-stock::after,
html[lang="fa"] #metric-ready-stock::after {
  display: none !important; /* Disable standard corner brackets */
}

/* Shine Wipe Animation Effect */
#metric-ready-stock .liquid-specular-rim::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: -100%;
  width: 50%;
  background: linear-gradient(
    105deg, 
    transparent, 
    rgb(255 255 255 / 90%), 
    rgb(15 118 110 / 15%),
    transparent
  );
  transform: skewX(-15deg);
  animation: metric-shine-wipe 3s ease infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#metric-ready-stock:hover .liquid-specular-rim::after {
  opacity: 1;
}

@keyframes metric-shine-wipe {
  0% { transform: skewX(-15deg) translateX(-150%); }
  50%, 100% { transform: skewX(-15deg) translateX(500%); }
}

#metric-ready-stock:hover {
  border-color: var(--idx-teal) !important;
  box-shadow: 0 30px 60px -15px rgb(15 23 42 / 15%);
  --hover-lift: -8px;
}

/* Pulse radar logic for spotlight */
#metric-ready-stock h3::after {
  content: "";
  display: inline-block;
  inline-size: 6px;
  block-size: 6px;
  background-color: var(--idx-teal);
  border-radius: 50%;
  margin-inline-start: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgb(15 118 110 / 20%);
  animation: metric-pulse-radar-teal 2s infinite cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes metric-pulse-radar-teal {
  0% { box-shadow: 0 0 0 0 rgb(15 118 110 / 40%); }
  70% { box-shadow: 0 0 0 8px rgb(15 118 110 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(15 118 110 / 0%); }
}

#metric-ready-stock .value {
  color: var(--idx-teal) !important;
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-shadow: none;
}

#metric-ready-stock h3 {
  color: var(--idx-muted);
  font-weight: 600;
}

#metric-ready-stock .unit {
  color: #64748B;
}

#metric-ready-stock .metric-waveform-canvas { 
  color: rgb(15 118 110 / 15%); 
}

/* Spotlight icon */
#metric-ready-stock .liquid-content > svg:not(.metric-icon),
#metric-ready-stock .metric-icon {
  color: var(--idx-cyan);
  stroke: var(--idx-cyan);
  inline-size: 44px;
  block-size: 44px;
  flex-shrink: 0;
  padding: 10px;
  background: rgb(56 189 248 / 8%);
  border-radius: 16px;
  box-sizing: content-box;
  box-shadow: 0 0 15px rgb(56 189 248 / 10%);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

#metric-ready-stock:hover .liquid-content > svg:not(.metric-icon),
#metric-ready-stock:hover .metric-icon {
  transform: scale(1.12) rotate(4deg);
  background: rgb(56 189 248 / 14%);
  filter: drop-shadow(0 4px 12px rgb(56 189 248 / 25%));
}

/* 5. Icon dynamics for standard quad cards */
.metric-icon {
  width: 44px;
  height: 44px;
  color: var(--idx-muted);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.metric:hover .metric-icon {
  color: var(--idx-teal);
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgb(15 118 110 / 25%));
}

/* 3. Typography Adjustments */

/* ── Card label ── */
.metric h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--idx-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 0;
  text-wrap: balance;
}

/* 6. RTL Symmetry */
:root[dir="rtl"] .metric h3 {
  letter-spacing: 0;
  text-transform: none;
}

/* ── Numeric value ── */
.metric p {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 4px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

:root[dir="rtl"] .metric p { 
  letter-spacing: 0; 
}

/* Enforce Space Grotesk Tabular Nums across ALL locales (Manifesto Mandate) */
.metric .value {
  font-family: 'Space Grotesk', system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--idx-navy);
  line-height: 1.1;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: start;
}

:root[dir="rtl"] .metric .value {
  letter-spacing: 0;
}

.metric .unit {
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: 600;
  color: var(--idx-teal);
  white-space: normal;
  text-wrap: balance;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}
:root[dir="rtl"] .metric .unit { font-family: inherit; }
:root[dir="rtl"] .metric .unit { font-family: inherit; }

/* ─────────────────────────────────────────────
   §9.5 — Scientific Thesis (Minimal Luxury Column)
   ───────────────────────────────────────────── */
.venom-intro {
  max-inline-size: 800px;
  margin-inline: auto;
  padding-block: clamp(60px, 8vw, 90px);
  padding-inline: clamp(24px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
}

.venom-intro h2 {
  font-family: var(--idx-ff-display);
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 200; /* Ultra light weight for luxury feel */
  color: var(--idx-navy); /* Dark Navy authority text */
  margin: 0 0 clamp(24px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  
  /* Animation Base (Vertical Rise) */
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

:root[dir="rtl"] .venom-intro h2 {
  letter-spacing: 0;
  font-weight: 300;
  transform: translate3d(0, 32px, 0);
}

:root:lang(fa) .venom-intro h2,
html[lang="fa"] .venom-intro h2 {
  font-weight: 700;
  line-height: 1.32;
}

.venom-intro p {
  font-family: var(--idx-ff-body);
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--idx-slate);
  text-wrap: pretty;
  margin: 0 auto;

  /* Animation Base (Delayed Vertical Rise) */
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
  will-change: opacity, transform;
}

:root[dir="rtl"] .venom-intro p {
  font-weight: 400;
  line-height: 1.8;
  transform: translate3d(0, 24px, 0);
}

:root:lang(fa) .venom-intro p,
html[lang="fa"] .venom-intro p {
  font-weight: 400;
  line-height: 1.9;
}

/* ─────────────────────────────────────────────
   §9.6 — Scientific Thesis Animation States
   ───────────────────────────────────────────── */
.venom-intro.is-visible h2,
.venom-intro.is-visible p {
  opacity: 1;
  transform: translate3d(0, 0, 0) !important;
}



/* ─────────────────────────────────────────────
   §11 — B2B Core Pipelines (Clinical Product Pipeline Grid)
   ───────────────────────────────────────────── */
.b2b-pipeline {
  max-inline-size: 1480px;
  margin-inline: auto;
  padding-block: clamp(60px, 8vw, 120px);
  padding-inline: clamp(24px, 6vw, 64px);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Ambient Orbs for Glassmorphism Refraction */
.b2b-pipeline::before,
.b2b-pipeline::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.b2b-pipeline::before {
  width: clamp(300px, 40vw, 500px);
  height: clamp(300px, 40vw, 500px);
  background: rgb(153 184 186 / 40%); /* Clinical Sage */
  top: 10%;
  inset-inline-start: 5%;
}

.b2b-pipeline::after {
  width: clamp(250px, 35vw, 400px);
  height: clamp(250px, 35vw, 400px);
  background: rgb(14 165 233 / 15%); /* Soft Blue */
  bottom: 10%;
  inset-inline-end: 5%;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  100% { transform: translate(0, 25px); }
}

.pipeline-header {
  text-align: center;
  margin-block-end: clamp(40px, 6vw, 80px);
}

.pipeline-header h2 {
  font-family: var(--idx-ff-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 300;
  color: var(--idx-navy);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

:root[dir="rtl"] .pipeline-header h2 {
  letter-spacing: 0;
}

.pipeline-header .subtitle {
  font-family: var(--idx-ff-body);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--idx-slate);
  max-inline-size: 600px;
  margin-inline: auto;
}

.pipeline-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 40px);
  z-index: 1;
  overflow: hidden;
}

.pipeline-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(200px, 50vw, 400px);
  height: clamp(200px, 50vw, 400px);
  background: rgb(15 118 110 / 15%); /* Deep Teal */
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrbCenter 12s ease-in-out infinite alternate-reverse;
  transform: translate(-50%, -50%);
}

@keyframes floatOrbCenter {
  0% { transform: translate(-50%, -50%); }
  100% { transform: translate(-50%, -40%); }
}

@media (width <= 900px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
}

/* Removed .crystal-card base styles, now handled by Clinical Liquid Glass Engine below */

.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 8px;
}

.node-badge, .rd-badge {
  font-family: var(--idx-ff-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
}

.node-badge {
  background: rgb(30 41 59 / 5%);
  color: var(--idx-navy);
}

.rd-badge {
  background: rgb(153 184 186 / 15%); /* Clinical Sage */
  color: var(--idx-teal);
}

/* Removed .crystal-card h3 styles, now handled by Clinical Liquid Glass Engine below */

.crystal-card p {
  font-family: var(--idx-ff-body);
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.7;
  color: var(--idx-slate);
  margin: 0;
}

/* ─────────────────────────────────────────────
   §10.5 — Capabilities Matrix (Bio-Assets)
   ───────────────────────────────────────────── */
.capabilities-matrix {
  position: relative;
  max-inline-size: 1480px;
  margin-inline: auto;
  padding-block: clamp(40px, 6vw, 90px);
  padding-inline: clamp(24px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  overflow: hidden;
}

@media (width <= 1023px) {
  .capabilities-matrix {
    grid-template-columns: 1fr;
  }
  
  .capabilities-matrix .spatial-scorpion-stage {
    width: clamp(240px, 55%, 380px);
    max-inline-size: 100%;
    margin: 0 auto;
  }
}

.capabilities-content {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
}

.capabilities-content .section-header h2 {
  font-family: var(--idx-ff-display);
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  font-weight: 700;
  color: var(--idx-navy);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

:root[dir="rtl"] .capabilities-content .section-header h2 {
  letter-spacing: 0;
}

.capabilities-content .section-header .subtitle {
  font-family: var(--idx-ff-ui);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  color: var(--idx-teal);
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 580px) {
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Bento Layout: when total card count is odd (e.g. 5 cards), first flagship card spans full width (1 + 2 + 2) */
  .capabilities-grid > .cap-card.is-featured,
  .capabilities-grid > .cap-card:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Bento Featured Flagship Card Enhancements */
.capabilities-grid > .cap-card.is-featured,
.capabilities-grid > .cap-card:first-child:nth-last-child(odd) {
  --lg-bg: rgb(255 255 255 / 22%);
  border-radius: 28px;
}

.capabilities-grid > .cap-card.is-featured .liquid-backdrop,
.capabilities-grid > .cap-card:first-child:nth-last-child(odd) .liquid-backdrop {
  border-color: rgba(15, 118, 110, 0.18) !important;
  border-top-color: rgba(255, 255, 255, 0.85) !important;
  border-inline-start-color: rgba(255, 255, 255, 0.85) !important;
}

.capabilities-grid > .cap-card.is-featured .liquid-content,
.capabilities-grid > .cap-card:first-child:nth-last-child(odd) .liquid-content {
  padding: clamp(32px, 3vw, 42px) clamp(28px, 3vw, 38px);
}

.capabilities-grid > .cap-card.is-featured .cap-card-link,
.capabilities-grid > .cap-card:first-child:nth-last-child(odd) .cap-card-link {
  font-size: clamp(1.35rem, 1.5vw, 1.5rem);
}

.capabilities-grid > .cap-card.is-featured p,
.capabilities-grid > .cap-card:first-child:nth-last-child(odd) p {
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  line-height: 1.7;
  max-inline-size: 85ch;
}

/* ==========================================================================
   §10 — Clinical Liquid Glass Engine (Highlights & Pipelines)
   ========================================================================== */

/* Base card styling for Liquid Glass */
.cap-card, .crystal-card {
  position: relative;
  border-radius: 24px;
  z-index: 1;
}

.liquid-glass-card {
  --lg-bg: rgb(255 255 255 / 15%);
  --lg-blur: blur(40px) saturate(140%);
  --lg-border: rgb(255 255 255 / 20%);
  --lg-border-top: rgb(255 255 255 / 70%);
  --lg-border-left: rgb(255 255 255 / 70%);
  --lg-rim-shadow: inset 0 1px 0 rgb(255 255 255 / 30%);
  
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --hover-lift: 0px;

  /* outer drop shadow */
  box-shadow: 0 12px 32px rgb(0 0 0 / 5%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  
  /* physics */
  transform: translateY(var(--hover-lift));
  will-change: transform;
}

.liquid-glass-card .liquid-backdrop {
  background: var(--lg-bg) !important;
  backdrop-filter: var(--lg-blur) !important;
  border: 1px solid var(--lg-border) !important;
  border-top-color: var(--lg-border-top) !important;
  border-inline-start-color: var(--lg-border-left) !important;
  transition: border-color 0.4s, background 0.4s;
}

.liquid-glass-card .liquid-specular-rim {
  box-shadow: var(--lg-rim-shadow) !important;
  transition: box-shadow 0.4s;
}

.liquid-glass-card .liquid-content {
  padding: 40px 32px;
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  border-radius: inherit;
  overflow: hidden; /* Contains inner glows and animations */
}

/* Ensure content stays above liquid */
.cap-card h3, .cap-card p, .crystal-card .card-content {
  position: relative;
  z-index: 3;
}

/* Typography for luxury cards */
.cap-card h3 {
  margin: 0 0 14px;
}

.cap-card-link, .crystal-card h3 {
  font-family: var(--idx-ff-display);
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.35rem;
  transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cap-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  cursor: pointer;
}

.cap-card-title-text {
  flex: 1;
}

.cap-card-arrow-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: var(--idx-teal, #0F766E);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.cap-card-arrow {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[dir="rtl"] .cap-card h3 a, :root[dir="rtl"] .crystal-card h3 {
  letter-spacing: 0;
}

:root[dir="rtl"] .cap-card-arrow {
  transform: scaleX(-1);
}

.cap-card:focus-within {
  outline: 2px solid var(--idx-teal, #0F766E);
  outline-offset: 4px;
}

.cap-card p {
  font-family: var(--idx-ff-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--idx-slate);
  margin: 0;
}

/* ==========================================================================
   The Trapped Biological Liquid
   ========================================================================== */
.liquid-glass-card .liquid-content::before {
  content: '';
  position: absolute;
  top: 80%; /* Partially hidden at bottom initially */
  inset-inline-start: 50%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--idx-sage) 0%, rgb(15 118 110 / 20%) 70%);
  transform: translate(-50%, 0);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  filter: blur(20px);
  z-index: 2;
  opacity: 0.15; /* Lower opacity for subtle effect */
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  animation: liquid-biotech-morph 8s infinite ease-in-out alternate;
  pointer-events: none;
}

/* Flip translation for RTL using standard logic instead of inset-inline-start which translates based on LTR coordinates if we use translate(-50%, 0) */
:root[dir="rtl"] .liquid-glass-card .liquid-content::before {
  transform: translate(50%, 0);
  animation-name: liquid-biotech-morph-rtl;
}

/* Luxury interaction on hover & touch */
.liquid-glass-card:hover .liquid-content::before,
.liquid-glass-card.is-touched .liquid-content::before {
  top: 20%;
  width: 260px;
  height: 260px;
  opacity: 0.25; /* Less intense on hover */
  background: radial-gradient(circle, var(--idx-sage) 0%, rgb(15 118 110 / 15%) 100%);
  border-radius: 40% 60% 60% 40% / 50%;
}

.liquid-glass-card:hover,
.liquid-glass-card.is-touched {
  --hover-lift: -6px;
  --lg-border: rgb(255 255 255 / 40%);
  --lg-border-top: rgb(255 255 255 / 90%);
  --lg-border-left: rgb(255 255 255 / 90%);
  --lg-rim-shadow: inset 0 1px 0 rgb(255 255 255 / 50%);
  box-shadow: 0 30px 60px -20px rgb(153 184 186 / 20%);
  z-index: 10;
}

.cap-card:hover .cap-card-link,
.cap-card.is-touched .cap-card-link,
.crystal-card:hover h3 {
  color: #0F766E; /* Deep teal on hover */
}

.cap-card:hover .cap-card-arrow-badge,
.cap-card.is-touched .cap-card-arrow-badge {
  background: var(--idx-teal, #0F766E);
  border-color: var(--idx-teal, #0F766E);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
  transform: scale(1.06);
}

.cap-card:hover .cap-card-arrow,
.cap-card.is-touched .cap-card-arrow {
  transform: translate3d(2px, -2px, 0);
}

:root[dir="rtl"] .cap-card:hover .cap-card-arrow,
:root[dir="rtl"] .cap-card.is-touched .cap-card-arrow {
  transform: scaleX(-1) translate3d(2px, -2px, 0);
}

/* Keyframes for organic liquid mutation */
@keyframes liquid-biotech-morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate(-50%, 0) rotate(0deg);
  }

  50% {
    border-radius: 45% 55% 65% 35% / 40% 65% 35% 60%;
  }

  100% {
    border-radius: 30% 70% 70% 30% / 50% 30% 70% 50%;
    transform: translate(-50%, 5px) rotate(180deg);
  }
}

@keyframes liquid-biotech-morph-rtl {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: translate(50%, 0) rotate(0deg);
  }
  50% {
    border-radius: 45% 55% 65% 35% / 40% 65% 35% 60%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 50% 30% 70% 50%;
    transform: translate(50%, 5px) rotate(180deg);
  }
}

/* Local spatial stage styling for the grid */
.capabilities-matrix .spatial-scorpion-stage {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--idx-r-xl);
  background: radial-gradient(circle at center, rgb(153 184 186 / 12%) 0%, transparent 65%);
  z-index: 1;
  display: block;
  pointer-events: none;
  overflow: hidden;
}

.capabilities-matrix .spatial-scorpion-stage img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgb(15 118 110 / 15%));
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

:root[dir="rtl"] .capabilities-matrix .spatial-scorpion-stage img {
  left: auto;
  right: auto;
}

@keyframes stage-breathe {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -15px, 0) scale(1.02);
  }
}

.capabilities-matrix .stage-breather {
  width: 100%;
  height: 100%;
  animation: stage-breathe 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Products list */
.products-capacity ul {
  padding: 0;
  margin: clamp(12px, 1.4vw, 18px) 0 0;
  display: grid;
  gap: clamp(10px, 1.2vw, 14px);
}

.products-capacity li {
  list-style: none;
  padding: clamp(10px, 1.2vw, 16px);
  background: var(--idx-white);
  border: 1px solid var(--idx-border);
  border-radius: var(--idx-r-sm);
  font-family: var(--idx-ff-body);
  font-size: clamp(0.9rem, 1vw, 1rem);
  color: var(--idx-slate);
}

/* Link hover — soft teal micro-glow only, NO underlines by default */
.about-company a,
.research-publications a,
.products-capacity a {
  color: var(--idx-teal);
  text-decoration: none;
  background: transparent;
  border-radius: 3px;
  transition:
    background var(--idx-speed) var(--idx-ease),
    color      var(--idx-speed) var(--idx-ease);
  padding-inline: 2px;
}

.about-company a:hover,
.research-publications a:hover,
.products-capacity a:hover {
  background: var(--idx-teal-soft);
  color: color-mix(in oklab, var(--idx-teal) 85%, black);
}



/* Section rhythm */
.about-company     { margin-block-end: 6px; }
.research-publications { margin-block: 6px; }
.products-capacity { margin-block-start: 6px; }

/* ─────────────────────────────────────────────
   §11 — Accessibility: Focus Rings
   ───────────────────────────────────────────── */
.hero-cta-primary:focus-visible  {
  outline: 3px solid var(--idx-cyan);
  outline-offset: 4px;
}

.hero-cta-secondary:focus-visible {
  outline: 2px solid var(--idx-teal);
  outline-offset: 3px;
}

.metric a:focus-visible,
.venom-highlights a:focus-visible {
  outline: 2px solid var(--idx-teal);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────
   §12 — Fluid Responsive
   Mobile → Tablet → Desktop → 4K/8K
   ───────────────────────────────────────────── */

/* ≤ 767px — mobile: single column, visual first */
@media (width <= 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 6vw, 48px);
  }

  .hero-visual {
    aspect-ratio: 4 / 3;
    order: -1;
  }

  .home-hero {
    padding-block: clamp(40px, 7vw, 72px);
  }

  .hero-text h1 {
    font-size: clamp(1.9rem, 6.5vw, 2.9rem);
  }

  .hero-desc {
    max-inline-size: 100%;
  }
}

/* 768–1023px — tablet */
@media (width >= 768px) and (width <= 1023px) {
  .hero-grid {
    gap: clamp(24px, 4vw, 52px);
  }

  .hero-text h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
  }
}

/* 1440px+ widescreen */
@media (width >= 1440px) {
  /* Retain for other widescreen specific adjustments if needed */
}

/* 1920px+ full-HD */
@media (width >= 1920px) {
  .metrics-list { gap: clamp(14px, 1.4vw, 26px); }
}

/* 2560px+ 4K/8K */
@media (width >= 2560px) {
  .hero-grid { max-inline-size: min(1860px, 74vw); }
  .hero-text h1 { font-size: clamp(4rem, 3.2vw, 5.4rem); }
  .metric      { border-radius: 36px; }
}

/* ─────────────────────────────────────────────
   §13 — Reduced Motion
   ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .home-hero::before,
  .hero-text,
  .hero-visual,
  .hero-label,
  .hero-overlay-metrics { animation: none; }

  .hero-cta-primary:hover,
  .metric:hover { transform: none; }
}

/* =====================================================================
   §14 — Standalone Base Layer
   Replaces the foundational rules previously provided by global.css.
   These are scoped carefully so they don't bleed into the nav
   (navigation.css manages its own scope via .nav-capsule-bar).
   ===================================================================== */

/* ── §14.1 HTML-level overflow guard ─────────── */
html {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}

/* ── §14.2 Media elements ─────────────────────── */
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── §14.3 Base anchor styles ─────────────────── */

/*
  Default links inside content sections get teal styling.
  The nav manages its own link colors; we use .home-hero,
  main, and section selectors to stay out of nav scope.
*/
main a {
  color: var(--idx-teal);
  text-decoration: none;
  text-underline-offset: 3px;
}

main a:hover {
  color: color-mix(in oklab, var(--idx-teal) 82%, black);
}

/* ── §14.4 Heading base styles ────────────────── */

/*
  Scoped to main to avoid overriding the nav-capsule-bar.
  Space Grotesk (LTR) / Readex Pro (RTL) via --idx-ff-display token.
*/
main h1,
main h2,
main h3 {
  font-family: var(--idx-ff-display);
  line-height: 1.22;
  margin: 0 0 0.5em;
  text-wrap: balance;
  color: var(--idx-navy);
}

main h3 {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 600;
  color: var(--idx-navy);
  letter-spacing: -0.01em;
  margin-block-start: clamp(18px, 2vw, 28px);
}
:root[dir="rtl"] main h3 { letter-spacing: 0; }

/* Sub-headings inside content cards (Products & Capacity) */
.products-capacity h3,
.venom-highlights h2,
.about-company h3,
.research-publications h3 {
  font-family: var(--idx-ff-display);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 600;
  color: var(--idx-navy);
  letter-spacing: -0.01em;
  margin-block: clamp(16px, 1.8vw, 24px) clamp(8px, 1vw, 14px);
  text-wrap: balance;
}

:root[dir="rtl"] .products-capacity h3,
:root[dir="rtl"] .about-company h3,
:root[dir="rtl"] .research-publications h3 {
  letter-spacing: 0;
}

/* ── §14.5 Paragraph & inline base ───────────── */
main p {
  margin: 0 0 1em;
  color: var(--idx-slate);
  line-height: 1.78;
}
main p:last-child { margin-block-end: 0; }

main strong {
  font-weight: 600;
  color: var(--idx-navy);
}

main em {
  font-style: italic;
  color: var(--idx-slate);
}

main sub, main sup {
  font-size: 0.72em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
main sub { inset-block-end: -0.2em; }
main sup { inset-block-start: -0.4em; }

small.note {
  color: var(--idx-muted);
  font-family: var(--idx-ff-ui);
  font-size: clamp(11px, 0.82vw, 13px);
  line-height: 1.55;
}

/* ── §14.6 Main content rhythm ────────────────── */

/*
  Every direct child of <main> gets: centered max-width,
  padding-inline, and padding-block — matching global.css's
  "main > *" rule but using our new teal/white palette.
*/
main > * {
  max-inline-size: 1480px; /* Base for standard blocks */
  margin-inline: auto;
  padding-inline: clamp(32px, 8vw, 88px);
  padding-block: clamp(28px, 4.5vw, 64px);
}

/* Hero header and spatial stage overrides */
main > .home-hero {
  max-inline-size: none;
  padding-inline: 0 !important; /* Forces outer container to be full bleed */
}

main > .spatial-scorpion-stage {
  padding: 0 !important;
  max-inline-size: 1320px;
}

/* ── §14.7 Scroll margin for anchored headings ── */
:where(h1, h2, h3, [id]) {
  scroll-margin-top: calc(80px + 12px); /* matches fixed nav height */
}

/* ── §14.8 Skip Link ─────────────────────────── */
.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  background: transparent;
  color: inherit;
  z-index: 20000;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
  inline-size: auto;
  block-size: auto;
  padding: 8px 14px;
  background: var(--idx-surface);
  color: var(--idx-navy);
  border: 1px solid var(--idx-border);
  border-radius: 8px;
  font-family: var(--idx-ff-ui);
  font-size: 14px;
  font-weight: 500;
  outline: 2px solid var(--idx-teal);
  outline-offset: 2px;
}


/* ── §14.10 Global focus ring ─────────────────── */

/*
  Scoped to main so we don't fight the nav-capsule-bar
  which has its own focus declarations.
*/
main :focus-visible {
  outline: 2px solid var(--idx-teal);
  outline-offset: 2px;
  border-radius: 6px;
}



/* ── §14.12 High-Contrast Mode ───────────────── */
@media (forced-colors: active) {
  .hero-cta-primary,
  .hero-cta-secondary {
    border: 2px solid ButtonText;
  }

  .metric {
    border: 1px solid GrayText;
  }

  main :focus-visible {
    outline: 2px solid Highlight;
  }
}

/* ─────────────────────────────────────────────
   §14 — Spatial Scorpion Stage
   Cinematic focal element in the hero-metrics gap.
   Acts as a structural relative flexbox spacer to prevent overlapping.
   ───────────────────────────────────────────── */

/* Symmetrical Background Stage Container - Zero-height absolute anchor */
.spatial-scorpion-stage {
  position: relative;
  inline-size: 100%;
  max-inline-size: 1320px; 
  margin-inline: auto;
  margin-block-end: clamp(-80px, -10vw, -140px); /* Aggressively pull the metrics section up to kill any remaining gap */
  block-size: 0;
  height: 0; /* Zero vertical space! Eliminates the empty layout gap entirely */
  z-index: 10;
  display: flex;
  justify-content: flex-end; /* Align image to the right in LTR */
  padding: 0 !important;
  box-sizing: border-box;
}

.spatial-scorpion-stage img {
  position: absolute;
  top: clamp(-160px, -16vw, -60px); /* Positioned higher up into the hero section */
  inset-inline-end: clamp(24px, 5vw, 60px);
  width: clamp(340px, 28vw, 495px); /* 10% smaller than before */
  max-inline-size: 100%;
  height: auto;
  display: block;
  opacity: 0; /* JS takes over immediately */
  filter: drop-shadow(0 20px 50px rgb(15 118 110 / 8%)) contrast(1.05);
  pointer-events: auto; /* Allow hover */
  will-change: transform, opacity;

  /* GPU acceleration base */
  transform: translate3d(0, 0, 0);
  transition: filter 0.6s ease;
}

/* Interaction animation on hover/touch */
.spatial-scorpion-stage img:hover {
  filter: drop-shadow(0 40px 80px rgb(15 118 110 / 25%)) contrast(1.15);
}

@media (max-width: 767px) {
  .spatial-scorpion-stage {
    margin-block-end: clamp(-40px, -8vw, -60px);
    padding: 0 !important;
  }
  .spatial-scorpion-stage img {
    width: clamp(190px, 48vw, 260px);
    max-inline-size: calc(100% - 24px);
    top: clamp(-80px, -12vw, -40px);
    inset-inline-end: clamp(12px, 3vw, 20px);
  }
}

