/* =====================================================================
   Crêpes Dinnes – Stylesheet
   Statische Website, Nachbau auf Basis von crepes-dinnes.de
   ===================================================================== */

:root {
  --color-accent: #6b250a;
  --color-text: #000;
  --color-heading: #030303;
  --color-page-bg: #fcfcfc;
  --color-header-bg: #fdddae;
  --color-content-overlay: rgba(255, 255, 255, 0.3);
  --max-width: 1160px;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-nav: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 25px;
  color: var(--color-text);
  background-color: var(--color-page-bg);
  background-image: url("../img/hintergrund.jpg");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  background-attachment: fixed;
}

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

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

a:hover {
  color: #8a3312;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  z-index: 200;
  padding: 10px 18px;
  background: #fff;
  color: #000;
  text-decoration: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 10px;
  color: #000;
}

/* ---------------------------------------------------------------------
   Kopfbereich
   --------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 450px;
  padding: 0 20px;
  background-color: var(--color-header-bg);
  background-image: url("../img/kopfbereich.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.site-logo {
  display: block;
  line-height: 0;
}

.site-logo img {
  width: 300px;
  max-width: 100%;
  height: auto;
}

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

.main-nav {
  position: relative;
  z-index: 20;
  background-color: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.main-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > li {
  display: flex;
  align-items: center;
}

.nav-menu > li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  transform: rotate(-45deg);
  background-color: rgba(0, 0, 0, 0.3);
}

.nav-menu a {
  display: block;
  padding: 0 17px;
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 600;
  line-height: 60px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a[aria-current="page"] {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
}

.nav-toggle__icon {
  width: 22px;
  height: 22px;
  transition: transform 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  transform: rotate(180deg);
}

/* ---------------------------------------------------------------------
   Inhalt
   --------------------------------------------------------------------- */

.site-content {
  flex: 1 0 auto;
}

.content-box {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 40px 92px;
  background-color: var(--color-content-overlay);
}

.page-header {
  margin: 0 0 17px;
  text-align: center;
}

.page-title {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  line-height: 34px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-heading);
}

.entry h2,
.entry h3,
.entry h4,
.entry h6 {
  color: var(--color-heading);
  line-height: 1.2;
}

.entry h2 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 600;
}

.entry h3 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 600;
}

.entry h6 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
}

.entry p {
  margin: 0 0 15px;
}

.entry a {
  overflow-wrap: anywhere;
}

.entry > :last-child {
  margin-bottom: 0;
}

.entry p + h2,
.entry p + h3 {
  margin-top: 30px;
}

.entry--justify p,
.entry--justify h2,
.entry--justify h3 {
  text-align: justify;
}

.entry h2 + h6 {
  margin-top: 30px;
}

.entry .entry-heading {
  font-family: var(--font-body);
  font-size: 26px;
}

.entry--intro .entry-heading {
  margin-bottom: 33px;
}

/* Zwei Spalten: Text und Bild (Philosophie und Zutaten) */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 15px;
}

.split p:last-child {
  margin-bottom: 0;
}

.split__media {
  text-align: center;
}

.split__media img {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Bildergalerien
   --------------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery li {
  margin: 0;
}

.gallery--masonry {
  display: block;
  column-count: 4;
  column-gap: 20px;
}

.gallery--masonry li {
  break-inside: avoid;
  margin: 0 0 20px;
}

.gallery a {
  display: block;
  cursor: zoom-in;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------
   Startseiten-Slider
   --------------------------------------------------------------------- */

.slider {
  position: relative;
}

.slider__viewport {
  overflow: hidden;
}

.slider__track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slider__slide {
  position: relative;
  flex: 0 0 100%;
}

.slider__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.slider__button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.75);
  color: #000;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.slider__button--prev {
  left: 10px;
}

.slider__button--next {
  right: 10px;
}

.slider:hover .slider__button,
.slider__button:focus-visible {
  opacity: 1;
}

.slider__button:hover {
  background-color: #fff;
}

.slider__button svg {
  width: 20px;
  height: 20px;
}

.slider__dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 14px 0 0;
}

.slider__dot {
  width: 24px;
  height: 24px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background-color: #b9b9b9;
  background-clip: content-box;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.slider__dot[aria-current="true"] {
  background-color: #2f2f2f;
}

/* ---------------------------------------------------------------------
   Fußbereich
   --------------------------------------------------------------------- */

.site-footer {
  flex: 0 0 auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 17px 40px;
}

.site-footer__inner > * {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 25px;
  text-align: center;
  text-decoration: none;
  color: #000;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-accent);
}

/* ---------------------------------------------------------------------
   Lightbox
   --------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
  background-color: rgba(0, 0, 0, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__nav {
  top: 50%;
  margin-top: -24px;
}

.lightbox__nav--prev {
  left: 12px;
}

.lightbox__nav--next {
  right: 12px;
}

.lightbox__nav svg,
.lightbox__close svg {
  width: 22px;
  height: 22px;
}

.lightbox__nav[hidden] {
  display: none;
}

body.is-locked {
  overflow: hidden;
}

/* ---------------------------------------------------------------------
   Responsive Anpassungen
   --------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .site-header {
    height: 400px;
  }
}

@media (max-width: 1024px) {
  .gallery--masonry {
    column-count: 3;
  }
}

@media (max-width: 991px) {
  .site-header {
    height: 340px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0;
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu > li {
    justify-content: center;
  }

  .nav-menu > li + li::before {
    display: none;
  }

  .nav-menu a {
    padding: 0 20px;
    line-height: 50px;
  }
}

@media (max-width: 767px) {
  .site-header {
    height: 320px;
  }

  .site-logo img {
    width: 240px;
  }

  .content-box {
    padding: 30px 20px 60px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery--masonry {
    column-count: 2;
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 0;
    padding: 14px 20px;
  }

  .slider__button {
    opacity: 1;
    width: 38px;
    height: 38px;
    margin-top: -19px;
  }

  .lightbox {
    padding: 56px 12px;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }
}

@media (max-width: 479px) {
  .site-header {
    height: 300px;
  }

  .site-logo img {
    width: 200px;
  }

  .entry h2 {
    font-size: 25px;
  }

  .entry h3 {
    font-size: 22px;
  }

  .gallery--masonry {
    column-count: 1;
  }
}

/* Parallax-Hintergründe sind auf Touch-Geräten unzuverlässig */
@media (hover: none) {
  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .slider__track,
  .nav-toggle__icon,
  .slider__button {
    transition: none;
  }
}

@media print {
  body {
    background-image: none;
  }

  .site-header,
  .main-nav,
  .site-footer,
  .slider__button,
  .slider__dots {
    display: none;
  }

  .content-box {
    background: none;
    padding: 0;
  }
}
