/* Latitude Health — styles.css
   No external dependencies (system fonts, inline SVG). Drop-in for static hosting. */

:root {
  --ink: #0f2740;
  --body: #41506a;
  --muted: #6b7a93;
  --bg: #ffffff;
  --surface: #f4f7fb;
  --surface-2: #eef3f9;
  --line: #e2e8f1;
  --primary: #c0432e;       /* warm "infrared" red-orange */
  --primary-dark: #9c3322;
  --ongoing: #1d8a6e;       /* green = active */
  --done: #2563eb;          /* blue = completed */
  --spectrum: linear-gradient(90deg,#7c3aed 0%,#4f46e5 16%,#2563eb 30%,#0ea5e9 44%,#10b981 58%,#f59e0b 78%,#ef4444 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,39,64,.06), 0 8px 24px rgba(15,39,64,.06);
  --maxw: 1320px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 2px; border-radius: 4px; }

/* ---------- Spectrum bar (brand motif) ---------- */
.spectrum-bar { height: 4px; background: var(--spectrum); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--spectrum); box-shadow: 0 0 0 3px rgba(124,58,237,.12); flex: 0 0 auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink); font-weight: 600; font-size: .96rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav .nav-cta { background: var(--ink); color: #fff; padding: 9px 16px; margin-left: 6px; }
.nav .nav-cta:hover { background: #1c3a5c; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 380px at 88% -10%, rgba(245,158,11,.14), transparent 60%),
    radial-gradient(800px 360px at 6% 0%, rgba(124,58,237,.10), transparent 55%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 8vw, 88px);
}
.hero-inner { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; color: var(--primary); margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.05rem, 5vw, 3.3rem); font-weight: 800; margin-bottom: .35em; }
.grad-text {
  background: var(--spectrum); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--body); max-width: 64ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-weight: 700; font-size: 1rem; padding: 13px 24px; border-radius: 10px; border: 2px solid transparent; transition: transform .08s ease, background .15s, border-color .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 8vw, 88px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 0 36px; }
.section-head-left { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.group-label { display: flex; align-items: center; gap: 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 30px 0 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-ongoing { background: var(--ongoing); box-shadow: 0 0 0 4px rgba(29,138,110,.16); }
.dot-done { background: var(--done); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
.cards-3 { grid-template-columns: repeat(2, 1fr); }
/* Literature feed fills the row on wider screens (3-up, then reflows down). */
#lit-feed.cards-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spectrum); }
.section-alt .card { background: var(--bg); }

.study h4, .insight h4 { font-size: 1.2rem; font-weight: 750; margin-bottom: .5em; }
.study p, .insight p { color: var(--body); margin-bottom: 14px; }
.study-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }

.badge { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; }
.badge-ongoing { background: rgba(29,138,110,.12); color: #136b54; }
.badge-done { background: rgba(37,99,235,.12); color: #1e4fb8; }
.collab { font-size: .9rem; color: var(--muted); font-weight: 600; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.tags li { font-size: .82rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }

.insight-kicker { display: inline-block; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); margin-bottom: 10px; }
.insight p { margin-bottom: 0; }
.section-note { color: var(--muted); margin-top: 26px; font-size: 1rem; }

/* "From the literature" automated feed (heading + intro now live in .section-head) */
.lit h4 { font-size: 1.05rem; }
.lit h4 a { color: var(--ink); }
.lit h4 a:hover { color: var(--primary); }
.lit-cite { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.lit p { margin-bottom: 0; }
.lit-tags { margin-top: 14px; }
.lit-empty { grid-column: 1 / -1; color: var(--muted); margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.about-grid p { font-size: 1.06rem; }
.focus-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 14px; }
.focus-list li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid; border-image: var(--spectrum) 1; border-radius: 10px; padding: 16px 18px; color: var(--body); }
.focus-list strong { color: var(--ink); }

/* ---------- Contact ---------- */
.section-contact { background: var(--ink); color: #cdd9e8; }
.section-contact .section-head h2 { color: #fff; }
.section-contact .section-head p { color: #9fb2c9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.section-contact .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.section-contact .btn-ghost:hover { border-color: #fff; }
.contact-meta { margin-top: 20px; color: #9fb2c9; font-weight: 600; font-style: normal; line-height: 1.8; }
.contact-meta a { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #0a1c2e; color: #93a6bd; }
.footer-inner { padding: 40px 0; }
.brand-footer { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.footer-tag { margin: 0 0 6px; max-width: 52ch; }
.footer-address { margin: 0 0 6px; font-size: .9rem; font-style: normal; color: #93a6bd; }
.footer-legal { margin: 0; font-size: .9rem; color: #6f86a0; }

/* ---------- Responsive ---------- */
/* Nav collapses to the menu button at 900px (sooner than the 760px content
   breakpoint) so the longer link labels never crowd or overlap the brand. */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 16px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
}
@media (max-width: 760px) {
  .cards-3 { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
}
