/* HCP Expert — public site. Plain CSS, system fonts, no build step. */

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #11161d;
  --muted: #5a6577;
  --brand: #5e8bf7; /* logo and accents only */
  --primary: #2f62d9; /* interactive: 5.5:1 with white text */
  --primary-text: #ffffff;
  --link: #2f62d9;
  --border: #d5dbe6;
  --focus: #11161d;
  /* Status colors, used as text and as marks in the illustrations.
     Ratios against --surface / --bg are recorded in README.md. */
  --ok: #16703f;
  --warn: #8a5200;
  --danger: #b3261e;
  --tint: #eaeffb; /* --primary at 10% over --surface */
  --section-tint: #e4eaf7; /* --primary at 8% over --bg */
  --band: #1c2a4a;
  --band-text: #ffffff;
  --band-muted: #c9d6f5;
  --shadow: 0 1px 0 rgb(17 22 29 / 6%), 0 6px 16px -8px rgb(17 22 29 / 28%);
  --header-h: 4.25rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b23;
    --text: #e7ecf3;
    --muted: #9aa6b8;
    --primary: #5e8bf7;
    --primary-text: #0d1117;
    --link: #8fb0ff;
    --border: #2b3340;
    --focus: #e7ecf3;
    --ok: #5fd39a;
    --warn: #f0b35a;
    --danger: #ff8a80;
    --tint: #1d2638;
    --section-tint: #131b29;
    --band: #1a2440;
    --band-text: #e7ecf3;
    --band-muted: #b9c6e4;
    --shadow: 0 1px 0 rgb(0 0 0 / 40%), 0 8px 18px -8px rgb(0 0 0 / 80%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* The header is sticky: anchors stop below it. A section brings its own
   top padding, so it only needs to clear the header. */
[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

section[id],
main[id] {
  scroll-margin-top: var(--header-h);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(100% - 2rem, 68rem);
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--primary-text);
  border-radius: 0.4rem;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header: sticky, opaque, with a shadow that appears once the page scrolls. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Where scroll-driven animation exists, the shadow waits for the first scroll.
   Elsewhere it is always on, which is the safe reading of "fixed header". */
@supports (animation-timeline: scroll()) {
  .site-header {
    box-shadow: none;
    animation: header-shadow linear both;
    animation-timeline: scroll();
    animation-range: 0 3rem;
  }
}

@keyframes header-shadow {
  to {
    box-shadow: var(--shadow);
  }
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 2.6rem;
  width: auto;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: inline;
  }
}

.site-nav ul,
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem 1.5rem;
  align-items: center;
}

.site-nav ul {
  justify-content: flex-end;
}

.site-nav a {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--primary);
}

.header-cta {
  padding: 0.45rem 1rem;
  white-space: nowrap;
}

/* Narrow screens: logo and action on the first row, the links on a second row.
   No script and no collapsible menu, so nothing stays open over the page. */
@media (max-width: 47.99rem) {
  :root {
    --header-h: 6.25rem;
  }

  .header-row {
    grid-template-columns: 1fr auto;
    gap: 0;
    padding-top: 0.5rem;
  }

  .logo img {
    height: 2.25rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-inline: -1rem;
    padding-inline: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.95rem;
    padding: 0.55rem 0 0.45rem;
  }
}

.button {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.3;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-text);
}

.button-primary:hover {
  filter: brightness(0.92);
  text-decoration: none;
}

.button-outline {
  border-color: var(--primary);
  color: var(--link);
  background: transparent;
}

.button-outline:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  text-decoration: none;
}

.button-contrast {
  background: var(--band-text);
  color: var(--band);
}

.button-contrast:hover {
  filter: brightness(0.92);
}

/* Sections */
.section {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.section-tint {
  background: var(--section-tint);
}

.section-intro {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 0;
}

/* Hero */
.hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5.5rem);
  background: linear-gradient(var(--surface), var(--bg));
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 3.5rem;
  }
}

.hero h1 {
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 17ch;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.hero .lede {
  max-width: 36rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-note {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Illustrations: inline SVG drawn with the tokens above, so both themes work. */
figure {
  margin: 0;
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.illo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgb(17 22 29 / 45%);
}

.illo text {
  font-family: inherit;
}

.i-card {
  fill: var(--surface);
  stroke: var(--border);
}

.i-paper {
  fill: var(--surface);
  stroke: var(--muted);
}

.i-text {
  fill: var(--text);
}

.i-muted {
  fill: var(--muted);
}

.i-strong {
  font-weight: 650;
}

.i-primary {
  fill: var(--link);
}

.i-ok {
  fill: var(--ok);
}

.i-warn {
  fill: var(--warn);
}

.i-danger {
  fill: var(--danger);
}

.i-tint,
.i-seg-b,
.i-tint-card {
  fill: var(--tint);
}

.i-tint-card {
  stroke: var(--primary);
}

.i-seg-a {
  fill: color-mix(in srgb, var(--primary) 26%, var(--surface));
}

.i-grid,
.i-sep {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.i-rail {
  fill: none;
  stroke: var(--border);
  stroke-width: 2;
}

.i-baseline,
.i-baseline-mark {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-baseline {
  stroke-dasharray: 5 5;
}

.i-current,
.i-current-mark {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-flag {
  fill: var(--band);
}

.i-flag-text {
  fill: var(--band-text);
}

.i-dot-done,
.i-diamond {
  fill: var(--primary);
}

.i-ok-fill {
  fill: var(--ok);
}

.i-dot-open {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 2.5;
}

.i-check {
  fill: none;
  stroke: var(--surface);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-bar-danger {
  fill: var(--danger);
}

.i-bar-warn {
  fill: var(--warn);
}

.i-bar-ok {
  fill: var(--ok);
}

.i-bar-muted {
  fill: var(--muted);
}

.i-qr {
  fill: var(--text);
}

.i-skeleton {
  fill: var(--border);
}

.i-mini {
  fill: none;
  stroke: var(--border);
}

.i-mini-right,
.i-mini-left,
.i-link {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-mini-right {
  stroke: var(--danger);
}

.i-mini-left {
  stroke: var(--primary);
}

.i-link {
  stroke: var(--primary);
  stroke-dasharray: 3 5;
}

/* Feature rows: text and illustration side by side, alternating. */
.feature {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.feature h3 {
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.feature-copy > p {
  color: var(--muted);
  max-width: 34rem;
}

@media (min-width: 60rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }

  .feature-flip .feature-copy {
    order: 2;
  }
}

.points {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  max-width: 34rem;
}

.points li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.5rem;
  border-top: 1px solid var(--border);
}

.points li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 1.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
}

.cite {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.also-title {
  margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 1.25rem;
  font-size: 1.35rem;
}

.also {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: 0;
}

.also dt {
  font-weight: 650;
  margin-bottom: 0.3rem;
}

.also dd {
  margin: 0;
  color: var(--muted);
}

/* Who it is for */
.audience,
.controls {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.audience li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 0.5rem;
  padding: 1.35rem 1.35rem 1.1rem;
}

.audience h3,
.controls h3 {
  font-size: 1.1rem;
}

.audience p,
.controls p {
  color: var(--muted);
  margin-bottom: 0;
}

/* Security */
.controls {
  gap: 0 3rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.controls li {
  padding-block: 1.35rem;
  border-top: 1px solid var(--border);
}

.site-promise {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--tint);
  border-left: 3px solid var(--primary);
  border-radius: 0 0.5rem 0.5rem 0;
  max-width: 44rem;
}

/* Contact band */
.contact {
  background: var(--band);
  color: var(--band-text);
}

.contact :focus-visible {
  outline-color: var(--band-text);
}

.contact-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.3fr) auto;
    gap: 4rem;
  }
}

.contact p {
  color: var(--band-muted);
  max-width: 36rem;
  margin-bottom: 0;
}

.contact-action .button {
  padding: 0.8rem 1.4rem;
  font-size: 1.05rem;
}

.contact-action p {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  padding-block: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: var(--surface);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  flex-wrap: wrap;
}

.site-footer a {
  color: inherit;
}

/* 404 */
.notfound {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.notfound .lede {
  color: var(--muted);
  font-size: 1.2rem;
}

/* Text pages (the privacy notice): one column of prose, at reading width. */
.page {
  padding: 3rem 0 4rem;
}

.page .container {
  max-width: 44rem;
}

.page h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.page .lede {
  color: var(--muted);
}

/* Real screenshots of the system: light and dark pairs chosen by the theme. */
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px -24px rgb(17 22 29 / 45%);
}

@media print {
  .site-header {
    position: static;
    box-shadow: none;
    animation: none;
  }
}
