/* ============================================================
   HomeProp Intelligence — Design Tokens v1.1
   Dual-surface accent system. All -onlight / -ondark values are
   text-grade: verified >= 4.5:1 WCAG AA against their surface.
   Base values are brand anchors: glyphs, large graphics, fills.
   Surfaces: light = /buy, /sell, tool pages (#FAFAF7 / #FFF)
             dark  = section 3 band, OCB, navy surfaces (#10233F)
   ============================================================ */

:root {
  /* ---- Neutrals / surfaces ---- */
  --hp-navy:        #10233F;  /* Harbor Navy — dark surface + primary text on light (15.0:1) */
  --hp-slate:       #44546A;  /* Channel Slate — secondary text on light */
  --hp-paper:       #FAFAF7;  /* light surface */
  --hp-white:       #FFFFFF;  /* text on dark (15.7:1) */

  /* ---- RentEstimator — Tide Teal ---- */
  --hp-rentestimator:          #0E9689;  /* brand base */
  --hp-rentestimator-onlight:  #0B7568;  /* 5.3:1 on paper */
  --hp-rentestimator-ondark:   #2BBFB0;  /* 6.9:1 on navy  */

  /* ---- Predictive Pricing Engine — Signal Amber ---- */
  --hp-pricing:                #E28A0D;  /* brand base (5.9:1 on navy — dark-safe as-is) */
  --hp-pricing-onlight:        #A36102;  /* 4.7:1 on paper */
  --hp-pricing-ondark:         #F0A73A;  /* 7.7:1 on navy  */

  /* ---- KOS — Deepwater Indigo ---- */
  --hp-kos:                    #5652CC;  /* brand base (5.8:1 on paper — light-safe as-is) */
  --hp-kos-onlight:            #5652CC;  /* base doubles as light text token */
  --hp-kos-ondark:             #918DF2;  /* 5.5:1 on navy — base FAILS on navy (2.6:1), never use base for dark text */

  /* ---- Natural-Language Search — Gulf Blue ---- */
  --hp-nlsearch:               #1E7FC2;  /* brand base */
  --hp-nlsearch-onlight:       #176BA6;  /* 5.4:1 on paper */
  --hp-nlsearch-ondark:        #4AA0DC;  /* 5.5:1 on navy  */

  /* ---- Hayden — Sunset Coral ---- */
  --hp-hayden:                 #E05A66;  /* brand base */
  --hp-hayden-onlight:         #C43B48;  /* 4.9:1 on paper */
  --hp-hayden-ondark:          #EC7B85;  /* 5.8:1 on navy  */

  /* ---- Site amendments (hp-brand Phase 2 consolidation) ----
     One token system, no orphans: values previously living only in
     build-homepage.php constants move here as the canonical source. */
  --hp-seam-bg:                #F5EFE3;  /* homepage S4 seam band (ARC-4.2 tint B, brand cream) */
}

/* ------------------------------------------------------------
   Surface-scoped mapping. Put data-surface on the band/section
   wrapper and consume the generic tokens below — components then
   work unchanged on both the dark band and light tool pages.
   ------------------------------------------------------------ */

[data-surface="light"] {
  --surface-bg:   var(--hp-paper);
  --text-primary: var(--hp-navy);
  --text-second:  var(--hp-slate);
  --accent-rentestimator: var(--hp-rentestimator-onlight);
  --accent-pricing:       var(--hp-pricing-onlight);
  --accent-kos:           var(--hp-kos-onlight);
  --accent-nlsearch:      var(--hp-nlsearch-onlight);
  --accent-hayden:        var(--hp-hayden-onlight);
}

[data-surface="dark"] {
  --surface-bg:   var(--hp-navy);
  --text-primary: var(--hp-white);
  --text-second:  #9FB0C6;
  --accent-rentestimator: var(--hp-rentestimator-ondark);
  --accent-pricing:       var(--hp-pricing-ondark);
  --accent-kos:           var(--hp-kos-ondark);
  --accent-nlsearch:      var(--hp-nlsearch-ondark);
  --accent-hayden:        var(--hp-hayden-ondark);
}

/* Rules:
   1. Base tokens: glyphs, icon strokes, chart fills, big numerals only.
      (Non-text graphics need 3:1 — every base passes on both surfaces
       EXCEPT KOS indigo on navy: use --hp-kos-ondark for OCB glyphs.)
   2. -onlight / -ondark tokens: any text, link, label, or small icon.
   3. One accent per surface. Hayden coral may co-exist with exactly
      one tool accent when Hayden delivers that tool's output.
   4. Reading text is always navy-on-light or white-on-dark; accents
      label and signal, they never carry paragraphs.                  */
