/* =========================================================
   Endogenous Therapeutics — styles
   Accent on white. Minimal, medical, modern. Manrope throughout.
   Blue palette: a deep accent (700) and a bright accent (500).
   ========================================================= */

:root {
  /* cobalt + azure */
  --ink: #0B1F3A;
  --text: #26364F;
  --accent-900: #071C3D;
  --accent-700: #0A47A3;
  --accent-500: #1E6FE8;
  --accent-300: #78AAF5;
  --accent-100: #E3EDFB;
  --accent-50: #F4F8FE;
  --accent-700-rgb: 10, 71, 163;
  --accent-500-rgb: 30, 111, 232;
  --canvas-bg: #F6F9FE;
  --white: #FFFFFF;
  --gray-600: #55637A;
  --hairline: rgba(11, 31, 58, 0.10);
  --hairline-light: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(var(--accent-700-rgb), 0.10);
  --shadow-sm: 0 8px 24px rgba(var(--accent-700-rgb), 0.12);

  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(80px, 10vw, 128px);
  --header-h: 84px;
  --header-h-compact: 64px;
  --radius: 20px;

  /* the logo's gradient, reused for accent fills: #1E6FE8 upper-right to
     #0A47A3 lower-left. Angle derived from the mark's own linearGradient. */
  --grad: linear-gradient(244deg, var(--accent-500) 0%, var(--accent-700) 100%);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h-compact) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 3px; border-radius: 4px; }
em { font-style: italic; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-weight: 600; font-size: 14px;
}
.skip-link:focus { top: 16px; }

/* ---------- type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-500);
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--grad); border-radius: 2px; }
.eyebrow--light { color: var(--accent-300); }
/* on the dark contact panel the accent gradient would sink into the background */
.eyebrow--light::before { background: var(--accent-300); }

.section__title {
  margin-top: 20px;
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.section__title--sm { font-size: clamp(28px, 3.4vw, 40px); }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease),
              transform 200ms var(--ease), box-shadow 200ms var(--ease), filter 200ms var(--ease);
  cursor: pointer;
}
.btn--sm { height: 42px; padding: 0 20px; font-size: 14px; }
.btn--primary { background: var(--grad); color: var(--white); }
/* gradients do not tween, so brighten on hover instead of swapping the image */
.btn--primary:hover { filter: brightness(1.14); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--ghost { border: 1.5px solid var(--hairline); color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: height 300ms var(--ease), background-color 300ms var(--ease), border-color 300ms var(--ease),
              box-shadow 300ms var(--ease);
}
.site-header.is-scrolled {
  height: var(--header-h-compact);
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--hairline);
  box-shadow: 0 10px 30px rgba(var(--accent-700-rgb), 0.06);
}
.site-header__inner {
  height: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 32px;
}
.brand { display: inline-flex; align-items: center; color: var(--ink); }
/* the lockup carries the wordmark, so height is the only dimension that is set */
.brand__logo { display: block; height: 38px; width: auto; transform-origin: left center; transition: transform 300ms var(--ease); }
.is-scrolled .brand__logo { transform: scale(0.9); }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 6px; }
.nav__list a {
  position: relative; display: inline-flex; align-items: center;
  height: 44px; padding: 0 12px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: color 200ms var(--ease);
}
.nav__list a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 2px;
  background: var(--grad); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease);
}
.nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); }
.nav__list a.is-active { color: var(--accent-700); }

.menu-toggle {
  display: none; position: relative; width: 44px; height: 44px; margin-left: auto;
  border-radius: 999px;
}
.menu-toggle__bar {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 300ms var(--ease), top 300ms var(--ease);
}
.menu-toggle__bar:nth-child(1) { top: 17px; }
.menu-toggle__bar:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  background: var(--white);
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu__list a {
  display: block; padding: 14px 0;
  font-size: clamp(32px, 9vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu__cta { align-self: flex-start; margin-top: 32px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--canvas-bg);
}
/* full-bleed: the video runs edge to edge and under the header, which floats
   over it until it goes solid on scroll */
.hero__media { position: absolute; inset: 0; background: var(--canvas-bg); }
.hero__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 50%;
}
.js .hero__poster { opacity: 0; }
.js.reduced-motion .hero__poster { opacity: 1; }
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 600ms var(--ease);
}
.hero.is-ready .hero__canvas { opacity: 1; }
.reduced-motion .hero__canvas { display: none; }

.hero__content {
  position: absolute; z-index: 2;
  left: var(--gutter); top: 50%; transform: translateY(-50%);
  max-width: 600px; padding-top: 24px;
}
@media (min-width: 1200px) { .hero__content { left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); } }
@media (max-width: 1199px) { .hero__content { max-width: 520px; } }
.hero__eyebrow { margin-bottom: 22px; }
.hero__title {
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.0;
  color: var(--ink);
  text-wrap: balance;
}
.hero__lead { margin-top: 24px; max-width: 44ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--gray-600); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__captions { position: absolute; z-index: 2; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(520px, 90vw); pointer-events: none; }
@media (min-width: 1200px) { .hero__captions { left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); } }
.hero__caption { position: absolute; left: 0; top: 0; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; opacity: 0; }
.hero__caption-index { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--accent-500); }
.hero__caption-text { font-size: clamp(26px, 3vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
/* no-JS / reduced motion: static poster, no scrub captions or cue (the Science section covers the steps) */
html:not(.js) .hero__captions, .reduced-motion .hero__captions,
html:not(.js) .hero__cue, .reduced-motion .hero__cue { display: none; }
html:not(.js) .hero__poster, .reduced-motion .hero__poster { object-position: 0% 50%; }

.hero__cue {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--gray-600);
}
.hero__cue-label { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.hero__cue-line { position: relative; width: 1px; height: 44px; background: var(--hairline); overflow: hidden; }
.hero__cue-line::after {
  content: ''; position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--grad);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .hero__cue-line::after { animation: none; top: 0; } }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); margin-top: clamp(40px, 5vw, 64px); align-items: start; }
.about__copy p + p { margin-top: 22px; }
.about__copy { font-size: clamp(17px, 1.25vw, 19px); line-height: 1.65; }
.pillars { display: flex; flex-direction: column; }
.pillar { padding: 24px 0; border-top: 1px solid var(--hairline); }
.pillar:last-child { border-bottom: 1px solid var(--hairline); }
.pillar__title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.pillar__text { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--gray-600); }

/* ---------- science ---------- */
.science { background: var(--accent-50); }
.science__lead { margin-top: 28px; max-width: 70ch; }
/* inline references in the lead: underlined so they read as links in running text */
.cite { color: var(--accent-700); text-decoration: underline; text-decoration-color: rgba(var(--accent-700-rgb), 0.35); text-underline-offset: 3px; transition: text-decoration-color 200ms var(--ease); }
.cite:hover { text-decoration-color: var(--accent-700); }
.cite:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 2px; border-radius: 2px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(48px, 6vw, 80px); }
.step { display: flex; flex-direction: column; gap: 20px; }
.step__figure {
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px;
  background: var(--canvas-bg); border: 1px solid var(--hairline);
}
.step__figure img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transform: scale(1.02); transition: transform 600ms var(--ease); }
.step:hover .step__figure img { transform: scale(1.06); }
.step__body { padding-top: 18px; border-top: 1px solid var(--hairline); }
.step__num { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent-500); }
.step__title { margin-top: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.step__text { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--gray-600); }


/* ---------- team ---------- */
.founders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.person { padding: 28px 24px 26px; border-radius: var(--radius); border: 1px solid var(--hairline); background: var(--white); transition: box-shadow 300ms var(--ease), transform 300ms var(--ease); }
.person:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
/* the whole card is the link to that founder’s bio */
.person { position: relative; }
.person__link { display: block; color: inherit; }
.person__link:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 4px; border-radius: calc(var(--radius) - 6px); }
/* always visible, so the card reads as clickable without a hover */
.person__bio {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 13px; font-weight: 600; color: var(--accent-700); opacity: 0.68;
  transition: opacity 240ms var(--ease);
}
.person:hover .person__bio, .person__link:focus-visible .person__bio { opacity: 1; }
.person__ext { width: 11px; height: 11px; flex: none; }

.person__photo {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  background: var(--accent-100);
}
.person__name { margin-top: 24px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.person__role { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--gray-600); }

/* parked: Board of Directors and Scientific Advisory Board return later */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.board { padding: 28px 0 0; border-top: 1px solid var(--hairline); }
.board__title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.board__text { margin-top: 6px; font-size: 15px; color: var(--gray-600); }

/* ---------- news: parked, returns with the first press release ---------- */
.news { background: var(--accent-50); }
.news__row { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.news-card { position: relative; padding: 32px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--hairline); }
.tag { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--accent-100); color: var(--accent-700); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; }
.news-card__title { margin-top: 18px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.news-card__text { margin-top: 8px; font-size: 15px; color: var(--gray-600); }
.news-card__link { display: inline-block; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--gray-600); opacity: 0.6; }

/* ---------- investors ---------- */
.investors { padding-bottom: calc(var(--section-y) - 16px); }
.investors__head { margin-bottom: clamp(32px, 4vw, 56px); }
.marquee { position: relative; overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; align-items: center; gap: clamp(56px, 8vw, 120px); width: max-content; padding-right: clamp(56px, 8vw, 120px); animation: marquee 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
/* each logo links to the firm; the track pauses on hover so they can be hit */
.marquee__link { display: block; transition: opacity 220ms var(--ease); }
.marquee__link:hover { opacity: 0.6; }
.marquee__link:focus-visible { outline: 2px solid var(--accent-500); outline-offset: 6px; border-radius: 4px; }
.marquee:focus-within .marquee__track { animation-play-state: paused; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee__item { display: flex; align-items: center; flex: none; }
/* Investor logos in their original colours.
   Heights are tuned per mark so letterforms read at the same size; widths follow each file's aspect ratio. */
.logo { display: block; height: var(--h); width: auto; }
.logo--freeflow    { --h: clamp(30px, 3.2vw, 42px); }
.logo--wilson-hill { --h: clamp(24px, 2.5vw, 33px); }
.logo--caltech     { --h: clamp(24px, 2.5vw, 32px); }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; padding: 0 var(--gutter); }
  .marquee__track .marquee__item[aria-hidden="true"] { display: none; }
}

/* ---------- contact ---------- */
.contact {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 10%, rgba(var(--accent-500-rgb), 0.35), transparent 60%), var(--accent-900);
  color: var(--white);
}
.contact__mark { position: absolute; right: -6vw; top: -8vw; width: 50vw; max-width: 720px; opacity: 0.16; pointer-events: none; }
.contact__inner { position: relative; }
.contact__title { margin-top: 20px; font-size: clamp(56px, 10vw, 128px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; color: var(--white); }
.contact__text { margin-top: 28px; max-width: 46ch; font-size: clamp(17px, 1.3vw, 20px); color: rgba(255, 255, 255, 0.72); }
.contact__email {
  display: inline-block; margin-top: 40px;
  font-size: clamp(24px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; color: var(--white);
  border-bottom: 3px solid var(--accent-300); padding-bottom: 6px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.contact__email:hover { color: var(--accent-300); border-color: var(--white); }
.contact__email:focus-visible { outline-color: var(--white); }
.contact__name { margin-top: 16px; font-size: 15px; color: rgba(255, 255, 255, 0.6); }

/* ---------- footer ---------- */
.site-footer { padding: 36px 0; border-top: 1px solid var(--hairline); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand--footer .brand__logo { height: 32px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer__links a { font-size: 14px; font-weight: 600; color: var(--ink); }
.site-footer__links a:hover { color: var(--accent-500); }
.site-footer__legal { font-size: 13px; color: var(--gray-600); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .founders { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .brand__logo { height: 32px; }
  :root { --header-h: 72px; --header-h-compact: 60px; }
  .nav, .site-header__cta { display: none; }
  .menu-toggle { display: block; }
  .about__grid, .news__row { grid-template-columns: 1fr; }
  .boards { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  .hero { min-height: 600px; }
  .hero__content, .hero__captions { top: calc(var(--header-h) + 8px); transform: none; }
  .hero__caption { top: 0; transform: none; }
  .hero__title { font-size: clamp(38px, 11vw, 48px); }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { height: 48px; }
  /* static fallback on small screens: poster sits low like the canvas does, captions are left to the science section */
  html:not(.js) .hero__poster, .reduced-motion .hero__poster {
    top: auto; bottom: 0; height: 52%; width: 160%; max-width: none; left: 50%; transform: translateX(-62%);
    object-fit: contain; object-position: 62% 75%;
  }
  .steps, .founders { grid-template-columns: 1fr; }
  .step__figure { aspect-ratio: 16 / 9; }
  .person { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center; padding: 20px; }
  .person__photo { width: 96px; height: 96px; grid-row: 1 / 3; }
  .person__name { margin-top: 0; font-size: 18px; align-self: end; }
  .person__role { align-self: start; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}


