/* =========================================================
   Pangenome AI — editorial/scientific theme
   --------------------------------------------------------
   Typography:  Share Tech Mono (display), system sans (body)
   Palette:     warm off-white, deep ocean teal, clay accent
   ========================================================= */

:root {
  /* Colors */
  --bg:          #FAF8F2;
  --bg-warm:     #F1EBDC;
  --bg-deep:     #102433;
  --ink:         #1A1F2E;
  --ink-soft:    #3D4759;
  --ink-mute:    #6B7280;
  --rule:        #E3DCC9;
  --primary:     #0E4F7A;
  --primary-dk:  #0A3A5C;
  --accent:      #C5642C;
  --accent-soft: #E8B891;

  /* Type */
  --display: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Scale */
  --container:        1180px;
  --container-narrow: 720px;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s var(--ease);
}
a:hover { color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left:  var(--gutter);
  padding-right: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}
.brand-mark { color: var(--primary); flex: 0 0 auto; }
.brand-name-accent { color: var(--accent); font-style: italic; }

.site-nav { display: flex; align-items: center; }
.nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 1.6rem;
}
.nav-list a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .01em;
  padding: .4rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: .5rem; gap: 4px;
  flex-direction: column;
}
.nav-toggle-bar {
  width: 22px; height: 1.5px;
  background: var(--ink);
  display: block;
  transition: transform .2s var(--ease);
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: absolute;
    inset: 72px 0 auto 0;
    flex-direction: column;
    background: var(--bg);
    padding: 1rem var(--gutter) 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    transform: translateY(-110%);
    transition: transform .3s var(--ease);
  }
  .nav-list.is-open { transform: translateY(0); }
  .nav-list li { border-top: 1px solid var(--rule); }
  .nav-list li:first-child { border-top: 0; }
  .nav-list a { display: block; padding: .9rem 0; border: 0; }
}

/* ===== Typography ===== */
.eyebrow {
  font-family: var(--body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.18;
  color: var(--ink);
  margin: 2rem 0 1rem;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: .03em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1rem, 1.6vw, 1.2rem); text-transform: uppercase; letter-spacing: .08em; }
h4 { font-size: 1rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; text-transform: none; }

p { margin: 0 0 1.2rem; }

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

blockquote {
  margin: 2rem 0;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink-soft);
  font-style: italic;
}

ul, ol { padding-left: 1.4rem; margin: 0 0 1.4rem; }
li { margin-bottom: .5rem; }
li::marker { color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* ===== Buttons & links ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 0;
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .2s var(--ease);
}
.btn-primary {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
.link-arrow span { transition: transform .2s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ===== Hero (home) ===== */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 85% -10%, rgba(197, 100, 44, .14), transparent 55%),
    radial-gradient(ellipse at 0% 110%, rgba(14, 79, 122, .12), transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin: 0 0 1.5rem;
  max-width: 28ch;
  letter-spacing: .03em;
  line-height: 1.25;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }

/* ===== Bands ===== */
.band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.band-dark {
  background: var(--bg-deep);
  color: var(--bg);
}
.band-dark h2 { color: var(--bg); }
.band-title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  max-width: 32ch;
  font-weight: 400;
  margin: 0 0 1.2rem;
  letter-spacing: .03em;
  line-height: 1.25;
}
.band-body {
  color: rgba(250, 248, 242, .78);
  max-width: 58ch;
  font-size: 1.05rem;
  margin: 0;
}

/* ===== Split (For Research / For Investors) ===== */
.split { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--bg-warm); }
.split-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .split-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.split-card {
  background: var(--bg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--rule);
}
.split-card h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin: 0 0 1rem;
}
.split-card p { color: var(--ink-soft); margin: 0 0 1.2rem; }

/* ===== Posts grid ===== */
.posts-section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { margin-bottom: 2.5rem; max-width: 60ch; }
.section-head h2 { margin: 0; }
.section-foot { margin-top: 2.5rem; text-align: center; }

.post-grid {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.post-card-image {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg,
      hsl(var(--card-hue, 210) 35% 30%) 0%,
      hsl(calc(var(--card-hue, 210) - 25) 50% 55%) 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.post-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.15), transparent 50%);
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: relative; z-index: 1;
}
.post-card-date {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .5rem;
}
.post-card-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 450;
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--ink);
  transition: color .2s var(--ease);
}
.post-card-link:hover .post-card-title { color: var(--primary); }
.post-card-excerpt {
  font-size: .98rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}
.post-card-read {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}

/* ===== CTA band ===== */
.cta {
  background: var(--bg-warm);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  text-align: center;
}
.cta-inner { max-width: 60ch; margin: 0 auto; }
.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 2rem;
}

/* ===== Single page ===== */
.single-header {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.single-title {
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  font-weight: 400;
  margin: 0 0 1rem;
  letter-spacing: .03em;
  line-height: 1.25;
}
.single-lede {
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0;
  line-height: 1.5;
}
.single-meta {
  font-size: .9rem;
  color: var(--ink-mute);
  letter-spacing: .02em;
  margin: 0;
}
.single-body {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  font-size: 1.1rem;
  line-height: 1.75;
}
.single-body h2 {
  margin-top: 2.8rem;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}
.single-body h3 { margin-top: 2.2rem; }
.single-body p:first-of-type {
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.single-foot {
  padding: 1rem 0 4rem;
  border-top: 1px solid var(--rule);
}
.single-foot p { margin: 0; padding-top: 2rem; }

/* ===== List page hero ===== */
.list-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.list-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  margin: 0;
  max-width: 36ch;
  letter-spacing: .03em;
  line-height: 1.25;
}

/* ===== Page bodies (about, investors, research, contact, privacy) ===== */
body.page .single-body p:first-of-type { font-size: 1.1rem; color: var(--ink); }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-deep);
  color: rgba(250, 248, 242, .8);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  margin-top: 0;
}
.site-footer a { color: var(--bg); }
.site-footer a:hover { color: var(--accent-soft); }
.footer-tagline { max-width: 62ch; margin-bottom: 3rem; }
.footer-statement {
  font-family: var(--body);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-style: italic;
  font-weight: 300;
  color: var(--bg);
  line-height: 1.5;
  margin: 0;
}
.footer-cols {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(250, 248, 242, .15);
}
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-heading {
  font-family: var(--body);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 1rem;
  font-weight: 600;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .5rem; }
.footer-list a { text-decoration: none; }
.footer-list a:hover { text-decoration: underline; }
.footer-meta {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(250, 248, 242, .6);
}
.footer-meta p { margin: 0; }

/* ===== Founder portrait (about page) ===== */
.founder-portrait {
  float: right;
  width: clamp(180px, 30%, 280px);
  margin: 0 0 1.25rem 1.75rem;
}
.founder-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
@media (max-width: 640px) {
  .founder-portrait {
    float: none;
    width: 60%;
    margin: 0 auto 1.5rem;
  }
}

/* ===== Contact page tweaks ===== */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0;
}

/* ===== Background video in hero sections ===== */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero.has-video,
.single-header.has-video {
  position: relative;
  overflow: hidden;
  min-height: 55vh;
  display: flex;
  align-items: center;
  color: var(--bg);
  background: var(--bg-deep);
  border-bottom: none;
}
.hero.has-video > .container,
.single-header.has-video > .container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero.has-video::before,
.single-header.has-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 35, .35) 0%, rgba(10, 22, 35, .55) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero.has-video .hero-title,
.hero.has-video .hero-sub,
.hero.has-video .eyebrow,
.single-header.has-video .single-title,
.single-header.has-video .single-lede,
.single-header.has-video .single-meta,
.single-header.has-video .eyebrow,
.single-header.has-video a { color: var(--bg); }
.hero.has-video .btn-ghost { color: var(--bg); border-color: rgba(250, 248, 242, .6); }
.hero.has-video .btn-ghost:hover { background: rgba(250, 248, 242, .15); }
@media (max-width: 767px) {
  .hero-video { display: none; }
  .hero.has-video,
  .single-header.has-video {
    min-height: 0;
    display: block;
    color: inherit;
    background: transparent;
    border-bottom: 1px solid var(--rule);
  }
  .hero.has-video::before,
  .single-header.has-video::before { display: none; }
  .hero.has-video .hero-title,
  .hero.has-video .hero-sub,
  .hero.has-video .eyebrow,
  .single-header.has-video .single-title,
  .single-header.has-video .single-lede,
  .single-header.has-video .single-meta,
  .single-header.has-video .eyebrow,
  .single-header.has-video a { color: inherit; }
  .hero.has-video .btn-ghost { color: var(--ink); border-color: var(--ink); }
}
