/* =========================================================
   Bäckerei Op de Kamp – Fallbeispiel (erfundener Betrieb)
   Stimmung: Backstube um fünf Uhr morgens. Dunkel, warm, Ofenlicht.
   ========================================================= */

@font-face { font-family: "Young Serif"; src: url(../fonts/YoungSerif.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(../fonts/Karla-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url(../fonts/Karla-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #140e09;      /* Backstube vor Sonnenaufgang */
  --night-2: #21170f;    /* Holz im Dunkeln */
  --flour: #f3eadb;      /* Mehl, Haupttext */
  --flour-dim: #c2b29a;  /* Nebentext */
  --crust: #d89a3c;      /* Kruste, Akzent */
  --crust-dark: #8e4a1c;
  --ember: #e2632e;      /* Glut, sparsam */
  --dough: #efe3cf;

  --serif: "Young Serif", Georgia, serif;
  --sans: "Karla", system-ui, sans-serif;

  --fs-title: clamp(48px, 8vw, 140px);
  --fs-h2: clamp(36px, 5vw, 76px);
  --fs-lead: clamp(19px, 1.5vw, 23px);
  --fs-body: 18px;
  --fs-small: 15px;

  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);   /* Emil: kräftiges ease-out */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--night); color: var(--flour); font: 400 var(--fs-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--crust); color: var(--night); }
:focus-visible { outline: 3px solid var(--crust); outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--flour); color: var(--night); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* Filmkorn über allem */
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none;
  background: url(../bilder/korn.png); opacity: .09; mix-blend-mode: overlay;
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

.title { font: 400 var(--fs-title)/.92 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font: 400 var(--fs-h2)/1 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--flour); max-width: 34ch; }
.btn {
  display: inline-flex; align-items: center; min-height: 54px; padding: 0 28px; border-radius: 999px;
  background: var(--crust); color: var(--night); font-weight: 700; text-decoration: none; font-size: var(--fs-body);
  transition: background-color .2s ease, scale .12s var(--ease);
}
.btn:active { scale: .97; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #e8ad52; } }
.btn[aria-disabled="true"] { background: var(--night-2); color: var(--flour-dim); pointer-events: none; }
.link { color: var(--crust); text-underline-offset: .2em; }

/* ---------- Vorspann ---------- */
.intro { position: relative; height: 100svh; display: grid; place-items: center; align-content: center; gap: 28px; overflow: hidden; background: #0b0805; }
.bar { position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 2; }
.bar--top { top: 0; } .bar--bottom { bottom: 0; }
.stamp { width: min(240px, 52vw); height: auto; }
.s-line { fill: none; stroke: var(--crust); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.s-thin { stroke-width: 1.5; opacity: .6; }
.s-text { fill: var(--crust); font: 700 13px var(--sans); letter-spacing: .22em; }
.intro-name { font: 400 clamp(40px, 6vw, 88px)/1 var(--serif); color: var(--flour); }
.intro-hint { position: absolute; bottom: calc(9vh + 20px); font-size: var(--fs-small); color: var(--flour-dim); letter-spacing: .04em; }

/* ---------- Bildszenen ---------- */
.scene { position: relative; min-height: 110svh; display: flex; align-items: flex-end; overflow: hidden; }
.scene-media { position: absolute; inset: 0; }
.scene-media img { width: 100%; height: 100%; object-fit: cover; }
/* dunkle Abdeckung unten, damit Schrift auf dem Foto lesbar bleibt */
.scene-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,7,4,.92) 0%, rgba(10,7,4,.55) 35%, rgba(10,7,4,0) 65%); } /* taste-skill-ignore: neutrale Abdeckung unter Text auf Foto */
.scene-text { position: relative; padding: 0 var(--pad) clamp(48px, 9vh, 110px); display: grid; gap: 24px; justify-items: start; max-width: 1100px; }

/* ---------- Brötchen backt ---------- */
.bake { position: relative; background: radial-gradient(ellipse at 70% 60%, #2a1a0e 0%, var(--night) 60%); } /* taste-skill-ignore: Ofenglut als Lichtquelle */
.bake-pin { min-height: 100svh; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 4vw; padding: 0 var(--pad); }
.bake-copy { display: grid; gap: 40px; }
.clock { display: grid; gap: 22px; }
.clock li { display: grid; grid-template-columns: 92px 1fr; gap: 16px; color: var(--flour-dim); transition: color .3s ease; }
.clock li b { font: 400 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.clock li.is-on { color: var(--flour); }
.clock li.is-on b { color: var(--crust); }
.bake-stage { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.glow { position: absolute; inset: 10% 5%; border-radius: 50%; background: var(--ember); filter: blur(80px); opacity: 0; }
.roll { position: relative; width: 100%; overflow: visible; }
.r-shadow { fill: #000; opacity: .45; }
.r-dough { fill: var(--dough); }
.r-crust { fill: var(--crust-dark); opacity: 0; }
.r-shine { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; opacity: 0; }
.r-cut { fill: none; stroke: #b9a07a; stroke-width: 4; stroke-linecap: round; }
.r-ear { fill: #e9c27a; opacity: 0; }
.r-flour circle { fill: #fff; opacity: .8; }
.r-steam path { fill: none; stroke: var(--flour); stroke-width: 5; stroke-linecap: round; opacity: 0; }
.bake-temp { position: absolute; right: 4%; top: 6%; font: 400 clamp(28px, 3vw, 44px)/1 var(--serif); color: var(--crust); font-variant-numeric: tabular-nums; }

/* ---------- Theke ---------- */
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 100svh; }
.shelf-photo { overflow: hidden; }
.shelf-photo img { width: 100%; height: 100%; object-fit: cover; }
.shelf-list { padding: clamp(48px, 8vw, 120px) var(--pad); display: grid; align-content: center; gap: 36px; background: var(--night-2); }
.menu { display: grid; gap: 16px; font-size: var(--fs-lead); }
.menu li { display: flex; align-items: baseline; gap: 12px; }
.menu i { flex: 1; border-bottom: 2px dotted rgba(243,234,219,.3); translate: 0 -5px; }
.menu b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--crust); }
.note { color: var(--flour-dim); font-size: var(--fs-small); }

/* ---------- Teig ---------- */
.dough { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 100svh; }
.dough-photo { height: 100%; overflow: hidden; }
.dough-photo img { width: 100%; height: 100%; object-fit: cover; }
.dough-copy { padding: clamp(48px, 8vw, 120px) var(--pad); display: grid; gap: 20px; }
.quote { font: 400 clamp(34px, 4vw, 60px)/1.08 var(--serif); max-width: 14ch; }
.quote-by { color: var(--flour-dim); font-size: var(--fs-small); }
.facts { display: grid; gap: 24px; margin-top: 32px; }
.facts dt { font: 400 clamp(28px, 2.6vw, 38px)/1 var(--serif); color: var(--crust); }
.facts dd { color: var(--flour-dim); }

/* ---------- Tüte ---------- */
.bag { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: center; padding: clamp(96px, 14vh, 160px) var(--pad); background: var(--night); }
.bag-copy { display: grid; gap: 28px; justify-items: start; }
.picker { display: grid; gap: 10px; width: 100%; max-width: 460px; }
.picker li { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--night-2); border-radius: 14px; padding: 12px 12px 12px 20px; font-size: var(--fs-lead); }
.count { display: flex; align-items: center; gap: 6px; }
.count button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(243,234,219,.1); cursor: pointer; font-size: 22px; transition: background-color .2s ease, scale .12s var(--ease); }
.count button:active { scale: .9; }
@media (hover: hover) and (pointer: fine) { .count button:hover { background: rgba(243,234,219,.2); } }
.count output { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.bag-sum { display: flex; justify-content: space-between; width: 100%; max-width: 460px; font-size: var(--fs-lead); }
.bag-sum b { font: 400 32px/1 var(--serif); color: var(--crust); font-variant-numeric: tabular-nums; }
.bag-stage { position: relative; display: grid; place-items: end center; height: 520px; }
.bag-drop { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.drop-item { position: absolute; top: 0; width: 84px; height: 58px; }
.paperbag { width: min(320px, 70%); position: relative; z-index: 2; }
.pb-back { fill: #b98f5a; } .pb-front { fill: #d3ab72; } .pb-fold { fill: #c09460; }
.pb-stamp circle { fill: none; stroke: var(--night); stroke-width: 3; opacity: .7; }
.pb-stamp text { text-anchor: middle; font: 400 16px var(--serif); fill: var(--night); opacity: .8; }
.bag-count { position: absolute; bottom: -36px; color: var(--flour-dim); font-size: var(--fs-small); }

/* ---------- Laden ---------- */
.scene--laden { align-items: center; justify-content: flex-end; }
.visit { position: relative; margin: 0 var(--pad); background: rgba(20,14,9,.88); padding: 36px; border-radius: 18px; display: grid; gap: 18px; max-width: 420px; }
.hours { display: grid; gap: 8px; }
.hours div { display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px dotted rgba(243,234,219,.25); padding-bottom: 6px; }
.hours dd { font-variant-numeric: tabular-nums; }

/* ---------- Fuß ---------- */
.foot { padding: 80px var(--pad) 40px; display: grid; gap: 24px; }
.foot-mark { font: 400 clamp(64px, 16vw, 260px)/.85 var(--serif); color: var(--crust); letter-spacing: -0.03em; }
.foot-note { max-width: 70ch; color: var(--flour-dim); font-size: var(--fs-small); }
.foot-note strong { color: var(--flour); }

/* ---------- Handy ---------- */
@media (max-width: 860px) {
  .bake-pin { grid-template-columns: 1fr; align-content: center; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
  .bake-stage { order: -1; max-width: 420px; justify-self: center; width: 100%; }
  .clock { gap: 12px; } .clock li { grid-template-columns: 70px 1fr; font-size: 16px; } .clock li b { font-size: 21px; }
  .clock li:not(.is-on) { display: none; }
  .shelf, .dough, .bag { grid-template-columns: 1fr; }
  .shelf-photo { aspect-ratio: 4 / 3; }
  .dough-photo { aspect-ratio: 1; }
  .bag-stage { height: 380px; margin-top: 40px; }
  .scene--laden { align-items: flex-end; padding-bottom: 40px; }
  .visit { margin: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .r-dough { fill: #d9a35a; } .r-crust { opacity: .85; } .r-ear { opacity: 1; } .r-cut { opacity: 0; } .r-steam path { opacity: .6; }
  .clock li { color: var(--flour); } .clock li:not(.is-on) { display: grid; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* ---------- Für alle Fallbeispiele (V12): Kopfzeile ein/aus und yourpage24-Hinweis ---------- */
.top { transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1); }
.top.yp-weg { transform: translateY(-100%); }
.yp-pill {
  position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 12px; border-radius: 99px; text-decoration: none; font: 500 13px/1.2 system-ui, sans-serif;
  color: #e9fbff; background: rgba(3, 18, 26, 0.82); border: 1px solid rgba(34, 227, 214, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(12px) scale(0.97); pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.23, 1, 0.32, 1), transform 250ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms ease;
}
.yp-pill.is-on { opacity: 1; transform: none; pointer-events: auto; }
.yp-pill i { width: 8px; height: 8px; border-radius: 50%; background: #22e3d6; box-shadow: 0 0 10px #22e3d6; flex: none; }
.yp-pill b { font-weight: 600; color: #22e3d6; }
.yp-pill:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .yp-pill:hover { border-color: #22e3d6; } }
@media (max-width: 520px) { .yp-pill span { display: none; } }
@media (prefers-reduced-motion: reduce) { .top, .yp-pill { transition-property: opacity; } .yp-pill { transform: none; } }
