/* Malis Cake – shabby chic: cream white, eucalyptus, dusty rose, a touch of gold.
   Fonts are hosted locally (assets/fonts), no external services. */

@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/great-vibes-400.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("assets/fonts/cormorant-garamond.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("assets/fonts/cormorant-garamond-500-italic.woff2") format("woff2"); }

:root {
  --creme: #faf5ec;
  --papier: #f6efe3;
  --leinen: #efe5d5;
  --eukalyptus: #8fa58d;
  --salbei: #6f856f;
  --altrosa: #c98f96;
  --rose: #b4646f;
  --rose-dunkel: #97505b;
  --gold: #c4a25f;
  --gold-hell: #e6d1a0;
  --tinte: #4f2f2c;
  --leise: #7d635c;
  --kopf-hoehe: 72px;
  --schreib: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
}

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

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

body {
  margin: 0;
  color: var(--tinte);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  background-color: var(--creme);
  /* soft watercolour washes + paper grain */
  background-image:
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(201, 143, 150, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 40% at 90% 85%, rgba(143, 165, 141, 0.2), transparent 70%),
    radial-gradient(ellipse 50% 50% at 85% 10%, rgba(230, 209, 160, 0.18), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }

:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.6em;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(180deg, #c2747e, var(--rose));
  box-shadow: inset 0 0 0 3px rgba(255, 245, 230, 0.35), 0 6px 18px rgba(151, 80, 91, 0.22);
  color: #fffaf3;
  font: 700 1.1rem/1.1 var(--serif);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s, background 0.35s;
}
.knopf:hover { transform: translateY(-2px); background: linear-gradient(180deg, #b86a75, var(--rose-dunkel)); box-shadow: inset 0 0 0 3px rgba(255, 245, 230, 0.35), 0 10px 24px rgba(151, 80, 91, 0.3); }
.knopf--klein { padding: 0.5em 1.2em; font-size: 1rem; }
.knopf--gross { padding: 0.85em 2em; font-size: 1.3rem; }
.knopf--rand { background: transparent; color: var(--rose-dunkel); box-shadow: none; }
.knopf--rand:hover { background: rgba(201, 143, 150, 0.12); box-shadow: none; }

/* pulsing gold rings around the main button */
.knopf--puls { position: relative; isolation: isolate; }
.knopf--puls::before,
.knopf--puls::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  border: 2px solid var(--gold);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: puls 2.6s cubic-bezier(.25, .5, .45, 1) infinite;
}
.knopf--puls::after { animation-delay: 1.3s; }
@keyframes puls {
  0% { opacity: 0.95; transform: scale(1); }
  55% { opacity: 0.45; }
  100% { opacity: 0; transform: scale(1.22, 1.55); }
}

/* Header */
.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--kopf-hoehe);
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: rgba(250, 245, 236, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(196, 162, 95, 0.35);
}
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marke img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--gold-hell), 0 3px 10px rgba(79, 47, 44, 0.15); }
.marke span { font-family: var(--schreib); font-size: 2.1rem; line-height: 1; color: var(--tinte); }
.kopf__aktionen { display: flex; align-items: center; gap: 18px; }
.kopf__insta { display: inline-flex; align-items: center; gap: 8px; color: var(--salbei); font-weight: 600; text-decoration: none; }
.kopf__insta:hover { color: var(--rose-dunkel); }

/* Cake section */
.torte { position: relative; }
.torte__buehne {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 80px);
  overflow: clip;
}

/* eucalyptus branches + gold frame */
.torte__buehne::before,
.torte__buehne::after {
  content: "";
  position: absolute;
  width: clamp(180px, 26vw, 380px);
  aspect-ratio: 520 / 620;
  background: url("assets/eukalyptus.svg") no-repeat center / contain;
  opacity: 0.75;
  pointer-events: none;
}
.torte__buehne::before { left: -2%; bottom: -6%; }
.torte__buehne::after { right: -2%; top: -6%; transform: rotate(180deg); }
.torte__rahmen {
  position: absolute;
  inset: clamp(10px, 1.6vw, 22px);
  border: 1.5px solid rgba(196, 162, 95, 0.7);
  border-radius: 28px;
  pointer-events: none;
}
.torte__rahmen::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(196, 162, 95, 0.35);
  border-radius: 22px;
}

/* Text – calm version: one below the other */
.torte__texte { position: relative; z-index: 1; display: grid; gap: 1.6em; }
.torte__satz h1,
.torte__satz h2 {
  font-family: var(--schreib);
  font-size: clamp(2.6rem, 4.4vw, 4.3rem);
  line-height: 1.08;
  color: var(--tinte);
}
.torte__satz p { margin: 0.35em 0 0; color: var(--leise); font-style: italic; font-size: 1.3rem; }
.torte__ueber {
  margin: 0 0 0.6em !important;
  font-style: normal !important;
  font-size: 0.85rem !important;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--salbei) !important;
}
.torte__hinweis { display: none; }
.sortiment { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.1em 0 0; padding: 0; list-style: none; }
.sortiment li {
  padding: 0.25em 0.9em;
  border: 1px solid rgba(196, 162, 95, 0.6);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.7);
  font-size: 1rem;
  font-weight: 600;
  color: var(--tinte);
}
.torte__fortschritt { display: none; }

/* Cake */
.torte__bild { position: relative; z-index: 1; display: grid; place-items: center; }
.torte__kuchen { position: relative; width: min(100%, 520px); aspect-ratio: 600 / 720; transform-origin: 50% 56%; }
.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: 0 -12%;
  background: radial-gradient(closest-side, rgba(255, 240, 210, 0.85), rgba(255, 240, 210, 0));
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}
.torte__funkeln, .torte__regen { position: absolute; inset: 0; pointer-events: none; }
.torte__funkeln svg {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  color: var(--gold);
  animation: funkeln 3.2s ease-in-out var(--d) infinite;
}
.torte__regen svg { position: absolute; color: var(--gold); opacity: 0; }
@keyframes funkeln {
  0%, 100% { opacity: 0.15; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1) rotate(20deg); }
}

/* gold glints on the gold leaf and the board, moving with their layer */
.glitzer { position: absolute; inset: 0; pointer-events: none; }
.glitzer span {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background: radial-gradient(circle, rgba(255, 246, 210, 0.95) 0 12%, rgba(255, 226, 150, 0.45) 30%, rgba(255, 226, 150, 0) 68%);
  opacity: 0;
  transform: scale(0);
  animation: glint var(--t, 5s) ease-in-out var(--d, 0s) infinite;
}
.glitzer svg { width: 100%; height: 100%; color: #fff8dc; display: block; }
@keyframes glint {
  0%, 14%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  6% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* gold dust drifting up around the cake */
.torte__staub { position: absolute; inset: 0; pointer-events: none; }
.torte__staub span {
  position: absolute;
  bottom: 18%;
  width: var(--g, 4px);
  height: var(--g, 4px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4cc, #d9b25c 60%, rgba(196, 162, 95, 0));
  box-shadow: 0 0 6px rgba(240, 205, 120, 0.7);
  opacity: 0;
  animation: staub var(--t, 9s) linear var(--d, 0s) infinite;
}
@keyframes staub {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  15% { opacity: 0.9; }
  70% { opacity: 0.6; }
  100% { opacity: 0; transform: translate3d(var(--x, 20px), -62vh, 0); }
}

/* Order + Instagram */
.torte__cta { position: relative; z-index: 1; display: grid; gap: 16px; justify-items: start; }
.torte__insta, .torte__telefon {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
}
.torte__insta { font-family: var(--schreib); font-size: 1.9rem; line-height: 1; color: var(--tinte); }
.torte__insta svg:first-child { color: var(--salbei); flex: none; }
.torte__insta .herz { color: var(--rose); flex: none; transition: transform 0.4s; }
.torte__insta:hover { color: var(--rose-dunkel); }
.torte__insta:hover .herz { transform: scale(1.25); }
.torte__telefon { color: var(--leise); font-weight: 600; letter-spacing: 0.04em; }
.torte__telefon svg { color: var(--salbei); }
.torte__telefon:hover { color: var(--rose-dunkel); }

/* Animated version (JavaScript on, no "reduce motion") */
/* Fixed screen: the page never scrolls; header on top, cake fills the middle, footer at the bottom */
html.ist-fix,
html.ist-fix body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.ist-fix body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
}
html.ist-fix main { min-height: 0; }
html.ist-fix .fuss { padding-block: 10px max(10px, env(safe-area-inset-bottom)); font-size: 0.9rem; }
.torte--bewegt { height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.torte--bewegt .torte__buehne {
  height: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-block: clamp(20px, 3.5vh, 44px);
}
.torte--bewegt .torte__texte { grid-template-areas: "satz"; align-items: center; min-height: 12em; }
.torte--bewegt .torte__satz { grid-area: satz; visibility: hidden; opacity: 0; will-change: transform, opacity, filter; }
.torte--bewegt .torte__satz--intro { visibility: visible; opacity: 1; }
.torte--bewegt .torte__hinweis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1.4em !important;
  font-style: normal !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.torte--bewegt .torte__hinweis span { width: 44px; height: 1px; background: var(--gold); animation: hinweis 2.4s ease-in-out infinite; transform-origin: left; }
@keyframes hinweis { 0%, 100% { transform: scaleX(0.4); } 50% { transform: scaleX(1); } }
.torte--bewegt .torte__fortschritt {
  position: absolute;
  left: 0;
  bottom: -2.5em;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.torte--bewegt .torte__fortschritt li { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--gold); transition: background 0.3s, transform 0.3s; }
.torte--bewegt .torte__fortschritt li.ist-aktiv { background: var(--gold); transform: scale(1.3); }
.torte--bewegt .torte__bild { height: 100%; min-height: 0; container-type: size; }
.torte--bewegt .torte__kuchen { width: min(100cqw, 82cqh * 600 / 720, 560px); will-change: transform; }
.torte--bewegt .torte__kuchen img { will-change: transform; }

/* Footer */
.fuss {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 28px 16px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(196, 162, 95, 0.35);
  color: var(--leise);
  font-size: 1rem;
}
.fuss nav { display: flex; gap: 20px; }
.fuss a { text-decoration: none; border-bottom: 1px solid rgba(196, 162, 95, 0.5); }
.fuss a:hover { color: var(--rose-dunkel); }

/* Order window */
.bestellung {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(24px, 5vw, 44px);
  border: 1.5px solid var(--gold);
  border-radius: 26px;
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(143, 165, 141, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(201, 143, 150, 0.16), transparent 70%),
    var(--creme);
  box-shadow: inset 0 0 0 6px var(--creme), inset 0 0 0 7px rgba(196, 162, 95, 0.4), 0 30px 80px rgba(79, 47, 44, 0.3);
  color: var(--tinte);
  overflow: auto;
}
.bestellung::backdrop { background: rgba(79, 47, 44, 0.35); backdrop-filter: blur(4px); }
.bestellung[open] { animation: fenster 0.45s cubic-bezier(.2, .8, .2, 1); }
@keyframes fenster { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.bestellung__schliessen-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.bestellung__schliessen {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(196, 162, 95, 0.6);
  border-radius: 50%;
  background: transparent;
  color: var(--tinte);
  font: 400 1.6rem/1 var(--serif);
  cursor: pointer;
}
.bestellung__schliessen:hover { background: rgba(201, 143, 150, 0.15); }
.bestellung__ueber { margin: 0 0 4px; padding-right: 48px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--salbei); }
.bestellung h2 { font-family: var(--schreib); font-size: clamp(2.6rem, 7vw, 3.4rem); line-height: 1.1; }
.bestellung__intro { margin: 6px 0 20px; color: var(--leise); font-style: italic; font-size: 1.15rem; }
.bestellung__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bestellung__form label { display: grid; gap: 6px; font-weight: 700; font-size: 1rem; }
.bestellung__form input,
.bestellung__form select,
.bestellung__form textarea {
  width: 100%;
  padding: 0.65em 0.85em;
  border: 1px solid rgba(196, 162, 95, 0.55);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.85);
  color: var(--tinte);
  font: 500 1.05rem var(--serif);
}
.bestellung__form textarea { resize: vertical; }
.bestellung__form :is(input, select, textarea):focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(201, 143, 150, 0.25); }
.bestellung__form .breit { grid-column: 1 / -1; }
.bestellung__senden { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.bestellung__info { margin: 0; font-size: 0.98rem; color: var(--leise); }
.bestellung__info a { color: var(--rose-dunkel); }

.ohne-js { margin: 0; padding: 16px; text-align: center; }

/* Legal pages */
.seite { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.seite h1 { font-family: var(--schreib); font-size: clamp(2.6rem, 6vw, 3.6rem); margin-bottom: 0.4em; }
.seite h2 { font-weight: 700; font-size: 1.3rem; margin: 1.6em 0 0.4em; }
.platzhalter { background: #fbeec2; padding: 0 0.3em; border-radius: 4px; }

/* Tablet */
@media (max-width: 960px) {
  .torte__buehne { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .torte__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; }
  .torte--bewegt .torte__buehne { grid-template-rows: minmax(0, 1fr) auto; }
}

/* Phone */
@media (max-width: 680px) {
  :root { --kopf-hoehe: 64px; }
  body { font-size: 18px; }
  .marke img { width: 44px; height: 44px; }
  .marke span { font-size: 1.8rem; }
  .kopf__insta span { display: none; }
  .kopf__aktionen { gap: 14px; }

  .torte__buehne { grid-template-columns: minmax(0, 1fr); text-align: center; padding-inline: 20px; }
  .torte__texte { justify-items: center; }
  .sortiment { justify-content: center; }
  .torte__kuchen { width: min(100%, 360px); }

  .torte--bewegt .torte__buehne { grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; padding-block: 18px max(16px, env(safe-area-inset-bottom)); }
  .torte--bewegt .torte__texte { min-height: 7.4em; }
  .torte--bewegt .torte__satz h1,
  .torte--bewegt .torte__satz h2 { font-size: clamp(2.1rem, 10vw, 2.7rem); }
  .torte--bewegt .torte__satz p { font-size: 1.1rem; }
  .torte--bewegt .torte__ueber { font-size: 0.72rem !important; }
  .torte--bewegt .torte__hinweis { justify-content: center; margin-top: 0.8em !important; }
  .torte--bewegt .sortiment { display: none; }
  .torte--bewegt .torte__fortschritt { display: none; }
  .torte--bewegt .torte__kuchen { width: min(100cqw, 90cqh * 600 / 720, 420px); }
  .torte__cta { gap: 6px 18px; }
  .knopf--gross { padding: 0.75em 1.6em; font-size: 1.15rem; }
  .torte__insta { font-size: 1.55rem; }
  .torte--bewegt .torte__telefon { display: none; }

  .bestellung__form { grid-template-columns: 1fr; }
  .torte__buehne::before, .torte__buehne::after { opacity: 0.45; width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .knopf, .torte__insta .herz { transition: none; }
  .torte__funkeln svg { animation: none; opacity: 0.5; }
  .knopf--puls::before, .knopf--puls::after, .glitzer, .torte__staub { display: none; }
  .bestellung[open] { animation: none; }
}
