/* ============================================================
   BREECHES — Custom CSS
   (Tailwind handles most styles; this file covers animations,
   effects, and anything Tailwind can't express inline.)
   ============================================================ */

/* ── Base ─────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Font rendering ───────────────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero text with line breaks ───────────────────────────── */
/* Allows \n in translations to create line breaks */
[x-text] {
  white-space: pre-line;
}

/* ── Hero entrance animations ─────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-hero {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── Scroll-triggered animations ─────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children when parent has data-animate-group */
[data-animate-group] > *:nth-child(1) { transition-delay: 0.05s; }
[data-animate-group] > *:nth-child(2) { transition-delay: 0.12s; }
[data-animate-group] > *:nth-child(3) { transition-delay: 0.19s; }
[data-animate-group] > *:nth-child(4) { transition-delay: 0.26s; }

/* ── Navbar blur/glass effect ─────────────────────────────── */
nav {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ── Gallery grid image aspect ratio ─────────────────────── */
.gallery-item {
  aspect-ratio: 1 / 1;
}

/* ── Lightbox image ───────────────────────────────────────── */
/* Prevent layout shift when lightbox opens */
body.lightbox-open {
  overflow: hidden;
}

/* ── Custom scrollbar (Chrome/Edge) ──────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

/* ── Focus ring ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

/* ── Map iframe (remove default border) ─────────────────── */
.map-frame {
  filter: grayscale(10%) contrast(1.02);
  transition: filter 0.3s ease;
}
.map-frame:hover {
  filter: grayscale(0%) contrast(1);
}

/* ── Selection colour ─────────────────────────────────────── */
::selection {
  background-color: #f97316;
  color: #ffffff;
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
  nav, footer, #kontakt form { display: none; }
}
