/* ==========================================================================
   T-Hawk Life Sciences site stylesheet
   Tokens derived from: deck logo (navy #00134b / orange #c26e2e),
   deck data tables (#17618e), and arthropod_evolution_timeline.html
   (navy #1a1a2e, gold #c9a84c, sand #f8f7f4, border #e2e0d8).
   ========================================================================== */

:root {
  --th-navy-900: #0b1226;
  --th-navy:     #14224e;
  --th-blue:     #17618e;
  --th-blue-dim: #dceaf3;
  --th-orange:   #c2622a;
  --th-orange-l: #f0a463;
  --th-gold:     #c9a84c;
  --th-gold-l:   #e8c97a;
  --th-sand:     #f8f7f4;
  --th-card:     #ffffff;
  --th-border:   #e2e0d8;
  --th-ink:      #1a1a2e;
  --th-muted:    #5a5a7a;
  --th-teal:     #1d9e75;
  --th-red:      #a32d2d;

  --display: 'Archivo', 'Segoe UI', Arial, sans-serif;
  --body: 'Spectral', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', 'Consolas', monospace;

  --measure: 1120px;
  --rail: 3px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--th-ink);
  background: var(--th-sand);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--th-blue); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--th-gold); color: var(--th-navy-900);
  padding: 10px 16px; z-index: 100; font-family: var(--display); font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--th-gold); outline-offset: 3px; }

/* ── HEADER ───────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--th-navy-900);
  border-bottom: 1px solid rgba(201,168,76,0.35);
}

.head-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 10px 28px 9px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark {
  text-decoration: none;
  display: block;
  flex-shrink: 0;
  margin-right: auto;
}
.wm-logo {
  display: block;
  width: 168px;
  height: auto;
  transition: opacity 0.15s ease;
}
.wordmark:hover .wm-logo { opacity: 0.82; }

/* ── INDEX DROPDOWN (upper corner, every page) ────────────────────────── */

.index { position: relative; margin-left: auto; }

.index-btn {
  display: flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--th-gold-l);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 9px 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.index-btn:hover { background: rgba(201,168,76,0.14); color: #fff; }
.index-btn .count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
}
.index-btn .chev { transition: transform 0.18s ease; }
.index-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.index-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 340px;
  background: var(--th-navy-900);
  border: 1px solid rgba(201,168,76,0.45);
  box-shadow: 0 18px 44px rgba(11,18,38,0.45);
  list-style: none;
  padding: 6px;
  max-height: 74vh;
  overflow-y: auto;
}
.index-menu[hidden] { display: none; }
.index-menu li + li { border-top: 1px solid rgba(255,255,255,0.06); }
.index-menu a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.78);
  font-family: var(--display);
  font-size: 13.5px;
  line-height: 1.35;
}
.index-menu a:hover { background: rgba(201,168,76,0.14); color: #fff; }
.index-menu a .n {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--th-gold);
  flex-shrink: 0;
}
.index-menu a[aria-current="page"] {
  background: rgba(194,98,42,0.2);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--th-orange);
}

/* ── FLIGHT LINE (signature: position in the 12-page sequence) ─────────── */

.flightline {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px 12px;
  display: flex;
  align-items: center;
  gap: 0;
}
.flightline .tick {
  height: var(--rail);
  flex: 1;
  background: rgba(255,255,255,0.1);
}
.flightline .tick.past { background: rgba(201,168,76,0.55); }
.flightline .tick.here {
  background: var(--th-orange);
  box-shadow: 0 0 0 1px rgba(240,164,99,0.4);
}
.flightline .tick + .tick { margin-left: 3px; }

/* ── PAGE FRAME ───────────────────────────────────────────────────────── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 46px 28px 22px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--th-orange);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px; height: 1px;
  background: var(--th-orange);
  vertical-align: 4px;
  margin-right: 12px;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--th-navy);
}

.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--th-muted);
  max-width: 62ch;
  margin-top: 16px;
}

.rule {
  height: 1px;
  background: var(--th-border);
  margin: 34px 0 30px;
  position: relative;
}
.rule::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 64px; height: 3px;
  background: var(--th-gold);
}

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.005em;
  color: var(--th-navy);
  margin-bottom: 12px;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--th-navy);
  margin-bottom: 8px;
}

.section-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--th-muted);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--th-border);
  margin: 42px 0 20px;
}

p + p { margin-top: 12px; }

/* ── CARDS & GRIDS ────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }

.card {
  background: var(--th-card);
  border: 1px solid var(--th-border);
  border-top: 3px solid var(--th-navy);
  padding: 22px 22px 24px;
}
.card.accent-orange { border-top-color: var(--th-orange); }
.card.accent-gold   { border-top-color: var(--th-gold); }
.card.accent-blue   { border-top-color: var(--th-blue); }
.card.accent-teal   { border-top-color: var(--th-teal); }
.card p { font-size: 15.5px; line-height: 1.58; color: #3a3a52; }

.card-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--th-muted);
  margin-bottom: 9px;
}

ul.ticks { list-style: none; }
ul.ticks li {
  position: relative;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: #3a3a52;
}
ul.ticks li + li { margin-top: 10px; }
ul.ticks li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px;
  border: 1.5px solid var(--th-orange);
  transform: rotate(45deg);
}

/* ── STAT PANELS ──────────────────────────────────────────────────────── */

.stat {
  background: var(--th-card);
  border: 1px solid var(--th-border);
  border-left: 3px solid var(--th-orange);
  padding: 18px 20px;
}
.stat .fig {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: var(--th-navy);
  letter-spacing: -0.02em;
}
.stat .cap {
  font-size: 14px;
  line-height: 1.45;
  color: var(--th-muted);
  margin-top: 9px;
}

/* ── FACT LIST ────────────────────────────────────────────────────────── */

.facts {
  background: var(--th-navy-900);
  color: rgba(255,255,255,0.86);
  padding: 26px 26px 28px;
}
.facts h2 { color: var(--th-gold-l); }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 22px; }
.facts dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  padding-top: 4px;
}
.facts dd { font-size: 15px; line-height: 1.45; }
.facts a { color: var(--th-gold-l); }

/* ── TABLES ───────────────────────────────────────────────────────────── */

.table-wrap {
  background: var(--th-card);
  border: 1px solid var(--th-border);
  overflow-x: auto;
}
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data thead tr { background: var(--th-blue); color: #fff; }
table.data thead th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  padding: 11px 14px;
  white-space: nowrap;
}
table.data tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--th-border);
  vertical-align: top;
}
table.data tbody tr:nth-child(even) { background: #fafaf8; }
table.data tbody tr:last-child td { border-bottom: none; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  white-space: nowrap;
}
.pill-done { background: #e1f5ee; color: #0f6e56; border: 1px solid #9fe1cb; }
.pill-live { background: #faeeda; color: #854f0b; border: 1px solid #fac775; }
.pill-plan { background: #eef0f6; color: #464f77; border: 1px solid #c9cfe2; }

/* ── PIPELINE GANTT ───────────────────────────────────────────────────── */

.gantt { background: var(--th-card); border: 1px solid var(--th-border); overflow-x: auto; }
.gantt-inner { min-width: 860px; }
.gantt-row {
  display: grid;
  grid-template-columns: 132px 168px repeat(6, 1fr);
  align-items: stretch;
}
.gantt-head {
  background: var(--th-blue);
  color: #fff;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.gantt-head > div { padding: 11px 12px; border-left: 1px solid rgba(255,255,255,0.16); }
.gantt-head > div:first-child { border-left: none; }
.gantt-body > div {
  padding: 16px 12px;
  border-left: 1px solid var(--th-border);
  border-bottom: 1px solid var(--th-border);
  display: flex; align-items: center;
}
.gantt-body > div:first-child { border-left: none; }
.gantt-body:nth-child(even) { background: #fafaf8; }
.gantt-mol { font-family: var(--mono); font-size: 14px; color: var(--th-navy); font-weight: 500; }
.gantt-ind { font-size: 14.5px; color: #3a3a52; }
.gantt-track { position: relative; padding: 0 !important; }
.gantt-bar {
  height: 22px;
  margin: 0 6px;
  width: calc(100% - 12px);
  background: var(--th-blue);
  position: relative;
  display: flex; align-items: center;
}
.gantt-bar::after {
  content: "";
  position: absolute; right: -11px; top: -3px;
  border-left: 12px solid var(--th-blue);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.gantt-empty { font-family: var(--mono); font-size: 11px; color: #b7b5ad; }

/* ── STAGE STACK (discovery platform) ─────────────────────────────────── */

.stack { display: flex; flex-direction: column; gap: 10px; }
.stage {
  display: flex;
  align-items: stretch;
  background: var(--th-card);
  border: 1px solid var(--th-border);
  border-left: 3px solid var(--th-blue);
}
.stage-n {
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  background: var(--th-blue);
  padding: 18px 16px;
  display: flex; align-items: center;
  flex-shrink: 0;
}
.stage-t { padding: 16px 20px; }
.stage-t h3 { margin-bottom: 4px; }
.stage-t p { font-size: 14.5px; color: var(--th-muted); }
.stage:nth-child(1) { margin-right: 0; }
.stage:nth-child(2) { margin-left: 3%; }
.stage:nth-child(3) { margin-left: 6%; }
.stage:nth-child(4) { margin-left: 9%; }
.stage:nth-child(5) { margin-left: 12%; }

/* ── PHOTO CARDS (organisms, precedent source organisms) ──────────────── */

.card .shot {
  display: block;
  width: calc(100% + 44px);
  margin: -22px -22px 16px;
  height: 158px;
  object-fit: cover;
  background: var(--th-navy-900);
  border-bottom: 1px solid var(--th-border);
}
.g3 .card .shot { height: 182px; }

.figline {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--th-muted);
  margin-top: 14px;
}

/* ── FOUNDER PORTRAIT ─────────────────────────────────────────────────── */

.bio { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: center; }
.bio .portrait {
  display: block;
  width: 100%;
  height: 158px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--th-border);
  background: var(--th-navy-900);
}

/* ── FIGURES ──────────────────────────────────────────────────────────── */

figure { background: var(--th-card); border: 1px solid var(--th-border); padding: 12px; }
figure img { display: block; width: 100%; height: auto; }
figcaption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--th-muted);
  padding: 12px 4px 4px;
  text-transform: uppercase;
}

/* ── HERO (intro page) ────────────────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; align-items: center; }
.hero-img { border: 1px solid var(--th-border); background: #000; }
.hero-img img { display: block; width: 100%; height: auto; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); }
.hero .contact {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--th-border);
  font-size: 16px;
  line-height: 1.7;
}
.hero .contact .name { font-family: var(--display); font-weight: 700; color: var(--th-navy); }
.hero .contact .role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--th-muted); }

/* ── CALLOUT ──────────────────────────────────────────────────────────── */

.callout {
  border-left: 3px solid var(--th-gold);
  background: #fffdf6;
  padding: 18px 22px;
  font-size: 16px;
  color: #3a3a52;
}
.callout strong { color: var(--th-navy); }

.legal {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--th-muted);
  border-top: 1px solid var(--th-border);
  padding-top: 16px;
}

/* ── FOOTER + PAGER ───────────────────────────────────────────────────── */

.site-foot { max-width: var(--measure); margin: 0 auto; padding: 30px 28px 56px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--th-border);
  padding-top: 22px;
}
.pager .spacer { flex: 1; }
.pg {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border: 1px solid var(--th-navy);
  background: var(--th-navy);
  color: #fff;
  padding: 12px 18px;
  min-width: 210px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pg:hover { background: var(--th-orange); border-color: var(--th-orange); }
.pg .dir {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--th-gold-l);
}
.pg .ttl { font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1.25; }
.pg:hover .dir { color: rgba(255,255,255,0.85); }
.pg-back { flex-direction: row; }
.pg-next { flex-direction: row-reverse; text-align: right; }
.pg-back .txt, .pg-next .txt { display: flex; flex-direction: column; gap: 3px; }
.pg-next .txt { align-items: flex-end; }

.colophon {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--th-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--th-muted);
  letter-spacing: 0.04em;
}
.colophon a { color: var(--th-muted); }

/* ── TIMELINE EMBED OVERRIDES ─────────────────────────────────────────── */

.tl-embed { background: transparent; }
.tl-embed .container { max-width: 100%; margin: 0; padding: 0; }
.tl-embed .section-title { font-family: var(--mono); letter-spacing: 0.16em; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dt { padding-top: 12px; }
  .stage { margin-left: 0 !important; }
  .pager { flex-direction: column; }
  .pg { min-width: 0; }
  .pg-next { flex-direction: row; text-align: left; }
  .pg-next .txt { align-items: flex-start; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .bio { grid-template-columns: 1fr; gap: 14px; }
  .bio .portrait { height: 230px; max-width: 180px; }
  .head-inner { padding: 12px 16px 10px; gap: 12px; }
  .flightline { padding: 0 16px 10px; }
  main { padding: 32px 16px 18px; }
  .site-foot { padding: 24px 16px 44px; }
  .index-menu { width: min(88vw, 340px); }
  .index-btn .count { display: none; }
  .wm-logo { width: 124px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-head, .pager, .skip { display: none; }
  body { background: #fff; }
}
