/* ===== Cell Discovery Network — landing page ===== */

@font-face {
  font-family: "Gramatika";
  src: url("assets/fonts/Gramatika-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gramatika";
  src: url("assets/fonts/Gramatika-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gramatika";
  src: url("assets/fonts/Gramatika-Bold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gramatika";
  src: url("assets/fonts/Gramatika-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f0f9fc;
  --bg-card: #ffffff;
  --ink: #002c4e;
  --ink-soft: #2e579e;
  --muted: #6888c2;
  --line: #d4e8f0;
  --accent: #002c4e;
  --accent-2: #e97d42;
  --accent-soft: #eaf7fb;
  --cdn-sky: #78c6e0;
  --cdn-seafoam: #6abcb6;
  --cdn-lavender: #d48bd3;
  --cdn-gold: #ffb653;
  --max: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 30px rgba(0, 44, 78, 0.06);
  /* Brand font: Gramatika (self-hosted). Urbanist only as emergency fallback. */
  --font: "Gramatika", "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.nav .brand {
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 18px;
  color: var(--ink);
}
.nav .brand span { color: var(--cdn-sky); }
.nav .links { display: flex; gap: 22px; font-size: 15px; }
.nav .links a { color: var(--ink-soft); }
.nav .links a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 720px) { .nav .links { display: none; } }

.hero {
  padding: 72px 0 46px;
  text-align: center;
  background: radial-gradient(1200px 380px at 50% -120px, var(--accent-soft), transparent 70%);
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  margin: 14px auto 0;
  font-weight: 700;
  max-width: 820px;
  letter-spacing: -0.02em;
}
.hero .tag {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--ink-soft);
  max-width: 720px;
  margin: 18px auto 0;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 30px 0 4px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: #001f38; color: #fff; }
.btn.cta { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.btn.cta:hover { background: #d56a2f; color: #fff; border-color: #d56a2f; }

section { padding: 54px 0; }
section.alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.h2 {
  font-family: var(--font);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.lead { color: var(--ink-soft); max-width: 760px; margin: 0 0 26px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.calendar-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
}
.calendar-wrap iframe {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
}
@media (max-width: 720px) {
  .calendar-wrap iframe { height: 450px; }
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.card .pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; }
.card .more { font-weight: 600; font-size: 14px; color: var(--accent-2); }
.card .meta { font-size: 13px; color: var(--muted); margin-top: 10px; }

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px) { .cats { grid-template-columns: repeat(2, 1fr); } }
.cat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.cat h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.cat p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.cat a { font-weight: 600; font-size: 14px; }

.pill-seafoam { color: #3d8a84; background: #e8f6f5; }
.pill-lavender { color: #9a4a99; background: #f9edf9; }
.pill-gold { color: #b87a00; background: #fff4e3; }

.video-highlight {
  margin-top: 36px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.video-highlight h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}
.video-highlight > p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 720px;
}
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #001a2e;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .team-grid { grid-template-columns: 1fr; } }
.team-grid .card h3 { font-size: 17px; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin: 0 0 10px; color: var(--ink-soft); }
.contact-list a { font-weight: 600; }

footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
footer a { color: var(--ink-soft); }

/* Spotlight archive & story pages */
.page-hero {
  padding: 56px 0 0;
  background: radial-gradient(1200px 380px at 50% -120px, var(--accent-soft), transparent 70%);
}
.page-hero .back {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.page-hero .back:hover { color: var(--accent); text-decoration: none; }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  max-width: 820px;
  line-height: 1.15;
}
.story {
  padding: 12px 0 64px;
}
.story-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 12px;
}
.story-body {
  max-width: 720px;
}
.story-affiliation {
  display: grid;
  gap: 6px;
  margin: 0 0 28px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 15px;
}
.story-affiliation a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.story-affiliation a:hover {
  color: var(--accent-2);
}
.story-portrait {
  margin: 0 0 28px;
  max-width: 280px;
}
.story-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.story-body p {
  color: var(--ink-soft);
  margin: 0 0 1.1em;
}
.story-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 1.6em 0 0.5em;
  letter-spacing: -0.01em;
}
.story-figure {
  margin: 1.6em 0;
  text-align: left;
}
.story-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.story-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  text-align: left;
}
.story-table {
  width: auto;
  max-width: 100%;
  margin: 1.6em auto;
  border-collapse: collapse;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: left;
}
.story-table th,
.story-table td {
  border: 1px solid var(--ink);
  padding: 10px 14px;
  text-align: left;
  font-weight: 400;
}
.story-table tr:first-child th,
.story-table tr:first-child td,
.story-table tr:last-child th,
.story-table tr:last-child td {
  font-weight: 700;
}
.story-body .refs {
  padding-left: 1.2em;
  margin: 0 0 1.2em;
}
.story-body .refs li {
  margin: 0 0 0.75em;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}
.story-nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.card a.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.card a.card-link:hover h3 { color: var(--accent-2); }
.card a.card-link:hover { text-decoration: none; }
