/* ==========================================================================
   Components – Sprechform, Buttons, Links, Listen, Header, Navigation,
   Footer, Dialog
   ========================================================================== */

/* --- Sprechform ---------------------------------------------------------
   Rechteck mit drei weichen Ecken und einer spitzen „Ansatz“-Ecke.
   Modifier bestimmen, wo der Ansatz sitzt (zeigt zum Text). */
.shape {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-organic);
  isolation: isolate;
}

.shape--tail-bl { border-bottom-left-radius: 0; }
.shape--tail-br { border-bottom-right-radius: 0; }
.shape--tail-tl { border-top-left-radius: 0; }

.shape > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Chevron (Wegzeichen aus dem Logo-Vokabular) ------------------------ */
:root {
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M1 .5 11 8 1 15.5v-4.3L5.6 8 1 4.8Z'/%3E%3C/svg%3E");
}

.chevron-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  color: var(--teal-deep);
  text-decoration: none;
}

.chevron-link::before {
  content: "";
  flex: none;
  width: 10px;
  height: 14px;
  background: var(--brand-yellow);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transition: transform var(--dur-fast) var(--ease-out);
}

.chevron-link:hover {
  color: var(--teal-deeper);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brand-yellow);
}

.chevron-link:hover::before {
  transform: translateX(3px);
}

/* --- Buttons ------------------------------------------------------------ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border: 2px solid transparent;
  border-radius: var(--r-control) var(--r-control) var(--r-control) var(--r-control-tail);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.button--primary {
  background: var(--teal-deep);
  color: var(--white);
}

.button--primary:hover {
  background: var(--teal-deeper);
  color: var(--white);
}

.button--secondary {
  border-color: var(--teal-deep);
  background: transparent;
  color: var(--teal-deep);
}

.button--secondary:hover {
  background: var(--mint-100);
  color: var(--teal-deeper);
  border-color: var(--teal-deeper);
}

/* Sekundärbutton auf Fotografie: eigene weiße Fläche statt Transparenz */
.button--on-photo {
  background: var(--white);
}

.button:active {
  transform: translateY(1px);
}

/* --- Markerliste -------------------------------------------------------- */
.marker-list {
  display: grid;
  gap: clamp(28px, 2vw + 12px, 44px);
}

.marker-list > li {
  position: relative;
  padding-left: 36px;
}

.marker-list > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.32em;
  width: 14px;
  height: 19px;
  background: var(--brand-yellow);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
}

.marker-list p {
  margin-top: var(--space-xs);
  max-width: 34rem;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow var(--dur-med) ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
  min-height: var(--header-h);
}

.site-header__brand {
  flex: none;
  display: block;
  padding-block: 8px;
}

.site-header__brand img {
  width: clamp(156px, 8vw + 92px, 232px);
}

/* Navigation: Desktop */
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: clamp(14px, 1.6vw, 30px);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--brand-yellow), var(--brand-yellow));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 6px);
  background-size: 0 3px;
  transition: background-size var(--dur-med) var(--ease-out), color var(--dur-fast) ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--teal-deeper);
  background-size: 100% 3px;
}

.nav-toggle {
  display: none;
}

/* Navigation: kompakt */
@media (max-width: 1179px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 14px 8px 12px;
    border: 2px solid var(--teal-deep);
    border-radius: var(--r-control) var(--r-control) var(--r-control) var(--r-control-tail);
    background: var(--white);
    color: var(--teal-deep);
    font-weight: 600;
    cursor: pointer;
  }

  .nav-toggle__icon {
    position: relative;
    width: 18px;
    height: 12px;
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after,
  .nav-toggle__icon > span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-fast) ease;
  }

  .nav-toggle__icon::before { top: 0; }
  .nav-toggle__icon > span { top: 5px; }
  .nav-toggle__icon::after { top: 10px; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon > span { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-5px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 32px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 24px 32px -24px rgb(21 50 43 / 0.25);
  }

  .js .site-nav:not(.is-open) {
    display: none;
  }

  .site-nav__list {
    display: block;
  }

  .site-nav__list li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    display: flex;
    min-height: 56px;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    background-position: 0 calc(100% - 12px);
  }

  /* Ohne JavaScript: Navigation bleibt sichtbar im Fluss */
  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
    padding-inline: 0;
  }

  html:not(.js) .site-header__inner {
    flex-wrap: wrap;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  padding-block: clamp(56px, 3rem + 3vw, 96px) 40px;
  background: var(--teal-deeper);
  color: var(--white);
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--brand-yellow);
  text-decoration-thickness: 2px;
}

.site-footer :focus-visible {
  outline-color: var(--brand-yellow);
}

.site-footer__grid {
  display: grid;
  gap: 40px var(--grid-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-l);
}

.site-footer__brand img:first-child {
  width: clamp(170px, 12vw + 90px, 220px);
}

.site-footer__ib {
  width: clamp(84px, 5vw + 50px, 110px);
}

.site-footer__title {
  margin-bottom: var(--space-s);
  color: var(--white);
  font-size: 20px;
  font-weight: 400;
}

.site-footer__nav li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.site-footer__legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m) var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid rgb(255 255 255 / 0.25);
  font-size: var(--fs-small);
}

.site-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}

.site-footer__legal li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.site-footer__note {
  color: rgb(255 255 255 / 0.82);
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
  }
}

/* --- Dialog ------------------------------------------------------------- */
.dialog {
  width: min(520px, calc(100vw - 32px));
  padding: clamp(28px, 4vw, 44px);
  border: 0;
  border-radius: var(--r-organic-s) var(--r-organic-s) var(--r-organic-s) 0;
  background: var(--white);
  color: var(--text);
}

.dialog::backdrop {
  background: rgb(19 77 65 / 0.6);
}

.dialog__title {
  margin-bottom: var(--space-s);
  font-size: 26px;
}

.dialog p {
  margin-bottom: var(--space-l);
}
