/* Altstadtcafé Bergneustadt: mobile-first */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/nunito-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --red: #C0281E;
  --red-dark: #9E1F17;
  --yellow: #F2D33C;
  --cream: #FAF6EE;
  --paper: #F2EBDC;
  --black: #1E1B18;
  --green: #2F5D46;
  --green-dark: #254A38;
  --wood: #6B4A2E;
  --chalk: #F6F2E8;
  --board: #24211E;
  --muted: #55504A;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Script", cursive;

  --header-h: 64px;
  --callbar-h: 60px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 10vw, 112px);
  --focus: var(--black);

  /* Fachwerk-Band: Rähm, Schwelle, Ständer und Streben */
  --timber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='216' height='36'%3E%3Cg fill='none' stroke='%231E1B18' stroke-width='4'%3E%3Cpath d='M0 2h216M0 34h216M36 0v36M108 0v36M144 0v36M216 0v36M36 36 0 0M108 0 72 36M72 0v36M144 36l36-36M180 0v36M180 0l36 36'/%3E%3C/g%3E%3C/svg%3E");
  --timber-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='216' height='36'%3E%3Cg fill='none' stroke='%23FAF6EE' stroke-opacity='.35' stroke-width='4'%3E%3Cpath d='M0 2h216M0 34h216M36 0v36M108 0v36M144 0v36M216 0v36M36 36 0 0M108 0 72 36M72 0v36M144 36l36-36M180 0v36M180 0l36 36'/%3E%3C/g%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom));
  background: var(--cream);
  color: var(--black);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem); margin-bottom: .55em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section-head { margin-bottom: clamp(28px, 5vw, 56px); }
.section-head h2 { margin-bottom: 0; }

.eyebrow {
  margin-bottom: .2em;
  font: 700 1.75rem/1.1 var(--hand);
  color: var(--red);
}
.handwritten {
  font: 700 2rem/1.15 var(--hand);
  color: var(--red);
}

.sprite { position: absolute; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 18px; background: var(--black); color: var(--cream);
  border-radius: 4px;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 4px;
  font: 700 1.0625rem/1.2 var(--sans);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--outline { border-color: var(--black); color: var(--black); background: transparent; }
.btn--outline:hover { background: var(--black); color: var(--cream); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); }
.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: #fff; }
.btn--dark { background: var(--black); color: var(--cream); }
.btn--dark:hover { background: var(--green-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.btn-row .btn { flex: 1 1 150px; }

.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--green); text-underline-offset: 3px; }
.text-link:hover { color: var(--black); }

/* Fachwerk-Band */
.beam {
  height: 36px;
  background: var(--timber) repeat-x center / auto 100%;
}
.beam--light { background-image: var(--timber-light); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 4px solid var(--black);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--header-h) - 4px);
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: none;
}
.brand img { width: 46px; height: 46px; }
.brand__name { font: 650 1.25rem/1 var(--serif); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 48px;
  min-height: 48px;
  padding: 8px 4px 8px 10px;
  border: 0;
  background: none;
  color: inherit;
  font: 700 1rem/1 var(--sans);
  cursor: pointer;
}
.js .nav-toggle { display: inline-flex; }
.nav-toggle__bars { display: grid; gap: 5px; width: 26px; }
.nav-toggle__bars span {
  display: block; height: 3px; background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.site-nav { flex-basis: 100%; }
.site-nav li + li { border-top: 1px solid rgba(30, 27, 24, .18); }
.site-header__inner { flex-wrap: wrap; }
.js .site-nav { display: none; }
.js .site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100svh - var(--header-h) - var(--callbar-h));
  overflow-y: auto;
  padding: 0 var(--gutter) 8px;
  background: var(--cream);
  border-top: 4px solid var(--black);
  border-bottom: 4px solid var(--black);
}

/* Hero */
.hero__media img {
  width: 100%;
  height: clamp(210px, 34svh, 460px);
  object-fit: cover;
  object-position: 42% 62%;
}
.hero__text {
  padding: 28px var(--gutter) 36px;
  border-top: 6px solid var(--black);
}
h1 { font-size: clamp(2.5rem, 12.2vw, 4.5rem); font-weight: 700; }
h1 span { display: block; color: var(--red); }
.hero__sub { margin: .25em 0 .35em; font: 700 2rem/1.1 var(--hand); color: var(--green); }
.hero__lead { max-width: 34em; font-size: 1.125rem; }
.hero__text .btn-row { margin-top: 24px; max-width: 440px; }

/* Heute-Status */
.status-line, .board__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
}
.status-line[hidden], .board__status[hidden] { display: none; }
.status-dot {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: var(--red);
}
.is-open-now .status-dot { background: var(--green); }
.board .is-open-now .status-dot, .board.is-open-now .status-dot { background: #79D19C; }
.board .status-dot { background: #FF8A7A; }
.status-line [data-status-detail] { color: var(--muted); }

/* Willkommen */
.welcome__grid { display: grid; gap: 36px; }
.welcome__text > p:not(.eyebrow):not(.handwritten) { max-width: 36em; }
.welcome__text .handwritten { margin-top: 1em; }
.welcome__figure img {
  width: 100%;
  border: 6px solid var(--black);
}
figcaption { font-size: .9375rem; color: var(--muted); }
.welcome__figure figcaption { margin-top: 10px; }

/* Angebot */
.offer { background: var(--paper); }
.offer__list { display: grid; gap: 0 32px; }
.offer__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  padding-block: 24px;
  border-top: 4px solid var(--black);
}
.offer__icon {
  grid-row: span 2;
  width: 52px; height: 52px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.offer__item h3 { font-size: 1.625rem; margin-bottom: .3em; }
.offer__item p { margin: 0; }
.offer__note {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--yellow);
  border-radius: 4px;
}

/* Kreidetafel */
.board {
  --focus: var(--yellow);
  position: relative;
  padding: clamp(24px, 6vw, 44px);
  background:
    radial-gradient(60% 45% at 20% 15%, rgba(255, 255, 255, .055), transparent 70%),
    radial-gradient(50% 40% at 85% 80%, rgba(255, 255, 255, .04), transparent 70%),
    var(--board);
  color: var(--chalk);
  border: 10px solid var(--wood);
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(30, 27, 24, .24);
}
.board a:not(.btn) { color: inherit; text-underline-offset: 3px; }

.hours { padding-block: var(--section-y); }
.board--hours { max-width: 680px; margin-inline: auto; }
.board__title {
  margin-bottom: 0;
  font: 700 clamp(2.75rem, 2rem + 4vw, 4rem)/1 var(--hand);
  letter-spacing: 0;
  color: var(--yellow);
}
.board__since { margin: 4px 0 16px; font-size: 1rem; }
.board__status {
  padding: 12px 0;
  border-block: 2px solid rgba(246, 242, 232, .3);
  margin-bottom: 8px;
}
.board__status strong { font-size: 1.125rem; }
.board__status [data-status-detail] { flex-basis: 100%; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 8px 10px; }
.hours-table tr + tr th, .hours-table tr + tr td { border-top: 1px dashed rgba(246, 242, 232, .25); }
.hours-table th {
  text-align: left;
  font: 700 1.75rem/1.2 var(--hand);
}
.hours-table td {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hours-table .is-closed td { font-weight: 400; }
.hours-table .is-today th, .hours-table .is-today td {
  background: var(--yellow);
  color: var(--black);
  border-top-color: transparent;
}
.today-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px 2px;
  background: var(--red);
  color: #fff;
  border-radius: 3px;
  font: 700 .75rem/1.2 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: .3em;
}
.board__footnote { margin-top: 14px; font-size: .9375rem; }

/* Specials */
.specials { background: var(--red); color: #fff; --focus: var(--yellow); }
.specials .eyebrow { color: #fff; }
.specials h2 { color: var(--yellow); }
.specials__grid { display: grid; gap: 28px; align-items: start; }
.board--special { display: flex; flex-direction: column; align-items: flex-start; }
.special__title {
  margin-bottom: .1em;
  font: 700 clamp(2.5rem, 2rem + 3vw, 3.5rem)/1.02 var(--hand);
  letter-spacing: 0;
  color: var(--yellow);
}
.special__rule { font-size: 1.125rem; font-weight: 700; }
.special__next { width: 100%; padding-block: 12px; border-block: 1px dashed rgba(246, 242, 232, .4); }
.special__next[hidden] { display: none; }
.special__label { display: block; font-size: .9375rem; }
.special__next time { font: 700 1.75rem/1.2 var(--hand); }
.special__hint { margin-top: 2px; }
.board--special .btn { width: 100%; }

/* Räume */
.rooms__grid { display: grid; gap: 28px; }
.room img { width: 100%; object-fit: cover; }
.room figcaption { margin-top: 10px; font-size: 1rem; color: var(--black); }
.room figcaption strong {
  display: block;
  font: 650 1.375rem/1.2 var(--serif);
}
.room--c img { aspect-ratio: 4 / 5; object-position: 50% 30%; }
.room figcaption a { color: var(--red); font-weight: 700; }

/* Mitten in Bergneustadt */
.town { background: var(--green); color: #fff; --focus: var(--yellow); }
.town .eyebrow { color: var(--yellow); }
.town__grid { display: grid; gap: 32px; }
.town__figure img { width: 100%; border: 6px solid var(--black); }
.town__text p:not(.eyebrow) { max-width: 34em; }

/* Bewertung */
.rating { background: var(--yellow); padding-block: 40px; }
.rating__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.rating h2 { margin: 0; font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem); }
.rating__stars { position: relative; display: inline-block; font-size: 2rem; line-height: 1; letter-spacing: .06em; color: rgba(30, 27, 24, .25); white-space: nowrap; }
.rating__fill { position: absolute; left: 0; top: 0; width: 98%; overflow: hidden; color: var(--red); }

/* Kontakt */
.contact__grid { display: grid; gap: 36px; }
address { font-style: normal; font-size: 1.125rem; margin-bottom: 8px; }
.contact__phone { font: 650 1.625rem/1.3 var(--serif); margin-bottom: 20px; }
.contact__phone a { display: inline-flex; align-items: center; min-height: 44px; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.map {
  position: relative;
  border: 6px solid var(--black);
  background: var(--paper);
}
.map__facade {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 340px;
  height: 100%;
  padding: 28px 20px;
  text-align: center;
}
.map__facade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--timber) center / 432px auto;
  opacity: .07;
}
.map__facade > * { position: relative; }
.map__pin { width: 44px; height: 44px; color: var(--red); }
.map__title { margin: 0; font: 650 1.25rem/1.3 var(--serif); }
.map__note { margin: 0; max-width: 28em; font-size: .9375rem; color: var(--muted); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* Footer */
.site-footer { background: var(--black); color: var(--cream); --focus: var(--yellow); }
.site-footer a { color: inherit; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__grid {
  display: grid;
  gap: 28px;
  padding-block: 44px 32px;
}
.site-footer__brand img { width: 96px; height: 96px; margin-bottom: 8px; }
.site-footer__brand .handwritten { color: var(--yellow); font-size: 1.625rem; }
.site-footer__title {
  margin-bottom: .4em;
  font: 650 1.125rem/1.3 var(--serif);
  letter-spacing: 0;
  color: var(--yellow);
}
.site-footer__credit {
  margin: 0;
  padding: 16px var(--gutter);
  border-top: 1px solid rgba(250, 246, 238, .22);
  font-size: .875rem;
  text-align: center;
}

/* Fester Anrufen-Button auf dem Handy */
.callbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: calc(var(--callbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--red);
  color: #fff;
  border-top: 3px solid var(--black);
  font: 700 1.1875rem/1 var(--sans);
  text-decoration: none;
}
.callbar:focus-visible { outline-color: var(--yellow); outline-offset: -6px; }

/* Einblenden beim Scrollen */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* Einfache Unterseiten */
.legal { min-height: 60vh; }
.legal h1 { font-size: clamp(2.25rem, 8vw, 3.25rem); margin-bottom: .5em; }
.legal__back { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--green); }
body.page-legal { padding-bottom: 0; }

@media (min-width: 640px) {
  .offer__list { grid-template-columns: repeat(2, 1fr); }
  .specials__grid { grid-template-columns: repeat(2, 1fr); }
  .board--special:nth-child(1) { transform: rotate(-.5deg); }
  .board--special:nth-child(2) { transform: rotate(.4deg); }
  .js .reveal.board--special:not(.is-visible) { transform: translateY(18px); }
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
  .rating__inner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
  .rating .btn { margin-left: auto; }
}

@media (min-width: 800px) {
  .rooms__grid {
    grid-template-columns: 7fr 5fr;
    grid-template-areas: "a c" "b c" "d d";
  }
  .room--a { grid-area: a; }
  .room--b { grid-area: b; }
  .room--c { grid-area: c; display: flex; flex-direction: column; }
  .room--d { grid-area: d; }
  .room--c img { flex: 1 1 0; min-height: 0; aspect-ratio: auto; height: 0; }
  .room--d img { aspect-ratio: 1100 / 340; }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  .callbar { display: none; }

  .site-header__inner { flex-wrap: nowrap; }
  .brand img { width: 56px; height: 56px; }
  .brand__name { font-size: 1.5rem; }
  .js .nav-toggle { display: none; }
  .js .site-nav, .js .site-nav.is-open, .site-nav { display: block; flex-basis: auto; position: static; max-height: none; overflow: visible; padding: 0; border: 0; background: none; }
  .site-nav ul { display: flex; gap: 6px; }
  .site-nav li + li { border: 0; }
  .site-nav a {
    min-height: 48px;
    padding-inline: 14px;
    font-size: 1.0625rem;
    border-bottom: 3px solid transparent;
    transition: border-color .18s ease, color .18s ease;
  }
  .site-nav a:hover { color: var(--red); border-bottom-color: var(--red); }

  .hero {
    display: grid;
    grid-template-columns: 5fr 7fr;
    min-height: min(calc(100svh - var(--header-h) - 36px), 780px);
  }
  .hero__media { order: 2; border-left: 12px solid var(--black); min-height: 0; position: relative; }
  .hero__media img { position: absolute; inset: 0; height: 100%; object-position: 40% 70%; }
  .hero__text {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(28px, 4vw, 64px);
    border-top: 0;
  }
  h1 { font-size: clamp(2.75rem, 4.7vw, 4.5rem); }
  .hero__sub { font-size: 2.5rem; }
  .hero__lead { font-size: 1.25rem; }
  .hero__text .btn-row .btn { flex: 0 1 auto; }

  .welcome__grid { grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
  .offer__list { grid-template-columns: repeat(4, 1fr); }
  .offer__item { display: block; }
  .offer__icon { display: block; margin-bottom: 14px; }
  .offer__note { margin-top: 32px; }
  .town__grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
  .contact__grid { grid-template-columns: 5fr 7fr; gap: 56px; align-items: stretch; }
  .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .site-footer__credit { text-align: left; padding-inline: max(var(--gutter), calc((100% - 1160px) / 2 + var(--gutter))); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .callbar, .nav-toggle, .site-nav, .map { display: none !important; }
  .site-header { position: static; }
}
