/* ════════════════════════════════════════════════════════════════
   nova-v2.css — Version 2 clarity layer
   Adds: premium mega-menu nav previews + "two engines, one OS"
   ecosystem section. Loaded after nova-light.css on the homepage.
   Brand: Launchpad = violet (#7C3AED) · Nova Ops = magenta (#800080)
   ════════════════════════════════════════════════════════════════ */

:root {
  --v2-build:      #7C3AED;   /* Launchpad */
  --v2-build-soft: #A855F7;
  --v2-scale:      #800080;   /* Nova Ops */
  --v2-scale-soft: #B833B8;
  --v2-ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════════════════════
   1 · PREMIUM MEGA-MENU
   ════════════════════════════════════════════════════════════════ */
.nav-mega {
  min-width: 580px !important;
  max-width: min(92vw, 620px);
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px !important;
}
/* invisible hover bridge so the menu doesn't close in the gap */
.nav-mega::before {
  content: "";
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 14px;
}
/* hover-to-open (keeps existing click-to-open intact) */
@media (min-width: 1025px) {
  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }
  .nav-dropdown:hover .nav-dropdown-trigger { color: rgba(10,10,20,0.92); }
  .nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
}

.nav-mega-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}
.nav-mega-main { padding: 22px 22px 20px; }
.nav-mega-kicker {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mega-accent, var(--v2-scale));
  margin-bottom: 8px;
}
.nav-mega-tagline {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(10,10,20,0.62);
  max-width: 320px;
}
.nav-mega-links { display: grid; gap: 2px; }
.nav-mega-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 11px;
  text-decoration: none;
  transition: background 0.2s var(--v2-ease), transform 0.2s var(--v2-ease);
}
.nav-mega-item:hover {
  background: var(--mega-tint, rgba(128,0,128,0.06));
  transform: translateX(2px);
}
.nav-mega-ic {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  color: var(--mega-accent, var(--v2-scale));
  background: var(--mega-tint, rgba(128,0,128,0.08));
  transition: transform 0.25s var(--v2-ease);
}
.nav-mega-item:hover .nav-mega-ic { transform: scale(1.08) rotate(-3deg); }
.nav-mega-ic svg { width: 17px; height: 17px; }
.nmi-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(10,10,20,0.88);
  letter-spacing: -0.01em;
}
.nmi-desc {
  display: block;
  font-size: 11.5px;
  color: rgba(10,10,20,0.62);
  margin-top: 1px;
}
.nav-mega-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mega-accent, var(--v2-scale));
  text-decoration: none;
}
.nav-mega-cta span { transition: transform 0.25s var(--v2-ease); }
.nav-mega-cta:hover span { transform: translateX(4px); }

/* right-hand preview panel */
.nav-mega-preview {
  position: relative;
  padding: 22px 20px;
  background:
    radial-gradient(120% 90% at 80% 0%, var(--mega-tint, rgba(128,0,128,0.10)), transparent 70%),
    var(--surface-base, #F7F7F8);
  border-left: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}
.nav-mega-preview-label {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(10,10,20,0.62);
}
.nmp-card {
  margin-top: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 12px;
  padding: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}
.nmp-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
}
.nmp-row + .nmp-row { border-top: 1px solid rgba(0,0,0,0.05); }
.nmp-check {
  display: grid; place-items: center;
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--mega-accent, var(--v2-scale));
  color: #fff; font-size: 11px;
}
.nmp-bar {
  flex: 1;
  height: 7px;
  border-radius: 5px;
  background: rgba(10,10,20,0.08);
  overflow: hidden;
}
.nmp-bar > i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--mega-accent, var(--v2-scale)), var(--mega-accent-soft, var(--v2-scale-soft)));
  width: var(--w, 60%);
  transform-origin: left;
  animation: nmpGrow 0.9s var(--v2-ease) both;
}
.nmp-label { font-size: 11px; color: rgba(10,10,20,0.62); white-space: nowrap; }
@keyframes nmpGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* per-menu theming */
#menu-launchpad { --mega-accent: var(--v2-build); --mega-accent-soft: var(--v2-build-soft); --mega-tint: rgba(124,58,237,0.09); }
#menu-nova      { --mega-accent: var(--v2-scale); --mega-accent-soft: var(--v2-scale-soft); --mega-tint: rgba(128,0,128,0.08); }

@media (max-width: 1024px) {
  .nav-mega { min-width: auto !important; }
  .nav-mega-preview { display: none; }
  .nav-mega-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   2 · ECOSYSTEM — "TWO ENGINES, ONE OPERATING SYSTEM"
   ════════════════════════════════════════════════════════════════ */
.section-ecosystem {
  position: relative;
  padding: 96px 0 88px;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(124,58,237,0.05), transparent 65%),
    var(--surface-bg, #fff);
  border-top: 1px solid var(--border-subtle, rgba(0,0,0,0.05));
  overflow: hidden;
}
.eco-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.eco-head .section-subtitle strong { color: var(--text-primary, rgba(10,10,20,0.92)); font-weight: 700; }

/* ── engines layout ── */
.eco-engines {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  max-width: 1080px;
  margin: 0 auto;
}
.eco-engine {
  position: relative;
  padding: 30px 30px 26px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 22px;
  transition: transform 0.4s var(--v2-ease), box-shadow 0.4s var(--v2-ease), border-color 0.4s var(--v2-ease);
  outline: none;
  cursor: default;
}
.eco-engine::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(135deg, var(--eng), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s var(--v2-ease);
  pointer-events: none;
}
.eco-engine:hover,
.eco-engine:focus-visible,
.eco-engine.is-active {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -20px var(--eng-shadow);
  border-color: transparent;
}
.eco-engine:hover::before,
.eco-engine:focus-visible::before,
.eco-engine.is-active::before { opacity: 1; }

.eco-engine--build { --eng: var(--v2-build); --eng-soft: var(--v2-build-soft); --eng-shadow: rgba(124,58,237,0.45); --eng-tint: rgba(124,58,237,0.09); }
.eco-engine--scale { --eng: var(--v2-scale); --eng-soft: var(--v2-scale-soft); --eng-shadow: rgba(128,0,128,0.42); --eng-tint: rgba(128,0,128,0.08); }

.eco-engine-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.eco-engine-glyph {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--eng), var(--eng-soft));
  box-shadow: 0 8px 22px -8px var(--eng-shadow);
}
.eco-engine-glyph svg { width: 23px; height: 23px; }
.eco-engine-kicker {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eng);
}
.eco-engine-title {
  margin: 2px 0 0;
  font-family: var(--font-display, sans-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary, rgba(10,10,20,0.92));
}
.eco-engine-stage {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--eng);
  background: var(--eng-tint);
}
.eco-engine-desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.66;
  color: rgba(10,10,20,0.62);
}
.eco-feat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.eco-feat-pills li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(10,10,20,0.72);
  background: var(--surface-base, #F7F7F8);
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.25s var(--v2-ease), background 0.25s var(--v2-ease), color 0.25s var(--v2-ease);
}
.eco-feat-pills li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--eng);
}
.eco-engine:hover .eco-feat-pills li,
.eco-engine.is-active .eco-feat-pills li {
  background: var(--eng-tint);
  color: var(--text-primary, rgba(10,10,20,0.92));
}
.eco-engine-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--eng);
  text-decoration: none;
}
.eco-engine-link span { transition: transform 0.25s var(--v2-ease); }
.eco-engine-link:hover span { transform: translateX(4px); }

/* ── center connector / handoff ── */
.eco-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 132px;
  position: relative;
}
.eco-conn-label {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(10,10,20,0.62);
}
.eco-conn-line {
  position: relative;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--v2-build), var(--v2-scale));
  opacity: 0.5;
}
.eco-conn-dot {
  position: absolute;
  top: 50%;
  width: 8px; height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px var(--v2-build), 0 0 12px rgba(124,58,237,0.6);
  animation: ecoFlow 2.6s var(--v2-ease) infinite;
}
.eco-conn-dot:nth-child(2) { animation-delay: 0.87s; }
.eco-conn-dot:nth-child(3) { animation-delay: 1.74s; }
@keyframes ecoFlow {
  0%   { left: 0;    box-shadow: 0 0 0 2px var(--v2-build), 0 0 12px rgba(124,58,237,0.6); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: 100%; box-shadow: 0 0 0 2px var(--v2-scale), 0 0 12px rgba(128,0,128,0.6); opacity: 0; }
}
.eco-conn-glyph {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(0,0,0,0.07));
  color: rgba(10,10,20,0.62);
}
.eco-conn-glyph svg { width: 16px; height: 16px; }

/* ── founder journey ribbon ── */
.eco-journey {
  max-width: 1080px;
  margin: 46px auto 0;
}
.eco-journey-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 18px 8px 0;
}
.eco-journey-track::before {
  content: "";
  position: absolute;
  top: 25px; left: 6%; right: 6%;
  height: 2px;
  background: linear-gradient(90deg, var(--v2-build) 0%, var(--v2-build) 50%, var(--v2-scale) 58%, var(--v2-scale) 100%);
  opacity: 0.25;
  z-index: 0;
}
.eco-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(10,10,20,0.62);
  text-align: center;
  transition: color 0.3s var(--v2-ease), opacity 0.3s var(--v2-ease), transform 0.3s var(--v2-ease);
}
.eco-stage-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--st);
  transition: transform 0.3s var(--v2-ease), box-shadow 0.3s var(--v2-ease);
}
.eco-stage[data-owner="build"] { --st: var(--v2-build); }
.eco-stage[data-owner="scale"] { --st: var(--v2-scale); }
.eco-stage:hover { color: var(--st); transform: translateY(-2px); }
.eco-stage:hover .eco-stage-dot { transform: scale(1.2); box-shadow: 0 0 0 5px color-mix(in srgb, var(--st) 16%, transparent); }

/* dim non-owned stages when an engine is active */
.eco-engines.dim-scale ~ .eco-journey .eco-stage[data-owner="scale"],
.eco-engines.dim-build ~ .eco-journey .eco-stage[data-owner="build"] {
  opacity: 0.28;
}
.eco-engines.dim-scale ~ .eco-journey .eco-stage[data-owner="build"] .eco-stage-dot,
.eco-engines.dim-build ~ .eco-journey .eco-stage[data-owner="scale"] .eco-stage-dot {
  transform: scale(1.18);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--st) 18%, transparent);
}
.eco-engines.dim-scale ~ .eco-journey .eco-stage[data-owner="build"],
.eco-engines.dim-build ~ .eco-journey .eco-stage[data-owner="scale"] { color: var(--st); }

.eco-journey-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 26px;
}
.eco-leg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(10,10,20,0.62);
}
.eco-leg::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 3px;
  background: var(--lg);
}
.eco-leg.build { --lg: var(--v2-build); }
.eco-leg.scale { --lg: var(--v2-scale); }

/* ── responsive ── */
@media (max-width: 860px) {
  .eco-engines { grid-template-columns: 1fr; gap: 0; }
  .eco-connector {
    width: auto;
    flex-direction: row;
    padding: 18px 0;
  }
  .eco-conn-line {
    width: 2px; height: 44px;
    background: linear-gradient(180deg, var(--v2-build), var(--v2-scale));
  }
  .eco-conn-dot { left: 50% !important; margin-left: -4px; top: 0; animation-name: ecoFlowV; }
  @keyframes ecoFlowV {
    0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; }
  }
  .eco-journey-track { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
  .eco-journey-track::before { display: none; }
}
@media (max-width: 460px) {
  .eco-journey-track { grid-template-columns: repeat(2, 1fr); }
  .section-ecosystem { padding: 72px 0 64px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .eco-conn-dot, .nmp-bar > i { animation: none; }
  .eco-conn-dot { opacity: 1; }
  .eco-engine, .eco-stage, .eco-feat-pills li { transition: none; }
}

/* ════════════════════════════════════════════════════════════════
   3 · LAUNCH SEQUENCE — tinted by owning product (tagged in JS)
   ════════════════════════════════════════════════════════════════ */
.launchseq-owner {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.launchseq-item[data-owner="build"] .launchseq-owner { color: var(--v2-build); background: rgba(124,58,237,0.10); }
.launchseq-item[data-owner="scale"] .launchseq-owner { color: var(--v2-scale); background: rgba(128,0,128,0.10); }

/* tint the node + phase label to match the product */
.launchseq-item[data-owner="build"] .launchseq-node { box-shadow: 0 0 0 4px rgba(124,58,237,0.12); }
.launchseq-item[data-owner="scale"] .launchseq-node { box-shadow: 0 0 0 4px rgba(128,0,128,0.12); }
.launchseq-item[data-owner="build"] .launchseq-phase { color: var(--v2-build); }
.launchseq-item[data-owner="scale"] .launchseq-phase { color: var(--v2-scale); }
