/* Restaurant Dionysos – site styles.
   Colors are taken from the logo: robe blue, wine-red jugs, olive branch. */

@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/merriweather-700-latin.woff2") format("woff2");
}

:root {
  --blue: #414786;
  --blue-dark: #2d3263;
  --blue-soft: #e8e9f3;
  --wine: #87203c;
  --wine-dark: #6c1830;
  --olive: #5f7244;
  --olive-soft: #e7ecdc;
  --cream: #fbf8f2;
  --sand: #f3ecdf;
  --white: #fff;
  --ink: #2b2420;
  --muted: #6b625a;
  --line: #e2d8c6;

  --font-head: "Merriweather", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(43, 36, 32, .06), 0 4px 16px rgba(43, 36, 32, .06);
  --header-h: 96px; /* updated by main.js */
  --bar-h: 112px;   /* updated by main.js */

  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 19H20M2 19V1H17V15H6V5H13V11H10' fill='none' stroke='%23414786' stroke-width='2'/%3E%3C/svg%3E");
  --meander-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 19H20M2 19V1H17V15H6V5H13V11H10' fill='none' stroke='%23fbf8f2' stroke-opacity='.55' stroke-width='2'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
  :root { --header-h: 68px; --bar-h: 0px; }
}

/* Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--blue-dark);
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

a { color: var(--blue); text-underline-offset: .15em; }
a:hover { color: var(--wine); }

:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; display: block; }

address { font-style: normal; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
}

.muted { color: var(--muted); }
.small { font-size: .875rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--blue);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: 6px;
}
.skip-link:focus { top: 8px; color: var(--white); }

.meander {
  height: 16px;
  background: var(--meander) repeat-x center / 16px 16px;
  opacity: .9;
}
.meander-light { background-image: var(--meander-light); }

/* Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .6rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .15s, color .15s, border-color .15s;
}

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }

.btn-ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-ghost:hover { background: var(--blue); color: var(--white); }

.btn-call { background: var(--wine); color: var(--white); padding: .5rem 1rem; }
.btn-call:hover { background: var(--wine-dark); color: var(--white); }

.cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, .97);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  padding-top: .5rem;
  padding-bottom: .25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.05;
}
.brand-small {
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--blue);
  letter-spacing: .02em;
}

.main-nav { order: 3; width: 100%; }
.main-nav ul {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: .35rem 0 .25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--wine); border-bottom-color: var(--wine); }

@media (min-width: 768px) {
  .header-inner { flex-wrap: nowrap; padding-top: .6rem; padding-bottom: .6rem; }
  .main-nav { order: 0; width: auto; margin-left: auto; }
  .main-nav ul { padding: 0; gap: 1.75rem; overflow: visible; }
}

/* Hero ---------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(ellipse at 85% 20%, rgba(65, 71, 134, .07), transparent 60%),
    radial-gradient(ellipse at 10% 90%, rgba(95, 114, 68, .08), transparent 55%),
    var(--cream);
}

.hero-inner {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  align-items: center;
}

.hero-logo {
  order: -1;
  justify-self: center;
  background: var(--white);
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  width: min(42vw, 170px);
}

.eyebrow {
  color: var(--olive);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  margin-bottom: .4em;
}

.lead {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  color: var(--wine);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.status.is-open { border-color: var(--olive); color: var(--olive); background: var(--olive-soft); }
.status.is-closed { border-color: var(--wine); color: var(--wine); }

@media (min-width: 820px) {
  .hero-inner {
    grid-template-columns: 1.25fr 1fr;
    gap: 3rem;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .hero-logo { order: 0; width: 100%; max-width: 320px; transform: rotate(1.5deg); }
}

/* Willkommen ---------------------------------------------------------- */

.welcome {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.welcome h2 { font-size: clamp(1.5rem, 4vw, 2rem); }

.welcome-text {
  max-width: 40rem;
  margin: 0 auto .75rem;
  font-size: 1.075rem;
}

.signature {
  font-family: var(--font-head);
  color: var(--wine);
  margin-bottom: 2rem;
}

.highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  text-align: left;
}

.highlights li {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem .5rem;
  border-top: 4px solid var(--olive);
}
.highlights li:nth-child(2) { border-top-color: var(--wine); }
.highlights li:nth-child(3) { border-top-color: var(--blue); }
.highlights h3 { font-size: 1.05rem; }

@media (min-width: 768px) {
  .highlights { grid-template-columns: repeat(3, 1fr); }
}

/* Speisekarte --------------------------------------------------------- */

.menu {
  background: var(--sand);
  padding: 2.5rem 0 3rem;
}

.menu > .wrap > h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.menu-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--sand);
  margin: 0 -16px 1rem;
  padding: .5rem 16px;
  border-bottom: 1px solid var(--line);
}

.menu-tabs {
  display: none; /* shown by main.js; without JS both lists are visible */
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: .5rem;
}
.js .menu-tabs { display: flex; }

.menu-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  padding: .5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}
.menu-tabs button[aria-selected="true"] { background: var(--blue); color: var(--white); }

.menu-chips ul {
  display: flex;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 2px 0 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.menu-chips ul::-webkit-scrollbar { display: none; }
.menu-chips li { scroll-snap-align: start; flex: none; }
.menu-chips li[hidden] { display: none; }

.menu-chips a {
  display: block;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
}
.menu-chips a:hover { border-color: var(--blue); color: var(--blue); }
.menu-chips a.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.panel-title { font-size: 1.35rem; margin: .5rem 0 1rem; }
.js .panel-title {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.menu-served {
  background: var(--olive-soft);
  border-left: 4px solid var(--olive);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.menu-cat {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem .75rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: calc(var(--header-h) + var(--bar-h) + 16px);
}

.menu-cat h4 {
  font-size: 1.15rem;
  color: var(--blue);
  padding-bottom: .5rem;
  margin-bottom: .5rem;
  border-bottom: 2px solid var(--blue-soft);
}

.cat-note { color: var(--muted); font-size: .9rem; margin: -.25rem 0 .5rem; }

.items { list-style: none; margin: 0; padding: 0; }

.item {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
}
.item:last-child { border-bottom: 0; }

.item-no {
  color: var(--muted);
  font-size: .8rem;
  padding-top: .2rem;
  font-variant-numeric: tabular-nums;
}

.item-head {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

.item-name { font-weight: 700; }

.leader {
  flex: 1;
  min-width: 1rem;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-.3em);
}

.price {
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--blue-dark);
}

.size {
  color: var(--muted);
  font-size: .85rem;
  white-space: nowrap;
  margin-right: .5rem;
}

.item-desc { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }

.variants {
  list-style: none;
  margin: .3rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.variants li {
  background: var(--cream);
  border-radius: 6px;
  padding: .1rem .5rem;
}

.codes {
  font-weight: 400;
  color: var(--muted);
  font-size: .7em;
  margin-left: .2em;
  cursor: help;
}

.legend {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  font-size: .9rem;
}
.legend summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue);
}
.legend h4 { font-size: .95rem; margin-top: 1rem; }

@media (min-width: 768px) {
  .menu-cat { padding: 1.5rem 1.75rem 1rem; }
}

/* Desktop: category list as sticky sidebar */
@media (min-width: 960px) {
  .menu-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    column-gap: 2rem;
    align-items: start;
  }
  .menu-layout > * { grid-column: 2; }
  .menu-bar {
    grid-column: 1;
    grid-row: 1 / span 3;
    top: calc(var(--header-h) + 16px);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }
  .menu-chips ul {
    flex-direction: column;
    gap: .25rem;
    overflow: visible;
  }
  .menu-chips a {
    border: 0;
    background: none;
    border-radius: 8px;
    padding: .4rem .75rem;
    font-size: .95rem;
  }
  .menu-chips a:hover { background: var(--white); }
}

/* Öffnungszeiten & Anfahrt -------------------------------------------- */

.visit { background: var(--cream); padding-bottom: 3rem; }

.visit-grid {
  display: grid;
  gap: 1.25rem;
  padding-top: 2.5rem;
}

@media (min-width: 768px) {
  .visit-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.card h2 { font-size: 1.35rem; }

.hours { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.hours th, .hours td {
  text-align: left;
  padding: .5rem .5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours th { font-weight: 600; }
.hours .closed td { color: var(--wine); }
.hours .is-today { background: var(--blue-soft); }
.hours .is-today th::after {
  content: "heute";
  margin-left: .5rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  background: var(--blue);
  border-radius: 999px;
  padding: .1rem .45rem;
  vertical-align: middle;
}

.card address { margin-bottom: 1rem; line-height: 1.7; }

.contact-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.contact-list li { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; color: var(--blue); }
.card .cta { margin-bottom: .75rem; }

/* Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--blue-dark);
  color: var(--cream);
  font-size: .925rem;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--sand); }

.footer-inner { padding-top: 2rem; padding-bottom: 2rem; text-align: center; }
.footer-brand { font-family: var(--font-head); font-size: 1.2rem; }
.footer-brand span { font-family: var(--font-body); font-size: .85rem; opacity: .8; }
.footer-legal { opacity: .85; margin-bottom: 0; }

/* Mobile action bar --------------------------------------------------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(43, 36, 32, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.action-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .5rem 0 .45rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.action-bar a:first-child { color: var(--wine); }
.action-bar .icon { width: 1.35rem; height: 1.35rem; }

body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

@media (min-width: 768px) {
  .action-bar { display: none; }
  body { padding-bottom: 0; }
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 55;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--blue-dark); color: var(--white); }

@media (min-width: 768px) {
  .to-top { bottom: 24px; right: 24px; }
}

/* Rechtstexte --------------------------------------------------------- */

.legal {
  padding: 2.5rem 0 3rem;
}
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.25rem; }

/* Pages without the mobile action bar */
body.no-action-bar { padding-bottom: 0; }
