/* v1.2.3 – Agency-only frosted navigation and harmonized liquid hero.
   Intentionally NO modifications to shared templates, controls or other routes. */
body:has(main.bb-agency-page) .wp-site-blocks{padding-top:0!important}
body:has(main.bb-agency-page){
  --bb-agency-fg:#f9fbff;
  --bb-agency-muted:rgba(244,247,255,.86);
  --bb-agency-soft:rgba(235,242,255,.68);
  --bb-agency-veil:linear-gradient(90deg,rgba(2,10,32,.95) 0%,rgba(3,13,36,.89) 31%,rgba(6,17,43,.69) 52%,rgba(6,18,45,.27) 78%,rgba(5,14,32,.09) 100%);
  --bb-agency-edge:linear-gradient(180deg,rgba(2,11,31,.26),transparent 28%,transparent 68%,rgba(4,12,31,.27));
  --bb-agency-glass:rgba(12,32,80,.35);
  --bb-agency-glass-border:rgba(255,255,255,.53);
  --bb-agency-glass-hover:rgba(242,249,255,.22);
  --bb-agency-active:rgba(246,250,255,.26);
  --bb-agency-glass-text:#f9fbff;
  --bb-agency-primary:#f8faff;
  --bb-agency-primary-text:#101c39;
  --bb-agency-focus:#d4e6ff;
}
:root[data-bb-theme="light"] body:has(main.bb-agency-page){
  --bb-agency-fg:#0d2346;
  --bb-agency-muted:#263a59;
  --bb-agency-soft:#415578;
  --bb-agency-veil:linear-gradient(90deg,rgba(245,249,255,.98) 0%,rgba(245,249,255,.94) 27%,rgba(240,246,255,.82) 49%,rgba(239,245,255,.33) 75%,rgba(239,245,255,.05) 100%);
  --bb-agency-edge:linear-gradient(180deg,rgba(240,247,255,.26),transparent 30%,transparent 74%,rgba(216,228,249,.15));
  --bb-agency-glass:rgba(237,245,255,.43);
  --bb-agency-glass-border:rgba(255,255,255,.89);
  --bb-agency-glass-hover:rgba(255,255,255,.65);
  --bb-agency-active:rgba(255,255,255,.75);
  --bb-agency-glass-text:#0c2146;
  --bb-agency-primary:#112751;
  --bb-agency-primary-text:#fff;
  --bb-agency-focus:#1b4e97;
}

/* Gutenberg Cover; explicit stacking is essential: the text scrim must sit
   ABOVE the video, not behind it as a ::before with the same z-index. */
.bb-agency-page{margin:0!important;padding:0!important;max-width:none!important;width:100%;min-width:0}
.bb-agency-page>*{max-width:none!important;margin:0!important}
body:has(main.bb-agency-page) .bb-agency-hero.wp-block-cover{
  min-height:100vh!important;min-height:100svh!important;
  align-items:stretch;isolation:isolate;padding:0!important;overflow:clip;
  color:var(--bb-agency-fg);background:#07142f;
}
:root[data-bb-theme="light"] .bb-agency-hero{background:#dce8fc}
body:has(main.bb-agency-page) .bb-agency-hero>.wp-block-cover__video-background{
  position:absolute;z-index:0!important;object-fit:cover;object-position:50% 50%;
  filter:saturate(.91) contrast(1.02);
}
:root[data-bb-theme="light"] .bb-agency-hero>.wp-block-cover__video-background{
  filter:saturate(.80) contrast(.98) brightness(1.07);
}
.bb-agency-hero::before,.bb-agency-hero::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
}
.bb-agency-hero::before{background:var(--bb-agency-veil)}
.bb-agency-hero::after{background:var(--bb-agency-edge)}
.bb-agency-hero>.wp-block-cover__background{opacity:0!important;pointer-events:none;z-index:1!important}
body:has(main.bb-agency-page) .bb-agency-hero>.wp-block-cover__inner-container{
  display:flex;position:relative;z-index:2;width:100%!important;
  max-width:none!important;margin:0!important;
}
.bb-agency-hero__layout{
  width:100%;min-height:100svh;display:flex;flex-direction:column;
  justify-content:center;padding:clamp(132px,17vh,205px) clamp(24px,4.65vw,92px) clamp(48px,8vh,100px);
  margin:0!important;
}
.bb-agency-hero__intro{max-width:1400px!important;width:100%;margin:auto 0!important;padding:0!important}
.bb-agency-hero__eyebrow{
  display:flex;align-items:center;gap:12px;margin:0 0 clamp(22px,3.3vh,36px)!important;
  font-size:12px;font-weight:710;letter-spacing:.14em;text-transform:uppercase;
  color:var(--bb-agency-soft)!important;
}
.bb-agency-hero__eyebrow::before{
  content:"";display:block;flex:0 0 24px;width:24px;height:1px;background:currentColor;opacity:.85;
}
body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__title{
  font-size:clamp(6.7rem,12.3vw,13.1rem);line-height:.94;letter-spacing:-.018em;
  font-weight:640;color:var(--bb-agency-fg)!important;margin:0!important;
  max-width:1220px;text-wrap:nowrap;
}
body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__statement{
  font-size:clamp(2.15rem,4.05vw,4.9rem);line-height:1.13;letter-spacing:-.012em;
  font-weight:495;color:var(--bb-agency-fg)!important;
  max-width:1120px;margin:clamp(22px,3.0vh,36px) 0 0!important;
}
.bb-agency-hero__desc{
  font-size:clamp(1.07rem,1.43vw,1.53rem);line-height:1.47;
  letter-spacing:-.008em;font-weight:420;color:var(--bb-agency-muted)!important;
  max-width:700px;margin:clamp(21px,3vh,32px) 0 0!important;text-wrap:pretty;
}
.bb-agency-hero__actions{
  display:flex;gap:12px;flex-wrap:wrap;margin:clamp(29px,3.8vh,41px) 0 0!important;
}
.bb-agency-hero__actions .wp-block-button__link{
  display:inline-flex;align-items:center;justify-content:center;min-height:52px;
  padding:0 26px;font-size:14px;font-weight:690;line-height:1.25;
  letter-spacing:.003em;border-radius:999px;border:1px solid transparent;
  box-sizing:border-box;text-decoration:none!important;
  transition:transform .2s ease,background .2s ease,box-shadow .2s ease;
}
.bb-agency-hero__actions .wp-block-button__link:hover{transform:translateY(-2px)}
.bb-agency-hero__actions .wp-block-button__link:focus-visible{
  outline:2px solid var(--bb-agency-focus);outline-offset:4px;
}
.bb-agency-hero__primary .wp-block-button__link{
  color:var(--bb-agency-primary-text);background:var(--bb-agency-primary);
  box-shadow:0 11px 34px rgba(2,10,31,.16);
}
.bb-agency-hero__secondary .wp-block-button__link{
  color:var(--bb-agency-fg);background:rgba(105,145,213,.10);
  border-color:rgba(209,227,255,.52);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
:root[data-bb-theme="light"] .bb-agency-hero__secondary .wp-block-button__link{border-color:rgba(20,54,106,.29);background:rgba(255,255,255,.33)}
.bb-agency-hero__secondary .wp-block-button__link:hover{background:var(--bb-agency-glass-hover)}
.bb-agency-hero__services{
  margin:clamp(26px,3.6vh,38px) 0 0!important;
  max-width:800px;display:flex;gap:12px 24px;flex-wrap:wrap;align-items:center;
  color:var(--bb-agency-soft)!important;font-size:11px;font-weight:680;
  letter-spacing:.105em;text-transform:uppercase;line-height:1.6;
}
.bb-agency-hero__services span{display:inline-block;white-space:nowrap}
.bb-agency-hero__services span+span::before{
  content:"/";display:inline-block;margin-right:24px;opacity:.6;font-weight:400;
}
.bb-agency-editor-content{padding:0!important;margin:0 auto!important;max-width:var(--bb-content-width)!important}
.bb-agency-editor-content:empty{display:none}

/* The normal global header is the *exact* scrolled state. Agency overrides
   apply only while the hero is at the top; do not restyle the shared header. */
body:has(main.bb-agency-page) .bb-header{
  transition:background-color .23s ease,border-color .23s ease,backdrop-filter .23s ease;
}
body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header{
  background:transparent!important;border-bottom-color:transparent!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
@media(min-width:783px){
  /* Frosted glass belongs to ONE navigation capsule, not each Gutenberg li.
     Gutenberg's default `background-color:inherit` caused square tiles. */
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container{
    position:relative;isolation:isolate;overflow:hidden;
    min-height:58px;align-items:center!important;gap:3px!important;
    padding:6px!important;margin:0!important;
    border-radius:999px;border:1px solid var(--bb-agency-glass-border);
    background:linear-gradient(156deg,rgba(255,255,255,.29) 0%,rgba(255,255,255,.055) 37%,rgba(255,255,255,.015) 66%,rgba(255,255,255,.12) 100%),var(--bb-agency-glass);
    -webkit-backdrop-filter:blur(42px) saturate(1.85) brightness(1.06);
    backdrop-filter:blur(42px) saturate(1.85) brightness(1.06);
    box-shadow:inset 0 1.5px rgba(255,255,255,.55),inset 0 -1px rgba(255,255,255,.11),0 0 0 1px rgba(255,255,255,.08),0 12px 40px rgba(2,10,31,.24);
  }
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container::before{
    content:"";position:absolute;inset:1px;border-radius:inherit;pointer-events:none;
    background:linear-gradient(175deg,rgba(255,255,255,.14),transparent 43%,rgba(255,255,255,.075));
    z-index:0;
  }
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item{
    position:relative;z-index:1;
    height:auto!important;min-height:0!important;display:flex;align-items:center!important;
    background:transparent!important;background-color:transparent!important;
    box-shadow:none!important;border-radius:999px;
  }
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item>.wp-block-navigation-item__content{
    display:inline-flex;align-items:center;justify-content:center;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    box-sizing:border-box!important;padding:0 clamp(12px,1.15vw,19px)!important;
    border:1px solid transparent!important;border-radius:999px;
    background:transparent!important;color:var(--bb-agency-glass-text)!important;
    font-size:13px;letter-spacing:.008em;font-weight:690;
    transition:background .2s ease,box-shadow .2s ease;
  }
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item>.wp-block-navigation-item__content:hover,
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item>.wp-block-navigation-item__content:focus-visible{
    background:var(--bb-agency-glass-hover)!important;text-decoration:none!important;
  }
  /* Admin-only rewritten preview link may not carry aria-current. */
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item:has(>a[href$="/agentur/"])>.wp-block-navigation-item__content,
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item:has(>a[aria-current="page"])>.wp-block-navigation-item__content{
    background:var(--bb-agency-active)!important;border-color:rgba(255,255,255,.32)!important;
    box-shadow:inset 0 1px rgba(255,255,255,.32),0 2px 12px rgba(0,0,0,.09);
  }
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item::after,
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation-item__content::after{display:none!important}
}
/* Actions and logo also return to their native theme appearance on scroll. */
body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-header-action-row :is(.bb-action,.wc-block-customer-account__link,.wc-block-mini-cart__button){
  background:var(--bb-agency-glass)!important;
  color:var(--bb-agency-glass-text)!important;
  border-color:var(--bb-agency-glass-border)!important;
  -webkit-backdrop-filter:blur(30px) saturate(1.6);backdrop-filter:blur(30px) saturate(1.6);
  box-shadow:inset 0 1px rgba(255,255,255,.25),0 6px 17px rgba(0,0,0,.12);
}
body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-header-action-row :is(.bb-action,.wc-block-customer-account__link,.wc-block-mini-cart__button):hover{
  background:var(--bb-agency-glass-hover)!important;
}
body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__responsive-container-open{
  color:var(--bb-agency-glass-text)!important;
}
body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-site-logo img{filter:brightness(0) invert(1)}
:root[data-bb-theme="light"] body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-site-logo img{filter:brightness(0)}

@media(max-width:1120px) and (min-width:783px){
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header>.bb-header__inner{gap:12px;padding-inline:20px}
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__container>.wp-block-navigation-item>.wp-block-navigation-item__content{
    padding-inline:12px!important;font-size:12px;
  }
  body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__title{font-size:clamp(6rem,12vw,9.5rem)}
}
@media(max-width:782px){
  .bb-agency-hero__layout{
    padding:clamp(136px,18vh,183px) 23px clamp(40px,8vh,72px);
  }
  body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__title{
    font-size:clamp(5.15rem,18.5vw,9.15rem);line-height:.96;letter-spacing:-.023em;
  }
  body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__statement{
    font-size:clamp(2.02rem,6.9vw,3.55rem);line-height:1.16;margin-top:24px!important;letter-spacing:-.011em;
  }
  .bb-agency-hero__eyebrow{margin-bottom:26px!important;font-size:11px}
  .bb-agency-hero__desc{font-size:clamp(1.07rem,4vw,1.28rem);max-width:500px;margin-top:22px!important}
  .bb-agency-hero__actions{gap:10px;margin-top:29px!important}
  .bb-agency-hero__actions .wp-block-button__link{min-height:50px;padding:0 20px;font-size:13px}
  .bb-agency-hero__services{font-size:10px;gap:6px 14px;margin-top:27px!important;letter-spacing:.045em}
  .bb-agency-hero__services span+span::before{margin-right:14px}
  .bb-agency-hero>.wp-block-cover__video-background{object-position:59% center}
  body:has(main.bb-agency-page){
    --bb-agency-veil:linear-gradient(90deg,rgba(2,10,32,.94),rgba(3,14,40,.85) 58%,rgba(4,15,42,.48));
  }
  :root[data-bb-theme="light"] body:has(main.bb-agency-page){
    --bb-agency-veil:linear-gradient(90deg,rgba(245,249,255,.97),rgba(243,249,255,.93) 58%,rgba(239,246,255,.65));
  }
  /* Native hamburger stays where it always is; give it the same glass look. */
  body:has(main.bb-agency-page):not(.bb-agency-scrolled) .bb-header .bb-main-nav .wp-block-navigation__responsive-container-open{
    background:var(--bb-agency-glass)!important;border-radius:50%;
    border:1px solid var(--bb-agency-glass-border);width:40px;height:40px;
    -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);
  }
}
@media(max-width:420px){
  body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__title{font-size:18.0vw}
  .bb-agency-hero__services{display:block}
  .bb-agency-hero__services span{margin-right:8px}
  .bb-agency-hero__services span+span::before{margin-right:10px}
}
@media(max-width:370px){
  .bb-agency-hero__layout{padding-inline:18px}
  body:has(main.bb-agency-page) .bb-agency-hero .bb-agency-hero__title{font-size:18.0vw}
  .bb-agency-hero__actions{display:grid;grid-template-columns:1fr 1fr}
  .bb-agency-hero__actions .wp-block-button__link{padding-inline:10px}
}
@media(prefers-reduced-motion:reduce){
  body:has(main.bb-agency-page) .bb-header,
  body:has(main.bb-agency-page) .bb-agency-hero .wp-block-button__link{transition:none!important}
}
