/* OncoPrint — the public site. Loaded after `base.css`, which carries the
 * tokens and the primitives. This file is only the marketing surfaces.
 */

/* ── header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--line);
}
/* `backdrop-filter` ONLY where there is no drawer.
 *
 * It looks harmless and is not: an element with `backdrop-filter` becomes the
 * CONTAINING BLOCK for its `position: fixed` descendants, and creates its own
 * stacking context. The mobile drawer lives inside this header, so it was being
 * positioned against a 60px-tall bar instead of the viewport, and sealed into
 * the header's layer — which presents as "the menu opens underneath the page".
 *
 * `transform` and `filter` do exactly the same thing. If a fixed child ever
 * misbehaves, look for one of these three on an ancestor before anything else.
 */
@media (min-width: 861px) {
  .site-header { backdrop-filter: blur(12px); }
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  font-size: 0.97rem; white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; padding: .5rem; margin-right: -.5rem; }
.nav-toggle svg { width: 26px; height: 26px; }

/* Only exists inside the open drawer, which covers the hamburger that opened it. */
.nav-close { display: none; background: none; border: 0; padding: .6rem; }
.nav-close svg { width: 24px; height: 24px; }

/* The mobile drawer. A checkbox would avoid the 12 lines of JS, but it cannot
 * close on Escape or restore focus, and this is the primary navigation. */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(20rem, 82vw);
    background: var(--paper);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: .25rem; padding: 5.5rem 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .22s ease;
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { transform: none; }
  .nav-close {
    display: block; position: absolute; top: 1rem; right: 1rem;
    min-height: 44px; min-width: 44px;
  }
  .site-nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .btn { margin-top: 1rem; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(14,23,32,.45);
    opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 45;
  }
  .nav-scrim[data-open="true"] { opacity: 1; pointer-events: auto; }
}

/* ── hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: #E8EDF1;
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 8vw, 8rem);
}
/* The oncoprint matrix, very faint, as the page's ground. It is the mark's own
 * idea at wall scale rather than a decorative texture borrowed from elsewhere. */
.hero__field {
  position: absolute; inset: 0; opacity: .5;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(105deg, transparent 28%, #000 72%);
  mask-image: linear-gradient(105deg, transparent 28%, #000 72%);
}
.hero__inner { position: relative; display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); }
@media (min-width: 940px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; }
}
.hero h1 {
  font-size: var(--t-hero); color: var(--paper);
  letter-spacing: -0.033em; line-height: 1.05;
}
.hero__slogan {
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  color: var(--accent-on-dark);
  font-weight: 500;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
/* The hero is dark but is not `.section--ink`, so the ghost button kept its
 * light-background ink colour and rendered as an empty outline. */
.hero .btn-ghost { border-color: var(--line-on-dark); color: var(--paper); }
.hero .btn-ghost:hover { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.hero__figure { min-width: 0; }

/* ── trust strip ──────────────────────────────────────────────────────────── */
.trust {
  border-bottom: 1px solid var(--line);
  padding-block: 1.5rem;
  background: var(--paper);
}
.trust__row {
  display: flex; flex-wrap: wrap; gap: .75rem 2.5rem;
  align-items: center; justify-content: center;
  color: var(--muted); font-size: var(--t-small);
}
.trust__row strong { color: var(--ink); font-weight: 600; }

/* ── service cards ────────────────────────────────────────────────────────── */
.service { display: flex; flex-direction: column; gap: .85rem; height: 100%; }
.service__icon {
  width: 52px; height: 52px; flex: none;
  border-radius: 12px; background: var(--accent-12);
  display: grid; place-items: center;
}
.service__icon svg { width: 28px; height: 28px; }
.service h3 { margin-top: .15rem; }
.service p { color: var(--muted); font-size: 0.98rem; }
.service__list { list-style: none; padding: 0; margin-top: auto; padding-top: .85rem; }
.service__list li {
  font-size: var(--t-small); color: var(--muted);
  padding-left: 1.15rem; position: relative; margin-top: .35rem;
}
.service__list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent);
}

/* ── the workflow ─────────────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 2.75rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--mono); font-size: var(--t-small); font-weight: 600;
  color: var(--accent);
  padding-bottom: .5rem;
}
.step::after {
  content: ""; position: absolute; top: 1.9rem; left: 0; right: 0;
  height: 2px; background: var(--accent-22);
}
@media (min-width: 760px) { .step:last-child::after { right: 50%; } }
.step h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step p { font-size: var(--t-small); color: var(--muted); }

/* ── stat band ────────────────────────────────────────────────────────────── */
.stat { text-align: center; }
.stat__n {
  display: block; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem);
  font-weight: 600; letter-spacing: -0.03em; color: var(--accent-on-dark);
  line-height: 1.05;
}
.stat__label { font-size: var(--t-small); color: var(--muted-on-dark); margin-top: .4rem; }

/* ── split feature ────────────────────────────────────────────────────────── */
.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--flip .split__media { order: -1; }
}

/* ── contact ──────────────────────────────────────────────────────────────── */
.contact-grid { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.15fr; } }

.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; gap: .85rem; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 20px; height: 20px; flex: none; margin-top: .25rem; color: var(--accent); }
.contact-list b { display: block; font-weight: 600; }
.contact-list span { color: var(--muted); font-size: var(--t-small); }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0;
  font-weight: 600; position: relative; list-style: none;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 50%;
  width: 10px; height: 10px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding-bottom: 1.25rem; color: var(--muted); max-width: var(--measure); }

/* ── footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--muted-on-dark); padding-block: 3.5rem 2rem; }
.site-footer h4 {
  color: var(--paper); font-size: var(--t-small);
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: .9rem;
}
/* Scoped to the columns. Applied to every footer link, it also stacked the
 * inline links in the slim legal footer below — three words on three lines. */
.site-footer__cols a { display: block; padding-block: .3rem; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--accent-on-dark); }
.site-footer__cols { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .site-footer__cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer__base {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-on-dark);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  align-items: center;
  font-size: var(--t-micro);
}
/* The legal pages' footer is this row on its own. Its links are inline, laid out
 * with a separator, and the whole row centres on a phone rather than leaving one
 * item hanging left and the other wrapping under it. */
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .85rem; }
.site-footer__links a { white-space: nowrap; }
.site-footer__links span { opacity: .45; }
@media (max-width: 560px) {
  .site-footer__base { justify-content: center; text-align: center; }
}


/* ── legal pages ──────────────────────────────────────────────────────────────
 * Privacy and terms. Long-form prose, so: a real measure, generous leading, and
 * headings that a reader can scan and a lawyer can cite by number.
 */
.legal { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.legal__inner { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
@media (min-width: 940px) { .legal__inner { grid-template-columns: 16rem 1fr; } }

/* Sticky contents on a desktop; an ordinary list above the prose on a phone,
 * where a sticky sidebar would eat the screen. */
.legal__toc { font-size: var(--t-small); }
@media (min-width: 940px) { .legal__toc { position: sticky; top: 5.5rem; } }
.legal__toc h2 {
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: .75rem;
}
.legal__toc a {
  display: block; padding: .35rem 0; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.legal__toc a:hover { color: var(--accent); }

.prose { max-width: var(--measure); }
.prose h2 {
  font-size: var(--t-h3); margin-top: 2.75rem; margin-bottom: .75rem;
  scroll-margin-top: 5.5rem;   /* the sticky header must not cover the anchor */
}
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.02rem; margin-top: 1.5rem; margin-bottom: .4rem; }
.prose p, .prose li { color: #33414C; }
.prose p + p { margin-top: .9rem; }
.prose ul, .prose ol { margin: .8rem 0 .8rem 1.25rem; }
.prose li + li { margin-top: .4rem; }
.prose table { margin: 1.25rem 0; font-size: var(--t-small); }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6rem .5rem; text-align: left; vertical-align: top; }
.prose th { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 620px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose th, .prose td { display: block; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prose tr { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .75rem; margin-bottom: .6rem; }
  .prose td { border: 0; padding: .3rem 0; }
  .prose td::before { content: attr(data-label) " — "; font-weight: 600; color: var(--muted); }
}

.legal__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  font-size: var(--t-small); color: var(--muted);
  margin-top: .75rem;
}
