/* Loopwright Therapeutics — v2 site styles (Brand Kit v4 · Black) */
:root {
  --void: #010203;
  --carbon: #0B0F11;
  --graphite: #1C2427;
  --line: #2E3A3E;
  --ash: #8A979C;
  --mist: #C9D2D5;
  --bone: #F2F5F4;
  --aqua: #16D9DC;
  --current: #0A8FC4;
  --abyss: #0C4487;
  --glass: rgba(11, 15, 17, 0.78);
  --gutter: clamp(20px, 6vw, 88px);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: var(--sans);   /* small uppercase labels: Geist, wide tracking (swap here to change the label face) */
  --p: 0; /* scroll progress 0–1, set by main.js */
  --header-bg: rgba(1, 2, 3, 0.72);
  --header-rule: #141A1C;
  --panel-bg: rgba(11, 15, 17, 0.85);
  --scrim: 1, 2, 3;
  --on-accent: #010203;
  --accent-hover: #5FEAEC;
}

/* Light theme — the brand kit's "on light" treatment: Bone ground, Void type,
   the deeper logo gradient, and aqua deepened to the gradient's blue so it
   stays legible. Switched by the footer toggle (main.js). */
[data-theme="light"] {
  --void: #F2F5F4;
  --carbon: #FFFFFF;
  --graphite: #D5DDE0;
  --line: #B9C6CC;
  --ash: #4A565B;
  --mist: #2B3639;
  --bone: #010203;
  --aqua: #0C63A8;
  --current: #0A8FC4;
  --glass: rgba(255, 255, 255, 0.8);
  --header-bg: rgba(242, 245, 244, 0.8);
  --header-rule: #DDE4E6;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --scrim: 242, 245, 244;
  --on-accent: #FFFFFF;
  --accent-hover: #0C4487;
}
/* The live wave draws itself in the deeper light-mode colors (strand-wave.js).
   The still image, shown only without animation, is inverted to dark strands on Bone. */
[data-theme="light"] .bg { background: var(--void); }
[data-theme="light"] img.bg__wave { filter: invert(1) hue-rotate(180deg) saturate(1.3); mix-blend-mode: multiply; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--aqua); }
a:hover { color: var(--bone); }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 300; letter-spacing: -0.05em; line-height: 0.98; }
h2 { font-size: clamp(36px, 4.4vw, 56px); }
h2.light { font-weight: 300; }
h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--ash); }

/* Background wave — moves with scroll */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__wave {
  position: absolute; left: -2%; top: 22%;
  width: 104%; height: auto; min-height: 60vh; object-fit: cover;
  transform-origin: 50% 50%;
  transform: translate(calc(var(--p) * -50px), calc(var(--p) * -18vh)) scale(calc(1 + var(--p) * 0.2));
  opacity: calc(1 - 0.45 * var(--mid, 0));
  will-change: transform, opacity;
}
/* Live wave (assets/js/strand-wave.js) takes the image's place once it starts */
.bg__wave--live { display: none; }
.bg.is-live .bg__wave--live { display: block; }
.bg.is-live img.bg__wave { display: none; }
.bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(var(--scrim),0.92) 0%, rgba(var(--scrim),0.7) 38%, rgba(var(--scrim),0.15) 64%, rgba(var(--scrim),0) 80%);
}
.progress {
  position: fixed; top: 0; left: 0; z-index: 20; height: 2px;
  width: calc(var(--p) * 100%);
  background: var(--aqua); box-shadow: 0 0 12px var(--aqua);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  height: 76px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--header-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-rule);
}
/* Lockup: every measurement is in em of .brand's font-size, so the header and
   footer lockups are the same shape at different sizes. "Therapeutics" is sized
   to the width of "Loopwright"; the negative margin cancels its trailing tracking. */
.brand { display: flex; align-items: center; gap: 0.55em; font-size: 22px; color: var(--bone); text-decoration: none; }
.brand img { height: 1.5em; width: auto; flex: none; }
.brand__name { display: flex; flex-direction: column; gap: 0.23em; }
.brand__word { font-size: 1em; font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.brand__sub { font-family: var(--label); font-weight: 500; font-size: 0.4em; letter-spacing: 0.44em; text-transform: uppercase; color: var(--ash); line-height: 1; padding-left: 0.2em; margin-right: -0.44em; }
.brand--lg { font-size: 30px; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--mist); text-decoration: none; white-space: nowrap; }
.site-nav a:not(.btn):hover { color: var(--aqua); }
.site-nav .btn--ghost:hover { color: var(--aqua); }

/* Mobile menu toggle */
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--bone); transition: transform .2s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn--sm { height: 44px; padding: 0 20px; font-size: 15px; }
.btn--primary { background: var(--aqua); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { border: 1px solid var(--line); color: var(--bone); font-weight: 400; }
.btn--ghost:hover { border-color: var(--aqua); color: var(--bone); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }

/* Layout */
.eyebrow, .label { font-family: var(--label); font-weight: 500; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--aqua); }
.label { font-size: 11px; letter-spacing: 0.08em; }
.hero {
  min-height: calc(100vh - 76px);
  padding: clamp(40px, 8vh, 72px) var(--gutter) 64px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.hero__inner { display: flex; flex-direction: column; gap: 28px; max-width: 840px; }
.lede { font-size: 19px; color: var(--ash); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-hint { font-family: var(--label); font-weight: 500; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash); }

.section { padding: clamp(72px, 12vh, 120px) var(--gutter); display: flex; flex-direction: column; gap: 40px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.split__lead { display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 20px; color: var(--mist); }

.card {
  background: var(--glass);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--graphite); border-radius: 8px;
  padding: 28px; display: flex; flex-direction: column; gap: 10px;
}
.person h3 { font-size: 24px; }
.role { color: var(--aqua); font-size: 15px; }
.person .muted { font-size: 15px; }

.focus { list-style: none; margin: 0; padding: 0 32px; gap: 0; }
.focus li { display: grid; grid-template-columns: 80px minmax(0, 380px) 1fr; gap: 24px; align-items: baseline; padding: 26px 0; }
.focus li + li { border-top: 1px solid var(--graphite); }
.focus strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.focus .label { font-size: 13px; }

.panel {
  padding: clamp(40px, 6vw, 80px);
  background: var(--panel-bg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--graphite); border-radius: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Footer */
.site-footer {
  padding: 72px var(--gutter) 40px;
  background: var(--void); border-top: 1px solid var(--graphite);
  display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; align-items: end;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 18px; }
.tagline { font-size: 18px; font-weight: 300; color: var(--mist); }
.site-footer__contact { font-style: normal; display: flex; flex-direction: column; gap: 6px; font-size: 15px; text-align: right; }
.site-footer__legal { grid-column: 1 / -1; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }

/* Dark / light toggle */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--mist); font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--aqua); color: var(--aqua); }
.theme-toggle:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg__wave { transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .split, .panel { grid-template-columns: 1fr; }
  .focus li { grid-template-columns: 48px 1fr; }
  .focus li .muted { grid-column: 2; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--void); border-bottom: 1px solid var(--graphite); z-index: 11;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--graphite); }
  .site-nav .btn { margin-top: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .focus { padding: 0 20px; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer__contact { text-align: left; }
  .bg__wave { top: 58%; width: 200%; left: -60%; }
  .bg::after { background: linear-gradient(180deg, rgba(var(--scrim),0.9) 0%, rgba(var(--scrim),0.75) 55%, rgba(var(--scrim),0.35) 100%); }
}

/* v3 — copy v6 (10 Oct 2026): hero summary, mission, effects, programs, leadership rows */
.hero__summary { font-size: 16px; color: var(--ash); max-width: 680px; }
.section__intro { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.section__intro .muted { font-size: 18px; }
.effects { display: flex; flex-direction: column; gap: 24px; }
.effects h3 { font-size: 24px; font-weight: 400; letter-spacing: -0.03em; }
.effect h3 { font-size: 20px; font-weight: 500; }
.effect .muted { font-size: 15px; }
.note { font-size: 15px; max-width: 760px; }
.panel--text { display: flex; flex-direction: column; gap: 24px; }
.panel__text { font-size: clamp(22px, 2.4vw, 30px); font-weight: 300; letter-spacing: -0.02em; line-height: 1.35; color: var(--bone); max-width: 960px; }
.panel__text .muted { color: var(--ash); }
.people { display: flex; flex-direction: column; gap: 14px; }
.person--row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px clamp(28px, 4vw, 56px); align-items: start; }
.person__head { display: flex; flex-direction: column; gap: 10px; }
.person--row .muted { font-size: 15px; line-height: 1.65; }
@media (max-width: 960px) {
  .person--row { grid-template-columns: 1fr; }
}
