/* Inner-pages header styling: always-fixed header that condenses into a solid
   bar once scrolled, plus page-declared tone (data-header-tone) and scrim.
   Loaded ONLY by projects / project / estudio / servicios — never by the home,
   whose header lives as cloned per-project layers in script.js. */

/* The header is fixed (inherits position: fixed from the shared bibo-header.css)
   and shown in the hero zone. Below the fold it hides while scrolling DOWN and
   slides back in (as the red condensed bar) while scrolling UP — so the red is
   only ever seen on the way up. Morph + slide + fade are all animated. */
.site-head {
  transition:
    transform 240ms var(--bibo-header-ease),
    opacity 180ms ease,
    inset 260ms var(--bibo-header-ease),
    min-height 260ms var(--bibo-header-ease),
    padding 260ms var(--bibo-header-ease),
    font-size 260ms var(--bibo-header-ease),
    color 200ms ease;
}

/* Hidden (scrolling down): slide fully off-screen, incl. the top inset, + fade. */
.site-head.is-hidden-on-scroll {
  transform: translate3d(0, calc(-100% - 28px), 0) !important;
  opacity: 0 !important;
  pointer-events: none;
}

body.is-enquiry-open .site-head {
  transform: translate3d(0, calc(-100% - 28px), 0) !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Condensed: the compact bar pinned to the top once scrolled (stays put). */
.site-head.is-condensed {
  inset: 0 0 auto;
  min-height: 58px;
  padding: 0 clamp(16px, 1.6vw, 30px);
  font-size: 10px;
}

.site-head.is-condensed .brand {
  width: 52px;
  /* Optical nudge: the wordmark is top-heavy (big BIBO over a thin ESTUDIO line). */
  transform: translateY(3px);
}

/* Solid fill on the condensed bar so it's readable over page content. */
.site-head.is-scrolled {
  background: var(--bibo-header-red);
}

/* Page-declared tone (sections marked data-header-tone="dark|light"). */
.site-head.is-over-light {
  color: var(--bibo-header-ink);
}

.site-head.is-over-light .brand img,
.site-head:not(.is-over-light):not(.site-head--layer) .brand img {
  filter: var(--bibo-logo-filter);
}

/* Scrim pseudo-elements stay disabled on inner pages. */
.site-head--scrim::before,
.site-head--scrim::after {
  display: none;
}
