/* =====================================================================
   CRUISINGCOCKTAILS — STYLESHEET

   TABLE OF CONTENTS
   1.  Design tokens (custom properties)
   2.  Reset
   3.  Base typography
   4.  Utilities (container, sr-only, skip-link, kicker, badge)
   5.  Paper grain overlay
   6.  Buttons
   7.  Card component
   8.  Awning stripe divider
   9.  Header & navigation
   10. Hero
   11. Zigzag block (Ueber uns)
   12. Offer cards (Angebot)
   13. Menu grid (Karte)
   14. Full-bleed photo break
   15. Timeline (Ablauf)
   16. Gallery
   17. Booking form (Buchung)
   18. Contact list (Kontakt)
   19. Footer
   20. Scroll-reveal animation
   21. Focus states & accessibility helpers
   22. Reduced motion
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   Palette starting point per brief; red has two variants because the
   base red only clears WCAG AA contrast on cream at large text sizes —
   red-dark is used anywhere red sits on small/normal-size text.
   --------------------------------------------------------------------- */
:root {
  /* Colour palette */
  --cream: #F1ECDD;
  --cream-dark: #E5DEC9;
  --yellow: #E8C23C;
  --yellow-dark: #D9AE22;
  --red: #C13B2A;
  --red-dark: #9A2C1E;
  --ink: #1A1A1A;
  --ink-soft: #3A3632;
  --teal: #7FB5C4;
  --teal-dark: #5D93A2;
  --sand: #E0C9A6;
  --sand-dark: #CDAF80;
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'Bagel Fat One', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, -apple-system, sans-serif;

  /* Spacing scales — deliberately varied editorial rhythm, not uniform */
  --space-tight: clamp(2.5rem, 4vw, 3.5rem);
  --space-normal: clamp(4rem, 8vw, 6rem);
  --space-loose: clamp(5rem, 12vw, 9rem);

  /* Shared radii / shadow for the card component */
  --radius-card: 20px;
  --shadow-card: 0 14px 30px -12px rgba(26, 26, 26, 0.28);

  /* Sticky header height, used for scroll-margin offsets */
  --header-height: 76px;
}

/* ---------------------------------------------------------------------
   2. RESET
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------------------------------------------------------------------
   3. BASE TYPOGRAPHY
   --------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400; /* Bagel Fat One only ships one weight */
  line-height: 1.15;
  color: var(--red);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

p { max-width: 62ch; }

/* Bands with a mid-tone background (yellow/sand/teal) get ink headings —
   red-on-yellow/sand/teal does not reliably clear AA contrast. */
.band-yellow h2, .band-yellow h3,
.band-sand h2, .band-sand h3,
.band-teal h2, .band-teal h3 {
  color: var(--ink);
}

/* ---------------------------------------------------------------------
   4. UTILITIES
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

.kicker {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0.6em;
}

.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  margin-bottom: 0.9rem;
}

.ink-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.ink-icon svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------------
   5. PAPER GRAIN OVERLAY
   Subtle site-wide noise texture so flat colour fields feel printed.
   Generated entirely in CSS via an SVG feTurbulence data URI.
   --------------------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------
   6. BUTTONS
   --------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.button:active { transform: translateY(1px); }

/* Red fill with white text: verified AA-safe at all sizes (ratio ~5.35).
   Hover swaps to yellow so the primary brand colour gets its CTA moment. */
.button--primary {
  background: var(--red);
  color: var(--white);
}
.button--primary:hover {
  background: var(--yellow);
  color: var(--ink);
}

.button--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.button--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------------------------------------------------------------------
   7. CARD COMPONENT
   Reused for Angebot, Karte, Ablauf-adjacent content and the booking form.
   --------------------------------------------------------------------- */
.card {
  background: var(--cream);
  border: 3px solid var(--red);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

/* ---------------------------------------------------------------------
   8. AWNING STRIPE DIVIDER
   The cart's yellow-and-white canopy, rendered in pure CSS.
   --------------------------------------------------------------------- */
.awning-divider {
  height: 48px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--yellow) 0 30px,
    var(--cream) 30px 60px
  );
  border-block: 3px solid var(--ink);
}

@media (min-width: 768px) {
  .awning-divider { height: 56px; }
}

/* ---------------------------------------------------------------------
   9. HEADER & NAVIGATION
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.site-header__logo {
  height: 42px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}
.nav-toggle__bar {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) 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(-8px) rotate(-45deg);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.primary-nav__list a {
  position: relative;
  padding-block: 0.35rem;
}
.primary-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.primary-nav__list a:hover::after,
.primary-nav__list a.is-active::after {
  transform: scaleX(1);
}
.primary-nav__list a.is-active {
  color: var(--red-dark);
}

.primary-nav__cta { white-space: nowrap; }

/* Mobile: collapse nav behind a hamburger, slide down as a panel */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.is-open {
    max-height: 32rem;
  }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 0;
  }
  .primary-nav__list li { border-bottom: 1px solid var(--cream-dark); }
  .primary-nav__list a { display: block; padding-block: 0.9rem; }
  .primary-nav__cta {
    margin: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  }
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

/* ---------------------------------------------------------------------
   10. HERO
   Image-only, no overlay text/buttons — the photo already carries the
   wordmark card and tagline.

   Mobile (<768px): the illustration is wide (~1.78:1). Cropping it to
   fill the viewport height cut off the bus and/or the wordmark card, so
   below 768px the hero instead follows the image's natural aspect ratio
   — the whole illustration renders uncropped, sitting under the sticky
   header, and the page simply continues into the next section below it.

   Tablet/desktop (>=768px): reverts to the full-bleed viewport-height
   cover crop, tuned per breakpoint, which has room to frame both the
   bus and the card without cropping either.
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--header-height);
}

.hero__media, .hero-img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .hero {
    height: calc(100vh - var(--header-height));
  }
  /* Prefer dynamic viewport height where supported, so mobile browser
     chrome (address bar showing/hiding) doesn't clip or letterbox the image. */
  @supports (height: 100dvh) {
    .hero { height: calc(100dvh - var(--header-height)); }
  }

  .hero__media, .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .hero-img {
    object-fit: cover;
    /* Tablet framing keeps both the VW bus and the wordmark card in frame. */
    object-position: 32% 50%;
  }
}

@media (min-width: 1024px) {
  .hero-img { object-position: 40% 55%; }
}

/* ---------------------------------------------------------------------
   11. ZIGZAG BLOCK (Ueber uns)
   --------------------------------------------------------------------- */
.section {
  padding-block: var(--space-normal);
  scroll-margin-top: var(--header-height);
}
.section--tight { padding-block: var(--space-tight); }

.band-cream { background: var(--cream); }
.band-yellow { background: var(--yellow); }
.band-sand { background: var(--sand); }
.band-teal { background: var(--teal); }

.section__intro { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section__intro-lead { margin-top: 0.75rem; color: var(--ink-soft); }
.section__cta { margin-top: clamp(2rem, 5vw, 3rem); }

.zigzag {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.zigzag__img {
  border-radius: var(--radius-card);
  border: 3px solid var(--red);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

@media (min-width: 900px) {
  .zigzag {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ---------------------------------------------------------------------
   12. OFFER CARDS (Angebot)
   --------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.offer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.offer-card .ink-icon { margin-bottom: 1rem; color: var(--red-dark); }
.offer-card h3 { margin-bottom: 0.6rem; }
.offer-card p { color: var(--ink-soft); }

@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------
   13. MENU GRID (Karte)
   --------------------------------------------------------------------- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.menu-card h3 { margin-bottom: 0.9rem; }
.menu-card--highlight { border-color: var(--red); background: var(--cream); position: relative; }

.menu-list li {
  padding-block: 0.4rem;
  border-bottom: 1px dashed var(--sand-dark);
  font-weight: 500;
}
.menu-list li:last-child { border-bottom: none; }

.menu-note {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Three categories only — skip the 2-column mid-step so a card never
   sits orphaned alone in its own row; go straight from 1-up to 3-up. */
@media (min-width: 700px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------
   14. FULL-BLEED PHOTO BREAK
   --------------------------------------------------------------------- */
.photo-break {
  position: relative;
  height: clamp(320px, 46vw, 560px);
  overflow: hidden;
}
.photo-break__img,
.photo-break picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.photo-break__img {
  object-fit: cover;
  object-position: 50% 30%;
}
.photo-break__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,0.05) 0%, rgba(26,26,26,0.45) 100%);
}
.photo-break__line {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 5vw, 3rem);
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.5vw, 2.25rem);
  color: var(--cream);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* ---------------------------------------------------------------------
   15. TIMELINE (Ablauf)
   --------------------------------------------------------------------- */
.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  counter-reset: step;
}

.timeline__step {
  position: relative;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
}
.timeline__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-body);
  margin-bottom: 0.75rem;
}
.timeline__step .ink-icon { margin: 0.25rem 0 0.75rem; color: var(--red-dark); }
.timeline__step h3 { margin-bottom: 0.4rem; }
.timeline__step p { color: var(--ink-soft); font-size: 0.95rem; }

@media (min-width: 900px) {
  .timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  /* Horizontal connector line linking the four steps */
  .timeline {
    position: relative;
  }
  .timeline::before {
    content: "";
    position: absolute;
    top: 2.75rem;
    left: 10%;
    right: 10%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px);
    z-index: -1;
  }
}

/* ---------------------------------------------------------------------
   16. GALLERY
   --------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: calc(var(--radius-card) - 4px);
  overflow: hidden;
  border: 3px solid var(--red);
}
.gallery-item picture,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item--large { grid-column: span 2; grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }

@media (min-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; }
}

/* ---------------------------------------------------------------------
   17. BOOKING FORM (Buchung)
   --------------------------------------------------------------------- */
.booking-card {
  max-width: 46rem;
  margin-inline: auto;
  background: var(--cream);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field--full { grid-column: 1 / -1; }

.form-field label { font-weight: 600; font-size: 0.9rem; }

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.7em 0.9em;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  font-size: 1rem;
}
.form-field textarea { resize: vertical; min-height: 6rem; }

.form-field input:invalid[data-touched="true"],
.form-field select:invalid[data-touched="true"] {
  border-color: var(--red-dark);
}

.form-error {
  font-size: 0.82rem;
  color: var(--red-dark);
  min-height: 1.1em;
}

.booking-form__submit {
  margin-top: 1.75rem;
  width: 100%;
}

@media (min-width: 560px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .booking-form__submit { width: auto; }
}

.booking-success,
.booking-error {
  text-align: center;
  padding: 2rem 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}
.booking-success { color: var(--red-dark); }
.booking-error { color: var(--red-dark); }

/* ---------------------------------------------------------------------
   18. CONTACT LIST (Kontakt)
   --------------------------------------------------------------------- */
.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 34rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}
.contact-list a:hover { color: var(--red-dark); }

@media (min-width: 640px) {
  .contact-list { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------
   19. FOOTER
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: var(--space-normal);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}
.site-footer__logo {
  height: 84px;
  width: auto;
  filter: brightness(0) invert(1);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-weight: 600;
}
.site-footer__nav a:hover { color: var(--yellow); }

.site-footer__legal {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.8;
}
.site-footer__legal a:hover { color: var(--yellow); }

.site-footer__copy {
  font-size: 0.8rem;
  opacity: 0.65;
}

/* ---------------------------------------------------------------------
   20. SCROLL-REVEAL ANIMATION
   Sections and staggered tile groups fade/translate in once, driven by
   IntersectionObserver in script.js. Disabled under reduced motion below.
   --------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-item] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal-item].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------
   21. FOCUS STATES
   --------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--red-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------
   22. REDUCED MOTION
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  [data-reveal], [data-reveal-item] {
    opacity: 1;
    transform: none;
  }
}
