/* =========================================================================
   USCare Quotes — main.css
   Single stylesheet, custom-property driven. No external fonts/CDNs, no
   frameworks. Mobile-first; breakpoints at 480 / 768 / 1024 / 1280.

   Gold-usage rule (audited across every section below):
     gold-500  fills, borders (>=2px), icon shapes, CTA backgrounds — never
               text or hairline rules on a light/paper background.
     gold-600  the only gold permitted for TEXT or thin (1px) strokes on a
               light background (~4.8:1 on white).
     gold-400  hover state / accent color when already on a dark background.
   Same contrast discipline applied to "muted" text: ink-600 is for muted
   text on PAPER only. On navy-900 backgrounds, muted text uses paper at
   reduced opacity instead of ink-600, which would be near-invisible on navy.

   Sections:
     1. Design tokens (:root)
     2. Reset / base typography
     3. Layout primitives
     4. Buttons & form controls
     5. Header
     6. Hero + questionnaire card
     7. How-it-works band
     8. Coverage section
     9. Comparison table
    10. FAQ accordions
    11. Trust/disclosure band
    12. Secondary CTA band
    13. Footer
    14. Legal page layout partial
    15. Utility / focus / motion
    16. Media queries
   ========================================================================= */

:root {
  /* ---- Brand color tokens (reference these everywhere; never hardcode hex) ---- */
  --navy-900: #0B1F3A; /* primary background, headers, footer */
  --navy-700: #16355C; /* section backgrounds, cards on dark */
  --navy-500: #24548C; /* links, secondary buttons */
  --gold-500: #C9A227; /* fills, borders, icons, CTA backgrounds. NEVER text on light bg */
  --gold-600: #8C6D14; /* the ONLY gold for text or thin strokes on light backgrounds (~4.8:1 on white) */
  --gold-400: #E0BE4A; /* hover state, dark-background accent */
  --gold-100: #FAF3DC; /* soft section background */
  --ink-900:  #10161F; /* body text on light */
  --ink-600:  #4A5568; /* muted text on PAPER only */
  --paper:    #FFFFFF;
  --success:  #1E7A4B;
  --error:    #B3261E;

  /* muted text on navy backgrounds — ink-600 is unreadable on navy-900 */
  --on-navy-muted: rgba(255, 255, 255, 0.78);
  --on-navy-faint: rgba(255, 255, 255, 0.55);
  --on-navy-border: rgba(255, 255, 255, 0.22);

  /* ---- Typography tokens ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
               sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-size-base: 18px;
  --font-size-body: 20px;
  --font-size-small: 16px;
  --font-size-fineprint: 15px;
  --line-height-body: 1.6;
  --measure-max: 68ch;

  /* ---- Spacing scale ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ---- Sizing tokens (accessibility minimums) ---- */
  --tap-target-min: 48px;
  --input-height-min: 56px;
  --button-height-primary: 60px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Focus ring ---- */
  --focus-ring-width: 3px;
  --focus-ring-color: var(--gold-400);
  --focus-ring-offset: 2px;

  /* ---- Elevation ---- */
  --shadow-card: 0 12px 32px rgba(11, 31, 58, 0.18);
  --shadow-card-sm: 0 4px 12px rgba(11, 31, 58, 0.12);

  /* ---- Motion ---- */
  --transition-step: 200ms ease;
}

/* =========================================================================
   2. Reset / base typography
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--font-size-base); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--ink-900);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; margin: 0 0 var(--space-4); text-wrap: balance; }
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: clamp(21px, 2.2vw, 26px); }
p { margin: 0 0 var(--space-4); max-width: var(--measure-max); }
a { color: var(--navy-500); text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
ul, ol { padding-left: 1.2em; }
button { font-family: inherit; }

/* =========================================================================
   3. Layout primitives
   ========================================================================= */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-5);
}
main:focus { outline: none; }
section { padding-block: var(--space-7); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--paper);
  color: var(--navy-900);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 100;
  transition: top var(--transition-step);
}
.skip-link:focus { top: var(--space-4); }

/* =========================================================================
   4. Buttons & form controls
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-target-min);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}
.btn-primary:hover { background: var(--gold-400); border-color: var(--gold-400); }

.btn-outline-on-navy {
  background: transparent;
  border-color: var(--gold-500);
  color: var(--paper);
}
.btn-outline-on-navy:hover { background: var(--gold-500); color: var(--navy-900); }

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

.btn-submit {
  width: 100%;
  min-height: var(--button-height-primary);
  background: var(--gold-500);
  border: 2px solid var(--gold-500);
  color: var(--navy-900);
  border-radius: var(--radius-md);
  font-size: 21px;
  font-weight: 800;
}
.btn-submit:hover { background: var(--gold-400); border-color: var(--gold-400); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.field { margin-bottom: var(--space-5); }
.field > label {
  display: block;
  font-weight: 700;
  font-size: var(--font-size-small);
  margin-bottom: var(--space-2);
  color: var(--ink-900);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select {
  width: 100%;
  min-height: var(--input-height-min);
  font-size: 20px;
  padding: var(--space-3) var(--space-4);
  border: 2px solid #C7CDD6;
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink-900);
}
.field input:invalid[aria-invalid="true"],
.field select:invalid[aria-invalid="true"] { border-color: var(--error); }
.field-hint { font-size: var(--font-size-small); color: var(--ink-600); margin-top: var(--space-2); }
.field-error {
  font-size: var(--font-size-small);
  color: var(--error);
  margin-top: var(--space-2);
  font-weight: 700;
  min-height: 1.2em;
}
.field-row { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }

fieldset { border: none; margin: 0 0 var(--space-6); padding: 0; }
fieldset legend {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: var(--space-4);
  padding: 0;
}
fieldset .legend-hint {
  display: block;
  font-size: var(--font-size-small);
  font-weight: 400;
  color: var(--ink-600);
  margin-top: var(--space-1);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.choice-grid li { margin: 0; }
.choice-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: var(--tap-target-min);
  padding: var(--space-3) var(--space-3);
  border: 2px solid #C7CDD6;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}
.choice-input:checked + .choice-label {
  border-color: var(--navy-900);
  background: var(--gold-100);
  color: var(--navy-900);
}
.choice-input:focus-visible + .choice-label {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================================================
   5. Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  border-bottom: 1px solid var(--on-navy-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.logo-link { display: flex; align-items: center; min-height: var(--tap-target-min); }
.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}
.header-phone .phone-hours {
  font-size: 14px;
  color: var(--on-navy-muted);
}

/* =========================================================================
   6. Hero + questionnaire card
   ========================================================================= */
.hero { background: var(--navy-900); color: var(--paper); padding-block: var(--space-7); }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}
.hero__form-col { order: 1; }
.hero__copy { order: 2; }

.hero__eyebrow {
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}
.hero__subhead { font-size: var(--font-size-body); color: var(--on-navy-muted); }
.hero__bullets {
  list-style: none;
  margin: var(--space-5) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.hero__bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-body);
}
.hero__bullets svg { flex-shrink: 0; margin-top: 4px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--on-navy-border);
}
.trust-row__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-small);
  color: var(--on-navy-muted);
}

.quote-card {
  background: var(--paper);
  color: var(--ink-900);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}
.quote-card__intro {
  font-size: var(--font-size-small);
  color: var(--ink-600);
  margin-bottom: var(--space-4);
}

.step-indicator {
  list-style: none;
  display: flex;
  gap: var(--space-2);
  padding: 0;
  margin: 0 0 var(--space-5);
}
.step-indicator li {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-600);
  padding-bottom: var(--space-2);
  border-bottom: 4px solid #E4E7EC;
}
.step-indicator li[aria-current="step"] {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
}
.step-indicator li.is-complete {
  color: var(--navy-500);
  border-bottom-color: var(--navy-500);
}

.form-step[hidden] { display: none; }
.form-step { animation: step-fade var(--transition-step); }
@keyframes step-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.form-nav .btn { flex: 1; }
.form-nav.form-nav--single { justify-content: flex-end; }

.consent-block {
  font-size: var(--font-size-fineprint);
  line-height: 1.6;
  color: var(--ink-600);
  background: #F7F8FA;
  border: 1px solid #E4E7EC;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-5) 0;
}
.consent-block a { color: var(--navy-500); }
.consent-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.consent-checkbox-row input[type="checkbox"] {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--navy-900);
}
.consent-checkbox-row label { font-size: var(--font-size-small); font-weight: 700; }

/* =========================================================================
   7. How-it-works band
   ========================================================================= */
.how-it-works { background: var(--gold-100); }
.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
  counter-reset: step;
}
.how-step { text-align: left; }
.how-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

/* =========================================================================
   8. Coverage section
   ========================================================================= */
.coverage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0 0;
}
.coverage-item__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  color: var(--navy-500);
}

/* =========================================================================
   9. Comparison table
   ========================================================================= */
.compare-wrap { overflow-x: auto; margin-top: var(--space-6); }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
.compare-table caption { text-align: left; font-weight: 700; margin-bottom: var(--space-3); }
.compare-table th, .compare-table td {
  text-align: left;
  padding: var(--space-4);
  border: 1px solid #E4E7EC;
  font-size: var(--font-size-small);
}
.compare-table thead th { background: var(--navy-900); color: var(--paper); }
.compare-table tbody th { background: #F7F8FA; }

@media (max-width: 767px) {
  .compare-table, .compare-table thead, .compare-table tbody,
  .compare-table th, .compare-table td, .compare-table tr { display: block; }
  .compare-table { min-width: 0; }
  .compare-table thead { position: absolute; left: -9999px; top: -9999px; }
  .compare-table tbody tr {
    border: 1px solid #E4E7EC;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
  }
  .compare-table td, .compare-table tbody th {
    border: none;
    padding: var(--space-2) 0;
    background: transparent;
  }
  .compare-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-600);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }
}

/* =========================================================================
   10. FAQ accordions
   ========================================================================= */
.faq-list { margin-top: var(--space-6); }
.faq-item {
  border-bottom: 1px solid #E4E7EC;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-8) var(--space-4) 0;
  font-weight: 700;
  font-size: 20px;
  position: relative;
  min-height: var(--tap-target-min);
  display: flex;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 400;
  color: var(--gold-600);
  line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: var(--space-4); color: var(--ink-600); }

/* =========================================================================
   11. Trust/disclosure band
   ========================================================================= */
.disclosure-band { background: var(--navy-700); color: var(--on-navy-muted); }
.disclosure-band h2 { color: var(--paper); }
.disclosure-band p { max-width: 80ch; font-size: var(--font-size-small); }

/* =========================================================================
   12. Secondary CTA band
   ========================================================================= */
.cta-band {
  background: var(--navy-900);
  color: var(--paper);
  text-align: center;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-5);
}

/* =========================================================================
   13. Footer
   ========================================================================= */
.site-footer { background: var(--navy-900); color: var(--on-navy-muted); }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--gold-400); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-block: var(--space-7);
}
.footer-legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-disclosure {
  font-size: var(--font-size-small);
  color: var(--on-navy-faint);
  border-top: 1px solid var(--on-navy-border);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
}

/* =========================================================================
   14. Legal page layout partial
   ========================================================================= */
.legal-main { padding-block: var(--space-7); }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { margin-top: var(--space-7); }
.legal-content h3 { margin-top: var(--space-5); }
.legal-content ul { color: var(--ink-900); }
.legal-updated { color: var(--ink-600); font-size: var(--font-size-small); margin-bottom: var(--space-6); }
.legal-back-link { display: inline-block; margin-bottom: var(--space-5); }

/* =========================================================================
   15. Utility / focus / motion
   ========================================================================= */
.u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

@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;
  }
}

/* =========================================================================
   16. Media queries
   ========================================================================= */
@media (min-width: 480px) {
  .choice-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (min-width: 768px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .coverage-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.22fr 1fr; }
  .hero__copy { order: 1; }
  .hero__form-col { order: 2; }
  .coverage-grid { grid-template-columns: repeat(4, 1fr); }
  .cta-band__actions { flex-wrap: nowrap; }
}

@media (min-width: 1280px) {
  .container { padding-inline: var(--space-6); }
}
