@import 'basis.css';

/* =====================================================================
   Beck Halter — Baar, seit 1934
   Haltung: früh, handfest, ehrlich. Eine Bäckerei lebt vom Rhythmus des
   Tages, nicht von Sortimentskacheln.
   Paradigma: DIE UHR. Die Seite ist nach Tageszeiten gebaut — 03:40 der
   Sauerteig, 06:00 der Laden, 11:30 der Mittag, 17:00 das Übrige. Die
   Uhrzeit steht gross in der Randspalte und führt durch die ganze Seite.
   ===================================================================== */

:root {
  --grund: oklch(0.225 0.028 56);
  --flaeche: oklch(0.275 0.03 56);
  --flaeche-2: oklch(0.33 0.032 56);
  --tinte: oklch(0.965 0.012 80);
  --leise: oklch(0.79 0.022 74);
  --linie: oklch(0.375 0.03 56);
  --akzent: oklch(0.845 0.135 84);
  --auf-akzent: oklch(0.26 0.05 60);
  --hell: oklch(0.955 0.016 84);
  --hell-tinte: oklch(0.24 0.03 56);

  --serif: 'Bitter', Georgia, serif;
  --grotesk: 'Nunito Sans', system-ui, sans-serif;
  --anzeige: 'Bitter', Georgia, serif;

  --mass: 74rem;
  --luft: clamp(3.25rem, 7.5vw, 6.5rem);
  --rand: clamp(1.25rem, 5vw, 3rem);
  --rundung: 3px;
  --weich: cubic-bezier(0.22, 1, 0.36, 1);
  --balken: oklch(0.17 0.025 56);
  --vorhang-grund: oklch(0.19 0.026 56);
  --vorhang-tinte: var(--tinte);
}

body {
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--grotesk);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.11rem);
  line-height: 1.68;
}

h1,
h2,
h3 {
  font-family: var(--anzeige);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.4rem, 1.7rem + 3.4vw, 4.3rem);
}
h2 {
  font-size: clamp(1.85rem, 1.4rem + 2.2vw, 2.9rem);
}
h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
}

.marke {
  font-family: var(--anzeige);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.05;
}
.marke small {
  margin-top: 0.3rem;
  font-family: var(--grotesk);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--akzent);
}
.merk {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--akzent);
}

/* ---------- Auftritt --------------------------------------------------- */

.auftritt {
  position: relative;
  isolation: isolate;
  min-height: min(86svh, 46rem);
  display: grid;
  align-items: end;
  padding-block: 5rem clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
}
.auftritt-bild {
  position: absolute;
  inset: -6% 0;
  z-index: -2;
}
.auftritt-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auftritt::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in oklch, var(--balken) 45%, transparent) 0%,
    color-mix(in oklch, var(--balken) 25%, transparent) 38%,
    color-mix(in oklch, var(--balken) 93%, transparent) 100%
  );
}
.auftritt h1 {
  max-width: 15ch;
  margin-top: 1.1rem;
}
.auftritt .lauf {
  max-width: 44ch;
  margin-top: 1.3rem;
  color: oklch(0.93 0.015 80);
}
.auftritt-tun {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}
.auftritt-heute {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid color-mix(in oklch, white 25%, transparent);
  font-size: 0.93rem;
}
.auftritt-heute b {
  color: var(--akzent);
}

/* ---------- Die Uhr ---------------------------------------------------- */

.uhr {
  display: grid;
  gap: 0;
  margin-top: clamp(2rem, 5vw, 3rem);
  border-top: 2px solid var(--akzent);
}
.stunde {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.6rem, 4vw, 2.4rem) 0;
  border-bottom: 1px solid var(--linie);
}
.stunde .zeit {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 1.8vw, 3.2rem);
  line-height: 1;
  color: var(--akzent);
  font-variant-numeric: tabular-nums;
}
.stunde p {
  color: var(--leise);
  max-width: 60ch;
}
.stunde .bild {
  border-radius: var(--rundung);
}

/* ---------- Sortimentsliste --------------------------------------------- */

.ware {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--linie);
}
.ware-kopf {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.ware-kopf h3 {
  font-family: var(--anzeige);
  font-size: clamp(1.12rem, 1.05rem + 0.4vw, 1.3rem);
}
.ware-kopf .punkte {
  flex: 1;
  height: 1px;
  min-width: 1.2rem;
  border-bottom: 1px dotted color-mix(in oklch, var(--leise) 55%, transparent);
  transform: translateY(-0.25rem);
}
.ware-kopf .preis {
  font-family: var(--anzeige);
  font-weight: 600;
  white-space: nowrap;
  color: var(--akzent);
}
.ware p {
  margin: 0;
  color: var(--leise);
  font-size: 0.94rem;
  max-width: 58ch;
}
.ware .tage {
  margin-top: 0.3rem;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in oklch, var(--akzent) 75%, var(--leise));
}
.gruppe > h3 {
  font-family: var(--grotesk);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--akzent);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--linie);
  margin-top: 2.2rem;
}

/* ---------- Helles Band -------------------------------------------------- */

.hell {
  background: var(--hell);
  color: var(--hell-tinte);
  --tinte: var(--hell-tinte);
  --leise: oklch(0.42 0.03 56);
  --linie: oklch(0.86 0.02 84);
  --flaeche: oklch(0.91 0.02 84);
  --feld-grund: #fff;
  --feld-tinte: var(--hell-tinte);
}
.hell .merk,
.hell .stunde .zeit,
.hell .ware-kopf .preis {
  color: oklch(0.48 0.11 66);
}
.hell p {
  color: var(--leise);
}

/* ---------- Zahlen, Zitate, Karten ---------------------------------------- */

.satz {
  font-family: var(--anzeige);
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.2;
  max-width: 25ch;
}
.reihe {
  display: grid;
  gap: 1.4rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.reihe > div {
  padding-top: 1rem;
  border-top: 2px solid var(--akzent);
}
.reihe dt {
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: clamp(1.8rem, 1.5rem + 1.3vw, 2.5rem);
  line-height: 1;
}
.reihe dd {
  margin: 0.5rem 0 0;
  font-size: 0.93rem;
  color: var(--leise);
}
.karte {
  padding: clamp(1.5rem, 4vw, 2rem);
  border: 1px solid var(--linie);
  border-radius: var(--rundung);
  background: var(--flaeche);
}
.zeiten {
  display: grid;
  margin: 0.9rem 0 0;
}
.zeiten div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linie);
  font-size: 0.93rem;
}
.zeiten div:last-child {
  border-bottom: 0;
}
.zeiten dd {
  margin: 0;
  color: var(--leise);
  text-align: right;
}

.seitenkopf {
  padding-block: clamp(2.25rem, 5.5vw, 3.75rem) clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--linie);
}
.seitenkopf p {
  max-width: 56ch;
  margin-top: 1.1rem;
  color: var(--leise);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.14rem);
}
.brotkrume {
  margin-bottom: 0.9rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leise);
}
.brotkrume a {
  color: var(--akzent);
  text-decoration: none;
}

/* ---------- Pakete --------------------------------------------------------- */

.pakete {
  background: oklch(0.185 0.026 56);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.pakete-kopf {
  max-width: 45rem;
}
.pakete-kopf p {
  margin-top: 1rem;
  color: var(--leise);
}
.paketreihe {
  display: grid;
  gap: 1px;
  margin-top: clamp(2rem, 5vw, 3rem);
  background: var(--linie);
  border: 1px solid var(--linie);
  border-radius: var(--rundung);
  overflow: hidden;
}
.paket {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: oklch(0.225 0.028 56);
}
.paket[data-beliebt] {
  background: oklch(0.275 0.032 56);
}
.paket-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.marke-beliebt {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--akzent);
  color: var(--auf-akzent);
  font-size: 0.66rem;
  font-weight: 800;
}
.paket .preis {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 1rem 0 0.4rem;
  font-family: var(--anzeige);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  line-height: 1;
  color: var(--akzent);
}
.paket .preis span {
  font-family: var(--grotesk);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--leise);
}
.paket > p {
  color: var(--leise);
  font-size: 0.93rem;
}
.paket ul {
  list-style: none;
  margin: 1rem 0 1.4rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.91rem;
  color: var(--leise);
}
.paket li {
  display: grid;
  grid-template-columns: 0.9rem 1fr;
  gap: 0.6rem;
}
.paket li::before {
  content: '';
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.35rem;
  background: var(--akzent);
  clip-path: polygon(14% 46%, 6% 58%, 40% 90%, 96% 22%, 86% 12%, 39% 68%);
}
.paket .knopf {
  margin-top: auto;
  width: 100%;
}
.pakete-fuss {
  margin-top: 1.5rem;
  max-width: 60ch;
  font-size: 0.85rem;
  color: var(--leise);
}

.fuss {
  background: oklch(0.17 0.025 56);
  color: var(--leise);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.6rem;
}
.fuss .marke {
  display: inline-flex;
  flex-direction: column;
  color: var(--tinte);
  margin-bottom: 0.9rem;
}
.fuss a:hover {
  color: var(--tinte);
}

@media (min-width: 46rem) {
  .reihe {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .paketreihe {
    grid-template-columns: repeat(3, 1fr);
  }
  .stunde {
    grid-template-columns: 7rem 1fr;
    column-gap: 2.5rem;
    row-gap: 0.9rem;
    align-items: start;
  }
  .stunde .zeit {
    grid-row: 1 / span 2;
    position: sticky;
    top: 6.5rem;
  }
  .zweispalt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
  }
}

@media (min-width: 62rem) {
  .stunde {
    grid-template-columns: 9rem 1.2fr 1fr;
    column-gap: 3rem;
    row-gap: 0.9rem;
  }
  .stunde h3,
  .stunde p {
    grid-column: 2;
  }
  .stunde .bild {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
  .stunde.ohne-bild h3,
  .stunde.ohne-bild p {
    grid-column: 2 / span 2;
  }
  .kontaktraster {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.stunde p {
  margin-bottom: 0;
}


/* =====================================================================
   Feinschliff — ui-ux-pro-max (Kontrast) + impeccable (Craft)
   Gemessene Werte und Begründung: _SKILLS-ANGEWENDET.md
   Feldrand   1.67:1 → 3.20:1  (WCAG 1.4.11, Bedienelement-Rand ≥3:1)
   Platzhalter          → 8.89:1  (WCAG 1.4.3, Fliesstext ≥4.5:1)
   Akzent als Text 10.63:1 → 10.63:1
   Knopfbeschriftung 9.67:1 → 9.67:1
   ===================================================================== */
:root {
  --feld-linie: oklch(0.527 0.03 56);
  --platzhalter: oklch(0.790 0.022 74);
  --akzent-text: var(--akzent);
}

/* Ein Formularfeld muss man sehen, bevor man hineinklickt. */
.feld input,
.feld select,
.feld textarea {
  border-color: var(--feld-linie);
}
.feld input::placeholder,
.feld textarea::placeholder {
  color: var(--platzhalter);
  opacity: 1;
}
.feld > label {
  font-size: 0.9rem;
}

/* Sichtbarer Fokus auf allem, was man bedienen kann. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

/* Kein Inhalt darf auf ein Skript warten, um sichtbar zu werden. */
@media (prefers-reduced-motion: reduce) {
  [data-auftritt],
  [data-auftritt] > *,
  [data-schnitt] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}


/* ---------- Navigation auf schmalen Schirmen --------------------------
   Kein Hamburger: die Abschnitte stehen als eigene Zeile unter der Marke,
   immer sichtbar und immer klickbar. Fünf Links hinter zwei Klicks zu
   verstecken kostet Aufrufe der Unterseiten.

   Diese Regeln stehen bewusst in stil.css: sie wird nach basis.css
   geladen und hat damit das letzte Wort.
   ---------------------------------------------------------------------- */
@media (max-width: 55.99rem) {
  .kopf-in {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .menue {
    display: flex;
    order: 3;
    width: 100%;
    gap: 0.15rem;
    margin: 0 calc(var(--rand, 1.25rem) * -1);
    padding: 0 var(--rand, 1.25rem);
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--linie, rgba(128, 128, 128, 0.25));
  }
  .menue::-webkit-scrollbar {
    display: none;
  }
  .menue a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.7rem;
    font-family: var(--grotesk, system-ui, sans-serif);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--leise, currentColor);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    opacity: 1;
  }
  .menue a:first-child {
    padding-left: 0;
  }
  .menue a[aria-current='page'] {
    color: var(--akzent, currentColor);
    font-weight: 600;
    border-bottom-color: currentColor;
  }
}


/* ---------- Wegweiser zwischen den Abschnitten --------------------------- */
/* Eine kurze Linie mit Spitze, die sich zeichnet, wenn die Grenze zwischen
   zwei Abschnitten in Sicht kommt. Sie sitzt in einem Kasten ohne eigene
   Höhe, mitten auf der Grenze — die Seite verschiebt sich dadurch nicht.
   Der Kasten steht nicht im HTML; wegweiser.js baut ihn. */

.wegweiser {
  position: relative;   /* eigener Bezug, damit kein Abschnitt umgestellt wird */
  height: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}
.wegweiser svg {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -50%;
  display: block;
  overflow: visible;
}
.wegweiser-linie {
  stroke: var(--weg-ton, currentColor);
  stroke-width: 1.4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.05s cubic-bezier(.22, .61, .36, 1);
}
.wegweiser-spitze {
  stroke: var(--weg-ton, currentColor);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  translate: 0 -5px;
  transition: opacity 0.4s ease-out 0.75s, translate 0.5s cubic-bezier(.22, .61, .36, 1) 0.75s;
}
.wegweiser[data-an] .wegweiser-linie { stroke-dashoffset: 0 !important; }
.wegweiser[data-an] .wegweiser-spitze { opacity: 1; translate: 0 0; }

/* Die Naht ist gestrichelt — dafür zeichnet nicht der Strich, sondern die
   Deckkraft, sonst frisst die Strichelung den dashoffset. */
.wegweiser[data-art="naht"] .wegweiser-linie {
  stroke-dasharray: 5 4 !important;
  stroke-dashoffset: 0 !important;
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.wegweiser[data-art="naht"][data-an] .wegweiser-linie { opacity: 1; }

@media (max-width: 45.99rem) { .wegweiser svg { width: 18px; height: 52px; } }


/* ---------- Gezeichneter Rahmen und antwortende Zeilen ------------------- */
/* Beim Überfahren zeichnet sich ein Rahmen: erst laufen die waagrechten
   Linien aus der Mitte nach aussen, dann wachsen die senkrechten dazu. Zwei
   Pseudoelemente, kein SVG. Der Rahmen liegt 5 px ausserhalb und fängt
   keine Zeiger ab — das Trefferfeld bleibt, wie es war. */

.knopf { position: relative; }
.knopf::before,
.knopf::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 7px;
  pointer-events: none;
  border: 1.5px solid transparent;
}
.knopf::before {
  border-top-color: var(--akzent);
  border-bottom-color: var(--akzent);
  transform: scaleX(0);
  transition: transform 0.26s cubic-bezier(.22, .61, .36, 1);
}
.knopf::after {
  border-left-color: var(--akzent);
  border-right-color: var(--akzent);
  transform: scaleY(0);
  transition: transform 0.26s cubic-bezier(.22, .61, .36, 1) 0.14s;
}
.knopf:hover::before, .knopf:focus-visible::before { transform: scaleX(1); }
.knopf:hover::after,  .knopf:focus-visible::after  { transform: scaleY(1); }

/* Die Zeilen der Preiskarte antworten nacheinander, nicht alle zugleich —
   45 ms Abstand liest sich als Bewegung, gleichzeitig wäre es ein Ruck. */
.paket li { transition: transform 0.34s cubic-bezier(.22, .61, .36, 1); }
.paket:hover li { transform: translateX(4px); }
.paket:hover li:nth-child(1) { transition-delay: 0s; }
.paket:hover li:nth-child(2) { transition-delay: 0.045s; }
.paket:hover li:nth-child(3) { transition-delay: 0.09s; }
.paket:hover li:nth-child(4) { transition-delay: 0.135s; }
.paket:hover li:nth-child(5) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .knopf::before, .knopf::after { display: none; }
  .paket li, .paket:hover li { transform: none; transition: none; }
}
