/* Cookie: eine Wiese, ein apricotfarbener Pudel, ein paar Blümchen. */
@font-face {
  font-family: "DynaPuff";
  src: url("schrift/dynapuff.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("schrift/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --wiese: #17402b;
  --moos: #0f2e1e;
  --halm: #2a6143;
  --aprikose: #f5a95c;
  --fell: #fbd3a4;
  --bluete: #f9c6d4;
  --sonne: #ffd23f;
  --milch: #fff6e9;
  --rand: clamp(18px, 5vw, 56px);
  --breite: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wiese);
  color: var(--milch);
  font-family: "Bricolage", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
h1, h2, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sonne); outline-offset: 3px; border-radius: 6px; }

h2 {
  font-family: "DynaPuff", "Bricolage", sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 5.2vw, 2.6rem);
  line-height: 1.1;
  color: var(--fell);
}

.sprung {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--sonne); color: var(--moos); padding: 10px 14px; border-radius: 10px; font-weight: 600;
}
.sprung:focus { top: 12px; }

main > section, .kopf, .fuss {
  width: min(100% - 2 * var(--rand), var(--breite));
  margin-inline: auto;
}
main > section { padding-block: clamp(30px, 6vw, 60px); }
main > .stimmung { padding-bottom: 8px; }

/* ---------------------------------------------------------------- Kopf */
.kopf {
  display: grid;
  gap: clamp(8px, 3vw, 32px);
  align-items: end;
  padding-top: clamp(28px, 6vw, 64px);
  position: relative;
}
.name {
  font-family: "DynaPuff", "Bricolage", sans-serif;
  font-weight: 700;
  font-size: clamp(5.2rem, 27vw, 15rem);
  line-height: .82;
  letter-spacing: -.035em;
  color: var(--aprikose);
  margin-left: -.04em;
  white-space: nowrap;
}
.name span { display: inline-block; transform-origin: 50% 90%; }
.name span:nth-child(2), .name span:nth-child(3) { color: var(--fell); }
.untertitel {
  margin-top: clamp(14px, 3vw, 26px);
  font-size: clamp(1.2rem, 3.6vw, 1.75rem);
  line-height: 1.3;
  font-weight: 500;
  max-width: 22ch;
}
.besuche {
  margin-top: 14px;
  color: var(--bluete);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.kopf-bild {
  justify-self: end;
  width: min(78vw, 440px);
  aspect-ratio: 1;
  margin-right: calc(-1 * var(--rand) / 2);
  margin-top: 4px;
  position: relative;
}
.kopf-bild img { width: 100%; height: 100%; object-fit: cover; }
.kopf-bild.foto img { border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%; border: 6px solid var(--fell); }
/* Blümchen: nur hier oben, als Gruß an den Namen im Stammbaum */
.kopf-bild::before, .kopf-bild::after {
  content: "";
  position: absolute;
  width: 15%; aspect-ratio: 1;
  background: url("bild/bluemchen.svg") center / contain no-repeat;
}
.kopf-bild::before { left: -2%; bottom: 10%; transform: rotate(-12deg); }
.kopf-bild::after { right: 4%; top: 2%; width: 10%; transform: rotate(18deg); }

@media (min-width: 820px) {
  .kopf { grid-template-columns: 1.25fr 1fr; padding-bottom: 12px; }
  .kopf-bild { margin-top: 0; margin-right: 0; width: 100%; max-width: 460px; }
  .name { font-size: clamp(9rem, 17vw, 15rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .name span { animation: hopp .7s cubic-bezier(.3, 1.6, .5, 1) both; }
  .name span:nth-child(1) { animation-delay: .05s; }
  .name span:nth-child(2) { animation-delay: .13s; }
  .name span:nth-child(3) { animation-delay: .21s; }
  .name span:nth-child(4) { animation-delay: .29s; }
  .name span:nth-child(5) { animation-delay: .37s; }
  .name span:nth-child(6) { animation-delay: .45s; }
  @keyframes hopp {
    from { transform: translate(-.5em, .12em) rotate(-14deg) scale(.6); opacity: 0; }
    60% { opacity: 1; }
    to { transform: none; opacity: 1; }
  }
}

/* ---------------------------------------------------------------- Reaktionen */
.stimmung h2 { margin-bottom: 18px; }
.leiste { display: flex; flex-wrap: wrap; gap: 10px; }
.reaktion {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 8px 16px 8px 12px;
  border: 2px solid var(--halm); border-radius: 999px;
  background: var(--moos);
  font-weight: 600; font-variant-numeric: tabular-nums;
  position: relative;
  transition: background-color .15s, border-color .15s, transform .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.reaktion .zeichen { font-size: 1.6rem; line-height: 1; }
.reaktion .zahl { min-width: 1ch; }
.reaktion:hover { border-color: var(--aprikose); }
.reaktion:active { transform: scale(.94); }
.reaktion[aria-pressed="true"] { background: var(--aprikose); border-color: var(--aprikose); color: var(--moos); }
.reaktion:disabled { opacity: .6; cursor: default; }
.flug { position: fixed; z-index: 30; pointer-events: none; font-size: 1.7rem; line-height: 1; }
.hinweis { margin-top: 12px; color: var(--bluete); min-height: 1.55em; }

/* ---------------------------------------------------------------- Galerie */
.galerie-kopf { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.filter { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--moos); }
.filter button {
  border: 0; background: none; padding: 9px 18px; border-radius: 999px; min-height: 44px; font-weight: 600;
}
.filter button[aria-pressed="true"] { background: var(--fell); color: var(--moos); }

.galerie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.spalte { display: grid; gap: 12px; }
@media (min-width: 720px) {
  .galerie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .spalte { gap: 16px; }
}
@media (min-width: 1080px) { .galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.galerie > .leer { grid-column: 1 / -1; }

.kachel { position: relative; border-radius: 18px; overflow: hidden; background: var(--moos); }
.kachel-oeffnen { display: block; width: 100%; padding: 0; border: 0; background: none; }
.kachel img { width: 100%; height: auto; }
.kachel-video::after {
  content: ""; position: absolute; left: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--milch) url("bild/abspielen.svg") 56% 50% / 16px no-repeat; pointer-events: none;
}
.kachel-herz {
  position: absolute; right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 12px 6px 10px; border: 0; border-radius: 999px;
  background: rgb(15 46 30 / .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.kachel-herz[aria-pressed="true"] { background: var(--aprikose); color: var(--moos); }

.wissen {
  background: var(--bluete); color: var(--moos);
  border-radius: 18px; padding: 16px 16px 18px; margin: 0;
  font-size: 1rem; line-height: 1.45;
}
.wissen strong {
  display: flex; align-items: center; gap: 8px;
  font-family: "DynaPuff", "Bricolage", sans-serif; font-weight: 600; font-size: 1.05rem; line-height: 1.15; margin-bottom: 8px;
}
.wissen strong::before { content: ""; width: 22px; height: 22px; flex: none; background: url("bild/bluemchen.svg") center / contain no-repeat; }
.leer { border: 2px dashed var(--halm); border-radius: 18px; padding: 22px 18px; color: var(--fell); }

/* ---------------------------------------------------------------- Steckbrief */
.steckbrief dl { max-width: 760px; margin-top: 20px; border-top: 2px solid var(--halm); }
.steckbrief dl > div {
  display: grid; grid-template-columns: minmax(7.5rem, 30%) 1fr; gap: 6px 18px;
  padding: 14px 0; border-bottom: 2px solid var(--halm);
}
.steckbrief dt { color: var(--bluete); }
.steckbrief dd { font-weight: 500; font-size: 1.125rem; }

/* ---------------------------------------------------------------- Geschichte */
.geschichte p { margin-top: 16px; font-size: 1.2rem; line-height: 1.6; max-width: 34em; }

/* ---------------------------------------------------------------- Fuß */
.fuss { padding-block: 40px 56px; border-top: 2px solid var(--halm); margin-top: 24px; }
.teilen {
  display: inline-flex; align-items: center; min-height: 52px; padding: 12px 22px; border-radius: 999px;
  background: var(--sonne); color: var(--moos); font-weight: 700; text-decoration: none;
}
.teilen:hover { background: var(--fell); }
.fuss p { margin-top: 18px; color: var(--fell); font-size: .95rem; max-width: 46em; }

/* ---------------------------------------------------------------- Großansicht */
.gross {
  border: 0; padding: 0; margin: auto; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: var(--moos); color: var(--milch);
}
.gross[open] { display: grid; grid-template-rows: 1fr auto; }
.gross::backdrop { background: var(--moos); }
.gross figure { min-height: 0; display: grid; grid-template-rows: 1fr auto; padding: 56px 12px 0; }
.gross-medium { min-height: 0; display: grid; place-items: center; }
.gross-medium img, .gross-medium video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.gross figcaption { text-align: center; padding: 12px 8px 0; color: var(--fell); }
.gross figcaption:empty { display: none; }
.gross-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px max(14px, env(safe-area-inset-bottom)); }
.gross-fuss .leiste { justify-content: center; gap: 6px; }
.gross-fuss .reaktion { min-height: 46px; padding: 6px 12px 6px 10px; }
.gross-fuss .reaktion .zeichen { font-size: 1.35rem; }
.gross-pfeil, .gross-zu {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--halm); background: var(--wiese);
  font-size: 1.7rem; line-height: 1; display: grid; place-items: center; padding: 0 0 4px;
}
.gross-zu { position: absolute; right: 12px; top: max(8px, env(safe-area-inset-top)); z-index: 2; }
.gross-pfeil { font-size: 0; padding: 0; }
.gross-pfeil::before { content: ""; width: 12px; height: 12px; border: solid var(--milch); border-width: 3px 3px 0 0; border-radius: 2px; }
#gross-zurueck::before { transform: translateX(3px) rotate(-135deg); }
#gross-weiter::before { transform: translateX(-3px) rotate(45deg); }
.gross-pfeil:disabled { visibility: hidden; }
[hidden] { display: none !important; }
