/* ============================================================
   BIOSPAN 2026 - shared styles
   Design direction: field-journal / lab-specimen aesthetic.
   Deep teal-navy ink on cool paper, helix motif as structural
   spine, Fraunces (display) + IBM Plex Sans (body) + IBM Plex
   Mono (data/labels).
   ============================================================ */

:root {
  --paper: #eef2ec;
  --paper-raised: #f7faf6;
  --ink: #132a3a;
  --ink-soft: #24404f;
  --helix: #0e9d68;
  --helix-dark: #0b7a4f;
  --amber: #f2960f;
  --amber-dark: #c77607;
  --violet: #8b5cf6;
  --violet-dark: #6d28d9;
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --coral: #fb5f43;
  --coral-dark: #d8431f;
  --slate: #516170;
  --line: #cfdad0;
  --line-strong: #aebdae;
  --shadow: 0 1px 2px rgba(19, 42, 58, 0.06), 0 8px 24px rgba(19, 42, 58, 0.06);

  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;

  --container: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

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

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

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

a { color: inherit; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

img { max-width: 100%; display: block; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--helix-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--helix);
  display: inline-block;
}

p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

::selection { background: var(--amber); color: #fff; }

:focus-visible {
  outline: 2.5px solid var(--amber-dark);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  background: none;
}
.btn-primary { background: var(--helix); color: #fff; border-color: var(--helix); }
.btn-primary:hover { background: var(--helix-dark); border-color: var(--helix-dark); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: #fff; border-color: var(--amber); }
.btn-amber:hover { background: var(--amber-dark); border-color: var(--amber-dark); transform: translateY(-1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------- nav ---------- */
.spectrum-bar {
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, #0e9d68, #8b5cf6, #0ea5e9, #fb5f43);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; }
.inst-logo { display: flex; align-items: center; flex-shrink: 0; }
.inst-logo img { width: 34px; height: 34px; object-fit: contain; display: block; }
.brand-divider { width: 1px; height: 26px; background: var(--line-strong); display: inline-block; flex-shrink: 0; }
@media (max-width: 560px) {
  .inst-logo img { width: 26px; height: 26px; }
  .brand-divider { height: 20px; }
}
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-word span { color: var(--helix); }
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--slate);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 3px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: rgba(30, 122, 95, 0.1); color: var(--helix-dark); }
.nav-links a.active { color: var(--helix-dark); font-weight: 600; }
.nav-links a.cta { background: var(--helix); color: #fff; }
.nav-links a.cta:hover { background: var(--helix-dark); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
    display: none;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 6px; }
}

/* ---------- section rhythm ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink p { color: rgba(238, 242, 236, 0.75); }
.section-ink h2, .section-ink h3 { color: var(--paper); }

.wash-green { background: linear-gradient(180deg, rgba(14,157,104,0.07), transparent 60%); }
.wash-violet { background: linear-gradient(180deg, rgba(139,92,246,0.07), transparent 60%); }
.wash-coral { background: linear-gradient(180deg, rgba(251,95,67,0.07), transparent 60%); }
.wash-sky { background: linear-gradient(180deg, rgba(14,165,233,0.07), transparent 60%); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 12px; }

hr.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- helix divider (structural spine motif) ---------- */
.helix-rule { display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.helix-rule svg { width: 100%; max-width: 340px; height: 20px; opacity: 0.55; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(238, 242, 236, 0.82);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(238, 242, 236, 0.15);
}
.footer-grid h4 {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-grid a { text-decoration: none; color: rgba(238, 242, 236, 0.75); }
.footer-grid a:hover { color: var(--paper); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(238, 242, 236, 0.5);
  letter-spacing: 0.03em;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- cards ---------- */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  background: rgba(30, 122, 95, 0.08);
  border: 1px solid rgba(30, 122, 95, 0.25);
  padding: 4px 9px;
  border-radius: 20px;
  display: inline-block;
}

/* ---------- page banner (interior pages) ---------- */
.page-banner { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-banner .eyebrow { margin-bottom: 14px; }
.page-banner h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-banner .lede { max-width: 640px; margin-top: 16px; font-size: 1.05rem; }

/* ---------- coming soon notice ---------- */
.notice {
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--slate);
  background: rgba(221, 139, 40, 0.06);
  display: flex;
  gap: 10px;
}
.notice strong { color: var(--ink); }
