/* ELISIR BIOTECH — base styles */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Manrope:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --black: #0a0a0b;
  --black-soft: #131416;
  --white: #fafaf9;
  --white-soft: #f1f0ec;
  --teal: #4fd1c6;
  --teal-dark: #0f766e; /* AA-contrast (5.2:1) variant for teal text on light sections */
  --teal-dim: rgba(79, 209, 198, 0.28);
  --gray-500: #666666; /* darkened from #8b8b8b: 3.26:1 on white failed the 4.5:1 small-text minimum */
  --gray-300: #c7c7c4;
  --gray-700: #39393a;
  --line-dark: rgba(250, 250, 249, 0.14);
  --line-light: rgba(10, 10, 11, 0.12);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --section-pad-y: clamp(72px, 12vw, 160px);
  --edge: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a { color: inherit; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ---------- Theming ---------- */

.theme-dark {
  background: var(--black);
  color: var(--white);
}

.theme-light {
  background: var(--white);
  color: var(--black);
}

.theme-dark .rule { border-color: var(--line-dark); }
.theme-light .rule { border-color: var(--line-light); }

/* ---------- Nav ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--edge);
  background: rgba(127, 127, 127, 0.06);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.site-nav .nav-logo img {
  height: 20px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(12px, 1.6vw, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 54vw;
  justify-content: flex-end;
  row-gap: 8px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border: 1px solid var(--white);
  padding: 13px 16px;
  border-radius: 999px;
  opacity: 0.9;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-cta:hover {
  background: var(--white);
  color: var(--black);
  opacity: 1;
}

/* Explicit theme detection (JS-driven) — the nav itself stays transparent/blurred;
   only the text and logo swap between white and black depending on what's behind it. */
.site-nav.on-light .nav-links a {
  color: var(--black);
}

.site-nav.on-light .nav-cta {
  color: var(--black);
  border-color: var(--black);
}

.site-nav.on-light .nav-cta:hover {
  background: var(--black);
  color: var(--white);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: none;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: background 0.2s ease, transform 0.25s ease, opacity 0.2s ease;
}

.site-nav.on-light .nav-toggle span { background: var(--black); }

/* ---------- Mobile nav (hamburger + full-screen menu) ---------- */
/* Scoped entirely to this breakpoint — desktop nav is untouched. */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* backdrop-filter on .site-nav creates a containing block for any
     position:fixed descendant, which would confine .nav-links' full-screen
     overlay to the nav bar's own box instead of the viewport. Drop it only
     while the menu is open (already covered by the solid overlay anyway). */
  .site-nav.menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    position: fixed;
    inset: 0;
    max-width: none;
    justify-content: center;
    align-items: center;
    gap: 28px;
    row-gap: 28px;
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 99;
  }

  .site-nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links a,
  .site-nav.on-light .nav-links a {
    font-size: 18px;
    opacity: 1;
    color: var(--white);
  }

  .site-nav.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .site-nav.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-nav.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
  .site-nav.menu-open .nav-toggle span,
  .site-nav.menu-open.on-light .nav-toggle span {
    background: var(--white);
  }
}

/* ---------- Section shell ---------- */

section {
  padding: var(--section-pad-y) var(--edge);
  position: relative;
  scroll-margin-top: 110px;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 110px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.eyebrow .index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
}

.theme-light .eyebrow .index { color: var(--teal-dark); }

.rule {
  border: none;
  border-top: 1px solid;
  margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--section-pad-y) + 40px);
  overflow: hidden;
  position: relative;
}

.hero .section-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-text {
  max-width: 640px;
  transform: translateY(-140px);
}

.hero-wordmark {
  width: min(420px, 100%);
  height: auto;
  margin-top: 110px;
  margin-bottom: 64px;
}

@media (max-width: 860px) {
  .hero-wordmark {
    width: min(280px, 80%);
    margin-top: 40px;
  }
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.8vw, 21px);
  color: var(--teal);
  margin: 0 0 24px;
}

.hero-copy {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--gray-300);
  max-width: 46ch;
  margin: 0 0 40px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  background: var(--teal);
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--teal-dim);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10,10,11,0.4), rgba(10,10,11,0.4)),
    linear-gradient(90deg, rgba(10,10,11,0.92) 0%, rgba(10,10,11,0.72) 32%, rgba(10,10,11,0.25) 62%, rgba(10,10,11,0.15) 100%),
    linear-gradient(0deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0) 35%);
}

@media (max-width: 760px) {
  .hero-visual::after {
    background:
      linear-gradient(180deg, rgba(10,10,11,0.35) 0%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.88) 78%, rgba(10,10,11,0.95) 100%),
      linear-gradient(rgba(10,10,11,0.35), rgba(10,10,11,0.35));
  }
}

/* ---------- Vision & Mission ---------- */

.vm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 100px);
  position: relative;
}

.vm-connector-wrap {
  position: absolute;
  top: 9px;
  left: 50%;
  width: clamp(16px, 2vw, 32px);
  height: 1px;
  transform: translateX(-50%);
  pointer-events: none;
}

.vm-connector {
  width: 100%;
  height: 100%;
  background: var(--teal-dark);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.vm-connector-wrap.is-visible .vm-connector {
  transform: scaleX(1);
}

.vm-grid h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark, var(--teal));
  margin: 0 0 20px;
}

.vm-grid p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 860px) {
  .vm-grid { grid-template-columns: 1fr; }
  .vm-connector-wrap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vm-connector { transition: none; transform: scaleX(1); }
}

/* ---------- Process ---------- */

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: 48px;
}

.process-step {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 16px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s steps(14, end);
}

.process-step.is-visible .step-num { clip-path: inset(0 0 0 0); }

.process-steps .process-step:nth-child(1) .step-num { transition-delay: 0s; }
.process-steps .process-step:nth-child(2) .step-num { transition-delay: 0.3s; }
.process-steps .process-step:nth-child(3) .step-num { transition-delay: 0.6s; }

.process-step h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.process-step p {
  color: var(--gray-300);
  margin: 0;
  font-size: 15.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.process-step.is-visible h3,
.process-step.is-visible p {
  opacity: 1;
  transform: none;
}

.process-steps .process-step:nth-child(1) h3 { transition-delay: 0.35s; }
.process-steps .process-step:nth-child(1) p { transition-delay: 0.5s; }
.process-steps .process-step:nth-child(2) h3 { transition-delay: 0.65s; }
.process-steps .process-step:nth-child(2) p { transition-delay: 0.8s; }
.process-steps .process-step:nth-child(3) h3 { transition-delay: 0.95s; }
.process-steps .process-step:nth-child(3) p { transition-delay: 1.1s; }

@media (prefers-reduced-motion: reduce) {
  .process-step .step-num { clip-path: none; transition: none; }
  .process-step h3,
  .process-step p { opacity: 1; transform: none; transition: none; }
}

.process-closing {
  margin-top: 56px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal);
}

@media (max-width: 860px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* Generic 3-column numbered steps (Process, Intelligence) */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: 48px;
}

@media (max-width: 860px) {
  .trio-grid { grid-template-columns: 1fr; }
}

.trio-grid .trio-item {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.theme-light .trio-grid .trio-item { border-top-color: var(--line-light); }

.trio-grid .trio-item .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 16px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s steps(14, end);
}

.trio-grid .trio-item.is-visible .step-num { clip-path: inset(0 0 0 0); }

.theme-light .trio-grid .trio-item .step-num { color: var(--teal-dark); }

.trio-grid .trio-item:nth-child(1) .step-num { transition-delay: 0s; }
.trio-grid .trio-item:nth-child(2) .step-num { transition-delay: 0.3s; }
.trio-grid .trio-item:nth-child(3) .step-num { transition-delay: 0.6s; }

.trio-grid .trio-item h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.trio-grid .trio-item p {
  color: var(--gray-300);
  margin: 0;
  font-size: 15.5px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.trio-grid .trio-item.is-visible h3,
.trio-grid .trio-item.is-visible p {
  opacity: 1;
  transform: none;
}

.trio-grid .trio-item:nth-child(1) h3 { transition-delay: 0.35s; }
.trio-grid .trio-item:nth-child(1) p { transition-delay: 0.5s; }
.trio-grid .trio-item:nth-child(2) h3 { transition-delay: 0.65s; }
.trio-grid .trio-item:nth-child(2) p { transition-delay: 0.8s; }
.trio-grid .trio-item:nth-child(3) h3 { transition-delay: 0.95s; }
.trio-grid .trio-item:nth-child(3) p { transition-delay: 1.1s; }

@media (prefers-reduced-motion: reduce) {
  .trio-grid .trio-item .step-num { clip-path: none; transition: none; }
  .trio-grid .trio-item h3,
  .trio-grid .trio-item p { opacity: 1; transform: none; transition: none; }
}

.theme-light .trio-grid .trio-item p { color: var(--gray-700); }

/* Generic lead paragraph + closing line, reused across text-only sections */
.lead-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 26px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 24px;
}

.body-text {
  font-size: 15.5px;
  max-width: 62ch;
  margin: 0 0 32px;
}

.theme-dark .body-text { color: var(--gray-300); }
.theme-light .body-text { color: var(--gray-700); }

.closing-line {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal);
  margin: 40px 0 0;
}

.theme-light .closing-line { color: var(--teal-dark); }

/* ---------- Science visual (animated dispense icon) ---------- */

.science-visual {
  display: flex;
  justify-content: center;
  margin-top: clamp(72px, 10vw, 112px);
}

.science-icon {
  width: clamp(420px, 56vw, 720px);
  height: auto;
  overflow: visible;
}

.sci-outer-frame {
  fill: var(--white);
  stroke: var(--teal);
  stroke-width: 2.5;
}

.sci-inner-panel {
  fill: url(#sciGlassGrad);
  stroke: var(--teal);
  stroke-width: 1.5;
}

.sci-inner-panel-shine {
  fill: url(#sciGlassShine);
  pointer-events: none;
}

.sci-eq-bar {
  fill: var(--teal);
  transform-box: fill-box;
  transform-origin: bottom;
}

.sci-eq-1 { animation: sci-eq-pulse 1.4s ease-in-out infinite; }
.sci-eq-2 { animation: sci-eq-pulse 1.7s ease-in-out infinite 0.3s; }
.sci-eq-3 { animation: sci-eq-pulse 1.5s ease-in-out infinite 0.6s; }
.sci-eq-4 { animation: sci-eq-pulse 1.9s ease-in-out infinite 0.15s; }

@keyframes sci-eq-pulse {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.sci-gauge-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  opacity: 0.6;
}

.sci-gauge-arc {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-dasharray: 80 83;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  animation: sci-gauge-spin 8s linear infinite;
}

.sci-level-outline {
  fill: var(--white);
  stroke: var(--teal);
  stroke-width: 1.5;
}

.sci-level-fill {
  fill: var(--teal);
  opacity: 0.85;
  transform-box: fill-box;
  transform-origin: bottom;
}

.sci-level-1 { animation: sci-level-pulse 2.6s ease-in-out infinite; }
.sci-level-2 { animation: sci-level-pulse 3.1s ease-in-out infinite 0.5s; }
.sci-level-3 { animation: sci-level-pulse 2.3s ease-in-out infinite 1s; }
.sci-level-4 { animation: sci-level-pulse 2.9s ease-in-out infinite 0.25s; }

@keyframes sci-level-pulse {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

.sci-pad {
  fill: var(--teal-dim);
}

.sci-drop {
  fill: var(--teal);
  animation: sci-drop 3.6s ease-in-out infinite;
}

.sci-cup-outline {
  fill: var(--white);
  stroke: var(--teal);
  stroke-width: 2;
}

.sci-cup-liquid {
  fill: var(--teal);
  transform-box: fill-box;
  transform-origin: bottom;
  animation: sci-fill 3.6s ease-in-out infinite;
}

@keyframes sci-gauge-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes sci-drop {
  0% { opacity: 0; transform: translateY(0); }
  8% { opacity: 1; }
  42% { opacity: 1; transform: translateY(20px); }
  46% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 0; transform: translateY(0); }
}

@keyframes sci-fill {
  0%, 4% { transform: scaleY(0); }
  46% { transform: scaleY(1); }
  80% { transform: scaleY(1); }
  92%, 100% { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .sci-drop { animation: none; opacity: 0; }
  .sci-cup-liquid { animation: none; transform: scaleY(0.55); }
  .sci-gauge-arc { animation: none; }
  .sci-eq-bar { animation: none; transform: scaleY(1); }
  .sci-level-fill { animation: none; transform: scaleY(1); }
}

/* ---------- Intelligence visual (particle core) ---------- */

#intelligence {
  padding-bottom: clamp(32px, 4vw, 64px);
}

.intelligence-visual {
  position: relative;
  width: 100%;
  height: clamp(546px, 73vw, 858px);
  margin-top: clamp(16px, 2.5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intelligence-visual canvas {
  width: 100%;
  height: 100%;
  max-width: 1690px;
  display: block;
}

.intelligence-core-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(30px, 4vw, 52px);
  height: auto;
  filter: drop-shadow(0 0 10px rgba(190, 250, 242, 0.8));
  pointer-events: none;
}

/* ---------- Node ---------- */

.node-visual-full {
  position: relative;
  overflow: hidden;
  margin: calc(-1 * var(--section-pad-y)) calc(-1 * var(--edge)) clamp(120px, 15vw, 200px);
  width: calc(100% + var(--edge) * 2);
}

.node-visual-full img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1004;
  object-fit: cover;
  filter: brightness(0.32);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 1.4s ease-out;
  will-change: transform, filter;
}

.node-visual-full.is-visible img {
  filter: brightness(1);
}

.node-visual-full:hover img,
.node-visual-full:focus-within img {
  transform: scale(1.045);
}

.node-copy {
  max-width: 640px;
}

.node-copy p.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0 0 20px;
}

.node-copy p.sub {
  color: var(--gray-700);
  font-size: 15.5px;
  margin: 0 0 32px;
  max-width: 62ch;
}

.node-specs,
.spec-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.node-specs li,
.spec-list li {
  font-size: 14.5px;
  padding-left: 20px;
  position: relative;
  color: var(--gray-700);
}

.theme-dark .spec-list li { color: var(--gray-300); }

.node-specs li::before,
.spec-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.theme-light .spec-list li::before { background: var(--teal-dark); }

.node-closing {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  color: var(--teal-dark);
  margin: 0 0 8px;
}

.node-footnote {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-500);
  line-height: 1.5;
  max-width: 60ch;
}

.node-visual-full-bottom {
  position: relative;
  overflow: hidden;
  margin: clamp(56px, 8vw, 96px) calc(-1 * var(--edge)) calc(-1 * var(--section-pad-y));
  width: calc(100% + var(--edge) * 2);
  background: var(--white);
}

.node-visual-full-bottom img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1012;
  object-fit: cover;
  display: block;
  filter: brightness(0.32);
  transition: filter 1.4s ease-out;
  will-change: filter;
}

.node-visual-full-bottom.is-visible img {
  filter: brightness(1);
}


/* ---------- Ecosystem (two-column detail cards) ---------- */

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 90px);
}

@media (max-width: 860px) {
  /* .ecosystem-col uses a negative margin to bleed its hover glow past its
     own padding; with no grid gap to absorb it in a single column, clip it
     here so it can't push the page wider than the viewport. */
  .ecosystem-grid { grid-template-columns: 1fr; overflow-x: hidden; }
}

.ecosystem-col {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 32px;
  margin: -32px;
  border-radius: 16px;
}

.ecosystem-col::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 35%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.03) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 1s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.theme-light .ecosystem-col::before {
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(15, 118, 110, 0.04) 35%,
    rgba(15, 118, 110, 0.16) 50%,
    rgba(15, 118, 110, 0.04) 65%,
    transparent 100%
  );
}

.ecosystem-col:hover::before {
  left: 125%;
}

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

.ecosystem-col h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 20px;
}

.theme-light .ecosystem-col h3 { color: var(--teal-dark); }

.ecosystem-col p.lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.4;
  margin: 0 0 20px;
}

.ecosystem-col p.note {
  font-size: 14.5px;
  max-width: 52ch;
  margin: 20px 0 0;
}

.theme-dark .ecosystem-col p.note { color: var(--gray-300); }
.theme-light .ecosystem-col p.note { color: var(--gray-700); }

.ecosystem-col p.note + .spec-list { margin-top: 24px; }

.ecosystem-visual-full {
  position: relative;
  overflow: hidden;
  margin: clamp(56px, 8vw, 96px) calc(-1 * var(--edge)) calc(-1 * var(--section-pad-y));
  width: calc(100% + var(--edge) * 2);
}

.ecosystem-visual-full img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1004;
  object-fit: cover;
  display: block;
}

/* ---------- CTA block (Journal, Partner, Press, Join Us, Contact, Closing) ---------- */

/* #partner's own box starts exactly at the Ecosystem/Partner image boundary,
   so aligning it with the nav (as other sections do) puts that boundary
   directly behind the translucent nav, letting the image bleed through its
   blur. Scroll a bit past the boundary instead, into Partner's own padding,
   so only its plain background sits behind the nav. */
#partner {
  scroll-margin-top: -40px;
}

.cta-block {
  max-width: 640px;
}

.cta-block .body-text { margin-bottom: 36px; }

.cta-block .fine-print {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--line-dark);
  padding: 14px 28px;
  border-radius: 999px;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-light .btn-secondary {
  color: var(--black);
  border-color: var(--line-light);
}

.btn-secondary:hover {
  border-color: var(--teal);
  background: var(--teal-dim);
}

/* ---------- FAQ accordion ---------- */

.faq-list {
  display: grid;
  gap: 0;
  margin-top: 40px;
}

.faq-item {
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
}

.theme-light .faq-item { border-top-color: var(--line-light); }

.faq-item:last-child { border-bottom: 1px solid var(--line-dark); }
.theme-light .faq-item:last-child { border-bottom-color: var(--line-light); }

.faq-item summary {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 19px);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.theme-light .faq-item summary::after { color: var(--teal-dark); }

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  margin: 16px 0 0;
  font-size: 15px;
  max-width: 65ch;
}

.theme-dark .faq-item p { color: var(--gray-300); }
.theme-light .faq-item p { color: var(--gray-700); }

/* ---------- Forms (Waitlist, Investor Pitch) ---------- */

.form-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  max-width: 480px;
}

.form-inline input[type="email"],
.form-inline input[type="text"] {
  flex: 1 1 220px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 15px;
}

.theme-light .form-inline input[type="email"],
.theme-light .form-inline input[type="text"] {
  border-color: var(--line-light);
}

.form-inline input::placeholder { color: var(--gray-500); }

.form-inline button {
  flex: none;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--teal);
  border: none;
  padding: 0 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.form-inline button:hover { transform: translateY(-1px); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px var(--edge) 32px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-dark);
}

.site-footer .footer-logo img {
  height: 18px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 10px 28px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-links a:hover { opacity: 1; }

.site-footer .footer-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 24px;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.process-steps .reveal:nth-child(1) { transition-delay: 0s; }
.process-steps .reveal:nth-child(2) { transition-delay: 0.3s; }
.process-steps .reveal:nth-child(3) { transition-delay: 0.6s; }
.vm-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.trio-grid .reveal:nth-child(1) { transition-delay: 0s; }
.trio-grid .reveal:nth-child(2) { transition-delay: 0.3s; }
.trio-grid .reveal:nth-child(3) { transition-delay: 0.6s; }
.ecosystem-grid .reveal:nth-child(2) { transition-delay: 0.08s; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .node-visual-full img { transition: none; }
  .node-visual-full:hover img, .node-visual-full:focus-within img { transform: none; }
  .node-visual-full-bottom img { transition: none; }
}
