/* =========================================================
   Senner Grillhaus – Stylesheet
   Handgeschrieben, mobile-first. Holzkohle + Glut als Markenbild.
   ========================================================= */

/* ---------- Selbst gehostete Display-Schrift (datensparsam) ---------- */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/oswald.woff2") format("woff2");
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Markenfarben (aus dem Logo abgeleitet) */
  --orange:        #E8902A;
  --orange-light:  #F4B24C;
  --orange-dark:   #B4660F;   /* dunkler -> AA-tauglich auf hellem Grund */
  --rot:           #C0392B;
  --ember:         #E74C3C;
  --charcoal:      #2B2723;
  --charcoal-soft: #4a4540;
  --smoke:         #1b1815;   /* Holzkohle, fast schwarz */

  /* Flächen (bewusst niedrig-chromatische Stein-Neutrale, kein Creme) */
  --bg:      #F4F3F0;
  --bg-alt:  #E9E7E1;
  --white:   #ffffff;
  --line:    #dcd8d0;

  --green:   #2e7d32;  /* "geöffnet" */

  /* Schrift */
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Maße */
  --maxw: 1100px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(27, 24, 21, 0.12);
  --shadow-sm: 0 2px 8px rgba(27, 24, 21, 0.10);
  --section-pad: clamp(2.75rem, 6vw, 5rem);
  --nav-h: 64px;

  /* Easing-Kurven (stärker als die CSS-Defaults) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--rot); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; font-weight: 700; letter-spacing: .01em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.8rem); text-transform: uppercase; }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem); }
:focus-visible { outline: 3px solid var(--orange-dark); outline-offset: 2px; border-radius: 4px; }

.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-pad); }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.section__head p { color: var(--charcoal-soft); max-width: 60ch; margin: .5rem auto 0; }
.section__head h2 { position: relative; display: inline-block; }
.section__head h2::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
  background: var(--orange); margin: .75rem auto 0;
}

/* ---------- Skip-Link (Barrierefreiheit) ---------- */
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--charcoal); color: #fff; padding: .65rem 1.1rem;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: .75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .03em;
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: 50px; border: 2px solid transparent;
  transition: transform .14s var(--ease-out), box-shadow .14s ease, background .14s ease;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--rot); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #a82e22; }
.btn--ghost { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn--ghost:hover { background: var(--charcoal); color: #fff; }
.btn--light { background: #fff; color: var(--charcoal); box-shadow: var(--shadow-sm); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--nav-h); }
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.nav__brand img { height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; }
.nav__links a {
  display: inline-block; padding: .5rem .7rem; color: var(--charcoal); text-decoration: none;
  font-family: var(--font-display); text-transform: uppercase; font-size: .92rem; font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav__links a:hover { background: var(--bg-alt); color: var(--rot); }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--charcoal); transition: transform .14s var(--ease-out);
}
.nav__toggle:active { transform: scale(.9); }
.nav__toggle-bars { position: relative; display: block; width: 26px; height: 18px; }
.nav__toggle-bars span {
  position: absolute; left: 0; right: 0; height: 2.5px; border-radius: 2px; background: currentColor;
  transition: transform .26s var(--ease-out), opacity .18s var(--ease-out);
}
.nav__toggle-bars span:nth-child(1) { top: 0; }
.nav__toggle-bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav__toggle-bars span:nth-child(3) { bottom: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(2) { opacity: 0; transform: translateY(-50%) scaleX(.4); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem; box-shadow: var(--shadow);
    /* Animierbar verbergen statt display:none (Panel ist absolut -> kein Layout-Shift) */
    opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none;
    transition: opacity .2s var(--ease-out), transform .24s var(--ease-out), visibility 0s linear .24s;
  }
  .nav__links.is-open {
    opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto;
    transition: opacity .22s var(--ease-out), transform .26s var(--ease-out), visibility 0s;
  }
  .nav__links a { display: block; padding: .8rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__links li:last-child a { border-bottom: 0; }

  /* Einträge gestaffelt einblenden (Stagger) */
  .nav__links li {
    opacity: 0; transform: translateY(-6px);
    transition: opacity .2s var(--ease-out), transform .24s var(--ease-out);
  }
  .nav__links.is-open li { opacity: 1; transform: translateY(0); }
  .nav__links.is-open li:nth-child(1) { transition-delay: .04s; }
  .nav__links.is-open li:nth-child(2) { transition-delay: .08s; }
  .nav__links.is-open li:nth-child(3) { transition-delay: .12s; }
  .nav__links.is-open li:nth-child(4) { transition-delay: .16s; }
  .nav__links.is-open li:nth-child(5) { transition-delay: .20s; }
  .nav__links.is-open li:nth-child(6) { transition-delay: .24s; }
}

/* ---------- Status-Badge (geöffnet/geschlossen) ---------- */
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem; border-radius: 50px; font-weight: 700;
  font-size: .9rem; background: #fff; color: var(--charcoal); box-shadow: var(--shadow-sm);
}
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rot); box-shadow: 0 0 0 4px rgba(192,57,43,.18); }
.status--open .status__dot { background: var(--green); animation: dot-pulse 2.4s var(--ease-out) infinite; }
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,125,50,.5); }
  70%  { box-shadow: 0 0 0 9px rgba(46,125,50,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,125,50,0); }
}
.status small { font-weight: 500; color: var(--charcoal-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff; text-align: center;
  background: var(--smoke) center / cover no-repeat;
  padding: clamp(3.5rem, 10vw, 6.5rem) 0 clamp(4rem, 10vw, 6.5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
}
/* Ohne Foto: Glut, die von unten aufsteigt (Holzkohle-Look) */
.hero:not(.hero--image)::before {
  background:
    radial-gradient(85% 60% at 50% 122%, rgba(231, 76, 60, .65), transparent 60%),
    radial-gradient(70% 50% at 50% 128%, rgba(232, 144, 42, .95), transparent 55%),
    radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.06), transparent 45%);
}
/* Mit Foto: dunkles Overlay für lesbaren Text */
.hero--image::before {
  background: linear-gradient(180deg, rgba(18, 15, 13, .45), rgba(18, 15, 13, .82));
}
.hero__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.25rem; }
.hero h1 {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 700;
  font-size: clamp(2.2rem, 1.2rem + 5vw, 4rem); line-height: 1.02;
  text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.hero p.lead { font-size: clamp(1.05rem, 1rem + .6vw, 1.4rem); text-shadow: 0 1px 6px rgba(0,0,0,.45); max-width: 36ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: .5rem; }
.hero__hinweis { color: rgba(255,255,255,.85); }

/* Sanfter Einzug der Hero-Inhalte (einmalig beim Laden, gestaffelt) */
.hero__inner > * { animation: hero-in .6s var(--ease-out) both; }
.hero__inner > .status { animation-delay: .05s; }
.hero__inner > h1 { animation-delay: .12s; }
.hero__inner > p.lead { animation-delay: .20s; }
.hero__inner > .hero__actions { animation-delay: .28s; }
.hero__inner > .hero__hinweis { animation-delay: .36s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Speisekarte ---------- */
.menu-nav { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.menu-nav a {
  font-family: var(--font-display); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em;
  color: var(--charcoal); background: var(--white); border: 1px solid var(--line);
  padding: .4rem .85rem; border-radius: 50px; text-decoration: none;
  transition: background .14s, color .14s, border-color .14s, transform .14s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .menu-nav a:hover { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
}
.menu-nav a:active { transform: scale(.95); }

.menu-cats { display: grid; gap: clamp(2rem, 5vw, 3rem) clamp(2rem, 5vw, 4rem); }
@media (min-width: 760px) { .menu-cats { grid-template-columns: 1fr 1fr; align-items: start; } }
.menu-cat { scroll-margin-top: calc(var(--nav-h) + 16px); }
.menu-cat__head {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); letter-spacing: .03em; color: var(--charcoal);
  padding-bottom: .5rem; margin-bottom: .25rem; border-bottom: 3px solid var(--orange);
}
.dish { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.dish:last-child { border-bottom: 0; }
.dish__name { font-weight: 700; }
.dish__name .code { font-weight: 400; color: var(--charcoal-soft); font-size: .85em; }
.dish__price { font-family: var(--font-display); font-weight: 600; white-space: nowrap; color: var(--rot); font-size: 1.1rem; }
.dish__desc { grid-column: 1 / -1; color: var(--charcoal-soft); font-size: .92rem; }
.dish--soldout { opacity: .55; }
.dish--soldout .dish__price { color: var(--charcoal-soft); }
.menu-legend { margin-top: 2rem; font-size: .85rem; color: var(--charcoal-soft); text-align: center; max-width: 75ch; margin-inline: auto; }
.menu-download { text-align: center; margin-top: 1.75rem; }

/* ---------- Öffnungszeiten ---------- */
.hours-wrap { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 720px) { .hours-wrap { grid-template-columns: 1.2fr 1fr; } }
.hours { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden; }
.hours table { width: 100%; border-collapse: collapse; }
.hours td { padding: .8rem 1.15rem; border-bottom: 1px solid var(--line); }
.hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today { background: color-mix(in srgb, var(--orange) 16%, #fff); }
.hours tr.is-today td.day::after { content: " · heute"; color: var(--orange-dark); font-weight: 600; font-size: .82em; }
.hours td.day { font-weight: 700; }
.hours td.time { text-align: right; font-variant-numeric: tabular-nums; }
.hours td.closed { color: var(--rot); }
.hours-note { background: var(--smoke); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; }
.hours-note .status { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.hours-note .status small { color: rgba(255,255,255,.75); }
.hours-note p { color: rgba(255,255,255,.85); }
.hours-note h3 { margin-bottom: .4rem; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; background: var(--bg-alt); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .gallery a:hover img { transform: scale(1.05); }
}
.gallery-empty {
  text-align: center; color: var(--charcoal-soft); border: 2px dashed var(--line);
  border-radius: var(--radius); padding: 2rem 1.5rem; max-width: 540px; margin: 1.75rem auto 0;
}

/* ---------- Über uns ---------- */
.about { max-width: 62ch; margin-inline: auto; text-align: center; text-wrap: pretty; }
.about p + p { margin-top: 1rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 1.5rem; display: grid; gap: 1rem; align-content: start; }
.contact-line { display: flex; gap: .75rem; align-items: flex-start; }
.contact-line svg { width: 22px; height: 22px; flex: none; color: var(--orange-dark); margin-top: 2px; }
.contact-line a { color: var(--charcoal); text-decoration: none; }
.contact-line a:hover { color: var(--rot); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); min-height: 280px; }
.map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--smoke); color: #e9e2d8; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h4 { font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; margin-bottom: .6rem; color: #fff; letter-spacing: .05em; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .35rem; }
.footer-grid a { text-decoration: none; opacity: .85; }
.footer-grid a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; opacity: .75; text-align: center; }

/* ---------- Rechtstexte / Prosa ---------- */
.legal { max-width: 760px; }
.legal__title { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.6rem); text-transform: uppercase; margin-bottom: 1.25rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose a { color: var(--rot); }

/* ---------- Hilfsklassen ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Scroll-Reveal (nur mit JS aktiv, nur unterhalb des Folds) ---------- */
.js-anim .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .menu-cat.reveal:nth-child(even) { transition-delay: .07s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js-anim .reveal { opacity: 1 !important; transform: none !important; }
}
