/* Oncolio public homepage. Tokens mirror the app (apps/web/src/styles/tokens.css). */

@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 400; font-style: normal; font-display: swap; src: url('../assets/fonts/ahn-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 600; font-style: normal; font-display: swap; src: url('../assets/fonts/ahn-600.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-weight: 700; font-style: normal; font-display: swap; src: url('../assets/fonts/ahn-700.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../assets/fonts/ahm-500.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --surface: #F7F6F3;
  --surface-raised: #FFFFFF;
  --surface-sunken: #F0EEEA;
  --text: #1E2224;
  --text-secondary: #525960;
  --border: #E0DDD6;
  --border-strong: #7A7D7F;
  --accent: #1A5C78;
  --accent-hover: #144A61;
  --accent-pressed: #0F3B4E;
  --on-accent: #FFFFFF;
  --accent-soft: #E4EFF3;
  --rail: #B9CFD8;
  --rail-line: #8DB1C1;
  --warning-bg: #FAEFD3;
  --warning-text: #734500;
  --warning-border: #D9B45C;
  --info-bg: #E8EDF2;
  --info-text: #3A4C63;
  --info-border: #AEBACA;
  --focus: #1A5C78;
  --shadow-card: 0 1px 2px rgba(30, 34, 36, 0.06), 0 12px 32px rgba(30, 34, 36, 0.07);

  --sans: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r-sm: 0.5rem;
  --r-md: 0.625rem;
  --r-card: 1rem;
  --gutter: 1.25rem;
  --page: 70rem;
  --rail-x: 0.375rem; /* centre of the rail line inside .rail */
  --rail-pad: 1.5rem;
  --node: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #17181A;
    --surface-raised: #202225;
    --surface-sunken: #111213;
    --text: #ECEAE6;
    --text-secondary: #A9ACAF;
    --border: #33363A;
    --border-strong: #7B7F85;
    --accent: #86BDD6;
    --accent-hover: #9DCBE0;
    --accent-pressed: #B3D7E8;
    --on-accent: #0E1F28;
    --accent-soft: #1D2F38;
    --rail: #35505C;
    --rail-line: #4A7184;
    --warning-bg: #33290F;
    --warning-text: #E4B76B;
    --warning-border: #7A6226;
    --info-bg: #252B33;
    --info-text: #AEBBCD;
    --info-border: #4D5A6C;
    --focus: #86BDD6;
    --shadow-card: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 20;
  background: var(--accent); color: var(--on-accent); padding: 0.625rem 1rem; border-radius: var(--r-md); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 0.75rem; color: var(--on-accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.625rem 1.375rem;
  border-radius: var(--r-md); border: 1px solid transparent;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { background: var(--accent-pressed); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-quiet:hover { background: var(--surface-sunken); color: var(--text); }
.btn-sm { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.btn svg { width: 1rem; height: 1rem; flex: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.top-in { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.3125rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 1.75rem; height: 1.75rem; color: var(--accent); }
.nav { margin-left: auto; display: none; }
.nav ul { display: flex; gap: 0.25rem; }
.nav a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9375rem; font-weight: 600; border-radius: var(--r-sm); }
.nav a:hover { color: var(--text); background: var(--surface-sunken); }
.top .btn { margin-left: auto; }
@media (min-width: 62rem) {
  .nav { display: block; }
  .top .btn { margin-left: 0; }
}

/* Hero */
.hero { padding-block: 2.5rem 3.5rem; overflow: hidden; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
h1 {
  margin-top: 1rem;
  font-size: clamp(2.125rem, 1.35rem + 3.6vw, 3.75rem);
  line-height: 1.06; font-weight: 700; letter-spacing: -0.022em;
  text-wrap: balance;
}
.lede { margin-top: 1.25rem; max-width: 34rem; font-size: 1.1875rem; line-height: 1.55; color: var(--text-secondary); }
.cta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note {
  margin-top: 1.75rem; padding-left: 0.875rem; max-width: 32rem;
  border-left: 2px solid var(--rail);
  font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary);
}
.hero-note strong { color: var(--text); font-weight: 600; }
/* Section links for phones and tablets, where the header has no room for them */
.jump { margin-top: 1.5rem; }
.jump ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.jump a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.875rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 600; white-space: nowrap;
}
.jump a:hover { background: var(--surface-sunken); color: var(--text); }
@media (min-width: 62rem) { .jump { display: none; } }
@media (min-width: 56.25rem) {
  .hero { padding-block: 4.5rem 5.5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 4rem; }
}

/* Hero illustration: a plan rail (the brand key visual, drawn in the app's own tokens) */
.sample { position: relative; max-width: 27rem; width: 100%; margin-inline: auto; }
.sample-card {
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: 1.25rem;
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.25rem 1.5rem;
}
.sample-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.sample-id { font-size: 0.875rem; color: var(--text-secondary); }
.tag {
  display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0.0625rem 0.5rem;
  border: 1px solid var(--info-border); border-radius: 0.375rem;
  background: var(--info-bg); color: var(--info-text);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.tag-soon { background: var(--warning-bg); color: var(--warning-text); border-color: var(--warning-border); }
.steps { position: relative; margin-top: 1.25rem; display: grid; gap: 0.75rem; }
.steps::before { content: ''; position: absolute; left: 0.6875rem; top: 0.75rem; bottom: 0.75rem; width: 1px; background: var(--rail); }
.step { position: relative; display: grid; grid-template-columns: 1.4375rem 1fr; gap: 0.875rem; align-items: center; }
.dot { position: relative; z-index: 1; width: 1.4375rem; height: 1.4375rem; border-radius: 50%; background: var(--surface-raised); border: 2px solid var(--border-strong); }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.done .dot::after {
  content: ''; position: absolute; left: 50%; top: 46%; width: 0.3125rem; height: 0.5625rem;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg);
}
.step.now .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.now .dot::after { content: ''; position: absolute; inset: 0.25rem; border-radius: 50%; background: var(--accent); }
.step-body { padding: 0.75rem 0.875rem; border-radius: 0.75rem; background: var(--surface-sunken); }
.step.now .step-body { background: var(--accent-soft); }
.step-title { font-weight: 600; line-height: 1.3; }
.step-sub { margin-top: 0.125rem; font-size: 0.875rem; line-height: 1.4; color: var(--text-secondary); }
.sample figcaption { margin-top: 0.875rem; font-size: 0.8125rem; color: var(--text-secondary); text-align: center; }

/* The page rail: one line runs down the page; each section hangs from a node on it */
.rail { position: relative; padding-bottom: 1rem; padding-left: var(--rail-pad); }
.rail::before { content: ''; position: absolute; left: calc(var(--rail-x) - 1px); top: 0; bottom: 0; width: 2px; background: var(--rail-line); }
.sec-head::before {
  content: ''; position: absolute; left: calc(var(--rail-x) - var(--rail-pad) - var(--node) / 2); top: calc((1.4rem - var(--node)) / 2);
  width: var(--node); height: var(--node); border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.sec.seen .sec-head::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sec { position: relative; padding-block: 3rem; }
.sec-head { position: relative; max-width: 40rem; }
.sec-num { display: block; font-size: 0.875rem; line-height: 1.4rem; color: var(--accent); letter-spacing: 0.04em; }
h2 { margin-top: 0.375rem; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.sec-intro { margin-top: 0.75rem; color: var(--text-secondary); max-width: 38rem; }
.sec-body { margin-top: 2rem; }

@media (min-width: 40rem) {
  :root { --rail-x: 0.6875rem; --rail-pad: 2.75rem; --node: 0.9375rem; }
  .sec { padding-block: 3.75rem; }
}
@media (min-width: 68.75rem) {
  .sec { display: grid; grid-template-columns: 17rem minmax(0, 1fr); column-gap: 3rem; padding-block: 4.5rem; }
  .sec-head { position: sticky; top: 6rem; align-self: start; }
  .sec-body { margin-top: 0.25rem; }
}

/* Feature blocks */
.features { display: grid; gap: 1rem; }
.card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-card); padding: 1.375rem; }
.card h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.005em; }
.card p { margin-top: 0.5rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.55; }
.card .tag { margin-bottom: 0.75rem; }
.ico { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.ico svg { width: 1.375rem; height: 1.375rem; }
.card-soon { border-style: dashed; border-color: var(--border-strong); background: transparent; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.calc { margin-top: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.calc li { padding: 0.1875rem 0.625rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.875rem; background: var(--surface); }
@media (min-width: 40rem) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-wide { grid-column: 1 / -1; }
}

/* Joining steps */
.join { display: grid; gap: 0; counter-reset: j; }
.join li { position: relative; padding: 0 0 1.75rem 3.25rem; counter-increment: j; }
.join li::before {
  content: counter(j); position: absolute; left: 0; top: 0; z-index: 1;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-weight: 500;
}
.join li::after { content: ''; position: absolute; left: 1.09375rem; top: 2.25rem; bottom: 0; width: 1px; background: var(--rail); }
.join li:last-child { padding-bottom: 0; }
.join li:last-child::after { display: none; }
.join h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; padding-top: 0.25rem; }
.join p { margin-top: 0.375rem; color: var(--text-secondary); max-width: 34rem; }
.after { margin-top: 2rem; }
@media (min-width: 48rem) {
  .join { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
  .join li { padding: 3.25rem 0 0; }
  .join li::after { left: 2.25rem; right: -1.5rem; top: 1.125rem; bottom: auto; width: auto; height: 1px; }
}

/* Cancers */
.cancers { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1rem; border-top: 1px solid var(--border); }
.cancers li { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--border); font-weight: 600; }
.cancers .mono { font-size: 0.8125rem; color: var(--text-secondary); font-weight: 500; }
.cancers small { font-size: 0.875rem; font-weight: 400; color: var(--text-secondary); }
@media (min-width: 30rem) {
  .cancers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cancers li { padding-block: 0.75rem; }
  .cancers small { display: block; line-height: 1.3; }
}
@media (min-width: 48rem) { .cancers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.notice {
  margin-top: 1.5rem; padding: 1rem 1.125rem; border-radius: var(--r-md);
  background: var(--surface-sunken); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  font-size: 0.9375rem; line-height: 1.55; color: var(--text-secondary);
}
.notice strong { color: var(--text); font-weight: 600; }

/* Security list */
.facts { display: grid; gap: 0; border-top: 1px solid var(--border); }
.facts > div { display: grid; gap: 0.25rem; padding: 1rem 0.25rem; border-bottom: 1px solid var(--border); }
.facts dt { font-weight: 700; }
.facts dd { color: var(--text-secondary); }
@media (min-width: 40rem) {
  .facts > div { grid-template-columns: 14rem minmax(0, 1fr); gap: 1.5rem; }
}

/* Coming */
.coming { display: grid; gap: 0; border-top: 1px solid var(--border); }
.coming li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: start; padding: 1rem 0.25rem; border-bottom: 1px solid var(--border); }
.coming h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
.coming p { grid-column: 1; color: var(--text-secondary); font-size: 1rem; }
.coming .tag { grid-column: 2; grid-row: 1; }

/* Closing band */
.close { margin-top: 2rem; background: var(--accent-soft); border-block: 1px solid var(--border); }
.close-in { padding-block: 3.5rem; display: grid; gap: 1.5rem; align-items: center; }
.close h2 { margin: 0; }
.close p { margin-top: 0.625rem; color: var(--text-secondary); max-width: 36rem; }
@media (min-width: 56.25rem) { .close-in { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; } }

/* Footer */
.foot { padding-block: 2.5rem 3rem; font-size: 0.9375rem; color: var(--text-secondary); }
.foot-grid { display: grid; gap: 1.75rem; }
.foot .brand { font-size: 1.125rem; }
.foot .brand svg { width: 1.5rem; height: 1.5rem; }
.foot p { margin-top: 0.5rem; max-width: 34rem; }
.foot p.legal { max-width: none; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--text-secondary); }
.foot-links a:hover { color: var(--text); }
.email { color: var(--text); font-weight: 600; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.875rem; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; } }

/* Plain document pages (privacy, terms) */
.doc { max-width: 44rem; padding-block: 3rem 4rem; }
.doc h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.doc h2 { margin-top: 2.25rem; font-size: 1.375rem; }
.doc p, .doc ul { margin-top: 0.75rem; }
.doc ul { list-style: disc; padding-left: 1.25rem; }
.doc li { margin-top: 0.375rem; }
.doc-meta { color: var(--text-secondary); font-size: 0.9375rem; }
.doc strong { font-weight: 600; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875em; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .top, .skip, .cta, .close { display: none; }
  body { background: #fff; color: #000; }
}
