/* Palette: Produkt-Tokens; Farbentscheidungen vom Koordinator bestätigt. */
:root {
  --sumi-950: #13181d;
  --sumi-900: #1d242b;
  --washi-50: #fbf9f9;
  --washi-200: #d1c7c8;
  --matcha-400: #abae7f;
  --hato-400: #799bba;
  --tile-size: 1100px;
  --space: clamp(24px, 5vw, 80px);
  color-scheme: dark;
  color: var(--washi-50);
  background: var(--sumi-950);
  font-family: 'Elms Sans', sans-serif;
  font-synthesis: none;
}

@font-face {
  font-family: 'Elms Sans';
  src: url('/assets/ElmsSans-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; }
.page {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
}
.surface {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.wordmark { margin: 0; line-height: 1; }
.wordmark img { display: block; width: 100%; height: auto; }
.announcement {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 450;
  line-height: 1.3;
}
footer { padding: 20px var(--space); background: var(--sumi-950); }
nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--washi-200);
  font-size: 1rem;
  line-height: 1.5;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
nav a:hover { color: var(--washi-50); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--hato-400); outline-offset: 5px; }

/* Vollständige Markenquelle: Körnung, Ring-Splitter und Strahlen bleiben erhalten. */
.texture { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
/* Neun feststehende Kacheln; die Definitionen werden im SVG wiederverwendet.
   Außerhalb des 3×3-Feldes bleibt auf sehr großen Displays das Original still. */
.texture {
  background: var(--sumi-950) url('/assets/kallisto-terrazzo-sumi.svg') repeat center / var(--tile-size) var(--tile-size);
}
.stone-field {
  position: absolute;
  width: calc(var(--tile-size) * 3);
  height: calc(var(--tile-size) * 3);
  left: calc(50% - var(--tile-size) * 1.5);
  top: calc(50% - var(--tile-size) * 1.5);
  /* The still stones sit in one cached file; only the moving shapes are inline. */
  background: url('/assets/kallisto-terrazzo-statisch.svg') repeat 0 0 / var(--tile-size) var(--tile-size);
}
.tile { overflow: hidden; }
.spark { transform-box: fill-box; transform-origin: center; }

/* C: das Material umschließt eine ausgesparte, ruhige Mitte. */
.variant-c .page { padding: clamp(120px, 19svh, 240px) clamp(24px, 7.5vw, 128px) clamp(64px, 10svh, 128px); }
.variant-c .surface {
  min-height: calc(100svh - clamp(120px, 19svh, 240px) - clamp(64px, 10svh, 128px));
  background: var(--sumi-950);
}
.variant-c main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 4vw, 64px);
  padding: 88px clamp(24px, 6vw, 88px) 64px;
  text-align: center;
}
.variant-c .wordmark { width: min(100%, 900px); }
.variant-c .announcement { color: var(--matcha-400); }
.variant-c footer { padding-inline: 24px; }
.variant-c nav { justify-content: center; }

/* Bedienbarer CSS-Schalter, ohne JavaScript und ohne zusätzlichen Claim. */
.pause-input {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  margin: 0;
  opacity: 0;
  z-index: 3;
  cursor: pointer;
}
.pause-control {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--hato-400);
  border-radius: 50%;
  color: var(--washi-50);
  background: var(--sumi-950);
  z-index: 2;
  cursor: pointer;
}
.pause-icon {
  width: 12px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(0 0, 33% 0, 33% 100%, 0 100%, 0 0, 67% 0, 100% 0, 100% 100%, 67% 100%, 67% 0);
}
.pause-input:checked + .pause-control .pause-icon { clip-path: polygon(12% 0, 100% 50%, 12% 100%); }
.pause-input:focus-visible + .pause-control { outline: 2px solid var(--hato-400); outline-offset: 5px; }
.pause-input:hover + .pause-control { background: var(--sumi-900); }

/* Größe um den eigenen Mittelpunkt; alle Positionen bleiben fest.
   Original-Deckkräfte bleiben in den Formen, die Gruppen modulieren sie. */
.animated.motion-1 .spark, .animated.motion-2 .spark {
  animation-name: sparkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.animated.motion-2 .star,
.animated.motion-1 .glimmer, .animated.motion-2 .glimmer {
  animation-name: breathe;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.animated.motion-3 .spark, .animated.motion-3 .glimmer {
  animation-name: disappear;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.motion-controls:has(.pause-input:checked) ~ .page .spark,
.motion-controls:has(.pause-input:checked) ~ .page .glimmer,
body.motion-2 .motion-controls:has(.pause-input:checked) ~ .page .star { animation-play-state: paused; }
@keyframes sparkle {
  0%, 100% { transform: scale(0.7); opacity: 0.2; }
  50% { transform: scale(1.3); opacity: 1; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
@keyframes disappear {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 700px) {
  :root { --tile-size: 760px; }
  .variant-c main { padding: 88px 24px 64px; gap: 40px; }
  .variant-c footer { padding-inline: 16px; }
  .variant-c nav { gap: 4px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .animated .texture .spark, .animated .texture .star, .animated .texture .glimmer { animation: none; transform: none; opacity: 1; }
  .pause-input, .pause-control { display: none; }
}
