/* Sierra Medical Supply — site styles.
   Single stylesheet, no build step. Matches the rev2 convention: files on disk
   are files on the wire. Brand tokens are defined once here; change them in one
   place and the whole site follows. */

:root {
  --ground:       #F5F8F6;
  --surface:      #FFFFFF;
  --surface-sunk: #E9F0EC;
  --border:       #D5E0DA;

  --ink:          #10201B;
  --ink-muted:    #4F6560;
  --ink-faint:    #7A8D87;

  /* Clinical: a calm, credible green-teal. Distinct from Cold Chain Meter blue. */
  --brand:        #1E6E5C;
  --brand-deep:   #14513F;
  --brand-soft:   #E2EFE9;
  --accent:       #2F8F8A;

  --warn:         #9A5A08;
  --ok:           #15694A;

  --shadow: 0 1px 2px rgba(14,27,36,.05), 0 6px 18px rgba(14,27,36,.06);

  --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:       #08150F;
    --surface:      #10231B;
    --surface-sunk: #0C1C15;
    --border:       #1F3A30;

    --ink:          #E5EFE9;
    --ink-muted:    #A0B8AE;
    --ink-faint:    #7D948B;

    --brand:        #6DC3A8;
    --brand-deep:   #9BD9C4;
    --brand-soft:   #12302A;
    --accent:       #55B9B2;

    --warn:         #D9A253;
    --ok:           #6BC49C;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.3);
  }
}

:root[data-theme="dark"] {
  --ground:       #08150F;
  --surface:      #10231B;
  --surface-sunk: #0C1C15;
  --border:       #1F3A30;

  --ink:          #E5EFE9;
  --ink-muted:    #A0B8AE;
  --ink-faint:    #7D948B;

  --brand:        #6DC3A8;
  --brand-deep:   #9BD9C4;
  --brand-soft:   #12302A;
  --accent:       #55B9B2;

  --warn:         #D9A253;
  --ok:           #6BC49C;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.3);
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--brand); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { letter-spacing: -.015em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5.2vw, 48px); line-height: 1.06; font-weight: 700; }
h2 { font-size: clamp(23px, 3vw, 31px); line-height: 1.15; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
p  { margin: 0 0 1em; max-width: 68ch; }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  margin: 0 0 12px;
}
.lede { font-size: 19px; color: var(--ink-muted); max-width: 60ch; }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 66px;
}
.brand {
  font-weight: 700; font-size: 18px; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px;
}
.brand .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
  flex: none;
}
.primary-nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.primary-nav a {
  color: var(--ink-muted); text-decoration: none; font-size: 15px; font-weight: 500;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--brand); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { padding: 68px 0 52px; }
.hero .lede { margin-bottom: 26px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 4px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { border-color: var(--border); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ── Sections ─────────────────────────────────────────────────────── */
section { padding: 52px 0; }
section.tint { background: var(--surface-sunk); border-block: 1px solid var(--border); }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint); display: block; margin-bottom: 9px;
}

/* Reference ranges — the numbers are the content, so set them as data */
.ranges { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); }
.ranges th, .ranges td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.ranges thead th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint); background: var(--surface-sunk);
}
.ranges td.temp { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranges tbody tr:last-child td { border-bottom: none; }
.scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }

.pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; padding: 3px 9px; border-radius: 3px;
  background: var(--brand-soft); color: var(--brand-deep);
}

/* ── Form ─────────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; max-width: 620px; }
.row-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 130px; resize: vertical; }
.req { color: var(--warn); }
.hint { font-size: 13.5px; color: var(--ink-faint); margin-top: 4px; }

/* Honeypot — must be reachable by bots, invisible and skipped for people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 34px 0; margin-top: 12px; font-size: 14.5px; color: var(--ink-muted);
}
.site-footer .cols { display: flex; gap: 32px; flex-wrap: wrap; align-items: baseline; }
.site-footer a { color: var(--ink-muted); }
.site-footer .legal { margin-left: auto; font-size: 13px; color: var(--ink-faint); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  .primary-nav { margin-left: 0; width: 100%; gap: 16px; }
  .hero { padding: 44px 0 36px; }
  .site-footer .legal { margin-left: 0; width: 100%; }
}

/* ── Contact form status ─────────────────────────────────────────────
   assets/js/contact.js sets `contact-form-status is-pending|is-success|is-error`
   on this element and writes the text. Without styling it still appears, but
   a failure reads the same as a success, which is the one distinction that
   has to be obvious. Colours come from the tokens above rather than new ones.  */
.contact-form-status               { margin: 0; font-size: .94rem; }
.contact-form-status:empty         { display: none; }
.contact-form-status.is-pending,
.contact-form-status.is-success,
.contact-form-status.is-error {
  border-radius: 8px;
  padding: .7rem .9rem;
  border: 1px solid var(--border);
  background: var(--surface-sunk);
}
.contact-form-status.is-pending    { color: var(--ink-muted); }
.contact-form-status.is-success    { color: var(--ok);   border-color: var(--ok);   background: #EAF5F0; }
.contact-form-status.is-error      { color: var(--warn); border-color: var(--warn); background: #FBF2E6; }
.contact-form-fallback             { margin: .5rem 0 0; font-size: .92rem; }
