/* BloodWork site — dark dotted ground, frosted glass, soft glows that fade (the app's own look).
   Layout: a single reading column with wide "statement" bands; privacy claims get the largest type. */
:root {
  --bg: #0a0a0c;
  --bg-raised: #131216;
  --ink: #f4f1f2;
  --muted: #a39ca0;
  --faint: #7d767a;
  --mauve: #9b5e6b;
  --rose: #c07a86;
  --optimal: #5fd3a6;
  --borderline: #f2a55a;
  --out: #f0705a;
  --info: #7aa7ff;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.09);
  --dot: rgba(255, 255, 255, 0.055);
  --display: "Outfit", "SF Pro Display", -apple-system, system-ui, sans-serif;
  --body: "Outfit", "SF Pro Text", -apple-system, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 28px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  /* dotted ground from the app */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  pointer-events: none;
}
.glows { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow {
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.glow.a { background: var(--mauve); left: -12vmax; top: -14vmax; }
.glow.b { background: #5e7f9b; right: -16vmax; top: 30vh; opacity: .32; }
.glow.c { background: var(--optimal); left: 20vw; bottom: -30vmax; opacity: .16; }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--optimal); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* Nav */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  background: rgba(10, 10, 12, 0.62);
  border-bottom: 1px solid var(--stroke);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 20px; letter-spacing: -0.01em; }
.app-icon {
  /* The iPhone app icon, with the same rounded-square corners iOS gives it. */
  width: 34px; height: 34px; flex: none; display: block;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 6px 18px -6px rgba(0,0,0,.6);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; white-space: nowrap;
  background: var(--glass-strong); border: 1px solid var(--stroke);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--optimal); box-shadow: 0 0 10px var(--optimal); }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav .pill { margin-left: auto; }
}

/* Type */
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(46px, 6.4vw, 92px); line-height: 0.98; }
h2 { font-size: clamp(36px, 5.6vw, 72px); line-height: 1.0; }
h3 { font-size: 24px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; line-height: 1.55; }
.soft { color: var(--muted); }
.mono { font-family: var(--mono); }
em.g { font-style: normal; color: var(--optimal); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 18px;
  text-decoration: none; font-size: 16px; font-weight: 500;
  transition: transform .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn.light { background: #e9e7e8; color: #111013; }
.btn.light:hover { background: #fff; }
.btn.glass { background: var(--glass-strong); border: 1px solid var(--stroke); }
.btn.glass:hover { background: rgba(255,255,255,.12); }

/* Glass surfaces */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

section { padding-block: clamp(72px, 11vw, 140px); }

/* Reveal on scroll (only applied by JS to things below the first screen) */
.reveal.pending { opacity: 0; transform: translateY(28px) scale(.985); }
.reveal { transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }

/* Footer */
footer { border-top: 1px solid var(--stroke); padding-block: 48px 64px; color: var(--faint); font-size: 14px; }
footer .wrap { display: grid; gap: 28px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.disclaimer { max-width: 62em; line-height: 1.6; }

/* Document pages (privacy, terms, support) */
.doc { padding-block: 64px 96px; }
.doc .wrap { max-width: 820px; }
.doc header { display: grid; gap: 16px; padding-bottom: 40px; border-bottom: 1px solid var(--stroke); margin-bottom: 40px; }
.doc h1 { font-size: clamp(42px, 7vw, 76px); }
.doc h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; margin-top: 56px; margin-bottom: 14px; font-weight: 400; }
.doc h3 { font-size: 19px; margin-top: 28px; margin-bottom: 8px; }
.doc p, .doc li { color: #d6d0d3; max-width: 68ch; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 14px 0; }
.doc .summary { padding: 26px 28px; display: grid; gap: 14px; }
.doc .summary p { color: var(--ink); font-size: 19px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.doc .table-wrap { overflow-x: auto; margin: 18px 0; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.doc th { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.doc .meta { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.copy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.copy-row code { font-family: var(--mono); font-size: 16px; padding: 10px 14px; border-radius: 12px; background: var(--glass-strong); border: 1px solid var(--stroke); user-select: all; overflow-wrap: anywhere; }
.copy-row button { font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.copy-row button:hover { background: var(--glass-strong); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.pending { opacity: 1 !important; transform: none !important; transition: none; }
  .glow { transition: none; }
}
@media (max-width: 420px) {
  .nav .wrap { gap: 12px; }
  .brand { font-size: 18px; }
  .nav .pill { font-size: 12.5px; padding: 7px 11px; gap: 6px; }
}
