/**
 * Header: info bar, sticky header, navigation, booking ribbons, mobile action bar.
 * Becomes assets/css/header.css in the theme.
 */

/* Info bar (CPT "info", latest post) ----------------------------------- */
.aw-infobar {
  position: relative;
  background: var(--aw-navy);
  border-bottom: 1px solid rgb(200 0 0 / .55);
  font-size: var(--aw-step--1);
}
.aw-infobar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem 1rem;
  flex-wrap: wrap;
  min-height: 46px;
  padding: .45rem 3rem;
  text-align: center;
}
.aw-infobar__title {
  margin: 0;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.aw-infobar__link {
  display: inline-block;
  padding: .2em .8em;
  border-radius: 999px;
  background: var(--aw-red);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--aw-dur-fast);
}
.aw-infobar__link:hover { background: var(--aw-red-light); color: var(--aw-white); }
.aw-infobar__close {
  position: absolute;
  right: .5rem; top: 50%;
  translate: 0 -50%;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--aw-mute);
  cursor: pointer;
  transition: color var(--aw-dur-fast), background var(--aw-dur-fast);
}
.aw-infobar__close:hover { color: var(--aw-white); background: rgb(255 255 255 / .08); }
.aw-infobar[hidden] { display: none; }

/* Header --------------------------------------------------------------- */
.aw-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   trap the fixed mobile menu inside the header box. */
.aw-header::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: rgb(0 0 0 / .86);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.aw-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--aw-header-h);
  transition: height var(--aw-dur) var(--aw-ease-out);
}
.aw-header.is-scrolled { --aw-header-h: 62px; }

/* Logged-in editors: keep the sticky header below the WordPress admin bar */
.admin-bar .aw-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .aw-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .aw-header { top: 0; } }

.aw-header__logo { flex: none; display: block; }
.aw-nav__list > li, .aw-lang, .aw-burger { flex: none; }
.aw-header__logo img { width: clamp(160px, 6rem + 6vw, 196px); height: auto; transition: width var(--aw-dur) var(--aw-ease-out); }
.aw-header.is-scrolled .aw-header__logo img { width: 164px; }

/* Four-colour line: each attraction owns a segment */
.aw-header__spectrum {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--aw-escape), var(--aw-laser) 35%, var(--aw-golf) 68%, var(--aw-gamer));
  box-shadow: 0 0 14px 1px rgb(200 24 220 / .35);
}

/* Desktop nav */
.aw-nav { margin-left: auto; }
.aw-nav__list {
  display: flex;
  gap: clamp(.85rem, .1rem + 1.25vw, 1.9rem);
  margin: 0; padding: 0;
  list-style: none;
}
.aw-nav__list a {
  --c: var(--aw-red);
  position: relative;
  display: block;
  padding: .5rem 0 .3rem;
  font-family: var(--aw-font-display);
  font-size: clamp(1.05rem, .7rem + .45vw, 1.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: clamp(.05em, -.03em + .08vw, .09em);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;          /* labels never break: no height jumps */
}
.aw-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--aw-dur) var(--aw-ease-out);
}
.aw-nav__list a:hover { color: var(--aw-white); }
.aw-nav__list a:hover::after,
.aw-nav__list [aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.aw-nav__list [aria-current="page"] { color: var(--aw-white); }   /* the underline marks the page */

.aw-lang {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--aw-line);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  transition: border-color var(--aw-dur-fast);
}
.aw-lang:hover { border-color: var(--aw-white); color: var(--aw-white); }

/* Ribbons: "Gutschein" and "Buchen" hang from the header like the v1 bookmarks.
   Space is reserved on the right so they never cover the nav. */
.aw-header__inner { padding-right: 140px; }

.aw-ribbons {
  position: absolute;
  z-index: 2;                    /* above the colour line */
  top: 0;
  right: var(--aw-gutter);
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.aw-ribbon {
  --rb: var(--aw-red);
  --drop: 58px;                     /* how far the ribbon hangs below the header */
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 46px;
  height: calc(var(--aw-header-h) + var(--drop));
  padding-bottom: 20px;
  background: var(--rb);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 13px), 0 100%);
  color: var(--aw-white);
  text-decoration: none;
  transform-origin: top center;
  transition: height var(--aw-dur) var(--aw-ease-spring), background var(--aw-dur-fast);
}
.aw-ribbon span {
  writing-mode: vertical-rl;
  font-family: var(--aw-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.aw-ribbon--voucher { --rb: var(--aw-white); color: var(--aw-black); }
.aw-ribbon:hover { --drop: 72px; }
.aw-ribbon--book:hover { --rb: var(--aw-red-light); color: var(--aw-white); }
.aw-ribbon--voucher:hover { color: var(--aw-black); }

@media (prefers-reduced-motion: no-preference) {
  /* Ribbons unroll once, after the hero has settled */
  .aw-ribbon { animation: aw-ribbon-drop .9s var(--aw-ease-spring) both .9s; }
  .aw-ribbon--book { animation-delay: 1.02s; }
}
@keyframes aw-ribbon-drop {
  from { transform: scaleY(.45); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* Scrolled: Gutschein rolls up, Buchen stays as a shorter tab */
.aw-header.is-scrolled .aw-ribbon { --drop: 26px; }
.aw-header.is-scrolled .aw-ribbon span { font-size: 1rem; }
.aw-ribbon span { transition: opacity var(--aw-dur-fast); }
.aw-header.is-scrolled .aw-ribbon--voucher { height: 0; padding: 0; overflow: hidden; }
.aw-header.is-scrolled .aw-ribbon--voucher span { opacity: 0; }   /* fades with the roll-up, no blank ribbon */

/* Contact in the mobile menu (hidden on desktop) */
.aw-nav__contact { display: none; }

/* Burger --------------------------------------------------------------- */
.aw-burger {
  display: none;
  position: relative;
  z-index: 70;
  width: 46px; height: 46px;
  margin-left: .25rem;
  border: 0;
  background: transparent;
  color: var(--aw-white);
  cursor: pointer;
}
.aw-burger span,
.aw-burger span::before,
.aw-burger span::after {
  position: absolute;
  left: 11px;
  width: 24px; height: 2px;
  background: currentColor;
  transition: transform var(--aw-dur) var(--aw-ease-out), opacity var(--aw-dur-fast);
}
.aw-burger span { top: 22px; }
.aw-burger span::before, .aw-burger span::after { content: ""; left: 0; }
.aw-burger span::before { transform: translateY(-7px); }
.aw-burger span::after { transform: translateY(7px); }
.aw-burger[aria-expanded="true"] span { background: transparent; }
.aw-burger[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--aw-white); }
.aw-burger[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--aw-white); }

/* Mobile action bar ---------------------------------------------------- */
.aw-actionbar { display: none; }

@media (max-width: 1180px) {
  .aw-header__inner { padding-right: 0; gap: 1rem; }
  .aw-header__logo img { width: 156px; }
  .aw-header.is-scrolled .aw-header__logo img { width: 140px; }
  .aw-ribbons { display: none; }
  .aw-burger { display: block; }
  .aw-lang { margin-left: auto; }

  .aw-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem var(--aw-gutter) 7rem;
    background: var(--aw-black);
    visibility: hidden;
    clip-path: circle(0 at calc(100% - 2.5rem) 2.4rem);
    transition: clip-path .6s var(--aw-ease-out), visibility 0s linear .6s;
  }
  .aw-nav.is-open {
    visibility: visible;
    clip-path: circle(150% at calc(100% - 2.5rem) 2.4rem);
    transition: clip-path .7s var(--aw-ease-out);
  }
  .aw-nav__list { flex-direction: column; gap: .15rem; }

  .aw-nav__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--aw-line);
    color: var(--aw-mute);
    font-style: normal;
    font-size: .95rem;
    line-height: 1.5;
  }
  .aw-nav__contact a { color: inherit; text-decoration: none; }
  .aw-nav__contact a:hover { color: var(--aw-white); }
  .aw-nav__phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.1rem;
    border: 1px solid rgb(255 255 255 / .25);
    border-radius: 999px;
    color: var(--aw-white) !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  @media (prefers-reduced-motion: no-preference) {
    .aw-nav__contact { opacity: 0; transition: opacity .4s; }
    .aw-nav.is-open .aw-nav__contact { opacity: 1; transition-delay: .5s; }
  }
  .aw-nav__list a { font-size: clamp(2.4rem, 10vw, 3.4rem); letter-spacing: .02em; padding: .1rem 0; width: fit-content; }
  .aw-nav__list a::after { height: 3px; }

  @media (prefers-reduced-motion: no-preference) {
    .aw-nav__list li { opacity: 0; transform: translateX(-16px); transition: opacity .3s, transform .4s var(--aw-ease-out); }
    .aw-nav.is-open li { opacity: 1; transform: none; transition-delay: calc(.12s + var(--i, 0) * .04s); }
  }

  .aw-actionbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: .5rem;
    padding: .6rem var(--aw-gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: rgb(0 0 0 / .9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--aw-line);
    transform: translateY(110%);
    transition: transform var(--aw-dur) var(--aw-ease-out);
  }
  .aw-actionbar.is-visible { transform: none; }
  .aw-actionbar .aw-btn { justify-content: center; }
  body { padding-bottom: 76px; }
}
