/*
 * HirayaVA Collective — Home palette uniformity
 * Loaded last across the public site.
 *
 * The Home page is the palette reference:
 *   navy   #07162D
 *   ivory  #FBF7EE
 *   bronze #A66F12
 *
 * Interior pages retain their navy hero structure. Large editorial accents use
 * the exact Home bronze; small text and controls use ivory/navy for legibility.
 */

:root {
  --hiraya-navy: #07162d;
  --hiraya-navy-hover: #102b4d;
  --hiraya-ivory: #fbf7ee;
  --hiraya-paper: #fffdf8;
  --hiraya-bronze: #8a5c0f;
}

/* Do not override the already-approved Home hero treatment. */
body.hiraya-home {
  --hiraya-palette-reference: 1;
}

/* Exact Home bronze for large, editorial gold accents. */
body:not(.hiraya-home) :is(
  .hero,
  .v2-hero,
  .v2-page-hero,
  .p2-hero,
  .p3-service-hero,
  .p4-guide-hero,
  .growth-hero,
  .section-navy,
  .v2-navy,
  .growth-section.is-navy
) :is(h1, h2, h3) em {
  color: var(--hiraya-bronze) !important;
}

/* Kicker text is ivory on navy instead of appearing as a second yellow. */
body:not(.hiraya-home) :is(
  .hero,
  .v2-hero,
  .v2-page-hero,
  .p2-hero,
  .p3-service-hero,
  .p4-guide-hero,
  .growth-hero,
  .section-navy,
  .v2-navy,
  .growth-section.is-navy
) :is(.eyebrow, .v2-kicker, [class*="kicker"]) {
  color: var(--hiraya-ivory) !important;
}

/* Gold-filled CTAs on navy become ivory buttons, matching the Home page's
   restrained navy/ivory hierarchy without disappearing into the background. */
body:not(.hiraya-home) :is(
  .hero,
  .v2-hero,
  .v2-page-hero,
  .p2-hero,
  .p3-service-hero,
  .p4-guide-hero,
  .growth-hero,
  .section-navy,
  .v2-navy,
  .growth-section.is-navy
) :is(.button-gold, .v2-btn-gold, .growth-btn-primary, [class*="btn-primary"]) {
  background: var(--hiraya-ivory) !important;
  background-image: none !important;
  border-color: var(--hiraya-ivory) !important;
  color: var(--hiraya-navy) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16) !important;
}

body:not(.hiraya-home) :is(
  .hero,
  .v2-hero,
  .v2-page-hero,
  .p2-hero,
  .p3-service-hero,
  .p4-guide-hero,
  .growth-hero,
  .section-navy,
  .v2-navy,
  .growth-section.is-navy
) :is(.button-gold, .v2-btn-gold, .growth-btn-primary, [class*="btn-primary"]):is(:hover, :focus-visible) {
  background: var(--hiraya-paper) !important;
  border-color: var(--hiraya-paper) !important;
  color: var(--hiraya-navy-hover) !important;
}

/* Standard v2 navigation follows the Home header: ivory surface, navy type,
   navy discovery CTA. */
body:not(.hiraya-home) .v2-header {
  background: rgba(251, 247, 238, .97) !important;
  border-bottom-color: rgba(7, 22, 45, .12) !important;
  box-shadow: 0 8px 28px rgba(7, 22, 45, .06) !important;
}

body:not(.hiraya-home) .v2-header :is(.v2-brand, .v2-nav nav a, .v2-menu) {
  color: var(--hiraya-navy) !important;
}

body:not(.hiraya-home) .v2-header .v2-nav-cta {
  background: var(--hiraya-navy) !important;
  background-image: none !important;
  border-color: var(--hiraya-navy) !important;
  color: var(--hiraya-ivory) !important;
}

body:not(.hiraya-home) .v2-header .v2-nav-cta:is(:hover, :focus-visible) {
  background: var(--hiraya-navy-hover) !important;
  border-color: var(--hiraya-navy-hover) !important;
  color: #fff !important;
}

/* On ivory and white sections, primary actions use the same navy treatment as
   the Home-page hero buttons. */
body:not(.hiraya-home) :is(
  .v2-light,
  .v2-cream,
  .section-light,
  .section-ivory,
  .growth-section:not(.is-navy)
) :is(.button-gold, .v2-btn-gold, .growth-btn-primary, [class*="btn-primary"]) {
  background: var(--hiraya-navy) !important;
  background-image: none !important;
  border-color: var(--hiraya-navy) !important;
  color: var(--hiraya-ivory) !important;
}

body:not(.hiraya-home) :is(
  .v2-light,
  .v2-cream,
  .section-light,
  .section-ivory,
  .growth-section:not(.is-navy)
) :is(.button-gold, .v2-btn-gold, .growth-btn-primary, [class*="btn-primary"]):is(:hover, :focus-visible) {
  background: var(--hiraya-navy-hover) !important;
  border-color: var(--hiraya-navy-hover) !important;
  color: #fff !important;
}

/* Pale panels and cards use bronze only as a restrained editorial detail. */
body:not(.hiraya-home) :is(
  .v2-light,
  .v2-cream,
  .section-light,
  .section-ivory,
  .growth-section:not(.is-navy)
) :is(.eyebrow, .v2-kicker, [class*="kicker"], h1 em, h2 em, h3 em) {
  color: var(--hiraya-bronze) !important;
}

/* Decorative hero panels should not reintroduce bright yellow labels. */
body:not(.hiraya-home) :is(
  .p2-hero-panel,
  .p3-service-panel,
  .growth-hero-panel,
  .v2-floating-card
) :is(span, .v2-kicker, [class*="kicker"]) {
  color: var(--hiraya-ivory) !important;
}

/* Numbering and micro-accents inside navy sections use the same bronze as the
   hero headline, eliminating the remaining bright-yellow fragments. */
body:not(.hiraya-home) :is(.section-navy, .v2-navy, .growth-section.is-navy) :is(
  .v2-service-card b,
  .v2-service-card span,
  .p2-value-grid b,
  .p2-path-steps b,
  .p5-match-grid b,
  .p5-principle-list b,
  .seo-va-value-grid h3
) {
  color: var(--hiraya-bronze) !important;
}

body:not(.hiraya-home) .p2-hero::after {
  border-color: rgba(166, 111, 18, .38) !important;
  box-shadow:
    0 0 0 70px rgba(166, 111, 18, .075),
    0 0 0 140px rgba(166, 111, 18, .045) !important;
}

body:not(.hiraya-home) :is(.p2-hero-panel, .p3-service-panel, .growth-hero-panel) {
  border-color: rgba(166, 111, 18, .42) !important;
}

/* Use the same Home bronze for editorial links and underlines on light pages. */
body:not(.hiraya-home) :is(.v2-light, .v2-cream, .growth-section:not(.is-navy)) a:not(.v2-btn) {
  text-decoration-color: rgba(166, 111, 18, .58);
}

/* The concierge keeps the single approved Home gold instead of page variants. */
.hiraya-chat-root {
  --hc-gold: #e6b64c !important;
}

/* Mobile navigation inherits the same ivory/navy palette. No dimensions,
   spacing, or breakpoint behavior are changed here. */
@media (max-width: 820px) {
  body:not(.hiraya-home) .v2-header .v2-nav.open nav {
    background: var(--hiraya-ivory) !important;
    border-color: rgba(7, 22, 45, .12) !important;
  }

  body:not(.hiraya-home) .v2-header .v2-nav.open nav a {
    color: var(--hiraya-navy) !important;
  }
}
