/* =========================================================
   Landgasthof Barni – Stylesheet
   Farbwelt aus dem Logo: Tannengrün, Creme, Gold/Ocker
   ========================================================= */

/* ---------- Design-Tokens ---------- */
:root {
  --green:        #2d4a35;
  --green-dark:   #1f3325;
  --green-light:  #3d6147;
  --gold:         #b08b4c;
  --gold-dark:    #9a7639;
  --cream:        #fcf7f1;

  /* Semantische Tokens – Light */
  --bg:           #fcf7f1;
  --bg-alt:       #f4ecdf;
  --surface:      #ffffff;
  --text:         #26302a;
  --text-muted:   #6b6459;
  --border:       #e4dac8;
  --brand:        var(--green);
  --brand-hover:  var(--green-dark);
  --accent:       var(--gold);
  --shadow:       0 6px 24px rgba(31, 51, 37, 0.10);

  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --radius: 12px;
  --radius-sm: 8px;
}

:root[data-theme="dark"] {
  --bg:           #151b17;
  --bg-alt:       #1c241e;
  --surface:      #212a23;
  --text:         #e9e3d7;
  --text-muted:   #a9a294;
  --border:       #33402f;
  --brand:        #8fb89b;
  --brand-hover:  #a6cbb1;
  --accent:       #cca767;
  --shadow:       0 6px 24px rgba(0, 0, 0, 0.35);
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--brand); color: #fff; padding: 0.7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; }
.brand-logo {
  height: 52px; width: auto; border-radius: 6px;
}
:root[data-theme="dark"] .brand-logo {
  /* Logo hat cremefarbenen Hintergrund – im Dark Mode dezent einbetten */
  background: #fcf7f1; padding: 4px 8px;
}

.main-nav { display: flex; align-items: center; }
.nav-list {
  list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0;
}
.nav-list a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.98rem;
  padding: 0.4rem 0; position: relative;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav-list a:hover::after, .nav-list a:focus-visible::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle-bar { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme Toggle */
.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--bg-alt); border-color: var(--accent); }
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: 999px; text-decoration: none;
  cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-primary { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #14201a; }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; text-align: center;
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
  background:
    radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.8rem;
  color: var(--accent); font-weight: 600; margin: 0 0 0.6rem;
}
.hero-title { font-size: clamp(2.8rem, 9vw, 5rem); color: var(--brand); font-weight: 700; }
.hero-sub {
  font-family: var(--font-head); font-size: clamp(1.2rem, 4vw, 1.7rem);
  letter-spacing: 0.35em; text-transform: uppercase; color: var(--text-muted);
  margin: 0.2rem 0 1.4rem;
}
.hero-text { max-width: 620px; margin: 0 auto 2rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 8vw, 5rem) 0; }
.section-accent { background: var(--bg-alt); }
.section-center { text-align: center; }
.section-title {
  font-size: clamp(1.9rem, 5vw, 2.6rem); color: var(--brand);
  text-align: center; margin-bottom: 0.5rem;
}
.section-title::after {
  content: ""; display: block; width: 60px; height: 3px; border-radius: 3px;
  background: var(--accent); margin: 0.8rem auto 0;
}
.section-lead {
  text-align: center; color: var(--text-muted); max-width: 640px;
  margin: 0 auto 2.5rem;
}
.section-lead em, .contact-hint em, .hours-table em { color: var(--text-muted); opacity: 0.85; font-size: 0.92em; }
code { background: var(--bg-alt); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.9em; }

/* ---------- Öffnungszeiten ---------- */
.hours-card {
  max-width: 620px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 0.95rem 1.4rem; text-align: left; }
.hours-table th { font-weight: 600; color: var(--text); width: 42%; }
.hours-table td { color: var(--text-muted); text-align: right; }
.hours-table tr:not(:last-child) { border-bottom: 1px solid var(--border); }
.hours-table .closed { color: var(--accent); font-style: italic; }
.hours-note {
  padding: 0.9rem 1.4rem; margin: 0; font-size: 0.9rem;
  color: var(--text-muted); background: var(--bg-alt); text-align: center;
}

/* ---------- Galerie ---------- */
.gallery {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.gallery-item {
  padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-sm); overflow: hidden;
}
.placeholder-img {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; width: 100%; color: #fff; font-family: var(--font-head);
  font-size: 1.3rem; letter-spacing: 0.03em; text-align: center; padding: 1rem;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  transition: transform 0.35s ease;
}
/* Leichte Farbabwechslung der Platzhalter */
.placeholder-img[style*="--ph:2"] { background: linear-gradient(135deg, #6f7d4a, #3d4a24); }
.placeholder-img[style*="--ph:3"] { background: linear-gradient(135deg, #a9863f, #6d4f1c); }
.placeholder-img[style*="--ph:4"] { background: linear-gradient(135deg, #4c6b78, #24323b); }
.placeholder-img[style*="--ph:5"] { background: linear-gradient(135deg, #8a5b3b, #4d2f1c); }
.placeholder-img[style*="--ph:6"] { background: linear-gradient(135deg, #5b6e57, #2c3a2a); }
.gallery-item:hover .placeholder-img,
.gallery-item:focus-visible .placeholder-img { transform: scale(1.05); }

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; text-align: center;
  box-shadow: var(--shadow);
}
.contact-heading { color: var(--accent); font-size: 1.35rem; margin-bottom: 0.6rem; }
.contact-body { font-style: normal; color: var(--text); line-height: 1.7; }
.contact-body a { color: var(--brand); text-decoration: none; font-weight: 500; }
.contact-body a:hover { text-decoration: underline; }
.contact-hint { text-align: center; margin-top: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark); color: #e9e3d7;
  padding: 2.5rem 0; margin-top: 0;
}
:root[data-theme="dark"] .site-footer { background: #10160f; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer-brand { font-family: var(--font-head); font-size: 1.4rem; letter-spacing: 0.05em; margin: 0; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: #cdbfa3; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-copy { margin: 0; font-size: 0.85rem; color: #9a9382; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 20, 15, 0.88);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  animation: fade-in 0.25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-figure { margin: 0; max-width: 900px; width: 100%; text-align: center; }
.lightbox-media {
  aspect-ratio: 4 / 3; max-height: 75vh; width: 100%; border-radius: var(--radius);
  font-size: 2rem;
}
.lightbox-caption { color: #fff; margin-top: 1rem; font-family: var(--font-head); font-size: 1.3rem; }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.5rem;
  background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1;
  cursor: pointer; width: 48px; height: 48px; border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255,255,255,0.12); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; order: 3; }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .nav-list.open { max-height: 340px; }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; padding: 1rem clamp(1.1rem, 4vw, 2rem); border-top: 1px solid var(--border); }
  .nav-list a::after { display: none; }
  .header-inner { position: relative; }
}

/* Fokus-Sichtbarkeit durchgängig */
a:focus-visible, button:focus-visible, .gallery-item:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
