/* ==========================================================================
   Q-Vision Solutions — design tokens
   Invisible Systems, Visible Outcomes
   Load before any layout CSS. Layout builds on these; never hardcode a hex.
   ========================================================================== */

:root {
  /* --- Core palette ------------------------------------------------------ */
  --qvs-navy:        #001F3F;  /* dominant: text, backgrounds, the unifying Q */
  --qvs-navy-deep:   #00152B;  /* footers, overlays */
  --qvs-teal:        #008080;  /* accent only: links, rules, data, waveform */
  --qvs-teal-light:  #5FD0D0;  /* on-navy accent text, hover */
  --qvs-teal-wash:   #EAF2F2;  /* emphasis callouts */
  --qvs-light-wash:  #F4F8F8;  /* section backgrounds */
  --qvs-ink:         #1A1A1A;  /* body copy on light */
  --qvs-grey:        #5A5A5A;  /* secondary text, captions */
  --qvs-rule:        #DDE6EC;  /* hairlines, table borders */
  --qvs-white:       #FFFFFF;

  /* --- The Four Qs ------------------------------------------------------- */
  --qvs-q1:          #228B22;  /* Community & Population Impact */
  --qvs-q2:          #000080;  /* Patient Experience */
  --qvs-q3:          #4B0082;  /* Provider Experience */
  --qvs-q4:          #FF4500;  /* Operational Excellence — FILL/ACCENT ONLY */
  --qvs-q4-text:     #C03A00;  /* AA-safe Q4 for text on light backgrounds */
  --qvs-q4-gold:     #FFD700;  /* Q4 secondary — decorative only */

  /* --- Type -------------------------------------------------------------- */
  --qvs-font-sans:   "Montserrat", -apple-system, BlinkMacSystemFont,
                     "Segoe UI", Arial, sans-serif;
  --qvs-font-body:   var(--qvs-font-sans);

  --qvs-text-xs:     0.8125rem;   /* 13px — captions, footnotes */
  --qvs-text-sm:     0.9375rem;   /* 15px — secondary */
  --qvs-text-base:   1.0625rem;   /* 17px — body */
  --qvs-text-lg:     1.25rem;     /* 20px — lead paragraphs */
  --qvs-text-xl:     1.5rem;      /* 24px — h3 */
  --qvs-text-2xl:    2rem;        /* 32px — h2 */
  --qvs-text-3xl:    2.75rem;     /* 44px — h1 */
  --qvs-text-hero:   2.5rem;      /* bumped at >=760px, see below */

  --qvs-leading-tight: 1.2;
  --qvs-leading-body:  1.65;
  --qvs-measure:       72ch;

  /* --- Space (8px base) --------------------------------------------------- */
  --qvs-space-1:  0.25rem;
  --qvs-space-2:  0.5rem;
  --qvs-space-3:  0.75rem;
  --qvs-space-4:  1rem;
  --qvs-space-6:  1.5rem;
  --qvs-space-8:  2rem;
  --qvs-space-12: 3rem;
  --qvs-space-16: 4rem;
  --qvs-space-24: 6rem;

  /* --- Structure ---------------------------------------------------------- */
  --qvs-container:   1140px;
  --qvs-radius:      4px;      /* restrained — this is an authority brand */
  --qvs-radius-lg:   8px;
  --qvs-shadow:      0 1px 3px rgba(0, 31, 63, 0.08),
                     0 8px 24px rgba(0, 31, 63, 0.06);
  --qvs-border:      1px solid var(--qvs-rule);
  --qvs-transition:  180ms ease;
}

/* --- Base ---------------------------------------------------------------- */

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

body {
  margin: 0;
  font-family: var(--qvs-font-body);
  font-size: var(--qvs-text-base);
  line-height: var(--qvs-leading-body);
  color: var(--qvs-ink);
  background: var(--qvs-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--qvs-font-sans);
  font-weight: 700;
  line-height: var(--qvs-leading-tight);
  color: var(--qvs-navy);
  margin: 0 0 var(--qvs-space-4);
  text-wrap: balance;
}

h1 { font-size: var(--qvs-text-3xl); }
h2 { font-size: var(--qvs-text-2xl); }
h3 { font-size: var(--qvs-text-xl); }

p { margin: 0 0 var(--qvs-space-4); max-width: var(--qvs-measure); }

a {
  color: var(--qvs-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--qvs-transition);
}
a:hover { color: var(--qvs-navy); }

/* Focus: visible always. Never remove without replacing. */
:focus-visible {
  outline: 3px solid var(--qvs-teal);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

/* --- Utilities ----------------------------------------------------------- */

.qvs-container {
  width: 100%;
  max-width: var(--qvs-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--qvs-space-6);
  padding-right: var(--qvs-space-6);
}

.qvs-section      { padding-top: var(--qvs-space-24);
  padding-bottom: var(--qvs-space-24); }
.qvs-section--wash{ background: var(--qvs-light-wash); }
.qvs-section--navy{ background: var(--qvs-navy); color: var(--qvs-white); }
.qvs-section--navy h1,
.qvs-section--navy h2,
.qvs-section--navy h3 { color: var(--qvs-white); }
.qvs-section--navy a  { color: var(--qvs-teal-light); }

.qvs-eyebrow {
  font-size: var(--qvs-text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qvs-teal);
  margin-bottom: var(--qvs-space-2);
}

.qvs-lead { font-size: var(--qvs-text-lg); color: var(--qvs-grey); }

/* Skip link — first focusable element on every page */
.qvs-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--qvs-navy);
  color: var(--qvs-white);
  padding: var(--qvs-space-3) var(--qvs-space-4);
  z-index: 100;
}
.qvs-skip:focus { left: var(--qvs-space-4); top: var(--qvs-space-4); }

/* Buttons */
.qvs-btn {
  display: inline-block;
  font-weight: 700;
  font-size: var(--qvs-text-base);
  padding: var(--qvs-space-3) var(--qvs-space-6);
  border-radius: var(--qvs-radius);
  text-decoration: none;
  min-height: 44px;              /* tap target floor */
  transition: background var(--qvs-transition), color var(--qvs-transition);
}
.qvs-btn--primary {
  background: var(--qvs-teal);
  color: var(--qvs-white);
}
.qvs-btn--primary:hover { background: var(--qvs-navy); color: var(--qvs-white); }
.qvs-btn--ghost {
  background: transparent;
  color: var(--qvs-navy);
  box-shadow: inset 0 0 0 2px var(--qvs-navy);
}
.qvs-btn--ghost:hover { background: var(--qvs-navy); color: var(--qvs-white); }

/* Q markers — color is never the only signal; always pair with the label */
.qvs-q { font-weight: 700; font-size: var(--qvs-text-sm); }
.qvs-q--1 { color: var(--qvs-q1); }
.qvs-q--2 { color: var(--qvs-q2); }
.qvs-q--3 { color: var(--qvs-q3); }
.qvs-q--4 { color: var(--qvs-q4-text); }

.qvs-section--navy .qvs-btn--primary {
  background: var(--qvs-teal-light);
  color: var(--qvs-navy-deep);
}
.qvs-section--navy .qvs-btn--primary:hover {
  background: var(--qvs-white);
  color: var(--qvs-navy-deep);
}
.qvs-section--navy .qvs-btn--ghost {
  color: var(--qvs-white);
  box-shadow: inset 0 0 0 2px var(--qvs-white);
}
.qvs-section--navy .qvs-btn--ghost:hover {
  background: var(--qvs-white);
  color: var(--qvs-navy-deep);
}

.qvs-card {
  background: var(--qvs-white);
  border: var(--qvs-border);
  border-radius: var(--qvs-radius-lg);
  padding: var(--qvs-space-6);
  box-shadow: var(--qvs-shadow);
}
.qvs-card--q1 { border-top: 4px solid var(--qvs-q1); }
.qvs-card--q2 { border-top: 4px solid var(--qvs-q2); }
.qvs-card--q3 { border-top: 4px solid var(--qvs-q3); }
.qvs-card--q4 { border-top: 4px solid var(--qvs-q4); }

.qvs-rule {
  border: 0;
  border-top: 2px solid var(--qvs-teal);
  width: 64px;
  margin: var(--qvs-space-6) 0;
}

.qvs-quote {
  border-left: 3px solid var(--qvs-teal);
  padding-left: var(--qvs-space-6);
  font-size: var(--qvs-text-lg);
  font-style: italic;
  color: var(--qvs-navy);
}

.qvs-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;
}

@media (min-width: 760px) {
  :root { --qvs-text-hero: 3.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Structural chrome — header, nav, hero, footer
   Included here so page-template.html renders correctly with tokens alone.
   Page-specific layout belongs in site.css, not this file.
   ========================================================================== */

.qvs-header {
  border-bottom: var(--qvs-border);
  background: var(--qvs-white);
  position: sticky;
  top: 0;
  z-index: 50;
}

.qvs-header__inner {
  display: flex;
  align-items: center;
  gap: var(--qvs-space-6);
  padding-top: var(--qvs-space-4);
  padding-bottom: var(--qvs-space-4);
  flex-wrap: wrap;
}

.qvs-header__logo { line-height: 0; margin-right: auto; }
.qvs-header__logo img { display: block; height: 40px; width: auto; }

.qvs-nav__list {
  display: flex;
  gap: var(--qvs-space-6);
  /* fallback for engines without flex gap */
  margin-right: calc(var(--qvs-space-6) * -1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.qvs-nav__list > li { margin-right: var(--qvs-space-6); }
@supports (gap: 1rem) {
  .qvs-nav__list { margin-right: 0; }
  .qvs-nav__list > li { margin-right: 0; }
}

.qvs-nav__list a {
  color: var(--qvs-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--qvs-text-sm);
  padding-top: var(--qvs-space-2);
  padding-bottom: var(--qvs-space-2);
}
.qvs-nav__list a:hover { color: var(--qvs-teal); text-decoration: underline; }

.qvs-hero { padding-top: var(--qvs-space-24);
  padding-bottom: var(--qvs-space-16); }
.qvs-hero h1 { font-size: var(--qvs-text-hero); max-width: 18ch; }
.qvs-hero .qvs-lead { max-width: 60ch; margin-bottom: var(--qvs-space-8); }
.qvs-hero .qvs-btn + .qvs-btn { margin-left: var(--qvs-space-3); }

.qvs-footer {
  background: var(--qvs-navy-deep);
  color: var(--qvs-white);
  padding-top: var(--qvs-space-12);
  padding-bottom: var(--qvs-space-12);
}
.qvs-footer__tagline {
  color: var(--qvs-teal-light);
  font-weight: 700;
  font-size: var(--qvs-text-lg);
  margin-bottom: var(--qvs-space-6);
}
.qvs-footer__links {
  display: flex;
  gap: var(--qvs-space-6);
  list-style: none;
  margin: 0 0 var(--qvs-space-6);
  padding: 0;
  flex-wrap: wrap;
}
.qvs-footer__links > li { margin-right: var(--qvs-space-6); }
@supports (gap: 1rem) {
  .qvs-footer__links > li { margin-right: 0; }
}
.qvs-footer__links a { color: var(--qvs-white); text-decoration: none; }
.qvs-footer__links a:hover { color: var(--qvs-teal-light); text-decoration: underline; }
.qvs-footer__legal {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--qvs-text-sm);
  margin: 0;
}

@media (max-width: 720px) {
  .qvs-header__inner { gap: var(--qvs-space-4); }
  .qvs-header__cta { display: none; }   /* CTA repeats in the hero on mobile */
  .qvs-section { padding-top: var(--qvs-space-16);
  padding-bottom: var(--qvs-space-16); }
  .qvs-hero .qvs-btn { display: block; text-align: center; }
  .qvs-hero .qvs-btn + .qvs-btn { margin-left: 0; margin-top: var(--qvs-space-3); }
}
