/* ==========================================================================
   digitlz Basis — Fonts, Reset, Typo-Grundstile, Utilities
   ========================================================================== */

/* Absolute Pfade, nicht relative: Webpack schreibt relative URLs auf
   /_next/static/media/<name>.<hash>.woff2 um, und dieser Name steht erst nach
   dem Build fest — ein <link rel="preload"> im Layout liesse sich darauf nicht
   formulieren. Genau daran hing am 2026-08-24 der kritische Pfad: /en/ → CSS →
   Schrift, drei Anfragen hintereinander, 969 ms bis die Schrift da war.
   Unter /fonts/ ist der Name stabil, components/SiteShell.tsx lädt beide
   Dateien vor, und nginx cached sie ein Jahr (docker/nginx.conf).

   Die Dateien sind zugeschnitten — Gewichtsachse 400–800 statt 100–900,
   Zeichenvorrat auf Latin begrenzt. scripts/schriften-zuschneiden.sh erzeugt
   sie aus den Originalen in ../assets/fonts/, die nur noch Quelle sind. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Typo-Grundstile */
/* line-height 1.05 reichte für englische Versalien, nicht für deutsche:
   die Punkte eines Ä/Ö/Ü ragen 0.88em über die Grundlinie, ein Komma 0.18em
   darunter — bei 1.05 überlappen sie sich um 0.4px, sobald beide in
   benachbarten Zeilen übereinander stehen ("ARBEIT," / "QUALITÄT").
   1.1 lässt in jeder Schriftgrösse Luft und setzt trotzdem eng. */
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

h1 {
  font-size: var(--text-display-xl);
}

h2 {
  font-size: var(--text-display);
}

h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

a {
  color: var(--color-ink);
  text-underline-offset: 3px;
}

code,
kbd,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Versal-Label (Formulare, Tabellen-Header, Kicker) */
.caption {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
}

/* Layout-Utilities */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Holo — Flächen-Utility und gemeinsame Keyframes
   Text auf Holo folgt via --holo-ink dem Theme: Light dunkel, Dark weiß
   (der Dark-Verlauf ist die dunkle Spektral-Variante der Liquid-Szene).
   ========================================================================== */

.holo {
  background-image: var(--holo-gradient);
  background-size: 300% 300%;
  animation: holo-flow var(--duration-holo) var(--ease) infinite;
  color: var(--holo-ink);
}

@keyframes holo-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Fokus-Puls — Halo atmet um das fokussierte Element */
@keyframes focus-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px var(--focus-halo);
  }
  50% {
    box-shadow: 0 0 0 7px var(--focus-halo-faint);
  }
}

/* Verlaufs-Rahmen für Eingabefelder: Layer 1 deckt, Layer 2 wandert */
@keyframes holo-border-flow {
  0%,
  100% {
    background-position: 0 0, 0% 50%;
  }
  50% {
    background-position: 0 0, 100% 50%;
  }
}

/* Reduzierte Bewegung: alles steht still, Fokus bleibt konstant sichtbar */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
