:root {
  --bg: #DFF2FD;
  --bg-bottom: #E5E0EC;
  --text: #5598CA;
  --accent: #EB5D56;
  --accent-bright: #FFB0AA;
  --dreieck-color: #FFFBDB;
  --maxw: 1400px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 0;
  --transition: 1s;
  --wordmark-size: clamp(2.75rem, 7vw, 4.5rem);
  --wordmark-line-height: 0.92;
  /* Match .site-logo dimensions for layout alignment */
  --site-logo-size: calc(var(--wordmark-size) * 2 * var(--wordmark-line-height));
  --site-header-hours-lh: 1.35;
  /* Where the .bg-dreieck-wrap is anchored. Triangles use the YO asset aspect ratio (369x283); apex
     y in the SVG sits at 149.695/369 of the rendered width, so we project that to viewport units. */
  --wrap-top: 25vh;
  --big-tri-size: 95vw;
  --big-tri-height: calc(var(--big-tri-size) * 283 / 369);
  /* --parallax-y: how far the background has moved up due to scroll (set by JS at 1.5x scrollY).
     Subtracting it from --apex-y slides the gradient seam together with the triangle wrap. */
  --parallax-y: 0px;
  --apex-y: calc(var(--wrap-top) + var(--big-tri-size) * 149.695 / 369 - var(--parallax-y));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, var(--bg) var(--apex-y), var(--bg-bottom) var(--apex-y));
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  isolation: isolate;
}

/* Two halves of the YO brand mark inlined from assets/dreieck.svg + dreieck_b.svg
   (viewBox 369x283; apexes offset from center). A short strip clips the second SVG
   so only the apex tip shows. */
.bg-dreieck-wrap {
  position: fixed;
  top: var(--wrap-top);
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100vw;
  pointer-events: none;
  opacity: 1;
  z-index: 0;
  transform: translateY(calc(var(--parallax-y) * -1));
  will-change: transform;
}

.bg-dreieck {
  display: block;
  flex: 0 0 var(--big-tri-size);
  width: var(--big-tri-size);
  height: var(--big-tri-height);
}

/* Right triangle at 45vw width; align manually because apexes are at different
   y-fractions in the asset viewBox (149.695/283 vs 133.157/283). */
.bg-dreieck-b-clip {
  flex: 0 0 5vw;
  width: 5vw;
  height: calc(45vw * 283 / 369);
  overflow: hidden;
  /* Pull seam ~1px to hide anti-aliasing hairline between tips */
  margin-left: -1px;
  align-self: flex-start;
  margin-top: calc((var(--big-tri-size) * 149.695 - 45vw * 133.157) / 369);
}

.bg-dreieck-b {
  display: block;
  width: 45vw;
  height: calc(45vw * 283 / 369);
  max-width: none;
}

.bg-dreieck path {
  fill: var(--dreieck-color);
}

.bg-dreieck-b path {
  fill: var(--accent);
}

body > *:not(.bg-dreieck-wrap) {
  position: relative;
  z-index: 1;
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; }

/* ---------- Header ---------- */
.site-header {
  padding: clamp(1rem, 3vw, 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.site-header__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100%;
}

.site-header__inner {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.6rem, 1.5vw, 1.25rem);
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

/* Wordmark + opening hours: stack to the right edge of the header */
.site-header__wordmark-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: flex-end;
  gap: clamp(0.12rem, 1vw, 0.35rem);
  min-width: 0;
  text-align: right;
}

.site-header__wordmark-wrap .wordmark {
  flex: 0 0 auto;
  text-align: right;
}

.site-header__meta {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: max-content;
  display: flex;
  justify-content: flex-end;
  padding-top: 0;
  margin-left: 0;
  align-self: flex-end;
}

.site-header__hours-block {
  --hours-font: clamp(0.75rem, 1.8vw, 0.85rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
  font-size: var(--hours-font);
  flex-shrink: 0;
  min-width: max-content;
  width: max-content;
}

.site-header__hours {
  margin: 50% 0 0 0;
  font-size: inherit;
  font-weight: 600;
  line-height: var(--site-header-hours-lh);
  letter-spacing: 0.02em;
}

.site-header__hours-line {
  display: block;
  white-space: nowrap;
}

/* Social row: full-width link with icon + label justified to the right edge
   (matches the hours/address right alignment). */
.site-header__social {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6em;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
  transition: color 0.15s;
}

.site-header__social:hover,
.site-header__social:focus-visible {
  color: var(--accent);
  outline: none;
}

.site-header__social-label {
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.site-header__social-label-insta {
  white-space: nowrap;
  letter-spacing: 0.09em;
}

.site-header__social-icon {
  display: block;
  width: calc(var(--site-header-hours-lh) * 1em);
  height: calc(var(--site-header-hours-lh) * 1em);
  flex-shrink: 0;
}

@media (max-width: 899px) {
  .site-header {
    z-index: 2;
  }

  .site-header__row {
    flex-direction: row;
    align-items: flex-start;
  }

  .site-header__inner {
    align-items: flex-start;
  }

  /* Same as base: pin + hours stacked under “ORK”, all right-aligned */
  .site-header__wordmark-wrap {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-end;
    align-self: flex-start;
    gap: clamp(0.12rem, 1vw, 0.35rem);
    min-width: 0;
  }

  .site-header__meta {
    position: static;
    inset: auto;
    margin-left: 0;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: max-content;
    z-index: auto;
  }

  .site-header__hours-block {
    text-align: right;
    grid-template-columns: auto max-content;
    column-gap: 0.5rem;
    align-items: start;
    --hours-font: clamp(0.65rem, 2.8vw, 0.8rem);
  }

  /* Large left triangle: nudge down slightly so the apex area clears the header band */
  :root {
    --wrap-top: clamp(22vh, 28vw, 38vh);
  }
}

.site-logo {
  flex: 0 0 auto;
  display: block;
  border: 0;
  outline: none;
  box-shadow: none;
  /* SVG is 1:1; height matches both wordmark lines stacked. */
  width: var(--site-logo-size);
  height: var(--site-logo-size);
}

.site-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
}

.site-logo:focus,
.site-logo:focus-visible {
  outline: none;
}

.wordmark {
  display: inline-block;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 800;
  line-height: var(--wordmark-line-height);
  font-size: var(--wordmark-size);
  letter-spacing: -0.02em;
}

.wordmark__top, .wordmark__bottom { display: block; }
.wordmark__bottom { color: var(--accent); }

/* Animated gradient sweep across "YONKEL": accent base with a brighter hot-spot
   that drifts through the letters via background-clip: text. */
.wordmark__top {
  background: linear-gradient(
    to right,
    var(--accent),
    var(--accent),
    var(--accent-bright),
    var(--accent),
    var(--accent)
  );
  background-size:200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradientAnimation 10s linear infinite;
}

@keyframes gradientAnimation {
  0%   { background-position: 200% 50%; }
  100% { background-position:   0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark__top { animation: none; }
}

/* ---------- Sections ---------- */
.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

/* Mobile: media on top, text below — applies to every section */
.section__media { order: 1; }
.section__text  { order: 2; }

/* Section 1 mobile: headline+subline → slideshow → pills */
@media (max-width: 899px) {
  .section[data-section="1"] { gap: 0; }
  .section[data-section="1"] .section__text { display: contents; }
  .section[data-section="1"] .section__headline { order: 1; }
  .section[data-section="1"] .section__subline  { order: 2; }
  .section[data-section="1"] .section__media    { order: 3; margin-bottom: 1.5rem; }
  .section[data-section="1"] .pills {
    order: 4;
    margin-top: 0;
    align-self: flex-start;
  }
  /* Slightly larger pills on mobile (better tap targets) */
  .pill { font-size: 0.85rem; }
}

@media (min-width: 900px) {
  .section { grid-template-columns: 1fr 1fr; align-items: stretch; }

  .section--text-left  .section__text  { order: 1; }
  .section--text-left  .section__media { order: 2; }
  .section--media-left .section__media { order: 1; }
  .section--media-left .section__text  { order: 2; }

  /* Desktop: wordmark stacked on the right edge, hours/pin below it (both right-aligned) */
  .site-header__wordmark-wrap {
    flex-direction: column;
    align-items: flex-end;
    gap: clamp(0.12rem, 1vw, 0.35rem);
  }
  .site-header__meta {
    margin-left: 0;
    align-self: flex-end;
  }

  /* Push the Impressum band one full viewport below the content so the two are
     never visible at the same time. */
  .imprint-band {
    margin-top: 100vh;
    margin-right: 0%;
  }
}

.section__text {
  display: flex;
  flex-direction: column;
}

.section__headline {
  margin: 0 0 1rem 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
}

.section__subline {
  margin: 0 0 2rem 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Pills ---------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto; /* desktop: pushes to bottom of flex column */
  align-self: flex-start;
}

.pill {
  display: inline-block;
  padding: 0.4em 1.1em;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  /* 33% smaller than the original 1rem */
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.pill:hover,
.pill:focus-visible {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  outline: none;
}

.pill[aria-pressed="true"],
.pill.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  cursor: default;
}

/* ---------- Slideshow ---------- */
.slideshow {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background: rgba(85, 152, 202, 0.06);
}

.slideshow__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity var(--transition) ease-in-out;
  will-change: opacity;
}

.slideshow__slide.is-active { opacity: 1; }

.slideshow__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
  padding: 2rem;
  background: rgba(85, 152, 202, 0.06);
}

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  text-align: right;
}

/* Full-viewport-width cream band that visually separates the Impressum from the
   content above. The inner .imprint-block stays constrained to --maxw. */
.imprint-band {
  width: 100%;
  background: #FFFBDB;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
}

.imprint-block {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}

.imprint-heading {
  margin: 0;
  margin-right: 1.0em;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.imprint {
  display: block;
  max-width: min(300px);
  height: auto;
  margin: 0;
  margin-right: 1.4em;
  scale: .8;
  transform-origin: top right;
}

.site-footer__bottom {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(2rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.datenschutz-link {
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.datenschutz-link:hover,
.datenschutz-link:focus-visible {
  color: var(--accent);
  outline: none;
}

/* ---------- Datenschutz overlay ---------- */
.datenschutz-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.datenschutz-overlay.is-open {
  display: flex;
}

.datenschutz-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 9, 114, 0.45);
}

.datenschutz-overlay__panel {
  position: relative;
  background: var(--bg);
  color: var(--text);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  padding-right: clamp(2.5rem, 5vw, 3.5rem);
  border: 2px solid var(--text);
  box-shadow: 0 10px 40px rgba(40, 9, 114, 0.25);
  font-size: 1rem;
  line-height: 1.5;
}

.datenschutz-overlay__title {
  margin: 0 0 1.25rem 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--accent);
}

.datenschutz-overlay__panel h3 {
  margin: 1.5rem 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.datenschutz-overlay__panel p {
  margin: 0 0 0.75rem 0;
}

.datenschutz-overlay__panel ul {
  margin: 0 0 0.75rem 0;
  padding-left: 1.25rem;
}

.datenschutz-overlay__panel li {
  margin: 0.15rem 0;
}

.datenschutz-overlay__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.datenschutz-overlay__close:hover,
.datenschutz-overlay__close:focus-visible {
  color: var(--accent);
  outline: none;
}

body.datenschutz-open {
  overflow: hidden;
}
