/* ============================================
   RIDECELL ONTOLOGY v3 — Palantir grade
   ============================================ */

:root {
  --bg-0: #0D1117;
  --bg-1: #161D26;
  --bg-2: #1F2937;
  --bg-3: #2A3344;
  --border: rgba(255,255,255,0.08);
  --border-b: rgba(255,255,255,0.1);

  --t1: #FFFFFF;
  --t2: #e2e2e2;
  --t3: #e2e2e2;
  --t4: #e2e2e2;

  /* Ridecell brand */
  --accent: #6CC04A;
  --accent-d: rgba(108,192,74,0.1);
  --accent-g: rgba(108,192,74,0.3);
  --accent-blue: #00B5E2;

  --c-op: #00B5E2;
  --c-as: #6CC04A;
  --c-su: #ED8B00;
  --c-sp: #A05EB5;
  --c-cl: #D4B826;

  --good: #6CC04A;
  --bad: #EF4444;

  --sans: 'Inter', system-ui, sans-serif;
  --heading: 'Montserrat', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg-0: #FFFFFF;
  --bg-1: #F5F6F8;
  --bg-2: #E8EBF0;
  --bg-3: #D8DCE4;
  --border: rgba(0,0,0,0.08);
  --border-b: rgba(0,0,0,0.14);
  --t1: #111827;
  --t2: #374151;
  --t3: #6B7280;
  --t4: #9CA3AF;
  --accent-d: rgba(108,192,74,0.08);
  --accent-g: rgba(108,192,74,0.2);
  --c-op: #0077A8;
  --c-as: #468237;
  --c-su: #A05A25;
  --c-sp: #703A70;
  --c-cl: #9E8A1E;
  --good: #468237;
  --bad: #DC2626;
}

[data-theme="light"] .nav-logo-white { display: none; }
[data-theme="light"] .nav-logo-dark { display: inline; }
.nav-logo-dark { display: none; }
[data-theme="light"] .hero__counter { text-shadow: none; }
[data-theme="light"] #hero::after { background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, var(--bg-0) 100%); }
[data-theme="light"] .kg__lines path { stroke: rgba(0,0,0,0.15); }
[data-theme="light"] .kg.has-hover .kg__lines path { stroke: rgba(0,0,0,0.04); }
[data-theme="light"] .kg__lines path.edge-active { stroke: #111827; }
[data-theme="light"] .kg.has-hover .kg__lines path.edge-active { stroke: #111827; }
[data-theme="light"] .kn__ring { background: var(--bg-0); }
[data-theme="light"] .kg__tip { background: rgba(255,255,255,0.95); border-color: var(--border); }
[data-theme="light"] .explore { background: rgba(255,255,255,0.92); }
[data-theme="light"] .decision-card { background: rgba(255,255,255,0.85); }
[data-theme="light"] .lens { background: rgba(255,255,255,0.7); }
[data-theme="light"] .impact__side { background: var(--bg-1); }
[data-theme="light"] .impact__bar-fill--full { background: var(--t4); }
[data-theme="light"] .day--idle { background: rgba(239,68,68,0.25); border-color: rgba(239,68,68,0.35); }
[data-theme="light"] .day--detect { background: rgba(0,119,168,0.25); border-color: rgba(0,119,168,0.35); }
[data-theme="light"] .day--action { background: rgba(0,119,168,0.15); border-color: rgba(0,119,168,0.25); }
[data-theme="light"] .day--ok { background: rgba(70,130,55,0.25); border-color: rgba(70,130,55,0.35); }
[data-theme="light"] .pipe-stage { background: var(--bg-0); }
[data-theme="light"] .mod-card { background: var(--bg-0); }
[data-theme="light"] #hero { background: var(--bg-0); }
[data-theme="light"] #hero::after { background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, var(--bg-0) 100%); }
[data-theme="light"] #hero-canvas { opacity: 0.3; mix-blend-mode: multiply; }
[data-theme="light"] #cta { background: var(--accent); }
[data-theme="light"] .cta__h2, [data-theme="light"] .cta__p { color: #FFFFFF; }
[data-theme="light"] .cta__btn { background: var(--bg-0); color: var(--t1); border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .cta__btn:hover { background: var(--bg-1); }

/* Theme toggle */
.theme-toggle { display: none !important; /* hidden for now */
  background: none;
  border: 1px solid var(--border-b);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--t2);
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--t1); border-color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Nav Book Demo CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 18px;
  background: var(--accent);
  color: var(--bg-0);
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.nav-cta:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-g), inset 0 0 24px var(--accent-d);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); color: var(--t2); background: var(--bg-0); overflow-x: hidden; }

.main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,17,23,0.4);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 12px rgba(0,0,0,0.2);
  padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 64px;
}
[data-theme="light"] .main-nav {
  background: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 12px rgba(0,0,0,0.05);
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }
.section { padding: 8rem 0; position: relative; }
.section--compact { padding: 4rem 0; }
.section--flush { padding-bottom: 0; }

/* ======= REVEAL ANIMATION ======= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======= SECTION HEADINGS ======= */
.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--t3);
  margin-bottom: 3rem;
}

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Vignette overlay */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, var(--bg-0) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease-out forwards;
}

.hero__h1 {
  margin-bottom: 1.5rem;
}

.hero__line {
  display: block;
  font-family: var(--heading);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.15;
  color: var(--t1);
}

.hero__line:not(.hero__line--ready) {
  opacity: 0;
  animation: fadeUp 0.8s 0.4s ease-out forwards;
}

.hero__char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(6px);
  animation: charReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--char-delay, 0s);
  will-change: opacity, filter, transform;
}

@keyframes charReveal {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}



.hero__sub {
  font-size: 1.2rem;
  color: var(--t3);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.0s ease-out forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero metrics */
.hero__metrics {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.3s ease-out forwards;
}

.hero__metric { text-align: center; }

.hero__metric-icon {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 0.5rem;
  color: var(--accent);
  opacity: 0.7;
}

.hero__metric-val {
  display: block;
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -0.03em;
}

.hero__metric-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__partners {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s 1.6s ease-out forwards;
}

.hero__partners-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 0.25rem;
  text-align: center;
}

.hero__partners-marquee {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.hero__partners-track {
  display: inline-flex;
  align-items: center;
  gap: 3.75rem;
  padding-left: 3.75rem;
  white-space: nowrap;
  animation: partnersScroll 90s linear infinite;
  will-change: transform;
}

.hero__partners-track span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 60px;
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--t3);
  opacity: 0.7;
  transition: opacity 0.3s ease, filter 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.hero__partners-track span img {
  display: block;
  height: 33px;
  width: auto;
  max-width: 135px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1) opacity(0.9);
  transition: filter 0.3s ease;
}

.hero__partners-track span[data-size="lg"] img {
  height: 48px;
  max-width: 150px;
}

.hero__partners-track span[data-size="sm"] img {
  height: 21px;
  max-width: 105px;
}

.hero__partners-track span[data-slug="bmw"] img {
  height: 39px;
}

.hero__partners-track span[data-slug="arval"] img,
.hero__partners-track span[data-slug="penske"] img {
  filter: grayscale(1) brightness(1.6) contrast(1.05);
}


@media (hover: hover) and (pointer: fine) {
  .hero__partners-track span:hover {
    opacity: 1;
    color: var(--t1);
  }

  .hero__partners-track span:hover img {
    filter: grayscale(0) brightness(1) contrast(1);
  }

  .hero__partners-marquee:hover .hero__partners-track {
    animation-play-state: paused;
  }
}

.partners-tooltip {
  position: fixed;
  background: var(--bg-3);
  border: 1px solid var(--border-b);
  color: var(--t1);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.15s ease;
  z-index: 9999;
}

.partners-tooltip.is-visible {
  opacity: 1;
}

@keyframes partnersScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__partners-track { animation: none; }
}

.hero__scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s 1.8s ease-out forwards;
}

/* ============================================
   PIPELINE
   ============================================ */
/* Section video background (reusable) */
.section-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2;
}

.section-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, var(--bg-0) 95%),
    linear-gradient(to bottom, var(--bg-0) 0%, transparent 8%, transparent 92%, var(--bg-0) 100%);
}

[data-theme="light"] .section-video { opacity: 0.1; }

@media (prefers-reduced-motion: reduce) {
  .section-video { display: none; }
}

#pipeline {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}

.pipe-stage {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-1);
  position: relative;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.pipe-stage:hover {
  border-color: var(--border-b);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.pipe-stage--active {
  border-color: rgba(108,192,74,0.25);
  background: linear-gradient(135deg, var(--bg-1), rgba(108,192,74,0.04));
}

.pipe-stage__icon {
  width: 48px;
  height: 48px;
  color: var(--t2);
  margin-bottom: 1.25rem;
  animation: iconFloat 4s ease-in-out infinite;
}

.pipe-stage:nth-child(1) .pipe-stage__icon { animation-delay: 0s; }
.pipe-stage:nth-child(3) .pipe-stage__icon { animation-delay: -1.3s; }
.pipe-stage:nth-child(5) .pipe-stage__icon { animation-delay: -2.6s; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pipe-stage__icon--brain { color: var(--t2); }

.pipe-stage__num {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--t2);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.pipe-stage h3 {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 0.75rem;
}

.pipe-stage p {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.7;
  flex: 1;
}

.pipe-stage__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 1rem;
}

.pipe-stage__chips span {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--t3);
}

.pipe-stage__chips span:last-child {
  border-style: dashed;
  color: var(--t4);
}

.pipe-stage__chips span[data-tip] {
  position: relative;
}

.pipe-stage__chips span[data-tip]:hover {
  border-color: var(--accent);
  color: var(--accent);
  cursor: default;
}

.pipe-stage__chips span[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--border-b);
  color: var(--t1);
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.pipe-stage__chips span[data-tip]:hover::after {
  opacity: 1;
}

/* Module pills */
.pipe-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.pm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid;
}

.pm i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pm--op { color: var(--c-op); border-color: rgba(0,181,226,0.2); background: rgba(0,181,226,0.06); }
.pm--op i { background: var(--c-op); }
.pm--as { color: var(--c-as); border-color: rgba(108,192,74,0.2); background: rgba(108,192,74,0.06); }
.pm--as i { background: var(--c-as); }
.pm--su { color: var(--c-su); border-color: rgba(237,139,0,0.2); background: rgba(237,139,0,0.06); }
.pm--su i { background: var(--c-su); }
.pm--sp { color: var(--c-sp); border-color: rgba(160,94,181,0.2); background: rgba(160,94,181,0.06); }
.pm--sp i { background: var(--c-sp); }
.pm--cl { color: var(--c-cl); border-color: rgba(212,184,38,0.2); background: rgba(212,184,38,0.06); }
.pm--cl i { background: var(--c-cl); }

.pipe-stage__outputs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1rem;
}

.pipe-stage__outputs span {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-b);
  border-radius: 5px;
  color: var(--t2);
}

/* Pipe connectors */
.pipe-connector {
  display: flex;
  align-items: center;
  padding: 2rem 0.5rem;
  align-self: center;
}

.pipe-connector svg { width: 60px; }

/* ============================================
   5 INTELLIGENCE MODULE CARDS
   ============================================ */
#modules { border-top: 1px solid var(--border); background: var(--bg-1); }

.mod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mod-card {
  border: 2px solid #282828;
  border-radius: 12px;
  background: var(--bg-0);
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.mod-card:hover {
  border-color: var(--border-b);
}

.mod-card--lg {
  padding: 2rem;
}

.mod-card--wide {
  grid-column: 1 / -1;
}

/* Module card background images */
.mod-card {
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  position: relative;
}

.mod-card > * {
  position: relative;
  z-index: 2;
}

.mod-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(13,17,23,0.7) 0%, rgba(13,17,23,0.8) 60%, rgba(13,17,23,0.88) 100%);
  z-index: 1;
  transition: background 0.3s;
  pointer-events: none;
}

.mod-card:hover::before {
  background: linear-gradient(160deg, rgba(13,17,23,0.6) 0%, rgba(13,17,23,0.72) 60%, rgba(13,17,23,0.82) 100%);
}

[data-theme="light"] .mod-card::before {
  background: linear-gradient(160deg, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.94) 60%, rgba(255,255,255,0.97) 100%);
}

[data-theme="light"] .mod-card:hover::before {
  background: linear-gradient(160deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.9) 60%, rgba(255,255,255,0.95) 100%);
}

.mod-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.mod-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mod-color);
}

.mod-card__label {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mod-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.mod-card__headline {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--t1);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.mod-card--lg .mod-card__headline {
  font-size: 1.4rem;
}

.mod-card__example {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.mod-card__metric {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--t2);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.mod-card__metric span {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--mod-color);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .mod-grid { grid-template-columns: 1fr; }
  .mod-card--lg .mod-card__headline { font-size: 1.2rem; }
}

/* ============================================
   PLATFORM ARCHITECTURE - ISOMETRIC 3D STACK
   ============================================ */
#platform-arch {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
  position: relative;
  overflow: hidden;
}

#platform-arch::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(108,192,74,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.iso {
  position: relative;
  height: 720px;
  margin: 4rem auto 0;
  max-width: 1400px;
  perspective: 2400px;
  perspective-origin: 50% 28%;
}
.iso[data-reveal] { opacity: 1; transform: none; transition: none; }

.iso__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.iso__stack {
  position: relative;
  width: 640px;
  height: 440px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg);
}

/* Faint base grid below the stack */
.iso__base {
  position: absolute;
  bottom: 4%;
  left: 50%;
  width: 1100px;
  height: 1100px;
  margin-left: -550px;
  transform: rotateX(60deg) rotateZ(-32deg);
  background-image:
    linear-gradient(rgba(108,192,74,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,192,74,0.10) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.2s;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, black 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 50% 50% at center, black 10%, transparent 70%);
}
.iso.visible .iso__base { opacity: 1; }

/* Layers - flat planes that translate along Z axis when revealed */
.iso-layer {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(31,41,55,0.92) 0%, rgba(13,17,23,0.88) 100%);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transform: translateZ(0);
  transition:
    transform 1.4s cubic-bezier(0.16,1,0.3,1) var(--td, 0s),
    opacity 0.3s ease 0s,
    filter 0.3s ease 0s,
    border-color 0.3s ease 0s;
  opacity: 0;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.5),
    0 2px 0 rgba(0,0,0,0.45),
    0 3px 0 rgba(0,0,0,0.4),
    0 4px 0 rgba(0,0,0,0.35),
    0 5px 0 rgba(0,0,0,0.3),
    0 6px 0 rgba(0,0,0,0.25),
    0 7px 0 rgba(0,0,0,0.2),
    0 8px 0 rgba(0,0,0,0.18),
    0 30px 70px rgba(0,0,0,0.65);
  overflow: hidden;
}

/* Module color accent (corner glow) */
.iso-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 0% 100%, var(--c) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 100% 0%, var(--c) 0%, transparent 70%);
  opacity: 0.20;
  pointer-events: none;
  border-radius: inherit;
}

/* Inner technical grid pattern */
.iso-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  border-radius: inherit;
}

/* Bottom layer (LLM Models) - more opaque foundation */
.iso-layer--5 {
  background: linear-gradient(135deg, rgba(43,52,66,0.96) 0%, rgba(28,33,40,0.94) 100%);
}
.iso-layer--5::before {
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(156,163,175,0.18) 0%, transparent 70%);
  opacity: 1;
}

/* Layer face content */
.iso-layer__face {
  position: relative;
  z-index: 2;
  padding: 1.6rem 1.9rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Watermark icon centered behind the content */
.iso-layer__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px !important;
  height: 120px !important;
  translate: -50% -50%;
  transform-origin: 50% 50%;
  color: var(--c);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  stroke-width: 1.1;
}
.iso-layer--5 .iso-layer__icon { color: rgba(255,255,255,0.4); opacity: 0.20; }
.iso-layer--4 .iso-layer__icon { transform: rotate(90deg); }
[data-theme="light"] .iso-layer__icon { opacity: 0.14; }
[data-theme="light"] .iso-layer--5 .iso-layer__icon { color: rgba(0,0,0,0.45); opacity: 0.18; }

.iso-layer__bar {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  align-self: flex-start;
  padding: 0.7rem 1.3rem;
  background: var(--c);
  color: #fff;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.2);
  white-space: nowrap;
}

.iso-layer__bar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  background: rgba(255,255,255,0.18);
  border-radius: 3px;
  color: rgba(255,255,255,0.95);
  flex-shrink: 0;
}

.iso-layer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}
.iso-layer__chips span {
  padding: 6px 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}
.iso-layer__chips--inline { margin-top: 0; }

.iso-layer__split {
  display: flex;
  gap: 1.6rem;
  margin-top: auto;
  align-items: flex-start;
}
.iso-layer__split--3 { gap: 1rem; }
.iso-layer__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.iso-layer__col-h {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--c);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  filter: brightness(1.2);
}

/* Reveal animation - layers expand outward (transform staggers via --td; opacity fades together) */
.iso.visible .iso-layer { opacity: 1; }
.iso.visible .iso-layer--1 { transform: translateZ(280px); --td: 0.20s; }
.iso.visible .iso-layer--2 { transform: translateZ(140px); --td: 0.35s; }
.iso.visible .iso-layer--3 { transform: translateZ(0px);   --td: 0.50s; }
.iso.visible .iso-layer--4 { transform: translateZ(-140px); --td: 0.65s; }
.iso.visible .iso-layer--5 { transform: translateZ(-280px); --td: 0.80s; }

/* Hover-focus: JS-driven via .has-hover on stack and .is-hovered on the focused layer.
   Pure CSS :hover is unreliable in 3D — translateZ shifts a layer's visible projection
   beyond the parent's flat bounds, so the browser hits the parent stage instead.
   In our DOM the layers are ordered 5,4,3,2,1, so following siblings = layers above in 3D. */
.iso.visible .iso__stack.has-hover .iso-layer {
  filter: brightness(0.3) saturate(0.4);
}
.iso.visible .iso__stack.has-hover .iso-layer.is-hovered {
  filter: none;
  border-color: var(--c);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.5),
    0 2px 0 rgba(0,0,0,0.45),
    0 3px 0 rgba(0,0,0,0.4),
    0 4px 0 rgba(0,0,0,0.35),
    0 5px 0 rgba(0,0,0,0.3),
    0 6px 0 rgba(0,0,0,0.25),
    0 7px 0 rgba(0,0,0,0.2),
    0 8px 0 rgba(0,0,0,0.18),
    0 0 40px var(--c),
    0 30px 70px rgba(0,0,0,0.65);
}
.iso.visible .iso__stack.has-hover .iso-layer.is-hovered ~ .iso-layer {
  opacity: 0.04;
  pointer-events: none;
}

/* Side annotations (flat to viewer, aligned with each expanded layer) */
.iso__annos {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.iso-anno {
  position: absolute;
  left: max(3%, calc(50% - 580px));
  top: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
/* Each annotation aligns vertically with its expanded layer's screen position */
.iso-anno[style*="--n:1"] { transform: translate(-30px, calc(-50% - 240px)); }
.iso-anno[style*="--n:2"] { transform: translate(-30px, calc(-50% - 120px)); }
.iso-anno[style*="--n:3"] { transform: translate(-30px, -50%); }
.iso-anno[style*="--n:4"] { transform: translate(-30px, calc(-50% + 120px)); }
.iso-anno[style*="--n:5"] { transform: translate(-30px, calc(-50% + 240px)); }

.iso.visible .iso-anno { opacity: 1; }
.iso.visible .iso-anno[style*="--n:1"] { transform: translate(0, calc(-50% - 240px)); transition-delay: 0.45s; }
.iso.visible .iso-anno[style*="--n:2"] { transform: translate(0, calc(-50% - 120px)); transition-delay: 0.60s; }
.iso.visible .iso-anno[style*="--n:3"] { transform: translate(0, -50%); transition-delay: 0.75s; }
.iso.visible .iso-anno[style*="--n:4"] { transform: translate(0, calc(-50% + 120px)); transition-delay: 0.90s; }
.iso.visible .iso-anno[style*="--n:5"] { transform: translate(0, calc(-50% + 240px)); transition-delay: 1.05s; }

.iso-anno__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--anno-c, var(--accent));
  letter-spacing: 0.08em;
  padding: 5px 9px;
  background: var(--anno-bg, rgba(108,192,74,0.10));
  border: 1px solid var(--anno-bd, rgba(108,192,74,0.35));
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* Per-layer annotation colors, matching each iso layer's --c */
.iso-anno[style*="--n:1"] { --anno-c: #00B5E2; --anno-bg: rgba(0,181,226,0.10);  --anno-bd: rgba(0,181,226,0.35); }
.iso-anno[style*="--n:2"] { --anno-c: #ED8B00; --anno-bg: rgba(237,139,0,0.10);  --anno-bd: rgba(237,139,0,0.35); }
.iso-anno[style*="--n:3"] { --anno-c: #A05EB5; --anno-bg: rgba(160,94,181,0.10); --anno-bd: rgba(160,94,181,0.35); }
.iso-anno[style*="--n:4"] { --anno-c: #0EAFA8; --anno-bg: rgba(14,175,168,0.10); --anno-bd: rgba(14,175,168,0.35); }
.iso-anno[style*="--n:5"] { --anno-c: #9CA3AF; --anno-bg: rgba(156,163,175,0.10);--anno-bd: rgba(156,163,175,0.35); }
.iso-anno__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iso-anno__name {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.iso-anno__desc {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--t3);
  white-space: nowrap;
}
.iso-anno__line {
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, var(--anno-bd, rgba(108,192,74,0.5)), transparent);
  flex-shrink: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

/* Annotation hover affordance — synced with corresponding layer via JS .is-hovered */
.iso-anno.is-hovered .iso-anno__num {
  background: var(--anno-bd, rgba(108,192,74,0.25));
  border-color: var(--anno-c, var(--accent));
  color: var(--t1);
}
.iso-anno.is-hovered .iso-anno__name { color: var(--anno-c, var(--accent)); }
.iso-anno.is-hovered .iso-anno__line {
  width: 56px;
  background: linear-gradient(to right, var(--anno-c, var(--accent)), transparent);
}

/* Light mode overrides */
[data-theme="light"] .iso-layer {
  background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(245,246,248,0.92) 100%);
  border-color: rgba(0,0,0,0.12);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.10),
    0 2px 0 rgba(0,0,0,0.09),
    0 3px 0 rgba(0,0,0,0.08),
    0 4px 0 rgba(0,0,0,0.07),
    0 5px 0 rgba(0,0,0,0.06),
    0 6px 0 rgba(0,0,0,0.05),
    0 7px 0 rgba(0,0,0,0.04),
    0 8px 0 rgba(0,0,0,0.035),
    0 30px 60px rgba(0,0,0,0.18);
}
[data-theme="light"] .iso-layer__chips span {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.72);
}
[data-theme="light"] .iso-layer::after {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
[data-theme="light"] .iso-layer--5 {
  background: linear-gradient(135deg, rgba(232,235,240,0.96) 0%, rgba(216,220,228,0.92) 100%);
}
[data-theme="light"] .iso__base {
  background-image:
    linear-gradient(rgba(70,130,55,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70,130,55,0.10) 1px, transparent 1px);
}

/* Mobile note */
.iso__mobile-note {
  display: none;
  text-align: center;
  color: var(--t3);
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: 2rem;
  letter-spacing: 0.04em;
}

/* Mobile fallback - flat vertical stack */
@media (max-width: 1100px) {
  .iso__annos { display: none; }
}
@media (max-width: 900px) {
  .iso {
    height: auto;
    perspective: none;
    padding: 0 1.5rem;
  }
  .iso__stage {
    position: relative;
    inset: auto;
  }
  .iso__stack {
    transform: none;
    width: 100%;
    max-width: 480px;
    height: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    margin: 0 auto;
  }
  .iso-layer {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    height: auto;
    min-height: 130px;
    transition-delay: 0s !important;
  }
  .iso__base { display: none; }
  .iso__mobile-note { display: block; }
  .iso-layer__split { gap: 1rem; flex-wrap: wrap; }
}

/* Mobile - tap-to-front stacked deck. JS sets data-rank on each layer
   (0 = active/front, higher = further back). */
@media (max-width: 768px) {
  .iso {
    padding: 0;
    margin: 0 auto;
  }
  #platform-arch .section-sub { margin-bottom: 1rem; }
  .iso__stage {
    padding: 0;
    position: relative;
    display: block;
  }

  .iso__stack {
    width: 100% !important;
    max-width: 460px !important;
    height: 440px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    position: relative !important;
    display: block !important;
    flex-direction: row !important;
    transform: none !important;
    overflow: visible;
  }

  .iso-layer {
    position: absolute !important;
    inset: auto 5vw 0 5vw !important;
    height: auto !important;
    min-height: 320px;
    margin: 0 !important;
    transform-origin: bottom center !important;
    transition:
      transform 0.4s cubic-bezier(0.16,1,0.3,1),
      filter 0.4s cubic-bezier(0.16,1,0.3,1) !important;
    opacity: 1 !important;
    touch-action: pan-y;
  }

  .iso-layer[data-rank="0"] {
    transform: translateX(var(--swipe-x, 0px)) rotate(var(--swipe-rot, 0deg)) !important;
    z-index: 50;
    filter: none;
    cursor: grab;
  }
  .iso-layer[data-rank="0"]:active { cursor: grabbing; }
  .iso-layer[data-rank="1"] { transform: translateY(-50px)  scale(0.97) !important; z-index: 40; filter: brightness(0.82) saturate(0.85); }
  .iso-layer[data-rank="2"] { transform: translateY(-90px)  scale(0.94) !important; z-index: 30; filter: brightness(0.7)  saturate(0.7); }
  .iso-layer[data-rank="3"] { transform: translateY(-124px) scale(0.91) !important; z-index: 20; filter: brightness(0.6)  saturate(0.6); }
  .iso-layer[data-rank="4"] { transform: translateY(-152px) scale(0.88) !important; z-index: 10; filter: brightness(0.5)  saturate(0.5); }

  /* Tighter type so chips don't overlap on narrow widths */
  .iso-layer__bar {
    font-size: 0.72rem;
    padding: 0.45rem 0.8rem;
    letter-spacing: 0.04em;
    white-space: normal;
    line-height: 1.2;
  }
  .iso-layer__chips { gap: 4px; }
  .iso-layer__chips span {
    font-size: 0.52rem;
    padding: 3px 6px;
    letter-spacing: 0.02em;
  }
  .iso-layer__col-h {
    font-size: 0.5rem;
    letter-spacing: 0.04em;
  }
  .iso-layer__face {
    position: absolute;
    inset: 0;
    padding: 0.85rem 0.95rem;
    gap: 0.6rem;
  }
  .iso-layer__split { gap: 0.55rem; flex-wrap: nowrap; }
  .iso-layer__split--3 { gap: 0.4rem; }
  .iso-layer__col { min-width: 0; }
  .iso-layer__icon {
    width: 70px !important;
    height: 70px !important;
  }

  .iso__mobile-note {
    display: block;
    margin-top: 1.25rem;
    font-size: 0.7rem;
    opacity: 0.6;
  }
}

/* Small phones - stack the multi-column splits vertically so wide chips
   like "CLS / CRM / ERP / B2B" stop fighting narrow columns. */
@media (max-width: 480px) {
  .iso__stack { height: 540px !important; }
  .iso-layer__split,
  .iso-layer__split--3 {
    flex-direction: column;
    gap: 0.6rem;
  }
  .iso-layer__col { width: 100%; }
  .iso-layer__col-h { font-size: 0.55rem; }
  .iso-layer__chips span { font-size: 0.55rem; }
}

/* ============================================
   DEPLOYMENT & SOVEREIGNTY
   ============================================ */
#sovereignty {
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  position: relative;
}

.sov-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.sov-tier {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.16,1,0.3,1),
    border-color 0.25s ease,
    box-shadow 0.3s ease;
}

.sov-tier::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--sov-c) 14%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.sov-tier > * { position: relative; z-index: 1; }

.sov-tier:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--sov-c) 35%, var(--border));
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}

.sov-tier__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sov-tier__num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--t4);
  padding: 3px 7px;
  background: var(--bg-2);
  border-radius: 4px;
}

.sov-tier__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sov-c);
  box-shadow: 0 0 12px var(--sov-c);
}

.sov-tier__label {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sov-c);
  text-transform: uppercase;
}

.sov-tier__icon {
  width: 28px !important;
  height: 28px !important;
  color: var(--sov-c);
  stroke-width: 1.6;
  margin-top: 0.2rem;
  opacity: 0.95;
}

.sov-tier__title {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.sov-tier__body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--t3);
  flex: 1;
}

.sov-tier__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.4rem;
}

.sov-tier__chips span {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 4px 9px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--t3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sov-rail {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sov-rail__label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--t4);
  text-transform: uppercase;
}

.sov-rail__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sov-rail__pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--t2);
  letter-spacing: 0.04em;
}

.sov-rail__pill i {
  width: 14px !important;
  height: 14px !important;
  color: var(--accent);
  stroke-width: 1.8;
  flex-shrink: 0;
}

.sov-rail__pill[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 9px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-b);
  border-radius: 6px;
  color: var(--t1);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-transform: none;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.sov-rail__pill[data-tip]:hover::after { opacity: 1; }

@media (max-width: 900px) {
  .sov-tiers { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
  .sov-tier { padding: 1.4rem 1.2rem 1.2rem; }
  .sov-tier__title { font-size: 1.1rem; }
  .sov-tier__body { font-size: 0.85rem; }
  .sov-rail { padding: 0.9rem 1.1rem; gap: 0.85rem; }
}

/* ============================================
   LIVING SYSTEM
   ============================================ */
#living-system { border-top: 1px solid var(--border); background: var(--bg-1); position: relative; overflow: hidden; }

.living__canvas-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.living__stage {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin-top: 2rem;
}


.living__lenses {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.lens {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 14px 10px;
  min-width: 76px;
  background: rgba(13,17,23,0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--t3);
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lens span {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lens:hover {
  background: rgba(13,17,23,0.85);
  transform: translateY(-3px);
}

.lens[data-module="operational"]:hover { border-color: var(--c-op); color: var(--c-op); box-shadow: 0 4px 30px rgba(0,181,226,0.12); }
.lens[data-module="asset"]:hover { border-color: var(--c-as); color: var(--c-as); box-shadow: 0 4px 30px rgba(108,192,74,0.12); }
.lens[data-module="supplier"]:hover { border-color: var(--c-su); color: var(--c-su); box-shadow: 0 4px 30px rgba(237,139,0,0.12); }
.lens[data-module="spend"]:hover { border-color: var(--c-sp); color: var(--c-sp); box-shadow: 0 4px 30px rgba(160,94,181,0.12); }
.lens[data-module="client"]:hover { border-color: var(--c-cl); color: var(--c-cl); box-shadow: 0 4px 30px rgba(212,184,38,0.12); }

/* Decision feed */
.living__feed {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
  width: 320px;
}

.decision-card {
  background: rgba(22,27,34,0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.55;
  color: var(--t2);
  max-height: 200px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(30px);
  animation: slideIn 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
  backdrop-filter: blur(8px);
  transition: max-height 0.5s ease, margin-bottom 0.5s ease, padding 0.5s ease, border-width 0.5s ease;
}

.decision-card.exiting {
  animation: slideOut 0.5s ease forwards;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: -8px;
  border-width: 0;
}

.decision-card__module { font-family: var(--mono); font-size: 0.52rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.decision-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.decision-card__id { font-weight: 700; color: var(--t1); }
.decision-card__type { font-size: 0.55rem; padding: 2px 6px; border-radius: 3px; font-weight: 600; }
.decision-card__type--operational { background: rgba(0,181,226,0.1); color: var(--c-op); }
.decision-card__type--asset { background: rgba(108,192,74,0.1); color: var(--c-as); }
.decision-card__type--supplier { background: rgba(237,139,0,0.1); color: var(--c-su); }
.decision-card__type--spend { background: rgba(160,94,181,0.1); color: var(--c-sp); }
.decision-card__type--client { background: rgba(212,184,38,0.1); color: var(--c-cl); }
.decision-card__body { margin-bottom: 4px; }
.decision-card__action { color: var(--accent); font-weight: 600; }

@keyframes slideIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(30px); } }

/* Explore overlay */
.explore {
  position: absolute;
  inset: 0;
  background: rgba(13,17,23,0.75);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
}
.explore[hidden] { display: none; }

.explore__close {
  position: absolute;
  top: 50%;
  left: calc(50% - 370px);
  transform: translateY(-50%);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--t3);
  width: 72px;
  height: 72px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.explore__close:hover { color: var(--t1); border-color: var(--border-b); }

.explore__inner { max-width: 560px; padding: 2rem; }
.explore__inner h3 { font-size: 1.2rem; font-weight: 700; color: var(--t1); margin-bottom: 2rem; }

.explore__steps { display: flex; flex-direction: column; }

.explore__step {
  display: flex;
  gap: 1rem;
  padding: 0.8rem 0 0.8rem 1.5rem;
  border-left: 1px solid var(--border);
  margin-left: 9px;
  position: relative;
  opacity: 0;
  transform: translateY(8px);
  animation: stepIn 0.45s ease-out forwards;
}
.explore__step:nth-child(2) { animation-delay: 0.25s; }
.explore__step:nth-child(3) { animation-delay: 0.5s; }
.explore__step:nth-child(4) { animation-delay: 0.75s; }
.explore__step:nth-child(5) { animation-delay: 1s; border-left-color: transparent; }

@keyframes stepIn { to { opacity:1; transform:translateY(0); } }

.explore__step-number {
  position: absolute;
  left: -9px;
  top: 0.8rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 1.5px solid var(--accent);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.explore__step-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 3px;
}

.explore__step-text { font-size: 0.85rem; color: var(--t3); line-height: 1.55; }
.explore__step-text strong { color: var(--t1); }

.living__mobile-note {
  display: none;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--t4);
  padding: 1.5rem;
}

/* ============================================
   IMPACT STORIES
   ============================================ */
#impact { border-top: 1px solid var(--border); }

.impacts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.impact {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.impact:last-child { border-bottom: none; }

.impact__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 5px;
  margin-bottom: 0.75rem;
}

.impact__badge--operational { color: var(--c-op); background: rgba(0,181,226,0.08); }
.impact__badge--asset { color: var(--c-as); background: rgba(108,192,74,0.08); }
.impact__badge--supplier { color: var(--c-su); background: rgba(237,139,0,0.08); }
.impact__badge--spend { color: var(--c-sp); background: rgba(160,94,181,0.08); }
.impact__badge--client { color: var(--c-cl); background: rgba(212,184,38,0.08); }

.impact__title {
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

/* Side-by-side viz */
.impact__viz {
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.impact__side {
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-1);
}

.impact__side--before { border-color: rgba(239,68,68,0.1); }
.impact__side--after { border-color: rgba(108,192,74,0.1); }

.impact__side-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.impact__side--before .impact__side-label { color: var(--t4); }
.impact__side--after .impact__side-label { color: var(--accent); }

.impact__divider { display: flex; align-items: center; justify-content: center; align-self: center; }

/* Bar charts */
.impact__bar-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 1.25rem; }

.impact__bar-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.impact__bar-track {
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}

.impact__bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 1s cubic-bezier(0.16,1,0.3,1);
}

.impact__bar-fill--full { background: var(--t4); }
.impact__bar-fill--bad { background: var(--bad); }
.impact__bar-fill--good { background: var(--good); }
.impact__bar-fill--accent { background: var(--accent); }

.impact__bar-val {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--t3);
  margin-top: 3px;
}
.impact__bar-val--bad { color: var(--bad); }
.impact__bar-val--good { color: var(--good); }

/* Loss / Gain callouts */
.impact__loss, .impact__gain {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.impact__loss-num, .impact__gain-num {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.impact__loss-num { color: var(--bad); }
.impact__gain-num { color: var(--good); }

.impact__loss span, .impact__gain span {
  font-size: 0.75rem;
  color: var(--t4);
}

/* Day grid (idle vehicle) */
.impact__timeline-viz { margin-bottom: 1.25rem; }

.impact__day-grid {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.day {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.day--idle { background: rgba(239,68,68,0.45); border-color: rgba(239,68,68,0.55); }
.day--detect { background: rgba(0,181,226,0.5); border-color: rgba(0,181,226,0.6); }
.day--action { background: rgba(0,181,226,0.35); border-color: rgba(0,181,226,0.45); }
.day--ok { background: rgba(108,192,74,0.5); border-color: rgba(108,192,74,0.6); }

/* Day box stagger animation (keyframes - only run when .visible added) */
.day { opacity: 0; transform: scale(0.5); }

/* Gauge arc draw animation */
/* Gauge arc draw animation */
.gauge-arc {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16,1,0.3,1);
}

/* Gauge text fade in */
.impact__gauge-svg text {
  opacity: 0;
  transition: opacity 0.5s ease 0.6s;
}
.impact.visible .impact__gauge-svg text {
  opacity: 1;
}

/* Arrow triangle pop animation */
.impact__gauge-svg path[fill="#EF4444"],
.impact__gauge-svg path[fill="#6CC04A"] {
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.4s ease 0.8s, transform 0.4s cubic-bezier(0.16,1,0.3,1) 0.8s;
}

.impact.visible .impact__gauge-svg path[fill="#EF4444"],
.impact.visible .impact__gauge-svg path[fill="#6CC04A"] {
  opacity: 0.8;
  transform: scale(1);
}

/* Gauge background track - hidden until visible */
.impact__gauge-svg path[stroke="#1C2128"] {
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
}
.impact.visible .impact__gauge-svg path[stroke="#1C2128"] {
  opacity: 1;
}

.spin-cw {
  animation: spinCW 3s linear infinite;
}

.spin-ccw {
  animation: spinCCW 3s linear infinite;
}

@keyframes spinCW {
  to { transform: rotate(360deg); }
}

@keyframes spinCCW {
  to { transform: rotate(-360deg); }
}

@keyframes dayPop {
  to { opacity: 1; transform: scale(1); }
}

.impact.visible .day { animation: dayPop 0.3s ease-out forwards; }
.impact.visible .impact__day-grid .day:nth-child(1) { animation-delay: 0.05s; }
.impact.visible .impact__day-grid .day:nth-child(2) { animation-delay: 0.1s; }
.impact.visible .impact__day-grid .day:nth-child(3) { animation-delay: 0.15s; }
.impact.visible .impact__day-grid .day:nth-child(4) { animation-delay: 0.2s; }
.impact.visible .impact__day-grid .day:nth-child(5) { animation-delay: 0.25s; }
.impact.visible .impact__day-grid .day:nth-child(6) { animation-delay: 0.3s; }
.impact.visible .impact__day-grid .day:nth-child(7) { animation-delay: 0.35s; }
.impact.visible .impact__day-grid .day:nth-child(8) { animation-delay: 0.4s; }
.impact.visible .impact__day-grid .day:nth-child(9) { animation-delay: 0.45s; }
.impact.visible .impact__day-grid .day:nth-child(10) { animation-delay: 0.5s; }
.impact.visible .impact__day-grid .day:nth-child(11) { animation-delay: 0.55s; }
.impact.visible .impact__day-grid .day:nth-child(12) { animation-delay: 0.6s; }
.impact.visible .impact__day-grid .day:nth-child(13) { animation-delay: 0.65s; }
.impact.visible .impact__day-grid .day:nth-child(14) { animation-delay: 0.7s; }

/* Sparkline draw animation (keyframes - only run when .visible added) */
.impact__sparkline path { stroke-dasharray: 300; stroke-dashoffset: 300; }
.impact__sparkline circle, .impact__sparkline text { opacity: 0; }
.impact__sparkline line { opacity: 0; }

@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

.impact.visible .impact__sparkline path { animation: drawLine 1.5s ease-out forwards; }
.impact.visible .impact__sparkline circle,
.impact.visible .impact__sparkline text { animation: fadeIn 0.4s ease-out 1.2s forwards; }
.impact.visible .impact__sparkline line { animation: fadeIn 0.4s ease-out 1.4s forwards; }

.impact__day-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--t4);
}

/* Notification timeline (Client Intelligence story) */
.impact__notif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  margin-left: 7px;
  font-size: 0.78rem;
  color: var(--t2);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
}

.impact__notif svg { flex-shrink: 0; margin-top: 2px; }
.impact__notif strong { color: var(--t1); }

.impact__notif--empty { border-left-color: rgba(239,68,68,0.2); }
.impact__notif--good { border-left-color: rgba(108,192,74,0.3); }

/* Stagger on appear */
.impact.visible .impact__notif {
  animation: stepIn 0.4s ease-out forwards;
}
.impact.visible .impact__notif:nth-child(1) { animation-delay: 0.2s; }
.impact.visible .impact__notif:nth-child(2) { animation-delay: 0.5s; }
.impact.visible .impact__notif:nth-child(3) { animation-delay: 0.8s; }

@keyframes stepIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Sparkline chart */
.impact__chart-wrap { margin-bottom: 1.25rem; }
.impact__sparkline { width: 100%; height: auto; }

/* Gauges */
.impact__gauge-row { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.impact__gauge { flex: 1; }
.impact__gauge-svg { width: 100%; height: auto; }

/* ============================================
   NUMBERS BAR
   ============================================ */
#numbers { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-1); }

.numbers__hero-img {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  margin: 0 auto 2.5rem;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}

.num-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.num-bar__item { text-align: center; flex: 1; }

.num-bar__val {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -0.03em;
}

.num-bar__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--t4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ============================================
   CTA
   ============================================ */
#cta {
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 50% 70% at 50% 100%, var(--accent-d) 0%, transparent 70%);
  overflow: hidden;
}

.cta { text-align: center; }

.cta__h2 {
  font-family: var(--heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--t1);
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.cta__p {
  font-size: 1.2rem;
  color: var(--t3);
  margin-bottom: 2.5rem;
}

.cta__btn-wrap {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  height: 56px;
}

/* Converging lines from edges */
.cta__line {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.cta__line--top, .cta__line--bottom {
  width: 1.5px;
  height: 80px;
  left: 50%;
  transform: translateX(-50%);
}

.cta__line--left, .cta__line--right {
  height: 1.5px;
  width: 120px;
  top: 50%;
  transform: translateY(-50%);
}

.cta__line--top {
  left: 50%;
  bottom: 100%;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #6CC04A);
  animation: lineFromTop 2.5s ease-in infinite;
}

.cta__line--bottom {
  left: 50%;
  top: 100%;
  height: 60px;
  background: linear-gradient(to top, transparent, #00B5E2);
  animation: lineFromBottom 2.5s ease-in 0.6s infinite;
}

.cta__line--left {
  top: 50%;
  right: 100%;
  width: 80px;
  background: linear-gradient(to right, transparent, #A05EB5);
  animation: lineFromLeft 2.5s ease-in 1.2s infinite;
}

.cta__line--right {
  top: 50%;
  left: 100%;
  width: 80px;
  background: linear-gradient(to left, transparent, #D4B826);
  animation: lineFromRight 2.5s ease-in 1.8s infinite;
}

@keyframes lineFromTop {
  0% { transform: translateX(-50%) translateY(-120px); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateX(-50%) translateY(0); opacity: 0; }
}

@keyframes lineFromBottom {
  0% { transform: translateX(-50%) translateY(120px); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateX(-50%) translateY(0); opacity: 0; }
}

@keyframes lineFromLeft {
  0% { transform: translateY(-50%) translateX(-200px); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-50%) translateX(0); opacity: 0; }
}

@keyframes lineFromRight {
  0% { transform: translateY(-50%) translateX(200px); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-50%) translateX(0); opacity: 0; }
}


.cta__btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 14px 40px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid var(--accent);
  color: var(--bg-0);
  background: var(--accent);
  transition: all 0.25s ease;
}

.cta__btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 30px var(--accent-g), inset 0 0 30px var(--accent-d);
}

/* ============================================
   KNOWLEDGE GRAPH (DOM/SVG)
   ============================================ */
#ontology { border-top: 1px solid var(--border); padding-bottom: 0; position: relative; overflow: hidden; }

.kg-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 2rem; }
.kg-legend__item { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.62rem; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: 0.06em; }
.kg-legend__item i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* Graph container */
.kg {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 580px;
  max-height: 800px;
  border-bottom: 1px solid var(--border);
  overflow: visible;
  background: transparent;
}

.kg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.25;
}

.kg__video-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, transparent 20%, var(--bg-0) 90%),
    linear-gradient(to bottom, var(--bg-0) 0%, transparent 15%, transparent 85%, var(--bg-0) 100%);
}

[data-theme="light"] .kg__video { opacity: 0.12; }

@media (prefers-reduced-motion: reduce) {
  .kg__video { display: none; }
}

/* SVG connection lines (behind nodes) */
.kg__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.kg__lines path {
  fill: none;
  stroke: rgba(255,255,255,0.35);
  stroke-width: 1;
  transition: stroke 0.3s, stroke-width 0.3s, opacity 0.3s;
}

.kg__lines text {
  fill: rgba(255,255,255,0.0);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  transition: fill 0.3s;
}

/* When graph has a hovered node */
.kg.has-hover .kg__lines path { stroke: rgba(255,255,255,0.08); }
.kg.has-hover .kg__lines text { fill: rgba(255,255,255,0.0); }
.kg__lines path.edge-active { stroke: #FFFFFF; stroke-width: 2; opacity: 1; }
.kg.has-hover .kg__lines path.edge-active { stroke: #FFFFFF; }
.kg.has-hover .kg__lines text.edge-label-active { fill: rgba(255,255,255,0.7); }

/* Nodes */
.kn {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.kn__ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}

.kn__ring svg {
  width: 22px;
  height: 22px;
  opacity: 0.75;
  transition: opacity 0.3s;
}

.kn__label {
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--t2);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.3s, opacity 0.3s;
}

/* Module color coding */
.kn--asset { color: var(--c-as); }
.kn--asset .kn__ring { border-color: rgba(108,192,74,0.35); }
.kn--operational { color: var(--c-op); }
.kn--operational .kn__ring { border-color: rgba(0,181,226,0.35); }
.kn--supplier { color: var(--c-su); }
.kn--supplier .kn__ring { border-color: rgba(237,139,0,0.35); }
.kn--spend { color: var(--c-sp); }
.kn--spend .kn__ring { border-color: rgba(160,94,181,0.35); }
.kn--client { color: var(--c-cl); }
.kn--client .kn__ring { border-color: rgba(212,184,38,0.35); }

/* Hero node (Assets) — larger */
.kn--hero .kn__ring { width: 56px; height: 56px; animation: pulseRing 2.5s ease-in-out infinite; }

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(108,192,74,0.35); }
  100% { box-shadow: 0 0 0 16px rgba(108,192,74,0); }
}
.kn--hero .kn__ring svg { width: 28px; height: 28px; }
.kn--hero .kn__label { font-size: 10px; }

/* Hover state on individual node */
.kn:hover .kn__ring,
.kn.node-active .kn__ring {
  transform: scale(1.2);
  border-width: 2px;
  background: var(--bg-2);
  box-shadow: 0 0 24px currentColor;
  border-color: currentColor;
}

.kn:hover .kn__ring svg,
.kn.node-active .kn__ring svg {
  opacity: 1;
}

.kn:hover .kn__label,
.kn.node-active .kn__label {
  color: var(--t1);
}

/* Connected nodes brighten */
.kn.node-connected .kn__ring {
  border-color: currentColor;
  background: var(--bg-2);
}

.kn.node-connected .kn__ring svg { opacity: 0.7; }
.kn.node-connected .kn__label { color: var(--t2); }

/* Dimmed nodes */
.kg.has-hover .kn:not(.node-active):not(.node-connected) { opacity: 0.15; }

/* Tooltip */
.kg__tip {
  position: absolute;
  z-index: 20;
  background: rgba(13,17,23,0.94);
  border: 1px solid var(--border-b);
  border-radius: 10px;
  padding: 14px 18px;
  width: 280px;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.15s;
}

.kg__tip[hidden] { opacity: 0; }

.kg__tip-mod {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kg__tip-mod::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

.kg__tip-ent { font-size: 1rem; font-weight: 700; color: var(--t1); margin-bottom: 4px; }
.kg__tip-act { font-size: 0.92rem; color: var(--t2); line-height: 1.55; margin-bottom: 6px; }
.kg__tip-ex { font-family: var(--mono); font-size: 0.65rem; color: var(--t3); line-height: 1.5; padding-top: 6px; border-top: 1px solid var(--border); }

.kg-mobile-note { display: none; text-align: center; font-family: var(--mono); font-size: 0.72rem; color: var(--t4); padding: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .pipeline { grid-template-columns: 1fr; gap: 1rem; }
  .pipe-connector { transform: rotate(90deg); justify-self: center; }
  .pipe-connector svg { width: 120px; }
  .hero__metrics { gap: 2rem; }
  .impact__viz { grid-template-columns: 1fr; }
  .impact__divider { transform: rotate(90deg); justify-self: center; margin: 0.5rem 0; }
}

@media (max-width: 768px) {
  /* Nav: show logo + videos link only */
  .main-nav { height: 52px; padding: 0 1rem; }
  .main-nav > div a[href="index.html"],
  .main-nav > div a[href="explorer/"] { display: none !important; }
  .main-nav img { height: 32px !important; }

  /* Hero: more top padding so text isn't behind nav */
  #hero {
    height: auto;
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 2.5rem;
    flex-direction: column;
    justify-content: flex-start;
  }
  .hero__content { padding: 0 1rem; }
  .hero__line { font-size: 2rem; }
  .hero__sub { font-size: 0.95rem; }
  .hero__metrics { flex-direction: column; gap: 1.5rem; }
  .hero__metric-val { font-size: 1.6rem; }

  /* Partners: drop absolute positioning, flow naturally below content */
  .hero__partners {
    position: static;
    margin-top: 3rem;
    width: 100%;
  }
  .hero__partners-marquee {
    width: 100%;
    margin-left: 0;
  }
  .hero__partners-track { gap: 2.25rem; padding-left: 2.25rem; }

  .section { padding: 4rem 0; }
  .section-heading { font-size: 1.6rem; }

  /* Pipeline: stack vertically */
  .pipeline { grid-template-columns: 1fr; gap: 1rem; }
  .pipe-connector { transform: rotate(90deg); justify-self: center; }

  /* Module cards: single column */
  .mod-grid { grid-template-columns: 1fr; }

  /* Living system */
  .living__canvas-bg { display: none; }
  .living__stage { height: auto; min-height: 0; }
  .living__feed { display: none; }
  .living__mobile-note { display: block; }
  .living__lenses { position: static; transform: none; flex-wrap: wrap; justify-content: center; padding: 1rem 0; }

  /* Explore overlay: full screen with visible back button */
  .explore { position: fixed; inset: 0; z-index: 200; }
  .explore__close { top: 1rem; left: 1rem; transform: none; width: 48px; height: 48px; z-index: 201; }
  .explore__close svg { width: 24px; height: 24px; }
  .explore__inner { max-width: 100%; padding: 5rem 1.5rem 2rem; overflow-y: auto; max-height: 100vh; }
  .explore__inner h3 { font-size: 1.1rem; }

  /* Impact stories: stack before/after */
  .impact__viz { grid-template-columns: 1fr; }
  .impact__divider { transform: rotate(90deg); justify-self: center; margin: 0.5rem 0; }
  .impact__title { font-size: 1.2rem; }

  /* Numbers bar */
  .num-bar { flex-wrap: wrap; gap: 1.5rem; }
  .num-bar__item { flex: 0 0 40%; }

  /* Knowledge graph: hide on mobile */
  .kg { display: none; }
  .kg-mobile-note { display: block; }

  /* CTA */
  .cta__h2 { font-size: 2rem; }
  .cta__btn-wrap { width: 240px; }
  .numbers__hero-img { max-width: 90%; margin-bottom: 1.5rem; }
}

/* ============================================
   FOOTER + GLOBE
   ============================================ */
.footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  padding: 4.5rem 0 2.5rem;
  text-align: center;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(108,192,74,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.footer .container { position: relative; z-index: 1; }

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin: 2.25rem auto 1.5rem;
  max-width: 560px;
}

.footer__top > :first-child { justify-self: start; }
.footer__top > :last-child { justify-self: end; }

.footer__icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer__icon-link:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.footer__icon-link[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--border-b);
  color: var(--t1);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.footer__icon-link[data-tip]:hover::after {
  opacity: 1;
}

.footer__brand img {
  height: 176px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer__brand:hover img { opacity: 1; }

.footer__email {
  color: var(--t2);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer__email:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.footer__globe-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 0 auto 2.5rem;
}

.footer__globe-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
}

.footer__globe-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#globe-canvas {
  cursor: grab;
  opacity: 0;
  transition: opacity 1s ease;
}

#globe-canvas.is-ready { opacity: 1; }
#globe-canvas:active { cursor: grabbing; }

#globe-overlay { pointer-events: none; }

.footer__legend {
  display: flex;
  gap: 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--t3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.footer__copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--t4);
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .footer { padding: 3rem 0 2rem; }
  .footer__top { gap: 1.75rem; margin: 1.75rem auto 1.25rem; }
  .footer__brand img { height: 88px; }
  .footer__icon-link svg { width: auto; }
  .footer__icon-link[aria-label="LinkedIn"] svg { width: 19px; height: 19px; }
  .footer__email-link svg { width: 22px; height: 22px; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
