/* ============ Fonts (lokal gehostet, DSGVO-konform) ============ */
@font-face {
  font-family: 'Marcellus';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/marcellus-normal-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/mulish-normal-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Mulish';
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/mulish-italic-400.woff2') format('woff2');
}

:root {
  --cream: #FBF7EF;
  --brown: #50332D;
  --gold: #C2912E;
  --terra: #C24349;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Mulish', sans-serif;
  background-color: var(--cream);
  color: #3B2A23;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display { font-family: 'Marcellus', serif; }

/* ============ Mäander-Bordüre (griechisches Schlüsselmuster) ============ */
.meander {
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 12 V2 H22 V8 H12 V5 H17' fill='none' stroke='%23C2912E' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 28px 14px;
}
.meander--dark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 12 V2 H22 V8 H12 V5 H17' fill='none' stroke='%23D9B10D' stroke-width='1.6'/%3E%3C/svg%3E");
}

/* ============ Körnung / Textur ============ */
.grain {
  position: relative;
}
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.31 0 0 0 0 0.20 0 0 0 0 0.18 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Scroll-Reveal (nur aktiv wenn JS läuft) ============ */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Interaktive Elemente ============ */
.btn {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -4px;
  height: 2px;
  background: var(--gold);
  transition: right .3s cubic-bezier(.22,1,.36,1);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { right: 0; }

/* ============ Bildkarten ============ */
.img-card { overflow: hidden; }
.img-card img {
  transition: transform .6s cubic-bezier(.22,1,.36,1);
}
.img-card:hover img { transform: scale(1.05); }

/* ============ Skeleton-Loader ============ */
/* Nur aktiv, solange ein Medium wirklich lädt (Klasse setzt main.js).
   Bilder blenden den Platzhalter erst nach 250 ms ein, damit schnelle Ladevorgänge nicht flackern. */
@keyframes sk-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes sk-in { from { opacity: 0; } to { opacity: 1; } }
.sk-loading, .sk-bg {
  background-color: #E9DCC3;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
}
img.sk-loading { color: transparent; animation: sk-in .3s ease .25s both, sk-shimmer 1.4s linear infinite; }
.sk-bg { animation: sk-shimmer 1.4s linear infinite; }
.lightbox img.sk-loading { width: min(92vw, 1100px); aspect-ratio: 16 / 9; }
@media (prefers-reduced-motion: reduce) {
  img.sk-loading, .sk-bg { animation: none; }
}

/* ============ Speisekarte ============ */
.menu-item { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem 1rem; align-items: baseline; }
.menu-item--nonum { grid-template-columns: 1fr auto; }
.menu-dots {
  border-bottom: 2px dotted #C9B894;
  transform: translateY(-4px);
}
.menu-num {
  font-family: 'Marcellus', serif;
  color: var(--gold);
  min-width: 2.2rem;
  text-align: right;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43,27,22,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(92vw, 1100px); max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
