/* Balkisserie – Entwurf von Seetalwebsites
   Abstände nur aus 8 · 16 · 24 · 40 · 64 · 104 */

:root {
  --grund: #f6eadd;
  --hero: #ead8c7;
  --text: #3b0f18;
  --text-2: rgba(59, 15, 24, 0.72);
  --text-3: rgba(59, 15, 24, 0.52);
  --akzent: #b0122e;
  --rot: #7a1220;
  --rosa: #f3c2be;
  --creme: #fbf3e9;
  --linie: rgba(59, 15, 24, 0.22);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --schrift: "Sacramento", "Snell Roundhand", cursive;

  --rand: 20px;
  --luft: 80px;
  --expo: cubic-bezier(0.19, 1, 0.22, 1);
  --bogen: 28px;
}

@media (min-width: 900px) {
  :root { --rand: 40px; --luft: 136px; --bogen: 40px; }
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, figure, dl, dd, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--rand);
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

h2 { font-size: clamp(44px, 7vw, 96px); }

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

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--akzent);
  border-radius: 999px;
  background: var(--akzent);
  color: var(--creme);
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.knopf:hover { background: var(--rot); border-color: var(--rot); }
.knopf:active { transform: scale(0.97); }

.knopf--hell { background: transparent; color: var(--text); border-color: var(--text); }
.knopf--hell:hover { background: var(--text); border-color: var(--text); color: var(--creme); }

.link {
  padding: 12px 0;
  font-weight: 500;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 150ms ease-out;
}
.link:hover { color: var(--akzent); }

/* ---------- Kopfzeile ---------- */

.top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; }
.top__in { display: flex; justify-content: space-between; align-items: center; height: 64px; font-size: 15px; }
.top__ort { color: var(--text-2); }
.top__nav { display: flex; gap: 24px; }
.top__nav a { padding: 12px 0; text-decoration: none; transition: color 150ms ease-out; }
.top__nav a:hover { color: var(--akzent); }
.top__nav a:not(:last-child) { display: none; }

@media (min-width: 900px) {
  .top__in { height: 80px; }
  .top__nav { gap: 40px; }
  .top__nav a:not(:last-child) { display: inline; }
}

/* ---------- Einstieg ---------- */

.hero {
  position: relative;
  min-height: max(100svh, 780px);
  overflow: hidden;
  background: var(--hero);
}

.hero__bild {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 50svh;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
.hero__bild img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 95% 50%;
  transform-origin: 72% 60%;
}

.hero__in { position: relative; z-index: 2; padding-top: 88px; }

.hero__zeile { font-size: 15px; color: var(--text-2); margin-bottom: 8px; }

.hero__name {
  font-size: 16.4vw;
  line-height: 0.95;
  margin-left: -0.04em;
}
.hero__name .maske { padding-bottom: 0.08em; }

.hero__satz { max-width: 30em; margin-top: 16px; color: var(--text-2); }

.hero__knoepfe { display: flex; align-items: center; gap: 24px; margin-top: 24px; }

.hero__legende { display: none; }

.platz {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  min-height: 48px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-2);
  text-decoration: none;
}
.platz svg { flex: none; width: 44px; height: 44px; color: var(--akzent); transition: transform 600ms var(--expo); }
.platz:hover svg { transform: rotate(40deg); }
.platz b { display: block; font-weight: 500; font-size: 15px; color: var(--text); }

@media (min-width: 900px) {
  .hero { display: flex; align-items: center; min-height: max(100svh, 640px); }
  .hero__bild { inset: 0; height: auto; -webkit-mask-image: none; mask-image: none; }
  .hero__bild img { object-position: 100% 58%; }
  .hero__in { padding-top: 64px; }
  .hero__text { max-width: 50%; }
  .hero__zeile { font-size: 17px; margin-bottom: 16px; }
  .hero__name { font-size: clamp(72px, 8.6vw, 144px); }
  .hero__satz { font-size: 19px; max-width: 24em; margin-top: 24px; }
  .hero__knoepfe { margin-top: 40px; }
  .hero__legende {
    display: block;
    position: absolute; z-index: 2;
    left: max(var(--rand), calc((100vw - 1280px) / 2 + var(--rand))); bottom: 24px;
    max-width: 30em;
    font-size: 14px;
    color: var(--text-3);
  }
  .platz { margin-top: 40px; }
}

/* Zeilen steigen aus einer Maske */
.maske { display: block; overflow: hidden; }
.maske > span { display: block; }
.js .maske > span { transform: translateY(105%); transition: transform 1100ms var(--expo); }
.js .hero__name .maske > span { transition-delay: 90ms; }
.js .hero__satz .maske > span { transition-delay: 180ms; }
.js .hero__knoepfe, .js .platz, .js .hero__legende { opacity: 0; transition: opacity 800ms ease-out 500ms, transform 600ms var(--expo); }
.js .hero__bild img { transform: scale(1.1); transition: transform 2000ms var(--expo); }
.js.bereit .maske > span { transform: none; }
.js.bereit .hero__knoepfe, .js.bereit .platz, .js.bereit .hero__legende { opacity: 1; }
.js.bereit .hero__bild img { transform: scale(1); }

/* ---------- Abschnittskopf ---------- */

.kopf { display: grid; gap: 16px; margin-bottom: 40px; }
.kopf p { max-width: 34em; color: var(--text-2); }

@media (min-width: 900px) {
  .kopf { grid-template-columns: 7fr 5fr; align-items: end; gap: 40px; margin-bottom: 104px; }
  .kopf p { font-size: 19px; padding-bottom: 8px; }
}

/* ---------- Torten ---------- */

.torten { padding: var(--luft) 0 calc(var(--luft) + var(--bogen)); }

.vitrine { display: grid; gap: 40px; }

.stueck { will-change: transform; }
.stueck__bild { overflow: hidden; border-radius: 4px; background: var(--hero); }
.stueck__bild img { width: 100%; height: 100%; object-fit: cover; }
.stueck__bild.hoch { aspect-ratio: 4 / 5; }
.stueck__bild.quer { aspect-ratio: 3 / 2; }
.stueck__bild.rund { aspect-ratio: 3 / 4; border-radius: 999px 999px 4px 4px; }

.stueck figcaption { margin-top: 16px; font-size: 15px; color: var(--text-2); }
.stueck figcaption span {
  display: block;
  font: 400 22px/1.2 var(--serif);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 4px;
}

.s3, .s6 { width: 78%; margin-left: auto; }
.s4 { width: 78%; }

.js .stueck__bild { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--expo); }
.js .stueck__bild img { transform: scale(1.15); transition: transform 1400ms var(--expo); }
.js .da .stueck__bild, .js .stueck__bild.da { clip-path: inset(0 0 0 0); }
.js .da .stueck__bild img, .js .stueck__bild.da img { transform: scale(1); }

@media (min-width: 900px) {
  .vitrine { grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 104px; }
  .s1 { grid-column: 1 / 6; }
  .s2 { grid-column: 7 / 13; margin-top: 104px; }
  .s3 { grid-column: 3 / 7; width: auto; margin-left: 0; }
  .s4 { grid-column: 8 / 12; width: auto; margin-top: 104px; }
  .s5 { grid-column: 1 / 5; }
  .s6 { grid-column: 6 / 11; width: auto; margin-left: 0; margin-top: 104px; }
  .stueck figcaption span { font-size: 26px; }
}

/* ---------- Bake Battle: rote Fläche mit Spritz-Kante ---------- */

.battle {
  position: relative;
  z-index: 1;
  background: var(--rot);
  color: var(--creme);
  padding: var(--luft) 0;
}
.battle::before, .battle::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: var(--bogen);
  background-repeat: repeat-x;
  background-position: center top;
  background-size: calc(var(--bogen) * 2) var(--bogen);
}
.battle::before {
  bottom: calc(100% - 1px);
  background-image: radial-gradient(circle at 50% 100%, var(--rot) calc(var(--bogen) - 0.5px), transparent var(--bogen));
}
.battle::after {
  top: calc(100% - 1px);
  background-image: radial-gradient(circle at 50% 0, var(--rot) calc(var(--bogen) - 0.5px), transparent var(--bogen));
}

.battle__in { display: grid; gap: 40px; }

.battle__name { font-size: 15px; color: rgba(251, 243, 233, 0.72); margin-bottom: 16px; }
.battle__text > p:not(.battle__name) { max-width: 30em; margin-top: 24px; color: rgba(251, 243, 233, 0.82); }

.battle__innen { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; max-width: 30em; }
.battle__innen div { border-top: 1px solid rgba(251, 243, 233, 0.3); padding-top: 16px; }
.battle__innen dt { font-size: 15px; color: rgba(251, 243, 233, 0.72); }
.battle__innen dd {
  font: 400 22px/1.2 var(--serif);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.015em;
  margin-top: 4px;
}

.battle__torte { margin: 0 -8px; }
.battle__frei {
  width: 100%;
  filter: drop-shadow(0 24px 32px rgba(30, 2, 8, 0.45));
  will-change: transform;
}

.battle__schnitt { width: 56%; margin-left: auto; }
.battle__schnitt figcaption { margin-top: 8px; font-size: 15px; color: rgba(251, 243, 233, 0.72); }
.battle__schnitt .stueck__bild { background: rgba(0, 0, 0, 0.2); }

@media (min-width: 900px) {
  .battle__in { grid-template-columns: 5fr 7fr; column-gap: 40px; row-gap: 64px; align-items: start; }
  .battle__text { grid-column: 1; grid-row: 1; padding-top: 40px; }
  .battle__torte { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: center; }
  .battle__schnitt { grid-column: 1; grid-row: 2; width: 240px; margin-left: 0; }
  .battle__text > p:not(.battle__name) { font-size: 19px; }
  .battle__innen dd { font-size: 26px; }
}

/* ---------- Bestellen ---------- */

.bestellen { background: var(--rosa); padding: calc(var(--luft) + var(--bogen)) 0 var(--luft); }

.karte { display: grid; gap: 40px; }

.karte__torte { text-align: center; }
.torte {
  display: block;
  width: min(100%, 420px);
  margin: 0 auto;
  filter: drop-shadow(0 16px 24px rgba(122, 18, 32, 0.28));
  --t-creme: #f6b3b6;
  --t-rand: #f09aa2;
  --t-rand-2: #fbd3d3;
  --t-tinte: #a30f2a;
}
.torte[data-farbe="Rot"] { --t-creme: #8e1726; --t-rand: #74101d; --t-rand-2: #c98b8b; --t-tinte: #f0bcb6; }
.torte[data-farbe="Creme"] { --t-creme: #f7ecd9; --t-rand: #efdcc0; --t-rand-2: #fffaf0; --t-tinte: #4a2015; }
.t-creme { fill: var(--t-creme); transition: fill 400ms ease-out; }
.m-basis { fill: var(--t-rand); transition: fill 400ms ease-out; }
.m-rille { fill: none; stroke: rgba(59, 15, 24, 0.14); stroke-width: 1.2; stroke-linecap: round; }
#t-perlen circle { fill: var(--t-rand-2); transition: fill 400ms ease-out; }
.t-schrift { font-family: var(--schrift); fill: var(--t-tinte); transition: fill 400ms ease-out; }

.karte__hinweis { margin-top: 16px; font-size: 14px; color: var(--text-3); }

.karte__form { display: grid; gap: 24px; }

.feld label, .feld legend { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.feld input[type="text"], .feld input[type="date"], .feld input[type="number"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--creme);
  color: var(--text);
  font: 400 17px/1 var(--sans);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 150ms ease-out;
}
.feld input:hover { border-color: var(--text-3); }
#f-schrift { font: 400 28px/1 var(--schrift); padding-top: 4px; }
.feld--zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl label { margin: 0; font-weight: 400; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wahl span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  font-size: 15px;
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.wahl label:hover span { border-color: var(--text); }
.wahl input:checked + span { background: var(--text); border-color: var(--text); color: var(--creme); }
.wahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 3px; }
.wahl i { width: 16px; height: 16px; border-radius: 50%; background: var(--f); border: 1px solid rgba(59, 15, 24, 0.25); }

.nachricht { border-top: 1px solid var(--linie); padding-top: 24px; }
.nachricht__titel { font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.nachricht__text { white-space: pre-line; color: var(--text-2); font-size: 16px; }

.karte__senden { display: flex; flex-wrap: wrap; gap: 16px; }
.karte__senden .knopf { flex: 1 1 220px; }
.karte__klein { font-size: 14px; color: var(--text-3); }

@media (min-width: 900px) {
  .karte { grid-template-columns: 5fr 6fr; column-gap: 104px; align-items: start; }
  .karte__torte { position: sticky; top: 104px; }
  .torte { width: 100%; max-width: 480px; }
}

/* ---------- Fusszeile ---------- */

.fuss { padding: var(--luft) 0 40px; overflow: hidden; }
.fuss__name {
  font: italic 400 min(16.6vw, 212px) / 0.95 var(--serif);
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.035em;
  color: var(--akzent);
  margin-left: -0.04em;
  white-space: nowrap;
}
.fuss__zeilen { display: grid; gap: 24px; margin-top: 40px; font-size: 16px; }
.fuss__zeilen a { display: inline-block; padding: 6px 0; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color 150ms ease-out; }
.fuss__zeilen a:hover { color: var(--akzent); }
.fuss__entwurf { color: var(--text-3); font-size: 14px; }

@media (min-width: 900px) {
  .fuss__zeilen { grid-template-columns: 1fr 1fr 1fr; margin-top: 64px; align-items: end; }
  .fuss__entwurf { text-align: right; }
}

/* ---------- Schwebender Knopf ---------- */

.schwebt {
  position: fixed;
  z-index: 20;
  right: 16px; bottom: 16px;
  box-shadow: 0 8px 24px rgba(59, 15, 24, 0.25);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 250ms ease-out, transform 500ms var(--expo), background-color 150ms ease-out;
}
.schwebt.an { opacity: 1; transform: none; pointer-events: auto; }

@media (min-width: 900px) { .schwebt { right: 40px; bottom: 40px; } }

/* ---------- Ohne Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .maske > span, .js .hero__bild img, .js .stueck__bild img { transform: none; }
  .js .stueck__bild { clip-path: none; }
  .js .hero__knoepfe, .js .platz, .js .hero__legende { opacity: 1; }
}
