/* ============================================================================================================
   mariulab · Kopf-Auge (Desi, 17.11.2026) – das kleine Auge links oben im Kopf jeder Seite: schwebt im Raum, zwinkert selten,
   zeigt nach einem Seitenwechsel kurz ein Universum, glimmt im Takt des großen Logo-Lichts (12 s).
   Aufbau:  <span class="kopf-auge" data-kopf-auge="zwinkern universum glanz"> <img class="marke-auge"> <span class="ka-oeff">…</span> <i class="ka-ring"></i> </span>
   Ohne Skript: neues Auge, Lichthof und Glanz (reines CSS). Zwinkern und Universum löst kopfauge.js aus.
   Lage der Augenöffnung im Icon (aus geometrie.json): links 22,656 %, oben 23,438 %, Breite 58,984 %, Höhe 47,07 %.
   ============================================================================================================ */
.kopf-auge { position: relative; display: inline-block; flex: none; width: 30px; height: 30px; line-height: 0; isolation: isolate;
  --ka-takt: 12s;                 /* derselbe Takt wie das Licht im großen Logo (--ld-dauer) */
  --ka-zwinkern: 1.15s;           /* Dauer eines Zwinkerns */
  --ka-uni: 1.3s; }               /* Dauer des Universum-Moments */
/* Bild: der harte Schein der Seite (drop-shadow 8 px) wird enger und leiser, den weiten Hof macht ::before */
.kopf .marke .kopf-auge .marke-auge, .kopf-auge .marke-auge { display: block; width: 100%; height: 100%; margin: 0; filter: drop-shadow(0 0 3px rgba(122,156,255,.42)); }
/* Lichthof: weiche Lichtlache hinter und leicht unter dem Auge – es schwebt, statt aufzuliegen */
.kopf-auge::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 56%; width: 215%; height: 170%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(92,128,255,.40) 0%, rgba(72,106,240,.19) 38%, rgba(60,90,220,.05) 70%, rgba(60,90,220,0) 100%); }

/* ---------- Kasten der Augenöffnung: trägt Glanz, Lid und Fenster, in Form der Öffnung maskiert ---------- */
.kopf-auge .ka-oeff { position: absolute; left: 22.656%; top: 23.438%; width: 58.984%; height: 47.07%; overflow: hidden; pointer-events: none;
  -webkit-mask: var(--ka-maske) center / 100% 100% no-repeat; mask: var(--ka-maske) center / 100% 100% no-repeat; }

/* Baustein „Glanz“: der Glanzpunkt der Iris flammt einmal je Takt auf, der Lichthof atmet mit. */
.kopf-auge .ka-glanz { position: absolute; left: 43.05%; top: 25.3%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255,255,255,.95) 0%, rgba(206,224,255,.6) 20%, rgba(130,168,255,.22) 48%, rgba(110,150,255,0) 100%); }
@supports (mix-blend-mode: plus-lighter) { .kopf-auge .ka-glanz { mix-blend-mode: plus-lighter; } }
.kopf-auge[data-kopf-auge~="glanz"] .ka-glanz { animation: ka-glanz var(--ka-takt) cubic-bezier(.4,0,.6,1) infinite; }
.kopf-auge[data-kopf-auge~="glanz"]::before { animation: ka-hof var(--ka-takt) cubic-bezier(.4,0,.6,1) infinite; }
@keyframes ka-glanz { 0%, 22% { opacity: 0; } 37.5% { opacity: 1; } 56%, 100% { opacity: 0; } }      /* Gipfel bei 4,5 s: dann zieht das Licht im großen Logo über das Auge */
@keyframes ka-hof   { 0%, 18% { opacity: .72; } 37.5% { opacity: 1; } 62%, 100% { opacity: .72; } }

/* Baustein „Zwinkern“: ein Lid aus Glas senkt sich langsam und hebt sich wieder. Nur das Lid bewegt sich. */
.kopf-auge .ka-lid { position: absolute; inset: 0; background: var(--ka-lid) center / 100% 100% no-repeat; transform: translateY(-104%); }
.kopf-auge.zwinkert .ka-lid { animation: ka-zwinkern var(--ka-zwinkern) linear 1 both; }
@keyframes ka-zwinkern {
  0%   { transform: translateY(-104%); animation-timing-function: cubic-bezier(.45,0,.35,1); }
  37%  { transform: translateY(0);     animation-timing-function: linear; }
  48%  { transform: translateY(0);     animation-timing-function: cubic-bezier(.3,0,.2,1); }
  100% { transform: translateY(-104%); }
}

/* Baustein „Universum-Moment“: von der Pupille aus öffnet sich ein Fenster in den Raum, eine Lichtwelle läuft nach außen, dann ist der Blick wieder da. */
.kopf-auge .ka-uni { position: absolute; left: -7.2%; top: -24.8%; width: 125%; aspect-ratio: 1; clip-path: circle(0% at 50% 50%);          /* Quadrat um die Iris-Mitte */
  background: var(--ka-uni-bild) center / cover no-repeat; }
.kopf-auge .ka-ring { position: absolute; left: 55.27%; top: 48.63%; width: 170%; aspect-ratio: 1; margin: -85% 0 0 -85%; border-radius: 50%; box-sizing: border-box; pointer-events: none;
  opacity: 0; transform: scale(.06); border: 1.5px solid rgba(214,230,255,.9); box-shadow: 0 0 6px 1px rgba(96,134,255,.7), inset 0 0 6px 1px rgba(96,134,255,.4); }
.kopf-auge.universum .ka-uni  { animation: ka-uni var(--ka-uni) linear 1 both, ka-uni-dreh var(--ka-uni) cubic-bezier(.2,.6,.3,1) 1 both; }
.kopf-auge.universum .ka-ring { animation: ka-ring var(--ka-uni) linear 1 both; }
.kopf-auge.universum::before  { animation: ka-hof-uni var(--ka-uni) ease-out 1 both; }
@keyframes ka-uni {
  0%   { clip-path: circle(0% at 50% 50%);  animation-timing-function: cubic-bezier(.2,.7,.2,1); }
  29%  { clip-path: circle(50% at 50% 50%); animation-timing-function: linear; }
  62%  { clip-path: circle(50% at 50% 50%); animation-timing-function: cubic-bezier(.5,0,.6,1); }
  100% { clip-path: circle(0% at 50% 50%); }
}
@keyframes ka-uni-dreh { from { transform: rotate(-24deg) scale(1.25); } to { transform: rotate(14deg) scale(1); } }
@keyframes ka-ring {
  0%   { opacity: 0; transform: scale(.06); animation-timing-function: cubic-bezier(.15,.6,.3,1); }
  5%   { opacity: 1; }
  30%  { opacity: .75; transform: scale(.55); }
  52%  { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes ka-hof-uni { 0% { opacity: .72; } 26% { opacity: 1; filter: brightness(1.5); } 100% { opacity: .72; } }

/* Startseite, Titelbild: das Mini-Auge allein (a.marke-mini) bekommt nur das neue Bild und den engen Schein – dort spielt das große Logo. */
.kopf .marke-mini img.ka-mini { filter: drop-shadow(0 0 4px rgba(122,156,255,.45)); }

/* ---------- Bewegung reduzieren: alles steht (neues Auge, Lichthof in Ruhe, Glanz aus) ---------- */
@media (prefers-reduced-motion: reduce) {
  .kopf-auge[data-kopf-auge] .ka-glanz, .kopf-auge[data-kopf-auge]::before, .kopf-auge.zwinkert .ka-lid, .kopf-auge.universum .ka-uni, .kopf-auge.universum .ka-ring, .kopf-auge.universum::before { animation: none; }
}
html.ka-still .kopf-auge[data-kopf-auge] .ka-glanz, html.ka-still .kopf-auge[data-kopf-auge]::before, html.ka-still .kopf-auge.zwinkert .ka-lid,
html.ka-still .kopf-auge.universum .ka-uni, html.ka-still .kopf-auge.universum .ka-ring, html.ka-still .kopf-auge.universum::before { animation: none; }

/* ============================================================================================================
   Repo: Platz im Kopf bei schmalen Fenstern. Der Kasten oben (flex: none, 30 px fest) machte die Marke schwerer
   zusammendrückbar als das alte <img> (max-width: 100 % zählt für die Mindestbreite nicht): bei 360 und 320 px rückte
   die rechte Gruppe im Kopf 10 bzw. 3 px nach rechts. Mit diesen zwei Regeln verhält sich der Kasten wie das alte Bild
   (gemessen 280–1440 px, Chromium und WebKit: alle Lagen gleich); das Auge bleibt 30 × 30 px.
   ============================================================================================================ */
.kopf .marke .kopf-auge { flex: 0 .0001 auto; width: auto; }
.kopf .marke .kopf-auge .marke-auge { width: 30px; }
