/* Basis */
html {
  scroll-behavior: smooth;
  /* Fullpage-Scroll-Snap */
  scroll-snap-type: y mandatory;
}

/* scroll snap für sections*/
.fullpage-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  scroll-margin-top: 4.5rem; /* Platz für den fixen Header */
}

body {
  background-color: #efdbc8;
  color: #444547; /* var(--grey) */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* ============= ANIMATIONEN ============= */

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeup {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grundzustand: noch NICHT sichtbar */
.animate-fadein,
.animate-fadein-delay,
.animate-up,
.animate-up-delay {
  opacity: 0;
  transform: translateY(10px);
}

/* Sobald .in-view per JS hinzugefügt wird → Animation läuft */
.animate-fadein.in-view {
  animation: fadein 0.8s ease-out forwards;
}

.animate-fadein-delay.in-view {
  animation: fadein 0.9s ease-out forwards;
}

.animate-up.in-view {
  animation: fadeup 0.7s ease-out forwards;
}

.animate-up-delay.in-view {
  animation: fadeup 0.8s ease-out forwards;
}

/* Stufenweise Verzögerung für Karten etc. */
.delay-1.in-view {
  animation-delay: 0.2s !important;
}

.delay-2.in-view {
  animation-delay: 0.35s !important;
}

.delay-3.in-view {
  animation-delay: 0.5s !important;
}

/* ============= HOVER-EFFEKTE BILDER / LOGO ============= */

img.hover-zoom {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center center;
}

img.hover-zoom:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

img.logo-zoom {
  transition: transform 0.3s ease;
}

img.logo-zoom:hover {
  transform: scale(1.04);
}

/* ============= PANELS / BUTTONS / FORM ============= */

.section-panel {
  border-radius: 0.75rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.section-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
}

/* ============= TEXTUR AUF DUNKLEN FLÄCHEN ============= */

:root {
  /*
    Feinjustierung:
    - --panel-overlay höher => dunkler und ruhiger
    - --panel-tint wärmer/kälter => Farbcharakter
    - --pattern-opacity niedriger => subtiler
  */
  --panel-overlay: 0.5; /* 0..1 */
  --panel-tint: 24, 18, 14; /* warmes dunkel */
  --pattern-size: 260px;

  /* Optional: Pattern zusätzlich transparenter machen */
  --pattern-opacity: 0.85; /* 0..1 */
}

/* Dark Panel bekommt IMMER eine Basisfarbe + Texture-Layer */
.section-panel-dark {
  background-color: var(--grey);

  /* Layer 1: Overlay / Tönung
     Layer 2: Pattern
  */
  background-image: linear-gradient(
      rgba(var(--panel-tint), var(--panel-overlay)),
      rgba(var(--panel-tint), var(--panel-overlay))
    ),
    url("../images/ML/greyness.png");

  background-repeat: repeat, repeat;
  background-size: auto, var(--pattern-size) var(--pattern-size);
  background-position: 0 0, 0 0;

  /* Hilft, dass die Textur trotz Overlay sichtbar bleibt */
  background-blend-mode: multiply, normal;
}

/* Falls du das Pattern noch subtiler machen willst (optional):
   => statt Blend-Mode kannst du auch das Pattern dämpfen via pseudo-element.
   Ich lasse es hier bewusst simpel & robust. */

/* Optional für Header / Footer, falls dort auch die Textur sein soll */
.bg-textured-dark {
  background-color: var(--grey);
  background-image: url("../images/ML/greyness.png");
  background-repeat: repeat;
  background-size: 260px 260px;
}

/* Buttons Navigation */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(241, 221, 202, 0.35);
  background-color: rgba(241, 221, 202, 0.06);
  color: #f1ddca; /* var(--parchment) */
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-nav:hover {
  background-color: rgba(241, 221, 202, 0.18);
  border-color: rgba(241, 221, 202, 0.65);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.btn-nav:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.btn-nav:focus-visible {
  outline: 2px solid rgba(241, 221, 202, 0.95);
  outline-offset: 2px;
}

/* Buttons CTA / Form – Elevated Style im CI */
.btn-primary {
  background-color: #444547; /* var(--grey) */
  color: #f1ddca; /* var(--parchment) */
  border-radius: 0.375rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.97;
  background-color: #3b3c3d;
  border-color: rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.btn-primary:focus-visible {
  outline: 2px solid rgba(241, 221, 202, 0.95);
  outline-offset: 2px;
}
/* Quote-Optik nur für den Einleitungs-Absatz */
.intro-quote {
  position: relative;
  max-width: 48rem; /* ~ max-w-3xl */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem; /* Platz für Linie */
  padding-top: 0.25rem; /* Platz fürs große “ */
}

/* linke Linie */
.intro-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 4px;
  border-radius: 999px;
  background: rgba(241, 221, 202, 0.22);
}
.intro-quote p {
  line-height: 1.7;
}

@media (min-width: 1024px) {
  .intro-quote p {
    line-height: 1.85;
  }
}
.quote-open {
  color: rgba(241, 221, 202, 0.5);
  font-family: ui-serif, Georgia, serif;
}
.quote-close {
  color: rgba(241, 221, 202, 0.5);
  font-family: ui-serif, Georgia, serif;
}
/* Form-Felder */
.form-field {
  border-radius: 0.375rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.6rem 0.75rem;
  background-color: rgba(255, 255, 255, 0.95);
  transition: box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, transform 0.2s ease;
}

.form-field:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background-color: #ffffff;
}

.form-field:focus {
  outline: none;
  border-color: #444547;
  box-shadow: 0 0 0 2px rgba(68, 69, 71, 0.3), 0 10px 24px rgba(0, 0, 0, 0.16);
  background-color: #ffffff;
}

/* === Formular UX: Status-Feedback + disabled Button === */

.form-status {
  margin-top: 0.5rem;
}

.form-status--success {
  color: #1f7a3a;
}

.form-status--error {
  color: #b42318;
}

.form-status--info {
  color: var(--grey);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Scroll-to-top Button */
.scroll-top-btn {
  /* Styling über Utility-Klassen im HTML */
}

.scroll-top-btn-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ============= LIGHTBOX ============= */

body.lightbox-open {
  overflow: hidden;
}

#lightbox-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#lightbox-overlay.lightbox-visible {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ============= ACCESSIBILITY ============= */

@media (prefers-reduced-motion: reduce) {
  .animate-fadein,
  .animate-fadein-delay,
  .animate-up,
  .animate-up-delay,
  .delay-1,
  .delay-2,
  .delay-3 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  img.hover-zoom,
  img.logo-zoom {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* Mobile-Spacing */
@media (max-width: 640px) {
  /* Nav Buttons auf Mobile wie einfache Links */
  .btn-nav {
    padding: 0.15rem 0.25rem; /* deutlich kleiner */
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0; /* keine Pill-Form */
    font-size: 0.8rem; /* kleiner */
    letter-spacing: 0.01em;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .btn-nav:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
    opacity: 0.9;
  }
}
