/* Candy Lefler Training — shared stylesheet
   Palette sampled from the business logo: navy #003170, red #CC2027.
   Self-contained: no external assets, no webfonts, no JS. */

:root {
  --paper:        #FDFBF9;
  --tint:         #EAEEF4;
  --navy:         #003170;
  --ink:          #0B1C33;
  --body:         #3A4658;
  --red:          #CC2027;
  --red-deep:     #8E1014;
  --on-navy:      #FDFBF9;
  --on-navy-mute: #C3CEE0;
  --trace:        #F1454B;  /* decorative SVG stroke only — 3.40:1 on navy, clears the 3:1 non-text bar */
  --red-on-navy:  #FF7A7E;  /* text-safe red for the navy fields — 4.98:1 on navy */
  --rule:         #D8DEE7;

  --display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem);
  line-height: 1.65;
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem); }
h3 { font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); letter-spacing: -0.005em; }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* prose lists (grid/steps reset their own) */
main ul:not([class]), main ol:not([class]) {
  max-width: var(--measure);
  margin: 0 0 1.15em;
  padding-left: 1.25em;
}
main ul:not([class]) li, main ol:not([class]) li { margin-bottom: 0.4em; }
main ul:not([class]) li::marker { color: var(--red); }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red-deep); }

strong { color: var(--ink); font-weight: 600; }

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin: 0 0 1rem;
  max-width: none;
}

.lede {
  font-size: clamp(1.125rem, 1.03rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

/* ---------- focus, skip link ---------- */

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible, .cta :focus-visible { outline-color: var(--on-navy); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--paper);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--tint); }

.section-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.section-head p:last-child { margin-bottom: 0; }
.section-head h2:last-child { margin-bottom: 0; }

/* editorial split: heading holds the left rail, content runs beside it */
@media (min-width: 62rem) {
  .split {
    display: grid;
    grid-template-columns: 15rem minmax(0, 40rem);
    gap: 0 4rem;
    align-items: start;
  }
  .split > * { grid-column: 2; }
  .split > .section-head { grid-column: 1; grid-row: 1 / span 99; margin-bottom: 0; }
  .split > .section-head h2 { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); }
}

/* ---------- header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.brand { display: inline-flex; flex: 0 0 auto; }
.brand img { display: block; width: clamp(11rem, 34vw, 15rem); height: auto; }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red-deep); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--red); }

/* ---------- hero ---------- */

.hero {
  background: var(--navy);
  color: var(--on-navy-mute);
  padding-block: clamp(3.5rem, 8vw, 6rem) 0;
  overflow: hidden;
}
.hero h1 { color: var(--on-navy); }
.hero .label { color: var(--red-on-navy); }
.hero .lede { max-width: 34rem; }
.hero strong { color: var(--on-navy); }
.hero-inner { max-width: 44rem; }

.hero--slim { padding-bottom: clamp(3rem, 7vw, 5rem); }

/* animated ECG trace — the brand's own motif, used as the hero's spine */
.trace {
  display: block;
  width: 100%;
  height: clamp(72px, 14vw, 120px);
  margin-top: clamp(2rem, 5vw, 3.25rem);
}
.trace path {
  fill: none;
  stroke: var(--trace);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 4.9s linear forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.trace-note {
  margin: 0;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: var(--on-navy-mute);
  max-width: 34rem;
}

@media (prefers-reduced-motion: reduce) {
  .trace path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- rule carrying a single heartbeat ---------- */

.beat-rule {
  --beat-bg: var(--paper);
  border: 0;
  height: 22px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(var(--rule), var(--rule)) left center / 100% 1px no-repeat;
}
.beat-rule::after {
  content: "";
  width: 92px;
  height: 22px;
  background: var(--beat-bg)
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 22"><path d="M6,11 H24 L29,15 L34,4 L39,19 L44,11 H66" fill="none" stroke="%23CC2027" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')
    center / 72px 22px no-repeat;
}
.beat-rule--tint { --beat-bg: var(--tint); background-color: var(--tint); }

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  padding: 1.75rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { max-width: none; font-size: 0.9375rem; line-height: 1.6; }

.card--pending {
  border: 1px dashed var(--rule);
  border-top: 3px dashed var(--red);
  background: transparent;
}

/* ---------- numbered steps (a real sequence — order carries meaning) ---------- */

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 44rem; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 3.25rem;
  border-left: 1px solid var(--rule);
  margin-left: 1.25rem;
}
.steps > li:last-child { padding-bottom: 0; border-left-color: transparent; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.15em;
  transform: translateX(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--on-navy);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0;
}
.steps h3 { margin-bottom: 0.35rem; }
.steps p { max-width: 34rem; }
.steps + p { margin-top: 2rem; }
p + .steps { margin-top: 2rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--red-deep);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.hero .btn, .cta .btn { background: var(--paper); color: var(--navy); }
.hero .btn:hover, .cta .btn:hover { background: var(--on-navy-mute); color: var(--ink); }

.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: var(--paper); }

/* ---------- notice: content the owner still has to supply ---------- */

.notice {
  max-width: var(--measure);
  margin: 0 0 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--tint);
  border-left: 4px solid var(--red);
}
.notice p { max-width: none; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- closing band ---------- */

.cta { background: var(--ink); color: var(--on-navy-mute); }
.cta h2 { color: var(--on-navy); }
.cta p { max-width: 34rem; }
.cta a:not(.btn) { color: var(--on-navy); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem;
  font-size: 0.875rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline; }
.site-footer p { margin: 0; max-width: none; }
.site-footer .tagline { font-family: var(--display); font-style: italic; color: var(--ink); }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }
.site-footer a { color: var(--body); }
.site-footer a:hover { color: var(--red-deep); }
.site-footer .colophon { margin-left: auto; }
