/* === Page Transition Overlay === */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #121414;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* === Film Grain Overlay (premium atmosphere) === */
/* z-index:1 keeps grain above body bg but below content stacks (header z-50, nav z-40, modals z-100+).
   This way focus indicators on buttons/links remain crisp. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* === German hyphenation for long words on mobile === */
@media (max-width: 767px) {
  p, li, span, td { hyphens: auto; -webkit-hyphens: auto; }
  [class*="tracking-[0.2em]"], [class*="tracking-[0.3em]"], [class*="tracking-widest"] { hyphens: none; -webkit-hyphens: none; }
}

/* === Page Fade-In on Load === */
body {
  animation: pageIn 0.6s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Nav Bar Entrance Animations === */
@keyframes slideDownNav {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@keyframes slideUpNav {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
[data-anim="slide-down"] {
  transition: transform 0.3s ease, background 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}
[data-anim="slide-up"] {
  transition: transform 0.3s ease, opacity 0.4s ease;
  will-change: transform;
}

/* Transparent nav over hero */
.nav-transparent {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Bottom nav hidden during hero */
.nav-hero-hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* Auto-hide states */
[data-anim="slide-down"].nav-hidden { transform: translateY(-100%); }
[data-anim="slide-up"].nav-hidden { transform: translateY(100%); }

/* === Scroll Animation Styles === */

/* Fade up: slide up + fade in */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.anim-fade-up.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in: simple opacity */
.anim-fade-in {
  opacity: 0;
  transition: opacity 0.7s ease-out;
}
.anim-fade-in.anim-visible {
  opacity: 1;
}

/* Slide from left */
.anim-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.anim-slide-left.anim-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.anim-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.anim-slide-right.anim-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in: zoom from 0.92 */
.anim-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.anim-scale-in.anim-visible {
  opacity: 1;
  transform: scale(1);
}

/* Parallax container */
.anim-parallax {
  will-change: transform;
  transition: none;
}

/* Line grow animation (for section dividers) */
.anim-line {
  transform: scaleX(0);
  transition: transform 0.7s ease-out;
}
.anim-line.anim-visible {
  transform: scaleX(1);
}

/* Focus styles - :focus fallback for Safari < 15.4, then :focus-visible override */
a:focus, button:focus {
  outline: 2px solid #c4956a;
  outline-offset: 2px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible) {
  outline: none;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid #c4956a;
  outline-offset: 2px;
}

/* === Chef Carousel Scroll-Snap === */
.chef-carousel {
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
}
.chef-carousel > * {
  scroll-snap-align: start;
}

/* === Review Card Hover Effect === */
section .bg-surface-container {
  transition: border-color 0.35s ease;
}
section .bg-surface-container:hover {
  border-color: rgba(196, 149, 106, 0.2);
}

/* === CTA Button Shine Animation === */
@keyframes ctaShine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
.hero-cta {
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  background-position: -200% center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.hero-cta:hover::before {
  opacity: 1;
  animation: ctaShine 0.8s ease-out forwards;
}

/* === Ornamental Divider === */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding: 1.5rem 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 0 0 60px;
  height: 1px;
  background: linear-gradient(
    to var(--ornament-dir, right),
    rgba(196, 149, 106, 0.5),
    rgba(196, 149, 106, 0.08)
  );
}
.ornament-divider::before {
  --ornament-dir: left;
}
.ornament-divider::after {
  --ornament-dir: right;
}
.ornament-divider .ornament-diamond {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(196, 149, 106, 0.5);
  transform: rotate(45deg);
  margin: 0 12px;
  flex-shrink: 0;
}

/* === Animated Link Underline (editorial feel) === */
.link-reveal {
  position: relative;
  display: inline;
}
.link-reveal::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #c4956a;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-reveal:hover::after {
  width: 100%;
}

/* === Nav Link Hover Underline === */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #c4956a;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

/* === Dish Card Premium Hover (speisekarte) === */
.dish-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease;
}
@media (hover: hover) {
  .dish-card:hover {
    transform: translateY(-4px);
  }
}

/* === Button hover lift === */
.btn-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
@media (hover: hover) {
  .btn-lift:hover {
    transform: translateY(-2px);
  }
}

/* === Chef Carousel Stagger Entrance === */
.chef-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.chef-stagger.stagger-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.chef-stagger.stagger-visible > *:nth-child(1) { transition-delay: 0s; }
.chef-stagger.stagger-visible > *:nth-child(2) { transition-delay: 0.1s; }
.chef-stagger.stagger-visible > *:nth-child(3) { transition-delay: 0.2s; }
.chef-stagger.stagger-visible > *:nth-child(4) { transition-delay: 0.3s; }

/* Safari webkit backdrop-filter fix */
[data-anim="slide-down"], [data-anim="slide-up"] {
  -webkit-backdrop-filter: blur(12px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up, .anim-fade-in, .anim-slide-left, .anim-slide-right, .anim-scale-in {
    opacity: 1; transform: none; transition: none;
  }
  .anim-line { transform: scaleX(1); transition: none; }
  body { animation: none; }
  [data-anim="slide-down"], [data-anim="slide-up"] { animation: none; }
  .hero-title, .hero-title-line, .hero-subtitle, .hero-cta, .hero-label { animation: none; opacity: 1; transform: none; }
  .chef-stagger > * { opacity: 1; transform: none; transition: none; }
  .hero-cta::before { animation: none; opacity: 0; }
  body::after { opacity: 0; }
  /* Marquee galleries: stop scrolling */
  .gallery-track, .gallery-track-home { animation: none !important; }
  /* Scroll-color: show images in color directly, skip grayscale-to-color animation */
  .scroll-color { filter: none !important; transition: none !important; }
  /* Videos: pause autoplay backdrops */
  video[autoplay] { display: none; }
  /* Logo hover scale */
  .logo-hover { transition: none; }
  .logo-hover:hover { transform: none; filter: none; }
  /* Dish card lift */
  .dish-card { transition: none; }
  .dish-card:hover { transform: none; }
  .btn-lift, .btn-lift:hover { transform: none; transition: none; }
}

/* === Open/Closed Status Badge === */
.open-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
  font-family: 'Source Sans 3', sans-serif;
}
.open-badge.ready { display: inline-flex; }
.open-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}
.open-badge[data-status="closed"] {
  background: rgba(248, 113, 113, 0.08);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}
.open-badge[data-status="soon"] {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}
@media (max-width: 480px) {
  .open-badge { font-size: 10px; padding: 3px 8px; gap: 5px; }
  .open-badge::before { width: 5px; height: 5px; }
}

/* === Language Toggle Active State === */
.lang-toggle [data-lang] {
  color: rgba(196, 149, 106, 0.45);
  transition: color 0.2s ease;
}
.lang-toggle [data-lang].lang-active {
  color: #c4956a;
}
