/* ==========================================================================
   Holzwirt Theme
   Dunkle Kreidetafel-Optik, adaptiert von der echten Live-Seite (holzwirt.at):
   dunkler Tafel-Hintergrund, helle Karten für Inhalte, Bernstein/Amber als
   Akzent (aus dem aktiven Menüpunkt der Live-Seite). Bitter (Headlines) +
   Work Sans (Body), self-hosted.
   ========================================================================== */

/* -- Fonts (self-hosted) -------------------------------------------------- */
/* font-display: optional - once cached, fonts apply within a very short block
   period on every navigation, so headings/body text don't visibly swap
   fonts/sizes when clicking between pages (this is a full page reload each
   time, not an SPA, so "swap" was re-triggering a visible flash on every
   single click). */

@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('../fonts/bitter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/bitter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('../fonts/bitter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Bitter';
  font-style: italic;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/bitter-600italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('../fonts/worksans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('../fonts/worksans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('../fonts/worksans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url('../fonts/worksans-700.woff2') format('woff2');
}

/* -- Tokens ---------------------------------------------------------------- */

:root {
  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dark chalkboard page canvas (default text sits directly on this) */
  --color-page: #201e1a;
  --color-page-text: #f0ead9;
  --color-page-text-muted: #b8ab93;
  --color-surface-dark: #16140f;

  /* Light card surface, used for anything that needs a readable content
     block (event/drink cards, the subpage article box) - mirrors the white
     article box the live site floats on its gray/chalkboard background. */
  --color-card: #f5f0e6;
  --color-card-text: #2a2420;
  --color-card-text-muted: #6b5f52;
  --color-border-card: #ddd2bc;

  /* Amber accent, taken from the live site's actual active-nav-link color */
  --color-accent: #c37f35;
  --color-accent-dark: #8a5a26;
  --color-accent-contrast: #201d18;

  --radius-card: 14px;
  --radius-pill: 999px;
  --radius-input: 8px;

  --shadow-card: 0 14px 32px -16px rgb(0 0 0 / 0.5);
  --max-width: 1200px;

  color-scheme: dark;
}

/* -- Reset ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--color-page);
  background-image: url('../images/chalkboard-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-page-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-input);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* -- Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active { transform: scale(0.98); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.btn--accent:hover { background: var(--color-accent-dark); }

.btn--ghost {
  background: rgb(255 255 255 / 0.08);
  color: var(--color-page-text);
  border-color: rgb(255 255 255 / 0.55);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgb(255 255 255 / 0.18); }

.btn--outline {
  background: transparent;
  color: var(--color-page-text);
  border-color: var(--color-page-text);
  margin-top: 1.5rem;
}
.btn--outline:hover { background: var(--color-page-text); color: var(--color-page); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
}
.link-more svg { width: 1em; height: 1em; transition: transform 0.15s ease; }
.link-more:hover svg { transform: translateX(3px); }

/* -- Icons -------------------------------------------------------------------- */

svg { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -0.2em; }

/* -- Header / Navigation ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface-dark);
  color: var(--color-page-text);
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-logo img {
  height: 52px;
  width: auto;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.primary-nav a:not(.btn) {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-page-text-muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.primary-nav a:not(.btn):hover,
.primary-nav a:not(.btn).is-active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  color: var(--color-page-text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--color-surface-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }
  .site-header.is-open .primary-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-cta { align-self: flex-start; }
}

/* -- Hero ----------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--color-page-text);
}
.hero__video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  /* Stops measured against the actual text zone (bottom ~55% of the hero) so the
     headline/claim/buttons stay legible regardless of what the background photo shows there. */
  background: linear-gradient(0deg, rgb(15 10 7 / 0.92) 0%, rgb(15 10 7 / 0.8) 40%, rgb(15 10 7 / 0.5) 70%, rgb(15 10 7 / 0.1) 100%);
}
.hero__inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
}
.hero__headline {
  font-size: clamp(2.25rem, 1.7rem + 2.4vw, 3.75rem);
  max-width: 14ch;
  margin-bottom: 0.3em;
}
.hero__claim {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  color: var(--color-page-text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.3;
  padding-bottom: 0.15em;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* -- Info bar --------------------------------------------------------------------- */

.info-bar {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}
.info-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: center;
  font-size: 0.95rem;
}
.info-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.info-bar a { text-decoration: underline; text-underline-offset: 2px; }

/* -- Sections -------------------------------------------------------------------- */

.section { padding: clamp(3rem, 2.2rem + 3vw, 5.5rem) 0; }
.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section--events, .section--menu { text-align: center; }
.section--events h2, .section--menu h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }

/* Events */

.events-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  text-align: left;
  margin: 2.5rem 0 0;
}
.event-card {
  background: var(--color-card);
  color: var(--color-card-text);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.event-card img { width: 100%; height: 260px; object-fit: contain; background: var(--color-page); }
.event-card--featured img { height: 340px; }
.event-card__body { padding: 1.5rem; }

/* Flip cards (homepage teaser only) - hover/focus reveals the full text on
   the back, since the front only has room for a short teaser. */
.event-card--flip {
  background: none;
  box-shadow: none;
  overflow: visible;
  perspective: 1400px;
  height: 420px;
}
.event-card--flip.event-card--featured { height: 500px; }
.event-card--flip:focus-visible { outline: none; }
.event-card__flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.event-card--flip:hover .event-card__flip-inner,
.event-card--flip:focus-within .event-card__flip-inner,
.event-card--flip.is-flipped .event-card__flip-inner {
  transform: rotateY(180deg);
}
.event-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Slightly translucent "frosted" card surface instead of a flat opaque
     one - lets the chalkboard texture bleed through faintly, blurred so
     the text on top stays easy to read. Faces stay at opacity:1 always;
     backface-visibility (plus the parent's rotateY) is what swaps them,
     so the 3D rotation itself stays the one clearly visible motion. */
  background: rgb(245 240 230 / 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.event-card__face--front img { flex-shrink: 0; }
.event-card__face--back {
  transform: rotateY(180deg);
  /* Left to right: full card color fading down to 50% transparent. */
  background: linear-gradient(to right, rgb(245 240 230 / 1) 0%, rgb(245 240 230 / 0.5) 100%);
  padding: 1.5rem;
  justify-content: center;
  overflow-y: auto;
}
.event-card__face--back .event-card__date { margin-bottom: 0.75em; }
.event-card__face--back p { color: var(--color-card-text); }

@media (prefers-reduced-transparency: reduce) {
  .event-card__face {
    background: var(--color-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .event-card__face--back { background: var(--color-card); }
}

@media (prefers-reduced-motion: reduce) {
  .event-card__flip-inner { transition: none; }
}

@media (max-width: 760px) {
  .event-card--flip, .event-card--flip.event-card--featured { height: 390px; }
}
.event-card__date {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: 0.5em;
}
.event-card__noimage {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-border-card);
  color: var(--color-card-text-muted);
}
.event-card__noimage svg { width: 2.5em; height: 2.5em; }
.event-card--featured .event-card__noimage { height: 340px; }

@media (max-width: 760px) {
  .events-grid { grid-template-columns: 1fr; }
  .event-card--featured img, .event-card--featured .event-card__noimage { height: 240px; }
}

/* Events list page (all active events, not just the homepage teaser) */

.section--events-page h1 { max-width: 20ch; }
.events-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0 0;
}

/* About split */

.about-split {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.about-split__image {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  aspect-ratio: 9 / 11;
  object-fit: cover;
  width: 100%;
  height: auto;
  max-height: 560px;
}
@media (max-width: 760px) {
  .about-split { grid-template-columns: 1fr; }
  .about-split__image { aspect-ratio: 4 / 3; order: -1; }
}

/* Dish grid */

.dish-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0 0;
  text-align: left;
}
.dish-card {
  background: var(--color-card);
  color: var(--color-card-text);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.dish-card img { width: 100%; height: 190px; object-fit: cover; }
.dish-card h3 { margin: 1rem 1.1rem 0.2rem; font-size: 1.05rem; }
.dish-card__price {
  margin: 0 1.1rem 1.2rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .dish-grid { grid-template-columns: 1fr; }
}

/* Anfahrt split */

.anfahrt-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.anfahrt-split__map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.anfahrt-split__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 760px) {
  .anfahrt-split { grid-template-columns: 1fr; }
  .anfahrt-split__map { order: -1; }
}

/* -- Consent-gated embeds (Google Maps, YouTube) ----------------------------------- */

.consent-embed { position: relative; }
.consent-embed__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--color-card);
  color: var(--color-card-text);
}
.consent-embed__placeholder svg { width: 2em; height: 2em; color: var(--color-accent-dark); }
.consent-embed__placeholder p { max-width: 32ch; margin: 0; }
.consent-embed.is-loaded .consent-embed__placeholder { display: none; }

/* -- Simple subpages -------------------------------------------------------------- */

.page-simple { padding: clamp(3rem, 2rem + 3vw, 5rem) 0; }
.page-simple__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  background: var(--color-card);
  color: var(--color-card-text);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.page-simple h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.page-simple__inner .link-more { color: var(--color-accent-dark); }
.event-detail__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-input);
  margin-bottom: 1.5rem;
}
.page-content { color: var(--color-card-text); }
.page-content :is(h2, h3) { margin-top: 1.5em; }
.page-content a { color: var(--color-accent-dark); text-decoration: underline; }

.page-content ul {
  list-style: disc;
  padding-left: 1.25em;
  margin: 0 0 1.25em;
}
.page-content li { margin-bottom: 0.4em; }
.page-content li:last-child { margin-bottom: 0; }

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.95rem;
}
.page-content th, .page-content td {
  text-align: left;
  padding: 0.6em 1em 0.6em 0;
  border-bottom: 1px solid var(--color-border-card);
}
.page-content th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-card-text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--color-accent-dark);
}
.page-content td:last-child, .page-content th:last-child { text-align: right; }

/* -- Footer ------------------------------------------------------------------------ */

.site-footer {
  background: var(--color-surface-dark);
  color: var(--color-page-text);
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-page-text-muted);
  margin-bottom: 1em;
}
.site-footer .wordmark--footer { font-size: 1.3rem; margin: 0 0 0.3em; }
.muted { color: var(--color-page-text-muted); }
.site-footer p { margin: 0 0 0.6em; }
.site-footer a:hover { color: var(--color-accent); }
.hours-list div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3em 0; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.hours-list dt, .hours-list dd { margin: 0; font-weight: 400; }
.social-links { display: flex; gap: 0.9rem; margin-top: 1rem; }
.social-links a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
}
.site-footer a[href^="tel:"], .site-footer a[href*="anfahrt"] {
  display: inline-flex; align-items: center; gap: 0.5em;
}

.site-footer__legal {
  border-top: 1px solid rgb(255 255 255 / 0.1);
}
.site-footer__legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-page-text-muted);
}
.site-footer__legal a:hover { color: var(--color-page-text); text-decoration: underline; }

.link-button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover { color: var(--color-page-text); }

@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* -- Cookie banner ------------------------------------------------------------------ */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-card);
  color: var(--color-card-text);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cookie-banner p { margin: 0; font-size: 0.95rem; }
.cookie-banner a { color: var(--color-accent-dark); text-decoration: underline; }
.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
.cookie-banner .btn--outline {
  color: var(--color-card-text);
  border-color: var(--color-card-text);
  margin-top: 0;
}
.cookie-banner .btn--outline:hover { background: var(--color-card-text); color: var(--color-card); }

/* -- Motion ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
