/* FoxCave - Fuchs-Avatar (3D-Look aus Ebenen, partials/fuchs.html), Fuchs-Tipp und Easter Egg im Kopf-Logo. */

/* ---------- Fuchs: Hintergrund = Verlauf je Trait, Figur = übereinanderliegende Bilder ---------- */
.fuchs {
  --fx-hell: #dcecfb; --fx-satt: #9cc6ee;
  display: inline-block; flex: none; vertical-align: middle;
  overflow: hidden; clip-path: circle(50%); border-radius: 50%;
}
.fuchs--hg-mint { --fx-hell: #d9f5ea; --fx-satt: #95dcc0; }
.fuchs--hg-pfirsich { --fx-hell: #ffe6d6; --fx-satt: #f7b896; }
.fuchs--hg-flieder { --fx-hell: #ece3fb; --fx-satt: #c3b0ea; }
.fuchs--hg-sonne { --fx-hell: #fff4d2; --fx-satt: #f6d27f; }
.fuchs--hg-tinte { --fx-hell: #34436b; --fx-satt: #151d36; }
.fuchs__grund-hell { stop-color: var(--fx-hell); }
.fuchs__grund-satt { stop-color: var(--fx-satt); }
/* Blinzel-Ebene (geschlossene Augen) ist nur im Augenblick des Blinzelns sichtbar; mit Sonnenbrille gar nicht */
.fuchs__lid { opacity: 0; }
.fuchs--augen-sonnenbrille .fuchs__lid, .fuchs--augen-skibrille .fuchs__lid, .fuchs--augen-vrbrille .fuchs__lid { display: none; }

@media (prefers-reduced-motion: no-preference) {
  /* Atmen + leichtes Wiegen um die Schultern; ab 56 px, darunter ruhig (Kopfzeile, Listen) */
  .fuchs:not(.fuchs--klein) .fuchs__figur {
    transform-box: view-box; transform-origin: 50% 100%;
    animation: fuchs-atmen 4.6s ease-in-out infinite;
  }
  .fuchs:not(.fuchs--klein) .fuchs__lid { animation: fuchs-blinzeln 5.3s steps(1, end) infinite; }
  /* jeder Fuchs blinzelt in seinem eigenen Takt (letzte Ziffer von nr) */
  .fuchs--t1 .fuchs__lid { animation-duration: 4.4s; animation-delay: -1.1s; }
  .fuchs--t2 .fuchs__lid { animation-duration: 6.1s; animation-delay: -2.3s; }
  .fuchs--t3 .fuchs__lid { animation-duration: 4.9s; animation-delay: -0.4s; }
  .fuchs--t4 .fuchs__lid { animation-duration: 5.7s; animation-delay: -3.2s; }
  .fuchs--t5 .fuchs__lid { animation-duration: 4.1s; animation-delay: -1.9s; }
  .fuchs--t6 .fuchs__lid { animation-duration: 6.6s; animation-delay: -2.8s; }
  .fuchs--t7 .fuchs__lid { animation-duration: 5.0s; animation-delay: -0.9s; }
  .fuchs--t8 .fuchs__lid { animation-duration: 5.9s; animation-delay: -4.1s; }
  .fuchs--t9 .fuchs__lid { animation-duration: 4.7s; animation-delay: -2.0s; }
  .fuchs--t1 .fuchs__figur, .fuchs--t4 .fuchs__figur, .fuchs--t7 .fuchs__figur { animation-duration: 5.2s; }
  .fuchs--t2 .fuchs__figur, .fuchs--t5 .fuchs__figur, .fuchs--t8 .fuchs__figur { animation-duration: 4.2s; animation-delay: -1.3s; }
}
/* Bewegung über WebGL (foxcave/js/fuchs-bewegung.js): eine Leinwand liegt über dem SVG, die SVG-Figur tritt zurück */
.fuchs-rahmen { position: relative; display: inline-block; flex: none; vertical-align: middle; line-height: 0; border-radius: 50%; }
.fuchs-leinwand { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
.fuchs--bewegt .fuchs__figur { visibility: hidden; }

@keyframes fuchs-atmen {
  0%, 100% { transform: rotate(0deg) scale(1, 1); }
  30% { transform: rotate(-0.6deg) scale(1.004, 1.01); }
  55% { transform: rotate(0deg) scale(1.006, 1.014); }
  80% { transform: rotate(0.5deg) scale(1.002, 1.006); }
}
/* zweimal kurz zu (ca. 120 ms), sonst offen */
@keyframes fuchs-blinzeln {
  0%, 93% { opacity: 0; }
  93.01%, 95.2% { opacity: 1; }
  95.21%, 100% { opacity: 0; }
}

/* Avatar im Kopf neben "Mein Konto" */
.kopf__link .fuchs { margin-block: -4px; }

/* ---------- Fuchs-Tipp: Fuchs mit Sprechblase ---------- */
.fuchs-tipp { display: flex; align-items: flex-end; gap: 1rem; max-width: 40rem; margin: 0; }
.fuchs-tipp > :is(.fuchs, .fuchs-rahmen) { box-shadow: 0 0 0 1px var(--linie, rgba(11, 15, 20, 0.08)); }
.fuchs-tipp__blase {
  position: relative; flex: 1 1 auto; margin: 0 0 0.75rem; padding: 0.9rem 1.15rem 1rem;
  background: var(--papier, #fff); color: var(--tinte, #0a0a0a);
  border: 1.5px solid var(--linie-2, #d5dde7); border-radius: 1.15rem 1.15rem 1.15rem 0.3rem;
  box-shadow: 0 1px 2px rgba(11, 15, 20, 0.04), 0 8px 24px -12px rgba(11, 15, 20, 0.18);
  font-size: 0.9875rem; line-height: 1.55; text-wrap: pretty;
}
/* Zipfel zeigt auf den Fuchs: Rand-Dreieck + Füll-Dreieck */
.fuchs-tipp__blase::before, .fuchs-tipp__blase::after {
  content: ""; position: absolute; bottom: -1.5px; width: 0.8rem; height: 0.85rem;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.fuchs-tipp__blase::before { left: -0.8rem; background: var(--linie-2, #d5dde7); }
.fuchs-tipp__blase::after { left: calc(-0.8rem + 2.2px); bottom: 0; background: var(--papier, #fff); }
.fuchs-tipp__marke { display: block; margin-bottom: 0.2rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blau, #186eb9); }

/* ---------- Easter Egg: Klick aufs "A" von CAVE (Treffer-Prüfung in fuchs.js) ---------- */
.kopf__marke { position: relative; justify-self: start; }
@media (max-width: 47.99rem) { .kopf__marke { grid-area: logo; } }
.fuchs-dialog {
  width: min(26rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0;
  border-radius: var(--radius-gross, 1.75rem); background: var(--papier, #fff); color: var(--tinte, #0a0a0a);
  box-shadow: var(--schatten-2);
}
.fuchs-dialog::backdrop { background: rgba(10, 10, 10, 0.55); }
.fuchs-dialog__inhalt { padding: 1.25rem 1.25rem 1.5rem; }
.fuchs-dialog__foto {
  display: grid; place-items: center; align-content: center; gap: 0.75rem; aspect-ratio: 1; margin: 0 0 1.25rem;
  border-radius: var(--radius, 1.25rem); background: var(--flaeche, #f3f5f8); color: var(--tinte-3, #566070);
  box-shadow: inset 0 0 0 1.5px var(--linie-2); font-weight: 600; letter-spacing: 0.02em;
}
.fuchs-dialog__foto img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fuchs-dialog h2 { margin: 0 0 0.4rem; font-size: 1.75rem; line-height: 1.05; }
.fuchs-dialog p { margin: 0 0 1.25rem; color: var(--tinte-2, #333c48); }
.fuchs-dialog .knopf { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .fuchs-dialog[open] { animation: fuchs-auf 0.35s var(--ease-raus, ease-out); }
  .fuchs-dialog[open]::backdrop { animation: fuchs-blende 0.35s ease-out; }
}
@keyframes fuchs-auf { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
@keyframes fuchs-blende { from { opacity: 0; } }

/* Szenen-Hintergründe (lokal in Arbeit): animierte SVG-Bilder statt Farbverlauf, der Grundkreis wird durchsichtig */
.fuchs--hg-wien, .fuchs--hg-sonnenuntergang, .fuchs--hg-fuchsfeuer { border-radius: 50%; background-position: center; background-size: cover; background-repeat: no-repeat; }
.fuchs--hg-wien { --fx-hell: #4a4a8f; --fx-satt: #1c2a5e; background-image: url("../img/fuchs/hg/wien.svg"); }
.fuchs--hg-sonnenuntergang { --fx-hell: #ffd9a0; --fx-satt: #ef8fa3; background-image: url("../img/fuchs/hg/sonnenuntergang.webp"); }
.fuchs--hg-fuchsfeuer { --fx-hell: #2b2266; --fx-satt: #07061c; background-image: url("../img/fuchs/hg/fuchsfeuer.webp"); }
/* Standbild ohne Szene (klein, ohne WebGL): feiner Goldrand außen statt Ring hinter dem Fuchs */
.fuchs--hg-fuchsfeuer:not(.fuchs--szene-an) { box-shadow: 0 0 0 1.5px #e2a93b, 0 0 0 2.5px rgba(138, 90, 23, 0.5); }
:is(.fuchs--hg-wien, .fuchs--hg-sonnenuntergang, .fuchs--hg-fuchsfeuer) .fuchs__grund { fill: transparent; }

/* 3D-Szene hinter dem Fuchs (fuchs-szene.js, lokal in Arbeit): Leinwand unter dem SVG, das SVG lässt seinen Hintergrund weg */
.fuchs-szene { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
.fuchs--szene-an { position: relative; background-image: none !important; }
.fuchs-szene--ring { z-index: 1; }
