/* ============================================================
   CARDIOSTIM — DESIGN TOKENS
   ============================================================ */
:root {
  --navy-950: #0F1A30;
  --navy-900: #131F3B;
  --navy-800: #1B2747;
  --navy-700: #263463;
  --teal-400: #4FB8AE;
  --copper-500: #C76E4B;
  --mist-100: #EDF1F5;
  --ink-200: #B7C2D9;
  --ink-400: #7C89AC;
  --line: rgba(183, 194, 217, 0.16);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max: 1080px;
  --pad: clamp(1.5rem, 5vw, 4rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--mist-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   SPINE — the connective rhythm element running down the page
   ============================================================ */
.spine {
  position: fixed;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--line) 6%, var(--line) 94%, transparent);
  z-index: 0;
}
@media (max-width: 720px) {
  .spine { display: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 26, 48, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__mark {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--mist-100);
}
.nav__link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-200);
  border: 1px solid var(--line);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}
.nav__link:hover { color: var(--teal-400); border-color: var(--teal-400); }

/* ============================================================
   SHARED TYPE HELPERS
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-500);
  margin: 0;
}
.lede {
  font-size: 1.05rem;
  color: var(--ink-200);
  max-width: 640px;
  margin: 1.1rem 0 0;
}
.lede--note { font-style: italic; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 14vh, 7rem) var(--pad) clamp(3rem, 10vh, 5rem);
  overflow: hidden;
}
.hero__trace {
  width: min(420px, 70%);
  margin-top: 2.2rem;
  opacity: 0.7;
  pointer-events: none;
}
.hero__trace svg { width: 100%; height: auto; display: block; }
.hero__trace path {
  fill: none;
  stroke: var(--teal-400);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.6s ease-out 0.2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero h1 {
  position: relative;
  font-size: clamp(3rem, 9vw, 5.5rem);
  margin-top: 0.6rem;
  color: var(--mist-100);
}
.hero__subtitle {
  position: relative;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-200);
  max-width: 560px;
  margin: 1.4rem 0 0;
}
.btn {
  position: relative;
  display: inline-block;
  margin-top: 2.2rem;
  padding: 0.85rem 1.6rem;
  background: var(--copper-500);
  color: var(--navy-950);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(199,110,75,0.28); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--pad);
  position: relative;
}
.section--panel {
  max-width: 100%;
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--panel .section__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--pad);
}

.section__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.marker { width: 46px; flex: none; opacity: 0.85; }
.marker__trace { width: 100%; height: auto; display: block; }
.marker__trace path { fill: none; stroke: var(--teal-400); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.section h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  max-width: 760px;
  color: var(--mist-100);
}

.prose { max-width: 640px; margin-top: 1.2rem; }
.prose p {
  color: var(--ink-200);
  font-size: 1.02rem;
  margin: 0 0 1rem;
}

/* ============================================================
   GRIDS — problem cards / team
   ============================================================ */
.grid { display: grid; gap: 1.1rem; margin-top: 2.2rem; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }

.card {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
}
.card h3 {
  font-size: 1.05rem;
  color: var(--mist-100);
  margin-bottom: 0.5rem;
}
.card p { color: var(--ink-200); font-size: 0.95rem; margin: 0; }

.member { text-align: center; }
.member__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.9rem;
  display: block;
  border: 1px solid var(--line);
}
.member h3 { font-size: 0.95rem; color: var(--mist-100); margin-bottom: 0.3rem; }
.member p { font-size: 0.82rem; color: var(--ink-400); margin: 0; }

.advisor {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--ink-200);
}
.advisor strong { color: var(--mist-100); }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.tl-item {
  flex: 1 1 150px;
  padding: 1.2rem 1.4rem 1.2rem 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.tl-item:last-child { border-right: none; }
.tl-item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--copper-500);
}
.tl-item time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--copper-500);
  margin-bottom: 0.4rem;
}
.tl-item span { color: var(--ink-200); font-size: 0.92rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact { text-align: left; }
.contact__row {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.4rem;
}
.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-decoration: none;
  color: var(--teal-400);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact__email:hover { border-color: var(--teal-400); }
.contact__location {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-400);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem var(--pad) 3.2rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-400);
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .grid--4 { grid-template-columns: 1fr; }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .timeline { flex-direction: column; }
  .tl-item { border-right: none; border-bottom: 1px solid var(--line); padding: 1rem 0; }
  .tl-item::before { width: 20px; }
}
