/* ==========================================================================
   knowfirstaid.com — design tokens + base styles
   Mobile-first. Green = safety (ISO first aid). Red reserved for emergencies.
   ========================================================================== */

:root {
  /* Color: green primary shades, warm-free cool neutrals tinted green */
  --green-900: #0b3527;
  --green-800: #0d4a35;
  --green-700: #0e6047;
  --green-600: #107a58;
  --green-500: #17936c;
  --green-100: #d9efe5;
  --green-050: #edf7f2;

  --ink-900: #16211c;      /* headings */
  --ink-700: #2c3b34;      /* body */
  --ink-500: #5a6b62;      /* secondary */
  --ink-300: #9aaaa1;      /* tertiary/disabled */

  --bg: #f7faf8;
  --surface: #ffffff;
  --line: #e2eae5;

  /* Semantic: red is for emergencies only, never decoration */
  --red-700: #a4271f;
  --red-050: #fbeeec;
  --amber-700: #8a5b00;
  --amber-050: #fdf4e3;

  /* Type scale (16 anchor) */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;                    /* 17px mobile body */
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1.5vw, 1.875rem);
  --fs-2xl: clamp(1.875rem, 1.4rem + 2.2vw, 2.5rem);
  --fs-hero: clamp(2.25rem, 1.6rem + 3.2vw, 3.5rem);

  /* Spacing scale (8px base) */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-6: 3rem;
  --sp-8: 4rem;
  --sp-12: 6rem;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(14, 74, 53, 0.08), 0 1px 3px rgba(14, 74, 53, 0.12);

  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 71.25rem;   /* 1140px */
  --text-width: 42rem;
}

/* Minimal reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink-900);
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); font-weight: 700; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; }

p { max-width: var(--text-width); }

a { color: var(--green-700); }
a:hover { color: var(--green-900); }

:focus-visible {
  outline: 3px solid var(--green-600);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.section { padding-block: var(--sp-8); }
@media (min-width: 48em) { .section { padding-block: var(--sp-12); } }

.kicker {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: var(--sp-1);
}

.section-intro { color: var(--ink-500); margin-top: var(--sp-1); }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 4.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink-900);
  text-decoration: none;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--green-700);
  display: grid;
  place-items: center;
  flex: none;
}
.brand span em { font-style: normal; color: var(--green-700); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-900);
  cursor: pointer;
}
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  box-shadow: var(--shadow);
}
.site-nav.open { display: block; }
.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-700);
  padding-block: 0.25rem;
  display: inline-block;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"]:not(.btn) { color: var(--green-800); }
.site-nav a[aria-current="page"]:not(.btn) { font-weight: 700; }

@media (min-width: 48em) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    padding: 0;
    box-shadow: none;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: var(--sp-3); }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.375rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s ease-out, transform 0.15s ease-out;
}
.btn-primary {
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 53, 39, 0.35);
}
.btn-primary:hover { background: var(--green-800); color: #fff; transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--green-800);
  border: 1.5px solid var(--green-700);
}
.btn-secondary:hover { background: var(--green-050); color: var(--green-900); }
.btn-note {
  display: block;
  font-size: var(--fs-sm);
  color: var(--ink-500);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  padding-block: var(--sp-8) var(--sp-6);
}
.hero .container {
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}
.hero h1 { font-size: var(--fs-hero); max-width: 22ch; }
.hero-sub { margin-top: var(--sp-2); font-size: var(--fs-lg); color: var(--ink-500); max-width: 34rem; }
.hero-actions { margin-top: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.hero-proof {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
}
.proof-item { font-size: var(--fs-sm); color: var(--ink-500); max-width: 15rem; }
.proof-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.375rem;
  color: var(--green-800);
}
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-badge {
  position: absolute;
  left: var(--sp-2);
  bottom: var(--sp-2);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--green-800);
  box-shadow: var(--shadow);
}
.hero-badge svg { color: var(--green-700); }
@media (min-width: 60em) {
  .hero .container { grid-template-columns: 1.15fr 0.85fr; }
}

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

.skill-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--sp-3);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-decoration: none;
  color: var(--ink-700);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.skill-card:hover { transform: translateY(-3px); color: var(--ink-700); }
.skill-card h3 { color: var(--ink-900); }
.skill-card:hover h3 { color: var(--green-800); }
.skill-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: var(--green-050);
  color: var(--green-700);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-1);
}
.skill-card p { font-size: var(--fs-sm); color: var(--ink-500); flex-grow: 1; }
.skill-card .card-cta { font-weight: 600; font-size: var(--fs-sm); color: var(--green-700); }
.skill-time {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Emergency callout (the one red element)
   -------------------------------------------------------------------------- */
.emergency {
  background: var(--red-050);
  border-left: 4px solid var(--red-700);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  margin-block: var(--sp-3);
  max-width: var(--text-width);
}
.emergency strong { color: var(--red-700); }
.emergency p { font-size: var(--fs-base); }

.note-box {
  background: var(--amber-050);
  border-left: 4px solid var(--amber-700);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  margin-block: var(--sp-3);
  max-width: var(--text-width);
}
.note-box strong { color: var(--amber-700); }

/* --------------------------------------------------------------------------
   Guide pages
   -------------------------------------------------------------------------- */
.guide-header { padding-block: var(--sp-6) var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--line); }
.guide-header .has-media {
  display: grid;
  gap: var(--sp-4);
  align-items: center;
}
.guide-photo {
  width: 100%;
  height: auto;
  max-height: 21rem;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 60em) {
  .guide-header .has-media { grid-template-columns: 1.15fr 0.85fr; }
  .guide-photo { height: 100%; }
}
.breadcrumb { font-size: var(--fs-sm); color: var(--ink-500); margin-bottom: var(--sp-2); }
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--green-800); }
.guide-summary { margin-top: var(--sp-2); font-size: var(--fs-lg); color: var(--ink-500); max-width: var(--text-width); }
.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--ink-500);
}
.review-meta strong { color: var(--green-800); font-weight: 600; }

.guide-body { padding-block: var(--sp-6); }
.guide-body > .container { max-width: 50rem; }
.guide-body h2 { margin-top: var(--sp-6); margin-bottom: var(--sp-2); }
.guide-body p + p { margin-top: var(--sp-2); }

.steps { list-style: none; padding: 0; margin-block: var(--sp-3); counter-reset: step; display: grid; gap: var(--sp-2); }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-3);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--sp-2);
  align-items: start;
}
.steps li::before {
  content: counter(step);
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-050);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { font-size: 1rem; color: var(--ink-500); }

.dodont { display: grid; gap: var(--sp-2); margin-block: var(--sp-3); }
@media (min-width: 40em) { .dodont { grid-template-columns: 1fr 1fr; } }
.dodont > div {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-3);
}
.dodont h3 { margin-bottom: var(--sp-1); }
.dodont ul { padding-left: 1.25rem; display: grid; gap: 0.5rem; font-size: 1rem; }
.dodont .do h3 { color: var(--green-800); }
.dodont .dont h3 { color: var(--red-700); }

/* --------------------------------------------------------------------------
   Recommendation / affiliate boxes
   -------------------------------------------------------------------------- */
.reco {
  background: var(--green-050);
  border-radius: var(--radius);
  padding: var(--sp-4);
  margin-block: var(--sp-6);
}
.reco .kicker { color: var(--green-800); }
.reco p { color: var(--ink-700); }
.reco .btn { margin-top: var(--sp-2); }
.disclosure { font-size: 0.8125rem; color: var(--ink-500); margin-top: var(--sp-2); }
.reco-media { display: grid; gap: var(--sp-3); }
.reco-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (min-width: 48em) {
  .reco-media { grid-template-columns: 1fr 16rem; align-items: center; }
  .reco-media img { aspect-ratio: 3 / 4; }
}

.pick-grid { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
@media (min-width: 60em) { .pick-grid { grid-template-columns: repeat(3, 1fr); } }
.pick {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
}
.pick-tag {
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-800);
  background: var(--green-050);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: var(--sp-2);
}
.pick h3 { margin-bottom: 0.375rem; }
.pick p { font-size: 1rem; color: var(--ink-500); flex-grow: 1; }
.pick ul { font-size: 1rem; color: var(--ink-500); padding-left: 1.25rem; margin-block: var(--sp-2); display: grid; gap: 0.375rem; }
.pick .btn { margin-top: auto; align-self: end; width: 100%; text-align: center; white-space: nowrap; }

/* On guide pages the prose container is narrow; let the card row use the full site width */
@media (min-width: 60em) {
  .guide-body .pick-grid { margin-inline: calc((100% - min(68rem, 100vw - 3rem)) / 2); }
}

/* Side-by-side cards: internal zones align across the row via subgrid.
   Fallback (no subgrid): flex column with the button pinned to the bottom. */
@supports (grid-template-rows: subgrid) {
  .card-grid > .skill-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5; /* icon, time, title, text, cta */
    row-gap: var(--sp-1);
  }
  .pick-grid > .zones-4 {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4; /* tag, title, intro, button */
    row-gap: var(--sp-1);
  }
  .pick-grid > .zones-5 {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 5; /* tag, title, intro, bullets, button */
    row-gap: var(--sp-1);
  }
  .pick-grid .pick ul { margin-block: 0; align-self: start; }
  .pick-grid .pick p { align-self: start; }
}

/* --------------------------------------------------------------------------
   Certification band
   -------------------------------------------------------------------------- */
.cert-band { background: var(--green-900); color: #d7e8e0; }
.cert-band .container { display: grid; gap: var(--sp-4); align-items: center; }
@media (min-width: 60em) { .cert-band .container { grid-template-columns: 1.2fr 0.8fr; } }
.cert-band .kicker { color: #8fd4b4; }
.cert-band h2 { color: #ffffff; }
.cert-band p { color: rgba(255, 255, 255, 0.78); }
.cert-band .btn-primary { background: #ffffff; color: var(--green-900); box-shadow: none; }
.cert-band .btn-primary:hover { background: var(--green-100); color: var(--green-900); }
.cert-band .btn-note { color: rgba(255, 255, 255, 0.6); }
.cert-points { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.cert-points li { display: flex; gap: 0.75rem; align-items: start; }
.cert-points svg { flex: none; margin-top: 0.2rem; color: var(--green-500); }

/* --------------------------------------------------------------------------
   Next-guide footer nav + footer
   -------------------------------------------------------------------------- */
.sources-list {
  font-size: var(--fs-sm);
  color: var(--ink-500);
  padding-left: 1.25rem;
  display: grid;
  gap: 0.375rem;
}
.guide-disclaimer {
  font-size: 0.8125rem;
  color: var(--ink-500);
  border-top: 1px solid var(--line);
  margin-top: var(--sp-4);
  padding-top: var(--sp-2);
  max-width: var(--text-width);
}
.proof-note { font-size: 0.8125rem; color: var(--ink-500); margin-top: var(--sp-2); }

.next-guide {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
}

.site-footer {
  background: var(--ink-900);
  color: #aebbb3;
  padding-block: var(--sp-6);
  margin-top: var(--sp-8);
  font-size: var(--fs-sm);
}
.site-footer .container { display: grid; gap: var(--sp-4); }
@media (min-width: 48em) { .site-footer .container { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: #ffffff; font-size: 1rem; margin-bottom: var(--sp-1); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: #cdd8d2; }
.site-footer a:hover { color: #ffffff; }
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  color: #8d9c94;
}
.footer-legal p { max-width: none; }
.footer-legal p + p { margin-top: var(--sp-1); }

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
