/* =========================================================
   Kaffee Fleck – Design-System & Layout
   Farbwelt: Kaffeebraun / Karamell / Creme + ruhiges Grün
   Schrift: Fraunces (Display) + Inter (Text), lokal gehostet
   ========================================================= */

/* ---------- Schriften (lokal, DSGVO) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  --kaffee:      #6F4E37;
  --kaffee-dark: #573C29;
  --karamell:    #D9B382;
  --karamell-soft:#EAD6B6;
  --creme:       #FBF6EF;
  --creme-2:     #F3E9DB;
  --gruen:       #3A6B5E;
  --gruen-dark:  #2E574B;
  /* Akzentfarbe für Buttons/Links/Fokus – aktuell Braun.
     Für den grünen Akzent die beiden Werte auf #3A6B5E / #2E574B setzen. */
  --accent:      var(--kaffee);
  --accent-dark: var(--kaffee-dark);
  --espresso:    #2A1E16;
  --espresso-soft:#6A5647;
  --logo-orange: #D3742B;
  --white:       #ffffff;

  --line: rgba(42, 30, 22, .12);
  --shadow-sm: 0 2px 8px rgba(58, 40, 26, .08);
  --shadow-md: 0 10px 30px rgba(58, 40, 26, .12);
  --shadow-lg: 0 24px 60px rgba(58, 40, 26, .18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --header-h: 72px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--espresso);
  background: var(--creme);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--kaffee); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--espresso); font-optical-sizing: auto; letter-spacing: -.01em; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0 !important;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--espresso); color: var(--creme); padding: .6rem 1rem;
  border-radius: var(--radius-sm); transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: var(--creme); }
.eyebrow {
  font-family: var(--font-sans); font-weight: 600; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: .5rem;
}
section[id], #top { scroll-margin-top: calc(var(--header-h) + 14px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .95rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--kaffee); border-color: rgba(111,78,55,.4); }
.btn--ghost:hover { background: var(--kaffee); color: var(--creme); border-color: var(--kaffee); }
.btn--sm { padding: .6rem 1rem; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 246, 239, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; }
.brand__k { color: var(--logo-orange); }
.brand__f { color: var(--kaffee); }

.nav { display: flex; align-items: center; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; position: relative; border-radius: 10px;
}
.nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2.5px; background: var(--kaffee); border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav__toggle-bar { top: 50%; transform: translateY(-50%); }
.nav__toggle-bar::before { top: -7px; }
.nav__toggle-bar::after { top: 7px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.nav__menu { display: flex; align-items: center; gap: 1.4rem; }
.nav__menu a { color: var(--espresso); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav__menu a:hover { color: var(--kaffee); }
.nav__menu .btn { color: var(--white); }
.nav__cta a:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--creme) 0%, var(--creme-2) 100%); padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2.6rem, 7vw, 5rem); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; }
.hero__text { max-width: 34rem; }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 3.9rem); margin-bottom: 1rem; }
.hero__lead { font-size: 1.12rem; color: var(--espresso-soft); margin-bottom: 1.8rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.stars { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--espresso); }
.stars__icons { color: var(--karamell); font-size: 1.15rem; letter-spacing: .05em; position: relative; }
.stars__half { position: relative; display: inline-block; color: rgba(217,179,130,.4); }
.stars__half::before { content: "★"; position: absolute; left: 0; top: 0; width: 50%; overflow: hidden; color: var(--karamell); }
.stars__text { font-size: .95rem; color: var(--espresso-soft); }
.stars__text strong { color: var(--espresso); }
.stars:hover .stars__text { color: var(--kaffee); }
.hero__status { font-size: .95rem; font-weight: 600; }
.hero__status .is-open { color: var(--accent); }
.hero__status .is-closed { color: #b23b2e; }

.hero__media { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.hero__media picture, .hero__media img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero__media img { aspect-ratio: 3 / 3.4; object-fit: cover; }
.hero__badge {
  position: absolute; left: -14px; bottom: 22px; display: flex; align-items: center; gap: .55rem;
  background: var(--creme); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: .6rem .85rem; border-radius: 14px; font-size: .82rem; font-weight: 600; line-height: 1.2; color: var(--espresso);
}
.hero__badge img { width: 40px; height: 40px; border-radius: 0; box-shadow: none; }

/* ---------- Sections allgemein ---------- */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--angebot { background: var(--white); }
.section--story { background: var(--creme-2); }
.section--galerie { background: var(--creme); }
.section--zeiten { background: var(--creme-2); }
.section--kontakt { background: var(--creme); }
.section__head { max-width: 42rem; margin-bottom: 2.4rem; }
.section__head h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); }
.section__intro { color: var(--espresso-soft); font-size: 1.08rem; margin-top: .6rem; }

/* ---------- Angebot / Menü ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.menu-card {
  background: var(--creme); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.menu-card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.menu-card__media img { width: 100%; height: 100%; object-fit: cover; }
.menu-card__body { padding: 1.3rem 1.4rem 1.6rem; }
.menu-card__body h3 { font-size: 1.35rem; margin-bottom: .7rem; color: var(--kaffee); }
.menu-list { display: grid; gap: .35rem; }
.menu-list li { position: relative; padding-left: 1.25rem; color: var(--espresso); }
.menu-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--karamell); }
.menu-note {
  margin-top: 1.8rem; text-align: center; color: var(--espresso-soft); font-size: 1rem;
  max-width: 44rem; margin-inline: auto;
}

/* ---------- Story / Ambiente ---------- */
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.6rem, 5vw, 3.4rem); align-items: center; }
.story__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 3 / 3.6; object-fit: cover; }
.story__text h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); margin-bottom: .8rem; }
.story__text p { color: var(--espresso-soft); margin-bottom: 1rem; }
.feature-list { display: grid; gap: .7rem; margin: 1.4rem 0; }
.feature-list li { display: flex; align-items: center; gap: .7rem; font-weight: 500; color: var(--espresso); }
.feature-list__ico { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; background: var(--creme); border: 1px solid var(--line); border-radius: 50%; font-size: 1rem; }
.feature-list--compact li { font-weight: 400; color: var(--espresso-soft); }
.story__events { font-size: .98rem; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery__btn {
  display: block; width: 100%; padding: 0; border: 0; background: var(--creme-2);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.gallery__btn img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .35s ease; }
.gallery__btn:hover img { transform: scale(1.06); }
.social-cta { margin-top: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.social-cta p { color: var(--espresso-soft); }

/* ---------- Öffnungszeiten & Anfahrt ---------- */
.zeiten { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 5vw, 3.2rem); }
.zeiten h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: .6rem; }
.status-badge {
  display: inline-flex; align-items: center; gap: .55rem; margin: .4rem 0 1.2rem;
  padding: .45rem .9rem; border-radius: 999px; background: var(--white);
  border: 1px solid var(--line); font-weight: 600; font-size: .95rem;
}
.status-badge__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--espresso-soft); flex: none; }
.status-badge.is-open .status-badge__dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(111,78,55,.18); }
.status-badge.is-closed .status-badge__dot { background: #b23b2e; box-shadow: 0 0 0 4px rgba(178,59,46,.16); }
.status-badge.is-open { color: var(--accent-dark); }
.status-badge.is-closed { color: #8f3327; }

.hours { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.hours th, .hours td { text-align: left; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { font-weight: 500; color: var(--espresso); }
.hours td { text-align: right; color: var(--espresso-soft); font-variant-numeric: tabular-nums; }
.hours tr.is-today { background: var(--karamell-soft); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--espresso); font-weight: 700; }

.nap { font-style: normal; line-height: 1.6; margin-bottom: 1rem; color: var(--espresso); }
.map { position: relative; margin-top: 1.2rem; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--creme-2); box-shadow: var(--shadow-sm); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map__consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; padding: 1.4rem; background: linear-gradient(160deg, var(--creme), var(--creme-2)); }
.map__consent p { color: var(--espresso-soft); font-size: .92rem; max-width: 28rem; }
.map__consent p strong { color: var(--espresso); font-size: 1rem; }
.map__consent .btn { margin-top: .3rem; }
.map__alt { font-size: .85rem !important; }

/* ---------- Kontakt / Formular ---------- */
.kontakt { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(1.6rem, 5vw, 3.2rem); align-items: start; }
.kontakt__intro h2 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); margin-bottom: .7rem; }
.kontakt__intro > p { color: var(--espresso-soft); margin-bottom: 1.4rem; }
.contact-list { display: grid; gap: .9rem; }
.contact-list li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list__label { font-weight: 600; color: var(--kaffee); font-size: .95rem; }

.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-md); }
.form__row { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { font-weight: 600; font-size: .95rem; color: var(--espresso); }
.form input, .form textarea {
  font: inherit; color: var(--espresso); background: var(--creme);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem; width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(111,78,55,.16); }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #b23b2e; box-shadow: 0 0 0 3px rgba(178,59,46,.14); }
.form textarea { resize: vertical; min-height: 110px; }
.form__hint { font-size: .85rem; color: var(--espresso-soft); margin: -.4rem 0 1rem; }
.form__consent { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; margin-bottom: 1.2rem; font-size: .9rem; color: var(--espresso-soft); }
.form__consent input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--accent); }
.form__consent a { color: var(--accent-dark); }
.form__status { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.form__status.is-success { background: rgba(111,78,55,.12); color: var(--accent-dark); }
.form__status.is-error { background: rgba(178,59,46,.1); color: #8f3327; }
.form #formSubmit { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso); color: var(--creme); padding: clamp(2.6rem, 6vw, 4rem) 0 1.5rem; }
.site-footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer a { color: var(--karamell); }
.site-footer a:hover { color: var(--white); }
.site-footer__brand p { color: rgba(251,246,239,.7); margin-top: .8rem; max-width: 22rem; font-size: .95rem; }
.brand--footer .brand__f { color: var(--creme); }
.brand--footer .brand__mark { width: 40px; height: 40px; }
.site-footer__h { font-family: var(--font-sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--karamell); margin-bottom: .8rem; font-weight: 700; }
.site-footer .nap { color: rgba(251,246,239,.82); }
.site-footer__col p { color: rgba(251,246,239,.82); }
.site-footer__links { display: grid; gap: .5rem; }
.site-footer__base { margin-top: 2.4rem; padding-top: 1.3rem; border-top: 1px solid rgba(251,246,239,.14); }
.site-footer__base p { color: rgba(251,246,239,.6); font-size: .85rem; }

/* ---------- Cookie-Hinweis ---------- */
.cookie {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 150;
  width: min(100% - 2rem, 640px); background: var(--white); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); border-radius: var(--radius); padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between;
}
.cookie__text { font-size: .88rem; color: var(--espresso-soft); flex: 1 1 320px; }

/* ---------- Lightbox (per JS erzeugt) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(26,18,12,.9); padding: 1.5rem; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(94vw, 900px); max-height: 88vh; width: auto; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox__btn { position: absolute; background: rgba(251,246,239,.14); color: var(--creme); border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; display: grid; place-items: center; transition: background-color .18s ease; }
.lightbox__btn:hover { background: rgba(251,246,239,.28); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__text { max-width: none; order: 2; }
  .hero__media { order: 1; max-width: 420px; }
  .story { grid-template-columns: 1fr; }
  .story__media { max-width: 460px; margin-inline: auto; order: 2; }
  .zeiten, .kontakt { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--creme); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: .4rem 1.25rem 1.1rem;
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { border-bottom: 1px solid var(--line); }
  .nav__menu li:last-child { border-bottom: 0; }
  .nav__menu a { display: block; padding: .85rem .2rem; }
  .nav__cta { padding-top: .7rem; }
  .nav__cta a { justify-content: center; }
  .menu-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .form__grid { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: .1rem; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .hero__badge { left: 8px; }
}

@media (max-width: 420px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .gallery__btn:hover img { transform: none; }
}

/* ---------- Rechtsseiten (Impressum / Datenschutz) ---------- */
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--kaffee); text-decoration: none; }
.back-link:hover { color: var(--kaffee-dark); }
.legal { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); background: var(--creme); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 1.3rem; }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .6rem; color: var(--kaffee); }
.legal p, .legal li { color: var(--espresso-soft); margin-bottom: .85rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }
.legal address { font-style: normal; color: var(--espresso); line-height: 1.7; margin-bottom: .85rem; }
.legal .lead { font-size: 1.05rem; color: var(--espresso); }
.legal small { color: var(--espresso-soft); }
.ph { background: #FFF1CF; border-bottom: 1px dashed #C79A3B; padding: 0 .25em; border-radius: 3px; color: var(--espresso); font-style: normal; }
