/* ============================================================
   HemoAI legal pages v2 — matches the landing "clinical luxury"
   look (Space Grotesk headings, aurora background, glass card).
   Self-contained: no dependency on landing.css.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-0: #05070d;
  --bg-1: #080b14;
  --ink: rgba(255, 255, 255, 0.92);
  --ink-soft: rgba(255, 255, 255, 0.70);
  --ink-faint: rgba(255, 255, 255, 0.50);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.08);
  --red: #ef4455;
  --red-deep: #b91c1c;
  --coral: #ff7a59;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --grad-ink: linear-gradient(92deg, #ffffff 0%, #ffd3d3 42%, var(--red) 78%, var(--coral) 100%);
  --grad-btn: linear-gradient(135deg, #e5323f 0%, #b91c1c 100%);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg-0: #fbfaf8; --bg-1: #f4f1ec;
    --ink: rgba(20, 16, 24, 0.94); --ink-soft: rgba(20, 16, 24, 0.72); --ink-faint: rgba(20, 16, 24, 0.52);
    --line: rgba(20, 16, 24, 0.10); --line-strong: rgba(20, 16, 24, 0.16);
    --glass: rgba(255, 255, 255, 0.7); --glass-2: rgba(255, 255, 255, 0.92);
    --shadow: 0 24px 60px rgba(60, 30, 30, 0.10);
    --grad-ink: linear-gradient(92deg, #1c1017 0%, #6d1220 45%, #c22030 80%, #e2543a 100%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(239, 68, 85, 0.35); }

/* legacy v1 background element, if present, is neutralised */
.bg { display: none !important; }

.aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -6%, rgba(239, 68, 85, 0.16), transparent 62%),
    radial-gradient(1100px 700px at 88% 12%, rgba(185, 28, 28, 0.13), transparent 60%),
    radial-gradient(800px 900px at 50% 110%, rgba(255, 122, 89, 0.07), transparent 62%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
}
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(1000px 640px at 50% 0%, rgba(0,0,0,0.8), transparent 78%);
  mask-image: radial-gradient(1000px 640px at 50% 0%, rgba(0,0,0,0.8), transparent 78%);
}
@media (prefers-color-scheme: light) {
  .aurora { background:
    radial-gradient(900px 620px at 12% -6%, rgba(226,84,58,0.10), transparent 62%),
    radial-gradient(1100px 700px at 88% 12%, rgba(194,32,48,0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%); }
  .aurora::after { background-image: radial-gradient(rgba(20,16,24,0.06) 1px, transparent 1px); }
}

.page { position: relative; z-index: 1; }
.wrap { max-width: 900px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 28px) 70px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 14px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 12px 10px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-0) 68%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}
@media (prefers-color-scheme: light) { .topbar { background: rgba(255,255,255,.72); box-shadow: 0 18px 44px rgba(60,30,30,.08); } }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img, .brand-mark img { width: 34px; height: 34px; border-radius: 11px; box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.brand-mark { display: inline-flex; }
.brand-veins, .brand-gloss { display: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); }
.brand-name em { font-style: normal; color: var(--red); }

.nav { display: flex; gap: 2px; font-size: 14px; flex-wrap: wrap; justify-content: center; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 9px 12px; border-radius: 12px; transition: background .15s ease, color .15s ease; }
.nav a:hover { background: var(--glass-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--glass-2); }
.actions { display: flex; align-items: center; gap: 8px; }
.actions:empty { display: none; }

.home-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 13.5px var(--font-display);
  color: #fff; background: var(--grad-btn);
  padding: 9px 15px; border-radius: 12px;
  box-shadow: 0 12px 28px rgba(229,50,63,.32);
  text-decoration: none;
}
.home-btn:hover { text-decoration: none; filter: brightness(1.05); }

/* ---------- document ---------- */
.doc { margin-top: 26px; }

.doc-hero {
  text-align: center;
  padding: clamp(28px, 5vw, 54px) 20px clamp(22px, 3vw, 34px);
}
.doc-hero .eyebrow {
  display: inline-block;
  font: 600 12.5px var(--font-display);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 700; line-height: 1.04; letter-spacing: -0.03em;
  margin: 0 0 14px;
  background: var(--grad-ink);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.last-updated {
  display: inline-block;
  font: 500 13px var(--font-body);
  color: var(--ink-soft);
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--glass);
}

/* content card wrapping all sections */
.doc > .section,
.doc > .contact-info,
.doc > .doc-footer { }

.doc .section,
.doc .contact-info {
  max-width: 760px; margin: 0 auto;
  padding: 26px clamp(20px, 4vw, 40px);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(8px);
}
.doc .section:first-of-type { border-top: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; padding-top: 34px; }
.doc .section + .section { border-top: 1px solid var(--line); }
.doc .contact-info {
  border: 1px solid rgba(239, 68, 85, 0.3);
  background: linear-gradient(135deg, rgba(239,68,85,.10), rgba(185,28,28,.02)), var(--glass);
  border-radius: 0;
  margin-top: 0;
}

.doc h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  margin: 0 0 14px; color: var(--ink);
}
.doc h3 {
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 600;
  margin: 22px 0 8px; color: var(--ink);
}
.doc p { margin: 0 0 14px; color: var(--ink-soft); }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--ink); font-weight: 600; }

.doc ul { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 9px; }
.doc ul li {
  position: relative; padding-left: 24px;
  color: var(--ink-soft);
}
.doc ul li::before {
  content: ""; position: absolute; left: 4px; top: 10px;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--red); transform: rotate(45deg);
}
.doc ul li strong { color: var(--ink); }

/* bottom card corner rounding: last content block */
.doc .section:last-of-type,
.doc .contact-info:last-of-type { border-radius: 0 0 var(--r-lg) var(--r-lg); border-bottom: 1px solid var(--line); }

.doc-footer {
  max-width: 760px; margin: 22px auto 0;
  text-align: center;
  font-size: 12.5px; color: var(--ink-faint);
}

/* ---------- back to home footer ---------- */
.doc-back {
  max-width: 760px; margin: 26px auto 0;
  display: flex; justify-content: center;
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: center; }
}
