/* Liver Lens landing page — the same tokens as the app (webapp/frontend/app/globals.css):
   dark by default, light for anyone whose system asks for it. */

:root {
  --bg: #0a0e14;
  --surface: #121821;
  --surface-2: #19212c;
  --border: #253040;
  --border-strong: #35435a;
  --text: #e6edf3;
  --text-dim: #9fb0c4;
  --muted: #7488a0;
  --accent: #38bdac;
  --accent-soft: rgba(56, 189, 172, 0.14);
  --accent-ink: #062b27;
  --tumor: #f59e0b;
  --tumor-soft: rgba(245, 158, 11, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.22);
  --ring: 0 0 0 3px var(--accent-soft);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #d9e1ea;
    --border-strong: #bdc9d6;
    --text: #131c26;
    --text-dim: #48586a;
    --muted: #64748b;
    --accent: #0f9486;
    --accent-soft: rgba(15, 148, 134, 0.12);
    --accent-ink: #ffffff;
    --tumor: #d97706;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1em; color: var(--text-dim); }
code { font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; color: var(--text); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.accent { color: var(--accent); }
.muted { color: var(--muted); }
.fine { font-size: 0.85rem; color: var(--muted); }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.mark-liver { fill: var(--accent); }
.mark-lesion { fill: var(--tumor); }
.nav-links { display: none; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-row > .btn { margin-left: auto; }
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .nav-row > .btn { margin-left: 0; }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 650; font-size: 0.97rem; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 0.9rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 88px 0 96px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}
.eyebrow {
  display: inline-block; margin-bottom: 18px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.82rem; font-weight: 650; letter-spacing: 0.02em;
}
.lede { font-size: 1.12rem; max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }

.ct { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.ct svg { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.seg-liver { fill: rgba(56, 189, 172, 0.42); stroke: #38bdac; stroke-width: 3; }
.seg-lesion { fill: rgba(245, 158, 11, 0.55); stroke: #f59e0b; stroke-width: 3; }
.ct figcaption { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 4px 2px; font-size: 0.85rem; color: var(--text-dim); }
.ct figcaption .muted { margin-left: auto; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-liver { background: #38bdac; }
.sw-lesion { background: #f59e0b; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding: 72px 16px; }
@media (min-width: 720px) { .section { padding: 88px 28px; } }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 72px 0; }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step-n {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.steps p { margin: 0; }

.grid { display: grid; gap: 18px; margin-top: 32px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color 0.15s; }
.card:hover { border-color: var(--border-strong); }
.card p { margin: 0; font-size: 0.96rem; }

.model-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .model-grid { grid-template-columns: 1.2fr 1fr; gap: 56px; } }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; }
.metrics div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.metrics dt { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.metrics dd { margin: 0; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.metrics div:nth-child(2) dd { color: var(--tumor); }
.metrics div:first-child dd { color: var(--accent); }

.closing { text-align: center; }
.closing p { margin-bottom: 24px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.9rem; color: var(--text-dim); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
