/* =====================================================
   MendAI Labs — Website Stylesheet
   ===================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:     #2563EB;
  --orange-lt:  #60A5FA;
  --teal:       #1D4ED8;
  --dark:       #0D1117;
  --dark-2:     #161B24;
  --dark-3:     #1E2530;
  --mid:        #F4F6F9;
  --mission-bg: #EEF3FB;   /* soft blue-tinted off-white, drawn from the blue accent palette */
  --white:      #FFFFFF;
  --text:       #1A1F2E;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
  --nav-bg:     rgb(14,22,40);          /* fixed top-bar / mobile dropdown background */
  --nav-h:      88px;                    /* top-bar height; the mobile dropdown anchors to it */
  --mission-line: rgba(96,125,175,.5);  /* mission timeline dotted connector */
  --radius:     12px;
  --radius-lg:  20px;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-md:  0 8px 40px rgba(0,0,0,.12);
  --font:       'Inter', system-ui, -apple-system, sans-serif;

  /* Three-step type scale used across the main sections
     (Mission, Solution, Product, Team, Contact). */
  --fs-title:   clamp(1.6rem, 3.5vw, 2.4rem); /* section titles            */
  --fs-body:    1rem;                          /* regular / reading text    */
  --fs-meta:    0.85rem;                        /* less important / captions */
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

/* --- Typography --- */
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { color: var(--text-muted); }

.accent { color: var(--orange); }

/* --- Layout helpers --- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.center { text-align: center; }
.section-light { background: var(--white); }
.section-dark  { background: var(--dark);  color: var(--white); }
.section-mid   { background: var(--mid); }
/* Mission section: a light blue tint instead of plain white. */
#mission.section-light,
#prism.section-light,
#contact.section-light { background: var(--mission-bg); }

section { padding: 60px 0; }

.section-header { margin-bottom: 56px; }
.section-header h2 { margin: 12px 0 16px; }
.section-intro { max-width: 680px; margin: 0 auto; font-size: var(--fs-body); }

/* --- Section tags --- */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(37,99,235,.08);
  border: 1px solid rgba(37,99,235,.30);
  border-radius: 100px;
  padding: 4px 14px;
}
.section-tag-dark {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-lt);
  background: rgba(37,99,235,.15);
  border-radius: 100px;
  padding: 4px 14px;
}

/* =====================================================
   NAV
   ===================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.logo-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}
/* Logo image in nav & footer */
.nav-logo-img {
  height: 68px;
  width: auto;
  display: block;
  object-fit: contain;
}
.footer-logo-img { height: 28px; opacity: .85; }
/* Fallback text — hidden by default, shown via onerror */
.nav-logo-fallback { display: none; align-items: center; gap: 8px; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--white); }
.btn-nav {
  background: var(--orange) !important;
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 100px;
  transition: background .2s !important;
}
.btn-nav:hover { background: var(--orange-lt) !important; }

/* Nav links for external/secondary pages (Publications, Blog) — shared across
   all pages so the menu bar stays consistent. */
.nav-ext {
  color: rgba(255,255,255,.90) !important;
  border: 1px solid rgba(255,255,255,.35);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.82rem !important;
  transition: border-color .2s, color .2s !important;
}
.nav-ext:hover {
  color: #fff !important;
  border-color: rgba(255,255,255,.5) !important;
}
.nav-ext.active {
  color: #fff !important;
  border-color: rgba(255,255,255,.55) !important;
  background: rgba(255,255,255,.08);
}
/* Active section link, set by the scroll-spy in main.js as sections scroll by. */
.nav-links a.active {
  color: var(--white) !important;
}

/* Hamburger button (injected by main.js). Styled here but hidden on desktop —
   the ≤900px media query flips it on and turns .nav-links into a dropdown. */
.nav-burger {
  display: none;                 /* shown at ≤900px */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 7px;
  border: 0;
  background: none;
  cursor: pointer;
  z-index: 101;                  /* above the dropdown panel */
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}
/* JS adds .active when open → morph the three bars into an X. */
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  color: var(--white);
  min-height: 100vh;
  padding: 0;
  position: relative;
  isolation: isolate;
}
/* Particle wave field — sits in front of the bg image (::after, z0),
   behind the hero text (.hero-inner, z2). */
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}
/* Background image + overlay live on a pseudo-element so it sits behind the
   hero text. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to right,
      rgba(13, 17, 23, 0.96) 0%,
      rgba(13, 17, 23, 0.86) 30%,
      rgba(18, 38, 88, 0.60) 58%,
      rgba(30, 74, 165, 0.42) 80%,
      rgba(37, 99, 235, 0.34) 100%),
    url('../images/bg_final.png') left center / cover no-repeat;
}
/* Film-grain texture over the background image. A tiled SVG fractal-noise
   pattern; blend mode + low opacity keep it subtle. Sits above the bg image
   (::after, z0) but below the particles (z1) and hero text (z2). */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 60px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 60px;
}
.hero-text {
  padding: 40px 44px;
  margin-left: -1cm;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.hero h1 { color: var(--white); margin-bottom: 24px; }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.92);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: var(--orange);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--orange-lt); transform: translateY(-1px); }
.btn-primary.btn-large { padding: 18px 40px; font-size: 1.05rem; }

.btn-ghost {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.9);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-left: auto;
  padding-right: 0;
}
#hero-spectrum-canvas {
  width: 254px;
  height: 340px;
  display: block;
  background: transparent;
}
.hero-card {
  background: rgba(8,10,18,0.35);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: border-color .2s;
}
.hero-card:hover { border-color: var(--orange); }
.hero-card-icon { font-size: 1.6rem; }
.hero-card-stat {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}
.hero-card-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
  margin: 0;
}

/* =====================================================
   MISSION
   ===================================================== */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
/* Mission: a vertical workflow timeline — icon "nodes" stacked on the left,
   linked by a continuous connector line, with supporting copy alongside. */
/* Left-aligned so the icon column starts at the same left edge as the
   "Highly manual…" text below it (the container's left padding). */
.mission-steps {
  position: relative;             /* positioning context for the JS connectors */
  margin: 0 0 56px;
}
.mission-step {
  position: relative;
  padding-left: 219px;            /* 175px icon column + 44px gap */
}
/* Equal vertical spacing between the paragraphs. The icon is taken out of flow
   (absolute, below), so each step's height is exactly its paragraph — making
   this margin the uniform gap between every paragraph regardless of icon size. */
.mission-step + .mission-step { margin-top: 76px; }
/* Icon sits in the left column, vertically centred on its paragraph and out of
   the document flow so it never stretches the row. */
.mission-step-node {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 175px;
  z-index: 1;
}
.mission-step-node img {
  width: 100%;
  max-width: 175px;
  max-height: 175px;              /* cap the tallest icon so it can't bleed into neighbours */
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
/* All four mission icons share a square frame, but the spectrometer's artwork
   fills less of it (~73% wide) so it reads smaller at the shared 175px cap —
   give it a slightly higher cap than the default to balance its visual weight. */
.mission-step-node img[src*="spectrometer"] {
  max-width: 158px;
  max-height: 158px;
}
.mission-step-node img[src*="configuration"] {
  max-width: 155px;
  max-height: 155px;
}
/* Connector running alongside the icons: a very thin, subtle dotted line in a
   low-opacity gray-blue, sitting in the gutter between the icon column and the
   text. main.js positions one continuous .mission-connector spanning from the
   first icon's centre to the last's; geometry (top/height/left) is supplied
   inline. It runs in the gutter, so it never overlaps an icon and needs no
   fading. */
.mission-connector {
  position: absolute;
  width: 2px;                     /* very thin */
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--mission-line) 0,
    var(--mission-line) 2px,
    transparent 2px,
    transparent 8px);             /* 2px dot, 6px gap → fine dotted line */
  z-index: 0;
  pointer-events: none;
}
/* Once JS has drawn the real connectors, drop the static CSS fallback below. */
.mission-steps.connectors-ready .mission-step:not(:last-child)::after { display: none; }
/* Static fallback for no-JS: the same dotted line in the inter-paragraph gap. */
.mission-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 197px;                    /* gutter between the 175px icon column and the text */
  transform: translateX(-50%);
  width: 2px;
  height: 76px;                   /* = the inter-paragraph margin */
  background-image: repeating-linear-gradient(
    to bottom,
    var(--mission-line) 0,
    var(--mission-line) 2px,
    transparent 2px,
    transparent 8px);
  z-index: 0;
}
.mission-step-text h3 {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.mission-step-text p {
  font-size: var(--fs-body);
  color: var(--text-muted);
  margin: 0;
}
/* Closing statement at the end of the Mission section. */
.mission-closer {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-top: 80px;
}
.mission-left .section-tag { margin-bottom: 16px; display: block; }
.mission-left h2 { margin-bottom: 24px; }
.mission-left p { margin-bottom: 16px; }
.team-pub-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.team-pub-link:hover { border-color: var(--orange); }

.pull-quote {
  border-left: 3px solid var(--orange);
  padding: 16px 20px;
  margin-top: 28px;
  font-style: italic;
  color: var(--text);
  font-size: 1rem;
  background: rgba(37,99,235,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.problem-box {
  background: var(--mid);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.problem-box h3 { margin-bottom: 20px; color: var(--text); }
.problem-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.problem-item:last-child { margin-bottom: 0; }
.problem-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.problem-item strong { display: block; color: var(--text); margin-bottom: 4px; }
.problem-item p { font-size: 0.9rem; margin: 0; }

.stat-row { display: flex; gap: 16px; }

/* =====================================================
   VISION
   ===================================================== */
.vision {
  padding: 72px 0;
}
.vision-statement {
  font-size: 1.5rem;
  line-height: 1.7;
  font-weight: 600;
  color: var(--text);
  max-width: 900px;
  margin: 0 auto;
}
.stat-box {
  flex: 1;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.stat-number { font-size: 1.7rem; font-weight: 800; color: var(--orange); margin-bottom: 6px; }
.stat-desc { font-size: 0.82rem; color: rgba(255,255,255,.6); margin: 0; }

/* =====================================================
   DATA PHILOSOPHY TEASER
   ===================================================== */
.data-phil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.data-phil-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color .2s, box-shadow .2s;
}
.data-phil-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 24px rgba(37,99,235,.08);
}
.data-phil-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--orange);
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
}
.data-phil-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.data-phil-card p { font-size: 0.9rem; line-height: 1.7; margin: 0; }
.data-phil-cta {
  text-align: center;
  margin-top: 40px;
}
.data-phil-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.data-phil-link:hover { border-color: var(--orange); }

/* =====================================================
   SOLUTION
   ===================================================== */
.solution {
  background:
    linear-gradient(rgba(15,26,56,0.88), rgba(15,26,56,0.88)),
    url('../images/bg_final.png') left center / cover no-repeat fixed;
}
.solution h2 { color: var(--white); }
.solution .section-intro { color: rgba(255,255,255,.9); }
.solution .section-tag-dark { margin-bottom: 16px; }

/* ── Cycle diagram ──────────────────────────────────── */
.cycle-diagram {
  position: relative;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 700 / 480;
  margin: 48px auto 16px;
  overflow: visible;
}
/* On desktop, shift the box so the circle (centred at x=240 of the 700-wide
   viewBox) sits at the section's horizontal centre, as it did before the PKB
   was folded into the viewBox: 110px ≈ (0.5 − 240/700) × 700. */
@media (min-width: 901px) {
  .cycle-diagram { transform: translateX(110px); }
}
.cycle-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Node = icon + label, centered on its circle position */
.cycle-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
}
/* Cardinal positions matching the rendered circle. The SVG (480×480 viewBox)
   is centred in the 530px-tall container, so the circle is offset ~25px down
   from the top — the top/bottom nodes account for that ((25+svgY)/530). */
.cycle-top    { left: 34.3%; top: 17.7%; } /* (240, 85)  */
.cycle-right  { left: 56.4%; top: 50%;   } /* (395, 240) */
.cycle-bottom { left: 34.3%; top: 82.3%; } /* (240, 395) */
.cycle-left   { left: 12.1%; top: 50%;   } /* (85,  240) */

.wf-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.genesis-icon    { background: linear-gradient(135deg, #6B46C1, #9F7AEA); }
.instrument-icon { background: linear-gradient(135deg, #374151, #6B7280); }
.prism-icon      { background: linear-gradient(135deg, #1D4ED8, #60A5FA); }
.helix-icon      { background: linear-gradient(135deg, #1E40AF, var(--orange)); }

.cycle-label {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  line-height: 1.35;
  white-space: nowrap;
}
.cycle-label small {
  display: block;
  font-weight: 400;
  color: rgba(255,255,255,.75);
  font-size: 0.8rem;
}

/* Module cards */
.modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.module-card {
  background: var(--dark-3);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .2s;
}
.module-card:hover {
  transform: translateY(-3px);
}
.module-card-highlight {
  background: #1C2740;
}
.module-card h3 { font-size: var(--fs-body); color: var(--white); margin: 16px 0 8px; }
.module-tag { font-size: var(--fs-body); color: rgba(255,255,255,.97); margin-bottom: 16px; }
.module-card ul {
  padding-left: 18px;
  margin-bottom: 24px;
}
.module-card li {
  font-size: var(--fs-body);
  color: rgba(255,255,255,.97);
  margin-bottom: 8px;
}
.module-card li strong { color: var(--white); }

/* Module logo in cycle diagram icons */
.module-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  display: block;
}
/* Fallback letter when image missing */
.wf-icon.icon-fallback::after {
  content: attr(data-fallback);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
}

/* Logo in module badge (top of card) */
.module-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 8px 16px;
  border-radius: 100px;
  min-height: 48px;
}
.badge-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}
.badge-name {
  margin-left: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.prism-badge   { background: rgba(96,165,250,.15); color: #60A5FA; }
.helix-badge   { background: rgba(37,99,235,.2);  color: var(--orange-lt); }
.genesis-badge { background: rgba(159,122,234,.2); color: #C4B5FD; }

.module-value {
  font-size: 0.85rem;
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
}
.value-chip {
  display: inline-block;
  background: rgba(37,99,235,.2);
  color: var(--orange-lt);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.82rem;
  margin-right: 6px;
}

/* Footnote marks (superscript asterisk) */
.footnote-mark {
  font-size: 0.60em;
  vertical-align: super;
  color: rgba(96,165,250,0.55);
  margin-left: 1px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Hero footnote (below the cards) */
.hero-footnote {
  font-size: 0.72rem;
  color: rgba(255,255,255,.35);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

/* Modules footnote (below the 3 module cards) */
.modules-footnote {
  font-size: 0.75rem;
  color: rgba(255,255,255,.35);
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}
.modules-footnote a {
  color: rgba(255,255,255,.45);
  text-underline-offset: 2px;
}
.modules-footnote a:hover { color: rgba(255,255,255,.7); }

.pilot-banner {
  margin-top: 32px;
  background: rgba(29,78,216,.12);
  border: 1px solid rgba(29,78,216,.3);
  border-radius: var(--radius);
  padding: 20px 28px;
  text-align: center;
}
.pilot-banner p {
  color: rgba(255,255,255,.8);
  margin: 0;
}
.pilot-banner strong { color: var(--white); }

/* =====================================================
   TEAM
   ===================================================== */
.founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 72px;
}
.founder-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.founder-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dark), var(--dark-3));
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  border: 3px solid var(--orange);
}
.founder-avatar.gb {
  background: linear-gradient(135deg, var(--teal), #1D7A7C);
}
.founder-avatar.photo {
  overflow: hidden;
  padding: 0;
}
.founder-avatar.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.founder-card h3 { font-size: var(--fs-body); margin-bottom: 4px; }
.founder-title { font-size: var(--fs-meta); color: var(--orange); font-weight: 600; margin-bottom: 4px; }
.founder-affil { font-size: var(--fs-meta); color: var(--text-muted); margin-bottom: 16px; }
.founder-card p { font-size: var(--fs-body); margin-bottom: 12px; }
.founder-italic { font-style: italic; font-size: var(--fs-meta) !important; color: var(--text-muted) !important; }

.partners-title {
  font-size: var(--fs-body);
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
}
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}
.partner-card {
  flex: 0 1 calc(33.333% - 14px);
  text-align: center;
  padding: 24px 16px;
  background: var(--mid);
  border-radius: var(--radius);
  transition: transform .2s;
}
.partner-card:hover {
  transform: translateY(-3px);
}
.partner-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--dark-3);
  color: var(--white);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.partner-avatar.photo {
  overflow: hidden;
  padding: 0;
}
.partner-avatar.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.partner-name { font-weight: 700; font-size: var(--fs-body); color: var(--text); margin-bottom: 4px; }
.partner-role { font-size: var(--fs-meta); color: var(--text-muted); margin: 0; }

/* Team section on a dark background — adapt cards & text to match the
   Solution section, including the same background image + overlay. */
.team.section-dark {
  background:
    linear-gradient(rgba(15,26,56,0.88), rgba(15,26,56,0.88)),
    url('../images/bg_final.png') left center / cover no-repeat fixed;
}
#team.section-dark .section-intro { color: rgba(255,255,255,.9); }
#team.section-dark .founder-card {
  background: var(--dark-2);
  border-color: rgba(255,255,255,.12);
  box-shadow: none;
}
#team.section-dark .founder-card p { color: rgba(255,255,255,.78); }
#team.section-dark .founder-affil { color: rgba(255,255,255,.55); }
#team.section-dark .founder-italic { color: rgba(255,255,255,.9) !important; }
#team.section-dark .partners-title { color: var(--white); }
#team.section-dark .partner-card { background: var(--dark-3); }
#team.section-dark .partner-name { color: var(--white); }
#team.section-dark .partner-role { color: rgba(255,255,255,.9); }
#team.section-dark .team-pub-link { color: var(--orange-lt); }
#team.section-dark .team-pub-link:hover { border-color: var(--orange-lt); }

.backing-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.backing-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.backing-icon { font-size: 1.6rem; flex-shrink: 0; }
.backing-item strong { display: block; color: var(--text); margin-bottom: 4px; }
.backing-item p { font-size: 0.85rem; margin: 0; }

/* =====================================================
   MILESTONES
   ===================================================== */
.milestones-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
.timeline-node {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
}
.timeline-year {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 12px;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  margin: 12px auto 20px;
}
.timeline-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.timeline-content ul {
  list-style: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.timeline-content li {
  margin-bottom: 8px;
  padding-left: 14px;
  position: relative;
}
.timeline-content li:before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--orange);
  font-weight: bold;
}

.market-banner {
  display: flex;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.market-stat {
  flex: 1;
  background: var(--dark);
  padding: 36px 28px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.06);
}
.market-stat:last-child { border-right: none; }
.market-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 8px;
}
.market-label { font-size: 0.85rem; color: rgba(255,255,255,.55); margin: 0; }

/* =====================================================
   CONTACT
   ===================================================== */
.contact { padding: 112px 0; }
.contact h2 { color: var(--text); margin: 16px 0 20px; }
.contact-sub {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  font-size: var(--fs-body);
}

/* =====================================================
   LOGOS / INSTITUTIONS
   ===================================================== */
.logos-section {
  background:
    linear-gradient(rgba(15,26,56,0.88), rgba(15,26,56,0.88)),
    url('../images/bg_final.png') left center / cover no-repeat fixed;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 64px 0 48px;
}
.logos-title {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  margin-bottom: 40px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.logos-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
}
.partner-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.7;
  /* Force every logo to render mostly white on the dark background. */
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}
.logo-item:hover .partner-logo {
  opacity: 1;
}
/* The École Polytechnique logo is a tall portrait lockup, so it renders narrow.
   Allow it a little extra height so it doesn't read as too small next to the
   wide wordmark logos. */
.partner-logo-tall {
  max-height: 125%;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background:
    linear-gradient(rgba(15,26,56,0.88), rgba(15,26,56,0.88)),
    url('../images/bg_final.png') left center / cover no-repeat fixed;
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer p {
  font-size: 0.82rem;
  color: rgba(255,255,255,.7);
}
.footer-disclaimer { font-style: italic; }
.footer .nav-logo { color: rgba(255,255,255,.7); font-size: 1rem; }

/* Social links for LinkedIn */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: opacity 0.3s ease;
  vertical-align: middle;
}
.social-link:hover {
  opacity: 0.8;
}
.social-link svg {
  width: 20px;
  height: 20px;
}

/* Footer social link */
.footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
  padding: 4px;
}
.footer-social:hover {
  color: #0A66C2;
}
.footer-social svg {
  width: 24px;
  height: 24px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .hero-inner       { min-height: auto; padding: 0 24px; }
  .hero-text        { padding: 120px 0 48px; margin-left: 0; }
  .hero-visual      { display: none; }
  .mission-grid     { grid-template-columns: 1fr; }
  .mission-step     { padding-left: 144px; }            /* 120px icon + 24px gap */
  .mission-step + .mission-step { margin-top: 56px; }
  .mission-step-node { width: 120px; }
  .mission-step-node img { max-width: 120px; max-height: 120px; }
  .mission-step:not(:last-child)::after { left: 132px; height: 56px; }   /* gutter between 120px icon column and text */
  .data-phil-grid   { grid-template-columns: 1fr; }
  .modules          { grid-template-columns: 1fr; }
  .founders         { grid-template-columns: 1fr; }
  .partner-card     { flex: 0 1 calc(50% - 10px); }
  .backing-row      { grid-template-columns: 1fr; }
  .milestones-timeline { grid-template-columns: 1fr; }
  .logos-grid       { grid-template-columns: repeat(4, 1fr); }
  .market-banner    { flex-direction: column; }
  .nav-burger       { display: flex; }
  .nav-links        { display: none; }   /* collapsed by default; .nav-open reveals it */
  /* Dropdown panel below the bar. .nav is fixed (containing block) and .nav-inner
     is static, so absolute positioning resolves to .nav → full-viewport width. */
  .nav-links.nav-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;            /* keep the .nav-ext pills pill-shaped */
    gap: 18px;
    position: absolute;
    top: var(--nav-h);                  /* sits directly below the top bar */
    left: 0;
    right: 0;
    padding: 20px 24px;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
}

@media (max-width: 600px) {
  section { padding: 40px 0; }
  .partner-card  { flex: 0 1 calc(50% - 10px); }
  .stat-row      { flex-direction: column; }
  .logos-grid    { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .logo-item     { height: 60px; }
  .cycle-diagram .wf-icon { width: 44px; height: 44px; font-size: 1rem; }
  .cycle-diagram .cycle-label { font-size: 0.68rem; }
}
