/* ---------- Fonts (self-hosted, DSGVO-freundlich) ---------- */
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #fdf6ec;
  --paper-dot: #ecdcc4;
  --card: #fffdf8;
  --ink: #3b2f2f;
  --ink-soft: #6e5d58;
  --coral: #ff6f61;
  --mint: #3dbfa0;
  --sun: #ffc233;
  --sky: #5aa9e6;
  --berry: #c05299;
  --lilac: #a78bfa;
  --shadow: 0 1px 0 rgba(59, 47, 47, .06), 0 18px 40px -18px rgba(59, 47, 47, .35);
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(var(--paper-dot) 1.2px, transparent 1.4px),
    radial-gradient(circle at 15% 10%, rgba(255, 194, 51, .18), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(61, 191, 160, .16), transparent 45%),
    radial-gradient(circle at 90% 15%, rgba(192, 82, 153, .10), transparent 35%);
  background-size: 22px 22px, 100% 100%, 100% 100%, 100% 100%;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--berry); text-underline-offset: 3px; }
a:hover { color: var(--coral); }

/* ---------- Layout ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 72px 16px 120px;
  overflow-x: clip;
}

/* ---------- Floating craft goodies ---------- */
.goodies { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.goody {
  position: absolute;
  width: var(--s, 90px);
  animation: bob var(--d, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  filter: drop-shadow(0 8px 10px rgba(59, 47, 47, .18));
}
.goody svg { display: block; width: 100%; height: auto; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-16px) rotate(calc(var(--r, 0deg) + 8deg)); }
}

/* ---------- The paper card ---------- */
.card {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  background: var(--card);
  padding: 56px 40px 44px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  text-align: center;
  animation: drop-in .9s cubic-bezier(.2, 1.4, .4, 1) both;
}
/* stitched border */
.card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(192, 82, 153, .35);
  border-radius: 4px;
  pointer-events: none;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-40px) rotate(-6deg) scale(.96); }
  to   { opacity: 1; transform: translateY(0) rotate(-1.2deg) scale(1); }
}

/* washi tape */
.tape {
  position: absolute;
  width: 130px;
  height: 34px;
  opacity: .88;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 6px, transparent 6px 12px),
    var(--tape, var(--sun));
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.tape--tl { --tape: var(--mint);  top: -14px; left: -30px;  transform: rotate(-32deg); }
.tape--tr { --tape: var(--coral); top: -12px; right: -28px; transform: rotate(28deg); }
.tape--b  {
  --tape: var(--lilac);
  bottom: -16px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  background:
    radial-gradient(circle, rgba(255,255,255,.6) 3px, transparent 3.5px) 0 0 / 14px 14px,
    var(--tape);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 14px;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--berry);
  border-radius: 999px;
  transform: rotate(2deg);
}

h1 {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 5.4rem);
  line-height: .95;
  margin: 10px 0 6px;
  letter-spacing: .01em;
}
h1 .l {
  display: inline-block;
  color: var(--c);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  transition: transform .25s cubic-bezier(.3, 1.8, .5, 1);
}
h1 .l:hover { transform: rotate(calc(var(--r, 0deg) * -2)) translateY(-8px) scale(1.15); }
h1 .word { white-space: nowrap; }

.tagline {
  font-family: var(--hand);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--ink-soft);
  margin: 4px 0 18px;
}
.tagline .scribble {
  background: linear-gradient(transparent 60%, rgba(255, 194, 51, .55) 60% 88%, transparent 88%);
  padding: 0 4px;
}

.lead { font-size: 1.08rem; max-width: 30em; margin: 0 auto 24px; }

/* sticker chips */
.stickers {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 34em;
}
.stickers li {
  --r: -2deg;
  padding: 6px 14px;
  font-weight: 700;
  font-size: .92rem;
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 3px 0 rgba(59, 47, 47, .12);
  transform: rotate(var(--r));
  transition: transform .2s ease;
  cursor: default;
}
.stickers li:nth-child(even) { --r: 2.5deg; }
.stickers li:hover { transform: rotate(0) scale(1.08); }

/* progress: a measuring tape */
.progress { margin: 0 auto 30px; max-width: 420px; text-align: left; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--hand);
  font-size: 1.35rem;
  color: var(--ink-soft);
}
.tape-measure {
  position: relative;
  height: 26px;
  border-radius: 4px;
  background: #f3ead9;
  overflow: hidden;
  box-shadow: inset 0 2px 3px rgba(59, 47, 47, .12);
}
.tape-measure .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--sun);
  animation: measure 2.2s 0.6s cubic-bezier(.3, .9, .3, 1) forwards;
}
.tape-measure::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(59,47,47,.55) 0 1px, transparent 1px 42px) 0 0 / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(59,47,47,.35) 0 1px, transparent 1px 8.4px) 0 0 / 100% 6px no-repeat;
}
@keyframes measure { to { width: var(--pct, 70%); } }

/* button */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font: 800 1.05rem var(--body);
  color: #fff;
  text-decoration: none;
  background: var(--coral);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 5px 0 #d4493c;
  transform: rotate(-1deg);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.cta:hover { color: #fff; transform: rotate(0) translateY(-2px); box-shadow: 0 7px 0 #d4493c; }
.cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #d4493c; }
.cta:focus-visible, a:focus-visible { outline: 3px dashed var(--sky); outline-offset: 4px; }

.small { font-size: .9rem; color: var(--ink-soft); margin: 16px 0 0; }

/* footer */
.site-footer {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 20px;
  text-align: center;
  font-size: .9rem;
  color: var(--ink-soft);
  padding: 0 16px;
}
.site-footer a { margin: 0 8px; }

/* confetti */
.confetti {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  will-change: transform, opacity;
}

/* ---------- Legal pages ---------- */
.legal .card { text-align: left; transform: rotate(-.4deg); animation: none; }
.legal h1 { font-size: clamp(2.6rem, 8vw, 3.6rem); color: var(--berry); }
.legal h2 { font-size: 1.1rem; margin: 26px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal .todo { background: #fff3c4; padding: 0 4px; border-radius: 3px; }
.back { font-weight: 700; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .card { padding: 48px 22px 36px; transform: rotate(-.6deg); }
  .tape { width: 96px; height: 28px; }
  .tape--tl { left: -18px; }
  .tape--tr { right: -18px; }
  .goody { --s: 58px !important; opacity: .75; }
  .goody.hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tape-measure .fill { width: var(--pct, 70%); }
}
