/* Page frame: dark header with menus and the progress bar, subpage head, footer. */

/* --- Header (anthrazit, CI p. 31) --- */

.site-header {
  --accent: var(--magenta-hell);
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--anthrazit);
  color: var(--weiss);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--tile-pad-x);
}

.site-header__logo { display: flex; flex-shrink: 0; }
.site-header__logo svg { width: auto; height: 34px; }

.main-nav__list {
  display: flex;
  gap: 28px;
  align-items: center;
  white-space: nowrap;
}

.main-nav__group { position: relative; }

.main-nav__trigger,
.main-nav__link {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.main-nav__trigger:hover,
.main-nav__link:hover { color: var(--magenta-hell); }
.main-nav__trigger.is-current,
.main-nav__link.is-current {
  border-bottom-color: var(--magenta-hell);
  color: var(--magenta-hell);
}

.main-nav__trigger .icon { transition: transform .2s; }
.main-nav__group.is-open .main-nav__trigger .icon { transform: rotate(180deg); }

/* Without JavaScript the menu opens on hover and keyboard focus; with it (html.js,
   set by menu.js) only via .is-open, which menu.js toggles on hover and click. */
.dropdown {
  display: none;
  position: absolute;
  left: -24px;
  top: 100%;
  padding-top: 18px;
  min-width: 300px;
}
html:not(.js) .main-nav__group:hover .dropdown,
html:not(.js) .main-nav__group:focus-within .dropdown,
.main-nav__group.is-open .dropdown { display: block; }

.dropdown__panel {
  display: flex;
  flex-direction: column;
  padding: 8px 24px 12px;
  border-top: var(--fuge) solid var(--magenta);
  background: var(--anthrazit);
}

.dropdown__link {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 2px dotted var(--magenta-hell);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: padding-left .2s;
}
.dropdown li:last-child .dropdown__link { border-bottom: 0; }
.dropdown__link:hover,
.dropdown__link.is-current { padding-left: 8px; color: var(--magenta-hell); }
.dropdown__chevron { color: var(--magenta-hell); }

.site-header__actions {
  display: flex;
  gap: 14px;
  align-items: center;
  white-space: nowrap;
}

.login-link {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 18px;
  border: 2px solid var(--weiss);
  border-radius: var(--radius-button);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
}
.login-link:hover { border-color: var(--magenta-hell); color: var(--magenta-hell); }

/* Round flag button that switches between English and German. In the bar it is only
   the flag; in the mobile menu the flag plus the language's name. */
.lang-switch { display: flex; }
.lang-switch__button {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
}
.lang-switch__flag {
  display: flex;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 2px solid var(--weiss);
  border-radius: 50%;
}
.lang-switch__button:hover .lang-switch__flag { border-color: var(--magenta-hell); }
.lang-switch__button:hover { color: var(--magenta-hell); }
.lang-switch__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lang-switch--menu .lang-switch__flag { width: 28px; height: 28px; }
.lang-switch--menu { display: none; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--weiss);
  border-radius: 50%;
  background: none;
  color: var(--weiss);
  cursor: pointer;
}
.burger:hover { border-color: var(--magenta-hell); color: var(--magenta-hell); }
.burger__open,
.burger__close { display: flex; }
.burger__close,
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger[aria-expanded="true"] .burger__close { display: flex; }

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px var(--tile-pad-x) 28px;
  border-top: var(--fuge) solid var(--magenta);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.mobile-menu__group {
  display: flex;
  flex-direction: column;
}

.mobile-menu__label {
  padding: 12px 0 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--magenta-hell);
}

.mobile-menu__link,
.mobile-menu__extra {
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}
.mobile-menu__link {
  padding: 11px 0;
  border-bottom: 2px dotted var(--magenta-hell);
}
.mobile-menu__link:hover,
.mobile-menu__extra:hover,
.mobile-menu__link[aria-current="page"] { color: var(--magenta-hell); }

@container frame (max-width: 1359.98px) {
  .main-nav,
  .login-link { display: none; }
  .burger { display: flex; }
  .site-header__actions { gap: 10px; }
}

@container frame (min-width: 1360px) {
  .mobile-menu { display: none !important; }
}

/* Phones: logo, CTA and burger have to fit next to each other. */
@container frame (max-width: 467.98px) {
  .site-header__bar { gap: 12px; padding-inline: 14px; }
  .site-header__logo { flex-shrink: 1; min-width: 0; }
  .site-header__logo svg { width: 130px; max-width: 100%; height: auto; }
  .site-header__actions { gap: 8px; }
  .lang-switch--bar { display: none; }
  .lang-switch--menu { display: flex; }
}
/* Only with enlarged text on a phone: no room for the CTA as well; Kontakt stays in
   the menu. */
@container frame (max-width: 339.98px) {
  .site-header .btn--header { display: none; }
}

/* --- Progress bar with Andy (CI p. 25, 31) --- */

.progress {
  --p: 0;
  position: relative;
  height: var(--fuge);
  background: var(--pflaume);
}
.progress__fill {
  position: absolute;
  inset: 0;
  background: var(--magenta);
  transform: scaleX(var(--p));
  transform-origin: left;
}

/* Andy rides on the end of the bar. Decorative: aria-hidden in the markup. */
.progress__andy {
  position: absolute;
  left: calc(var(--p) * (100% - 48px));
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
/* The drawing looks to the left; mirrored he looks right. --dir (motion.js) is the last
   direction he moved: 1 = right (scrolling down), -1 = left. At the start, and without
   motion, he looks right, along the bar. */
.progress__andy .andy { transform: scaleX(calc(var(--dir, 1) * -1)); transition: transform .2s; }

/* "WUSCH!" when scrolling fast: a small band behind him */
.progress__wusch {
  position: absolute;
  right: calc(100% + 6px);
  top: 4px;
  padding: 2px 8px;
  border: 2px solid var(--pflaume);
  background: var(--magenta);
  color: var(--weiss);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--pflaume);
  transform: rotate(-4deg);
  opacity: 0;
  transition: opacity .2s;
}
.progress__andy.is-fast .progress__wusch { opacity: 1; }

/* --- Subpage head: light hero next to a dark area with the ring motif --- */

.sub-hero { justify-content: center; gap: 24px; }

.sub-hero__title {
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 7cqi, 120px);
  line-height: .96; /* see .h-section in base.css */
  letter-spacing: -.03em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}
.sub-hero { container-type: inline-size; }

.sub-hero__text {
  max-width: 60ch;
  font-size: clamp(18px, calc(1.6 * var(--vw)), 22px);
  line-height: 1.5;
}

.sub-hero__art {
  min-height: 220px;
  overflow: hidden;
}
.sub-hero__art .rings {
  position: absolute;
  right: -30%;
  bottom: -30%;
  width: 130%;
  height: auto;
  aspect-ratio: 1;
}
@container frame (max-width: 887.98px) {
  .sub-hero__art { display: none; }
}

/* --- Closing band "Lass uns reden." --- */

.closing {
  align-items: center;
  padding-block: clamp(48px, calc(7 * var(--vw)), 104px);
  text-decoration: none;
}
.closing:hover { color: var(--weiss); }

.closing__text {
  display: flex;
  flex-wrap: wrap;
  gap: .12em .3em;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, calc(9 * var(--vw)), 128px);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: var(--sand);
}

.closing__mark {
  display: inline-flex;
  gap: .2em;
  align-items: center;
  /* Versal Exo 2 sits low in its line box: more padding below than above centres the
     capitals in the magenta box. */
  padding: .05em .22em .14em;
  border-radius: .18em;
  background: var(--magenta);
  color: var(--weiss);
  transition: transform .2s, box-shadow .2s;
}
.closing:hover .closing__mark {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--pflaume);
}

/* --- Footer (sand) --- */

.site-footer {
  gap: 48px;
  padding-block: 56px 32px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.site-footer__brand a { width: max-content; }
.site-footer__brand img { height: 40px; width: auto; }

.site-footer__claim {
  max-width: 260px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.05;
  text-transform: uppercase;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__heading {
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 3px solid var(--schrift);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-footer__col a,
.site-footer__bottom a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.site-footer__col a:hover,
.site-footer__bottom a:hover { color: var(--magenta); text-decoration: underline; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 20px;
  border-top: 2px dotted var(--schrift);
  font-size: 15px;
}
