/* PORT AZUR preview palette layer
   One HTML/CSS base, theme selected by html[data-theme].
   /test-v2/ -> blue, /test-v3/ -> gold via theme-init.js
*/

:root,
html[data-theme="blue"]{
  --brand-primary:#2B6DAA;
  --brand-primary-hover:#68A5D7;
  --brand-primary-deep:#174D79;
  --brand-primary-soft:rgba(43,109,170,.16);
  --brand-secondary:#D3A247;
  --brand-secondary-hover:#E1B45F;
  --brand-secondary-deep:#A97724;

  /* compatibility aliases used by the current layout */
  --pa-gold:var(--brand-primary);
  --pa-gold-hover:var(--brand-primary-hover);
  --pa-gold-deep:var(--brand-primary-deep);
  --pa-blue-secondary:var(--brand-secondary);
  --pa-blue-secondary-light:var(--brand-secondary-hover);
  --pa-brand-blue:var(--brand-primary);
  --pa-brand-blue-hover:var(--brand-primary-hover);
  --pa-brand-blue-active:var(--brand-primary-deep);
  --pa-brand-blue-bright:var(--brand-primary);
  --pa-brand-blue-soft:var(--brand-primary-soft);
  --pa-brand-copper:var(--brand-secondary);
  --orange:var(--brand-primary);
  --orange-2:var(--brand-primary-hover);
  --blue:var(--brand-primary);
  --blue-2:var(--brand-primary-hover);
}

html[data-theme="gold"]{
  --brand-primary:#D3A247;
  --brand-primary-hover:#E1B45F;
  --brand-primary-deep:#A97724;
  --brand-primary-soft:rgba(211,162,71,.16);
  --brand-secondary:#2B6DAA;
  --brand-secondary-hover:#68A5D7;
  --brand-secondary-deep:#174D79;

  --pa-gold:var(--brand-primary);
  --pa-gold-hover:var(--brand-primary-hover);
  --pa-gold-deep:var(--brand-primary-deep);
  --pa-blue-secondary:var(--brand-secondary);
  --pa-blue-secondary-light:var(--brand-secondary-hover);
  --pa-brand-blue:var(--brand-primary);
  --pa-brand-blue-hover:var(--brand-primary-hover);
  --pa-brand-blue-active:var(--brand-primary-deep);
  --pa-brand-blue-bright:var(--brand-primary);
  --pa-brand-blue-soft:var(--brand-primary-soft);
  --pa-brand-copper:var(--brand-secondary);
  --orange:var(--brand-primary);
  --orange-2:var(--brand-primary-hover);
  --blue:var(--brand-primary);
  --blue-2:var(--brand-primary-hover);
}

/* final semantic overrides: layout must not care which palette is active */
::selection{background:var(--brand-primary)!important;color:#fff!important}
.hero-accent,
.semantic-accent,
.inner-hero h1 .semantic-accent,
.page-hero h1 .semantic-accent,
.home-hero-copy h1 .hero-accent,
.kicker,.section-code,.process-row .num,.entry-index,.step-num,
.company-asset-index,.service-index,.company-v3-label,
.company-v3-block-head>span,.company-v3-brandline{
  color:var(--brand-primary)!important;
}
.eyebrow:before{background:var(--brand-primary)!important}
.site-header .brand-founded{color:#fff!important}
.site-header .brand-production{color:var(--brand-primary)!important}
.site-header .brand-products{color:#a9b5bd!important}
.site-nav a:hover,
.site-nav a[aria-current="page"],
.nav-tools.is-current>.nav-tools-parent{color:var(--brand-primary)!important}
.nav-tools.is-current>.nav-tools-parent::after{background:var(--brand-primary)!important}

.btn.primary{
  background:var(--brand-primary)!important;
  border-color:var(--brand-primary)!important;
  color:#fff!important;
}
html[data-theme="gold"] .btn.primary{color:#111!important}
.btn.primary:hover{
  background:var(--brand-primary-hover)!important;
  border-color:var(--brand-primary-hover)!important;
}
.btn.secondary{
  background:#fff!important;
  border-color:var(--brand-primary)!important;
  color:var(--brand-primary-deep)!important;
}
.btn.secondary:hover{
  background:var(--brand-primary)!important;
  border-color:var(--brand-primary)!important;
  color:#fff!important;
}
html[data-theme="gold"] .btn.secondary{
  color:var(--brand-primary-deep)!important;
}
html[data-theme="gold"] .btn.secondary:hover{
  color:#111!important;
}

.text-link,.company-asset-link,.directory-card-link,.subtle-tool-link,
.mass-result a,.service-specs span{
  color:var(--brand-secondary)!important;
}
html[data-theme="blue"] .text-link,
html[data-theme="blue"] .company-asset-link,
html[data-theme="blue"] .directory-card-link,
html[data-theme="blue"] .subtle-tool-link,
html[data-theme="blue"] .mass-result a,
html[data-theme="blue"] .service-specs span{
  color:var(--brand-primary)!important;
}

.hero-route:first-child{background:var(--brand-primary)!important}
.hero-route:first-child span{color:var(--brand-secondary)!important}
html[data-theme="gold"] .hero-route:first-child strong,
html[data-theme="gold"] .hero-route:first-child b{color:#111!important}
html[data-theme="gold"] .hero-route:first-child span{color:#111!important;opacity:.62}
.hero-route:last-child span{color:var(--brand-primary)!important}
.hero-route:last-child b{color:var(--brand-secondary-hover)!important}
.hero-route:hover{background:var(--brand-primary-hover)!important}
.hero-route:hover::after{background:var(--brand-secondary)!important}

.company-v3-metric strong{color:var(--brand-primary-deep)!important}
.company-v3-list li::marker{color:var(--brand-primary-deep)!important}
.company-v3-law-tags span{
  border-color:color-mix(in srgb,var(--brand-primary) 58%,#fff)!important;
  color:var(--brand-primary-deep)!important;
}
.company-v3-cta span,
.enterprise-card-copy span{color:var(--brand-primary-deep)!important}

.nav-tools-menu{
  border-color:color-mix(in srgb,var(--brand-primary) 50%,transparent)!important;
}
.nav-tools-menu a:hover,
.nav-tools-menu a[aria-current="page"]{
  background:color-mix(in srgb,var(--brand-primary) 12%,transparent)!important;
  border-color:color-mix(in srgb,var(--brand-primary) 34%,transparent)!important;
  color:var(--brand-primary-hover)!important;
}

:where(a,button,input,textarea,select,summary,[tabindex]):focus-visible{
  outline-color:var(--brand-primary)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-primary) 25%,transparent)!important;
}


/* TEST_V2_BLUE_HERO_ROUTES
   Blue preview keeps both primary hero routes visibly blue. */
html[data-theme="blue"] .hero-route:first-child,
html[data-theme="blue"] .hero-route:last-child{
  background:var(--brand-primary)!important;
  border-color:color-mix(in srgb,var(--brand-primary-hover) 45%,transparent)!important;
}
html[data-theme="blue"] .hero-route:hover{
  background:var(--brand-primary-hover)!important;
}


/* =========================================================
   TEST V4 / Stage 2 unified palette
   Blue sampled from supplied client references:
   median accent ≈ RGB(1,111,247)
   PORT_AZUR_STAGE2_UNIFIED_PALETTE_20260929
   ========================================================= */
html[data-theme="stage2"]{
  --brand-primary:#006FF7;
  --brand-primary-hover:#1788FF;
  --brand-primary-deep:#0057C7;
  --brand-primary-soft:rgba(0,111,247,.16);

  --brand-secondary:#006FF7;
  --brand-secondary-hover:#1788FF;
  --brand-secondary-deep:#0057C7;

  --pa-gold:var(--brand-primary);
  --pa-gold-hover:var(--brand-primary-hover);
  --pa-gold-deep:var(--brand-primary-deep);
  --pa-blue-secondary:var(--brand-primary);
  --pa-blue-secondary-light:var(--brand-primary-hover);
  --pa-brand-blue:var(--brand-primary);
  --pa-brand-blue-hover:var(--brand-primary-hover);
  --pa-brand-blue-active:var(--brand-primary-deep);
  --pa-brand-blue-bright:var(--brand-primary);
  --pa-brand-blue-soft:var(--brand-primary-soft);
  --pa-brand-copper:var(--brand-primary);

  --orange:var(--brand-primary);
  --orange-2:var(--brand-primary-hover);
  --blue:var(--brand-primary);
  --blue-2:var(--brand-primary-hover);
}

html[data-theme="stage2"] .hero-accent,
html[data-theme="stage2"] .semantic-accent,
html[data-theme="stage2"] .inner-hero h1 .semantic-accent,
html[data-theme="stage2"] .page-hero h1 .semantic-accent,
html[data-theme="stage2"] .home-hero-copy h1 .hero-accent,
html[data-theme="stage2"] .kicker,
html[data-theme="stage2"] .section-code,
html[data-theme="stage2"] .process-row .num,
html[data-theme="stage2"] .entry-index,
html[data-theme="stage2"] .step-num,
html[data-theme="stage2"] .company-asset-index,
html[data-theme="stage2"] .service-index,
html[data-theme="stage2"] .company-v3-label,
html[data-theme="stage2"] .company-v3-block-head>span,
html[data-theme="stage2"] .company-v3-brandline{
  color:#006FF7!important;
}

html[data-theme="stage2"] .btn.primary{
  background:#006FF7!important;
  border-color:#006FF7!important;
  color:#fff!important;
}
html[data-theme="stage2"] .btn.primary:hover{
  background:#1788FF!important;
  border-color:#1788FF!important;
}
html[data-theme="stage2"] .btn.secondary{
  background:#fff!important;
  border-color:#006FF7!important;
  color:#0057C7!important;
}
html[data-theme="stage2"] .btn.secondary:hover{
  background:#006FF7!important;
  color:#fff!important;
}

html[data-theme="stage2"] .text-link,
html[data-theme="stage2"] .company-asset-link,
html[data-theme="stage2"] .directory-card-link,
html[data-theme="stage2"] .subtle-tool-link,
html[data-theme="stage2"] .mass-result a,
html[data-theme="stage2"] .service-specs span{
  color:#006FF7!important;
}
