/* Undernet global visual system, P0.1-P0.5 */
:root{
  --udc-canvas:#1b1b1b;
  --udc-surface:#242424;
  --udc-card:#303030;
  --udc-elevated:#474747;
  --udc-line:#565656;
  --udc-text:#f4f4f4;
  --udc-muted:#d0d0d0;
  --udc-orange:#ef7d00;
  --udc-orange-hover:#ff981f;
  --udc-page-h1:clamp(2.65rem,4vw,3.5rem);
}

html,body{background:var(--udc-canvas)!important;color:var(--udc-text)!important}
main,#contenido{background:var(--udc-canvas)!important}

/* P0.2: sections no longer alternate arbitrary dark hues. */
section,.section,.section:nth-of-type(odd),.section:nth-of-type(even),
.section-white,.bg-white{background:var(--udc-canvas)!important;border-color:var(--udc-line)!important}
.alt-section,.section-alt,.light-section,.bg-light{background:var(--udc-surface)!important;border-color:var(--udc-line)!important}

/* Override page-specific pilots that previously introduced navy/brown section palettes. */
main#contenido > section.section,
main#contenido > section.section:not(.service-editorial):not(.section-orange-soft):not(.section-soft):not(.cta-section){
  background:var(--udc-canvas)!important;
  border-color:var(--udc-line)!important;
}
main#contenido > section.section.service-editorial,
main#contenido > section.section.section-soft,
main#contenido > section.section.section-orange-soft,
main#contenido > section.alt-section,
main#contenido > section.section-alt{
  background:var(--udc-surface)!important;
  border-color:var(--udc-line)!important;
}

/* P0.3: one neutral global header. */
header,.site-header,.main-header,.header-v2{
  background:var(--udc-canvas)!important;
  border-bottom:1px solid var(--udc-line)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.20)!important;
}
header .logo,.site-header .logo,.main-header .logo,.header-v2 .logo,
.brand-area,.site-branding{background:none!important}

/* P0.4: restrained, neutral interior-page hero. */
.hero,.hero-section,.page-hero,
main#contenido > section.page-hero{
  background:var(--udc-canvas)!important;
  border-bottom:1px solid var(--udc-line)!important;
  color:var(--udc-text)!important;
  padding-top:3rem!important;
  padding-bottom:3rem!important;
}
.hero::before,.hero::after,
.hero-section::before,.hero-section::after,
.page-hero::before,.page-hero::after,
main#contenido > section.page-hero::before,
main#contenido > section.page-hero::after{display:none!important}
.hero h1,.hero-section h1,.page-hero h1,
main#contenido > section.page-hero h1{
  max-width:900px;
  font-size:var(--udc-page-h1)!important;
  line-height:1.06!important;
  letter-spacing:-.035em!important;
  color:#fff!important;
  text-shadow:none!important;
}
.hero p,.hero-section p,.page-hero p,.page-lead,.hero-lead{color:var(--udc-muted)!important}
.eyebrow,.kicker,.overline{color:var(--udc-orange)!important}

/* Shared surfaces. Component-specific layout remains untouched. */
.card,.service-card,.services-card,.feature-card,.info-card,.standard-card,
.value-card,.highlight-card,.home-card{
  background:var(--udc-card)!important;
  border-color:var(--udc-line)!important;
  color:var(--udc-text)!important;
}
.card p,.service-card p,.feature-card p,.info-card p{color:var(--udc-muted)!important}

/* Areas de Experiencia: map the legacy navy palette to the global system.
   Photographic hero/CTA overlays remain intact because they serve image legibility. */
.ae-section-intro,.ae-detail,.ae-detail-alt,.ae-services{
  background:var(--udc-canvas)!important;
  border-color:var(--udc-line)!important;
}
.ae-area-card,.ae-framework,.ae-info-card{
  background:var(--udc-card)!important;
  border-color:var(--udc-line)!important;
  color:var(--udc-text)!important;
}
.ae-area-card:hover,.ae-area-card:focus-visible{
  background:var(--udc-elevated)!important;
  border-color:var(--udc-orange)!important;
}
.ae-relation-card{
  background:var(--udc-card)!important;
  border-left-color:var(--udc-orange)!important;
}
.ae-area-card-vial::before,.ae-area-card-vial::after{
  /* Preserve the intentional photographic Seguridad Vial treatment. */
  background-color:transparent;
}

/* Shared footer: same surface everywhere, with tighter vertical rhythm. */
footer,.site-footer,.footer-v2{
  background:var(--udc-surface)!important;
  border-top-color:var(--udc-line)!important;
  color:var(--udc-muted)!important;
}
.site-footer{
  padding-top:2.75rem!important;
  padding-bottom:1.25rem!important;
}
.site-footer .footer-bottom{
  margin-top:2rem!important;
  padding-top:1rem!important;
}

/* P0.5: mobile scale and density. */
@media(max-width:900px){
  :root{--udc-page-h1:clamp(2.25rem,9vw,2.65rem)}
  .hero,.hero-section,.page-hero,main#contenido > section.page-hero{
    padding-top:2.65rem!important;
    padding-bottom:2.65rem!important;
  }
  .site-footer{padding-top:2.25rem!important}
  .site-footer .footer-bottom{margin-top:1.5rem!important}
}
@media(max-width:620px){
  :root{--udc-page-h1:clamp(2.15rem,10vw,2.45rem)}
  .hero,.hero-section,.page-hero,main#contenido > section.page-hero{
    padding-top:2.25rem!important;
    padding-bottom:2.25rem!important;
  }
  .hero-lead,.page-lead{font-size:1.05rem!important}
  .site-footer{padding-top:2rem!important;padding-bottom:1rem!important}
}
