/* Mali's Cake – Farben und Schrift (Systemschriften, keine externen Dienste) */
:root {
  --creme: #fff8f1;
  --zart: #fdeee8;
  --rosa: #f3b6c2;
  --himbeere: #c2445f;
  --himbeere-dunkel: #9e2f49;
  --schoko: #3d2622;
  --text: #3d2622;
  --leise: #7a5c55;
  --weiss: #ffffff;
  --rund: 18px;
  --schatten: 0 10px 30px rgba(61, 38, 34, 0.08);
  --schrift: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  --titel: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--titel); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }

.rahmen { width: min(1120px, 100% - 32px); margin-inline: auto; }

.ueberzeile {
  margin: 0 0 0.5em;
  color: var(--himbeere);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Knöpfe */
.knopf {
  display: inline-block;
  padding: 0.8em 1.5em;
  border: 2px solid var(--himbeere);
  border-radius: 999px;
  background: var(--himbeere);
  color: var(--weiss);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.knopf:hover { background: var(--himbeere-dunkel); border-color: var(--himbeere-dunkel); transform: translateY(-1px); }
.knopf:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
.knopf--rand { background: transparent; color: var(--himbeere); }
.knopf--rand:hover { color: var(--weiss); }
.knopf--klein { padding: 0.45em 1.1em; }

/* Kopfzeile */
.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 248, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(61, 38, 34, 0.06);
}
.kopf__innen { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 0.6em; font-family: var(--titel); font-size: 1.35rem; font-weight: 700; text-decoration: none; }
.menue { display: flex; align-items: center; gap: 1.6em; }
.menue a:not(.knopf) { text-decoration: none; color: var(--leise); font-weight: 600; }
.menue a:not(.knopf):hover { color: var(--himbeere); }
.menue-knopf { display: none; }

/* Start */
.held { padding: clamp(40px, 8vw, 96px) 0; background: radial-gradient(circle at 80% 30%, var(--zart), transparent 60%); }
.held__innen { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.einleitung { font-size: 1.15rem; color: var(--leise); max-width: 34em; }
.held__knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.held__bild img { margin-inline: auto; animation: schweben 6s ease-in-out infinite; }

@keyframes schweben {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Torte – Schichten beim Scrollen (torte.js) */
.torte {
  --elfenbein: #faf4ea;
  --champagner: #eadcc4;
  --altrosa: #c99a9a;
  --gold: #b8924a;
  --kakao: #4a2c22;
  position: relative;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, #fffaf2 0%, var(--elfenbein) 55%, #f4eadb 100%);
  overflow: clip;
}
.torte__buehne {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
  padding: clamp(48px, 7vw, 96px) 0;
}

/* Überschriften – ruhige Fassung: untereinander */
.torte__texte { display: grid; gap: 1.4em; }
.torte__satz h2 {
  margin: 0 0 0.3em;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--kakao);
}
.torte__satz p { margin: 0; color: #7a6155; font-size: 1.02rem; letter-spacing: 0.01em; }
.torte__satz--final h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.torte__hinweis { display: none; }

/* Torte */
.torte__bild { position: relative; display: grid; place-items: center; }
.torte__kuchen {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 600 / 680;
  transform-origin: 50% 58%;
}
.torte__kuchen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
.torte__glanz {
  position: absolute;
  inset: 4% -10%;
  background: radial-gradient(closest-side, rgba(255, 236, 200, 0.75), rgba(255, 236, 200, 0));
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

/* Bestellen + Instagram */
.torte__cta { display: grid; gap: 14px; justify-items: start; }
.torte__bestellen {
  display: inline-block;
  padding: 1em 1.9em;
  border-radius: 14px;
  background: var(--kakao);
  color: #fbf3e6;
  font-family: var(--schrift);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(74, 44, 34, 0.18);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background 0.35s, box-shadow 0.35s;
}
.torte__bestellen:hover { background: #3a2119; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(74, 44, 34, 0.24); }
.torte__insta {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.6em 0.2em;
  color: var(--kakao);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 44, 34, 0.25);
  transition: border-color 0.3s, color 0.3s;
}
.torte__insta:hover { color: #8a4d55; border-color: currentColor; }
.torte__insta svg { flex: none; }

/* Bewegte Fassung (nur mit JavaScript und ohne "Bewegung reduzieren") */
.torte--bewegt .torte__buehne {
  height: calc(100vh - var(--kopf-hoehe, 68px));
  height: calc(100svh - var(--kopf-hoehe, 68px));
  padding: clamp(16px, 3vh, 40px) 0;
}
.torte--bewegt .torte__texte { grid-template-areas: "satz"; align-items: center; min-height: 10em; }
.torte--bewegt .torte__satz,
.torte--bewegt .torte__hinweis { grid-area: satz; visibility: hidden; opacity: 0; will-change: transform, opacity, filter; }
.torte--bewegt .torte__satz h2 { font-size: clamp(1.9rem, 3.4vw, 3.1rem); }
.torte--bewegt .torte__hinweis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  visibility: visible;
  opacity: 1;
  color: #9a8172;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.torte--bewegt .torte__hinweis span { width: 48px; height: 1px; background: currentColor; opacity: 0.6; }
.torte--bewegt .torte__bild { height: 100%; min-height: 0; container-type: size; }
.torte--bewegt .torte__kuchen {
  /* passt in Breite und Höhe der Fläche; Luft nach oben/unten fürs Auseinanderziehen */
  width: min(100cqw, 78cqh * 600 / 680, 560px);
  will-change: transform;
}
.torte--bewegt .torte__kuchen img { will-change: transform; }

@media (max-width: 900px) {
  .torte__buehne { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .torte__cta { grid-column: 1 / -1; grid-auto-flow: column; justify-content: center; align-items: center; gap: 24px; }
  .torte--bewegt .torte__buehne { grid-template-rows: minmax(0, 1fr) auto; }
}

@media (max-width: 680px) {
  .torte__buehne { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .torte__texte { justify-items: center; }
  .torte__bild { order: -1; }
  .torte__kuchen { width: min(100%, 360px); }
  .torte__cta { grid-auto-flow: row; justify-items: center; }

  .torte--bewegt .torte__buehne {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  }
  .torte--bewegt .torte__bild { order: 0; }
  .torte--bewegt .torte__texte { min-height: 6.6em; }
  .torte--bewegt .torte__satz h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .torte--bewegt .torte__satz p { font-size: 0.95rem; }
  .torte--bewegt .torte__hinweis { justify-content: center; }
  .torte--bewegt .torte__kuchen { width: min(100cqw, 86cqh * 600 / 680, 420px); }
  .torte--bewegt .torte__satz { width: 100%; }
  .torte--bewegt .torte__cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }
  .torte__bestellen, .torte__insta { white-space: nowrap; }
  .torte--bewegt .torte__bestellen { padding: 0.8em 1.3em; font-size: 0.95rem; }
  .torte--bewegt .torte__insta { font-size: 0.95rem; border-bottom: 0; }
}

/* Instagram an anderen Stellen der Seite */
.insta-link { display: inline-flex; align-items: center; gap: 0.4em; text-decoration: none; }
.insta-link svg { flex: none; }
.knopf--insta {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 12px;
  background: transparent;
  border-color: rgba(255, 248, 241, 0.6);
  color: var(--creme);
}
.knopf--insta:hover { background: var(--creme); border-color: var(--creme); color: var(--schoko); }

/* Abschnitte */
.abschnitt { padding: clamp(56px, 8vw, 96px) 0; }
.abschnitt--zart { background: var(--zart); }
.abschnitt--dunkel { background: var(--schoko); color: var(--creme); }
.abschnitt--dunkel .ueberzeile { color: var(--rosa); }

.karten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.karte { background: var(--weiss); border-radius: var(--rund); padding: 28px 24px; box-shadow: var(--schatten); transition: transform 0.2s; }
.karte:hover { transform: translateY(-4px); }
.karte img { margin-bottom: 16px; }
.karte p { margin: 0; color: var(--leise); }

.anlaesse { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 28px 0 0; }
.anlaesse li { padding: 0.6em 1.3em; border-radius: 999px; background: var(--weiss); font-weight: 600; box-shadow: var(--schatten); }

.schritte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 32px 0 0; counter-reset: schritt; }
.schritte li { position: relative; padding: 64px 24px 24px; border-radius: var(--rund); border: 2px dashed var(--rosa); counter-increment: schritt; }
.schritte li::before {
  content: counter(schritt);
  position: absolute;
  top: 20px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--himbeere);
  color: var(--weiss);
  font-weight: 700;
}
.schritte b { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.schritte span { color: var(--leise); }
.hinweis { margin-top: 24px; color: var(--leise); }

/* Kontakt */
.kontakt { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.anfrage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.anfrage label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.anfrage input, .anfrage textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1px solid rgba(255, 248, 241, 0.25);
  border-radius: 12px;
  background: rgba(255, 248, 241, 0.08);
  color: var(--creme);
  font: inherit;
}
.anfrage textarea { resize: vertical; }
.anfrage__breit { grid-column: 1 / -1; }
.anfrage__info { margin: 0; font-size: 0.85rem; opacity: 0.7; }

/* Fußzeile */
.fuss { padding: 28px 0; font-size: 0.9rem; color: var(--leise); }
.fuss__innen { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fuss nav { display: flex; gap: 20px; }

/* Rechtstexte */
.seite { padding: 56px 0 80px; }
.seite .rahmen { max-width: 760px; }
.platzhalter { background: #fff3c4; padding: 0 0.3em; border-radius: 4px; }

/* Tablet */
@media (max-width: 900px) {
  .karten { grid-template-columns: repeat(2, 1fr); }
  .kontakt { grid-template-columns: 1fr; gap: 24px; }
}

/* Handy */
@media (max-width: 680px) {
  .menue-knopf {
    display: block;
    padding: 0.45em 1em;
    border: 2px solid var(--schoko);
    border-radius: 999px;
    background: none;
    color: var(--schoko);
    font: inherit;
    font-weight: 700;
  }
  .menue {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 1em;
    padding: 20px 16px 24px;
    background: var(--creme);
    box-shadow: var(--schatten);
  }
  .menue.is-offen { display: flex; }
  .insta-link__text { display: inline; }
  .held__innen { grid-template-columns: 1fr; }
  .held__bild { order: -1; }
  .held__bild img { width: 240px; }
  .karten, .schritte { grid-template-columns: 1fr; }
  .anfrage { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .held__bild img { animation: none; }
  .karte, .knopf, .torte__bestellen, .torte__insta { transition: none; }
}
