/* Every Drop For Life
   Colors come from blood itself: red cells, the darker red of a full bag,
   and the straw yellow of plasma. */

:root {
  --blood: #c4122f;
  --blood-dark: #a10d25;
  --oxblood: #5e0b15;
  --plasma: #f6c445;
  --plasma-soft: #fdf0c4;
  --blush: #fdf1ee;
  --hero: #ffe9e4;
  --wine: #8e1b1b;
  --vessel: #fbdcd7;
  --paper: #ffffff;
  --ink: #26151a;
  --muted: #6b5358;
  --line: #efd3ce;
  --ok: #1c7a4b;
  --ok-soft: #e5f4ec;

  --display: 'Poppins', Arial, sans-serif;
  --body: 'Poppins', Arial, sans-serif;
  --hand: 'Caveat', cursive;

  --focus: var(--oxblood);
  --header-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; }
a { color: var(--blood); text-underline-offset: 0.15em; }
a:hover { color: var(--oxblood); }
b, strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-red { --focus: var(--plasma); }

.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.measure { max-width: 66ch; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--paper); color: var(--oxblood); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
h1 { color: var(--wine); font-size: clamp(2.25rem, 1.3rem + 4.2vw, 4.25rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.015em; color: var(--oxblood); margin-bottom: 0.6em; max-width: 22ch; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.25; margin: 2.2em 0 0.5em; }
p + p { margin-top: 0.9em; }
.big { font-size: 1.25rem; line-height: 1.5; }
.small { font-size: 0.9rem; color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--blood); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo:hover { color: var(--wine); }
.site-header ul { list-style: none; padding: 0; display: flex; gap: 2px; }
.site-header nav a { display: block; color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 8px 11px; border-radius: 999px; white-space: nowrap; }
.site-header nav a:hover { background: var(--hero); color: var(--wine); }
.menu-btn { display: none; font: inherit; font-weight: 700; color: var(--blood); background: transparent; border: 2px solid var(--blood); border-radius: 999px; padding: 6px 16px; cursor: pointer; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .site-header nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(94,11,21,0.08); padding: 6px 20px 16px; }
  .site-header nav.open { display: block; }
  .site-header ul { flex-direction: column; }
  .site-header nav a { font-size: 1.05rem; padding: 11px 12px; border-radius: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 999px; border: 2px solid #fff;
  background: #fff; color: var(--blood);
}
.btn:hover { background: var(--plasma); border-color: var(--plasma); color: var(--oxblood); }
.btn.ghost { background: transparent; color: #fff; }
.btn.ghost:hover { background: #fff; border-color: #fff; color: var(--blood); }
.btn.solid { background: var(--blood); border-color: var(--blood); color: #fff; }
.btn.solid:hover { background: var(--oxblood); border-color: var(--oxblood); color: #fff; }
.btn.line { background: transparent; border-color: var(--blood); color: var(--blood); }
.btn.line:hover { background: var(--blood); color: #fff; }

/* ---------- hero ---------- */
.hero { background: var(--hero); color: var(--ink); padding: clamp(36px, 6vw, 80px) 0 clamp(44px, 6vw, 84px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.lede { font-size: 1.2rem; line-height: 1.5; margin-top: 1.1em; max-width: 34em; color: #3d2a2e; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }
.hero-art { text-align: center; }
.hero-art svg { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; }
.hand { font-family: var(--hand); font-size: 1.85rem; line-height: 1.1; color: var(--blood); transform: rotate(-3deg); margin-top: 0.7em; }

.year {
  background: var(--blood); color: #fff; border-radius: 22px; padding: clamp(22px, 4vw, 40px); margin: 2em 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 clamp(24px, 4vw, 48px);
  grid-template-areas: "cap grid" "ctl grid"; align-items: center;
}
.year figcaption { grid-area: cap; align-self: end; }
.year-grid { grid-area: grid; }
.year-controls { grid-area: ctl; align-self: start; }
.year .seg legend { float: none; width: 100%; margin: 0 0 8px; }
.year figcaption { font-size: 0.98rem; line-height: 1.45; color: #ffe1dc; margin-bottom: 16px; max-width: 30em; }
.year figcaption b { display: block; color: #fff; font-family: var(--display); font-size: 1.15rem; }
.year-grid { display: grid; grid-template-columns: repeat(28, 1fr); gap: 3px; max-width: 520px; }
.year-grid i { aspect-ratio: 1; display: grid; place-items: center; }
.year-grid i::before { content: ''; width: 34%; aspect-ratio: 1; border-radius: 50%; background: rgba(255,255,255,0.32); transition: all 0.25s ease; }
.year-grid i.t::before { width: 86%; background: #fff; border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
/* The fill-in only ever hides a day for a moment, so the year still shows if the animation never runs. */
.year-grid.intro i { animation: day 0.3s ease backwards; animation-delay: calc(var(--i) * 4ms); }
@keyframes day { from { opacity: 0; } }

.year-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 20px; }
.seg { border: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seg legend { float: left; padding: 0; margin-right: 10px; font-size: 0.98rem; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.55); font-size: 0.95rem; font-weight: 700; }
.seg label:hover span { border-color: #fff; }
.seg input:checked + span { background: #fff; border-color: #fff; color: var(--blood); }
.seg input:focus-visible + span { outline: 3px solid var(--plasma); outline-offset: 3px; }
.year-count { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin: 0; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art svg { max-width: 170px; }
  .year { grid-template-columns: 1fr; grid-template-areas: "cap" "grid" "ctl"; }
}
@media (max-width: 520px) {
  .seg legend { float: none; width: 100%; margin: 0 0 8px; }
  .year { padding: 20px 16px; border-radius: 18px; }
  .seg span { padding: 6px 12px; font-size: 0.9rem; }
}

/* ---------- sections ---------- */
section { padding: clamp(52px, 7vw, 96px) 0; }
.tint { background: var(--blush); }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px clamp(28px, 5vw, 64px); }
.cols.middle { align-items: center; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

.list { padding-left: 1.2em; }
.list li { margin-bottom: 0.45em; }
.list li::marker { color: var(--blood); }

.note { background: var(--plasma-soft); border-left: 6px solid var(--plasma); border-radius: 0 12px 12px 0; padding: 18px 22px; margin-top: 2em; max-width: 72ch; }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 2.2em; }
.stats div { border-top: 4px solid var(--blood); padding-top: 14px; }
.stats dt { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--blood); }
.stats dd { margin-top: 8px; font-size: 0.98rem; line-height: 1.45; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .stats { grid-template-columns: 1fr; gap: 20px; } }

/* gene markers: empty = not affected, half = carrier, full = disease */
.gene { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blood); background: var(--paper); flex: none; }
.gene.carrier { background: linear-gradient(90deg, var(--blood) 50%, var(--paper) 50%); }
.gene.major { background: var(--blood); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 2em; }
.kind { background: var(--paper); border-radius: 16px; padding: 24px 26px 26px; }
.kind h3 { margin-top: 12px; color: var(--oxblood); }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

.inherit { margin-top: 1.4em; max-width: 640px; text-align: center; font-size: 0.95rem; line-height: 1.3; }
.parents { display: flex; justify-content: center; gap: 56px; }
.parents div, .children li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.branch { height: 34px; margin: 10px 12.5% 0; border: 3px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; position: relative; }
.branch::before { content: ''; position: absolute; left: 50%; top: -13px; height: 100%; border-left: 3px solid var(--line); transform: translateX(-50%); }
.branch::after { content: ''; position: absolute; inset: 0 33.33%; border-inline: 3px solid var(--line); }
.children { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 8px; }
.children b { font-family: var(--display); font-size: 1.25rem; }

/* sickle */
.vessel { margin-top: 12px; }
.vessel svg { display: block; width: 100%; height: auto; }
.vessel text { font-family: var(--body); font-size: 15px; font-weight: 700; fill: var(--ink); }
@media (max-width: 760px) { .vessel text { font-size: 23px; } }

/* reasons */
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 64px); margin-top: 0.6em; }
.reasons div { padding: 16px 0; border-top: 1px solid var(--line); }
.reasons dt { font-weight: 700; }
.reasons dd { color: #3d2a2e; }
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; } }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { font-family: var(--display); font-size: 0.95rem; color: var(--oxblood); border-bottom: 3px solid var(--blood); }
.rules tbody th { font-weight: 700; width: 38%; }
.rules + .small { margin-top: 14px; }

.myths td:first-child { width: 40%; font-style: italic; color: var(--muted); }
.myths td:last-child::before { content: 'Fact: '; font-weight: 700; color: var(--ok); display: none; }
@media (max-width: 600px) {
  .myths thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .myths tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .myths td { display: block; width: auto !important; border: 0; padding: 2px 0; }
  .myths td:last-child::before { display: inline; }
}

/* steps: a real sequence, so it gets numbers */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; margin-top: 1em; }
.steps li { counter-increment: s; border-top: 4px solid var(--blood); padding-top: 12px; }
.steps li::before { content: counter(s); display: block; font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--blood); margin-bottom: 6px; }
.steps b { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 4px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* checker */
.checker { background: var(--blush); border-radius: 18px; padding: 22px 24px 24px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checker label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 5px; }
.checker input, .checker select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  padding: 10px 12px; border: 2px solid #d9b9b3; border-radius: 10px; min-height: 46px;
}
.checker input:focus-visible, .checker select:focus-visible { outline-offset: 1px; border-color: var(--oxblood); }
.checker button { margin-top: 4px; }
.checker > .small { margin-top: 14px; }
#result { margin-top: 16px; }
#result:empty { display: none; }
#result p { padding: 14px 16px; border-radius: 12px; border-left: 6px solid; }
#result.ok p { background: var(--ok-soft); border-color: var(--ok); }
#result.no p { background: var(--paper); border-color: var(--blood); }
#result ul { margin: 8px 0 0; padding-left: 1.2em; }
#result .btn { margin-top: 12px; padding: 9px 18px; font-size: 0.95rem; }

/* help */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 2em; border-top: 4px solid var(--blood); }
.way { padding: 22px 24px 26px 0; display: flex; flex-direction: column; align-items: flex-start; }
.way + .way { padding-left: 24px; border-left: 1px solid var(--line); }
.way h3 { margin-top: 0; color: var(--oxblood); }
.way p { margin-bottom: 18px; }
.way .btn { margin-top: auto; padding: 10px 18px; font-size: 0.95rem; }
.way .btn + .btn { margin-top: 8px; }
@media (max-width: 980px) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .way:nth-child(3) { padding-left: 0; border-left: 0; }
  .way:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .ways { grid-template-columns: 1fr; }
  .way + .way { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.tscs { background: var(--oxblood); color: #fff; border-radius: 22px; padding: clamp(24px, 4vw, 44px); margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px clamp(28px, 5vw, 56px); }
.tscs h3 { margin-top: 0; font-size: 1.6rem; font-weight: 700; }
.tscs .btn { margin-top: 20px; }
.tscs a:not(.btn) { color: var(--plasma); }
.tscs address { font-style: normal; font-size: 1rem; }
.tscs address b { display: block; font-size: 0.9rem; color: #f3c9c2; }
.tscs .fine { grid-column: 1 / -1; color: #f3c9c2; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 16px; margin: 0; }
@media (max-width: 760px) { .tscs { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.15rem; padding: 18px 40px 18px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 500; color: var(--blood); line-height: 1; }
details[open] summary::after { content: '\2212'; }
details p { padding: 0 0 20px; max-width: 62ch; }

/* about */
.letter { max-width: 66ch; }
.sign { font-family: var(--hand); font-size: 2.6rem; line-height: 1; color: var(--blood); transform: rotate(-4deg); transform-origin: left center; margin-top: 0.5em; }
.insta { display: flex; align-items: center; gap: 8px; margin-top: 1.6em; color: var(--blood); }
.insta b { color: var(--ink); }
.letter .small { margin-top: 1.4em; }

/* footer */
footer { background: var(--ink); color: #e6d9d7; padding: 48px 0; font-size: 0.92rem; }
footer h2 { color: #fff; font-size: 1.2rem; letter-spacing: 0; margin-bottom: 12px; }
footer a { color: #ffb9ad; }
footer a:hover { color: #fff; }
footer ul { padding-left: 1.2em; margin-bottom: 22px; }
footer li { margin-bottom: 5px; }
footer p { max-width: 80ch; }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; background: var(--blood); color: #fff; padding: 40px 0; }
.lost p { margin: 1em 0 1.6em; font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .year-grid.intro i { animation: none; }
  .year-grid i::before { transition: none; }
}

@media print {
  .site-header, .year-controls, .actions, .checker, .menu-btn { display: none; }
  .hero, .tscs { background: #fff; color: #000; }
  section { padding: 24px 0; }
}
