/* Selbst gehostete Fonts (statt Google-Fonts-CDN, vermeidet IP-Übermittlung an Google) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/montserrat-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Shadows Into Light';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/shadows-into-light-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Permanent Marker';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/permanent-marker-400.woff2') format('woff2');
}

::selection {
  background-color: #C0C0C0;
  color: #0E0E10;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Gestaffeltes Einblenden (Logo, Tagline, Headline, CTA) – Timing per inline style gesetzt */
@keyframes fade-up-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-animate {
  opacity: 0;
  animation: fade-up-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-animate {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Dezent driftende Licht-Flächen im Hero-Hintergrund */
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, -4%) scale(1.08); }
}
.ambient-glow {
  animation: drift 14s ease-in-out infinite;
}

/* Scroll-gekoppelter Einflug-Effekt: main.js setzt opacity/transform bei jedem Scroll-Frame
   direkt anhand der Scrollposition (kein Timer) – daher bewusst ohne CSS-transition, sonst
   haengt die Animation dem Scrollen hinterher statt ihm 1:1 zu folgen. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}
.line-reveal {
  transform-origin: left;
  will-change: transform;
}
.line-reveal-center {
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* "So arbeiten wir": echtes Pinning. Aeusserer Wrapper ist ueberhoeht (JS-Distanz),
   die sichtbare Ansicht bleibt via sticky stehen, waehrend die Punkte einzeln einfliegen. */
[data-pin-step] {
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
}
[data-pin-shrink] {
  will-change: transform;
}
/* Handgezeichneter Strich: der Wrapper selbst bleibt sichtbar (kein Fade/Slide),
   nur die Linien darin zeichnen sich per stroke-dashoffset, main.js steuert Fortschritt. */
[data-pin-draw] {
  opacity: 1;
  transform: none;
}
[data-pin-draw] [data-draw-line] {
  stroke-dasharray: 330;
  stroke-dashoffset: 330;
}
@media (prefers-reduced-motion: reduce) {
  [data-pin-shrink] {
    transform: none !important;
  }
  [data-pin-wrapper] {
    height: auto !important;
  }
  [data-pin-wrapper] > .sticky {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
  }
  [data-pin-step] {
    opacity: 1 !important;
    transform: none !important;
  }
  [data-pin-draw] [data-draw-line] {
    stroke-dashoffset: 0 !important;
  }
}

/* "So arbeiten wir": grau-schwarzer Verlauf ("Black Gradient", Bloom Field).
   Vier weiche Farbflecken auf #111111: Ink #111111 (100 %), Slate #5C5C5C (30 %), Ash #A7A7A7 (74 %),
   Paper #F2F2F2 (0 %, also unsichtbar, bleibt als Reserve drin). Jeder Fleck faellt in fuenf Stufen weich
   auf 0 ab. Dazu Koernung (Overlay) und eine hauchzarte Vignette. Die Fleckpositionen sind die Variablen
   --b1x ... --b4y, die main.js langsam verschiebt; die Werte hier sind die Grundkomposition. */
.bloom-field {
  --b1x: 72.39%; --b1y: 58.91%;
  --b2x: 37.53%; --b2y: 79.97%;
  --b3x: 41.45%; --b3y: 25.53%;
  --b4x: 72.25%; --b4y: 83.19%;
  background-color: #111111;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.075'/></svg>"),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.024) 100%),
    radial-gradient(circle at var(--b1x) var(--b1y), rgba(17, 17, 17, 1) 0%, rgba(17, 17, 17, 0.844) 19.38%, rgba(17, 17, 17, 0.5) 38.75%, rgba(17, 17, 17, 0.156) 58.13%, rgba(17, 17, 17, 0) 77.5%),
    radial-gradient(circle at var(--b2x) var(--b2y), rgba(92, 92, 92, 0.3) 0%, rgba(92, 92, 92, 0.253) 13.25%, rgba(92, 92, 92, 0.15) 26.5%, rgba(92, 92, 92, 0.047) 39.75%, rgba(92, 92, 92, 0) 53%),
    radial-gradient(circle at var(--b3x) var(--b3y), rgba(167, 167, 167, 0.74) 0%, rgba(167, 167, 167, 0.624) 17.1%, rgba(167, 167, 167, 0.37) 34.2%, rgba(167, 167, 167, 0.116) 51.3%, rgba(167, 167, 167, 0) 68.4%),
    radial-gradient(circle at var(--b4x) var(--b4y), rgba(242, 242, 242, 0) 0%, rgba(242, 242, 242, 0) 10.63%, rgba(242, 242, 242, 0) 21.25%, rgba(242, 242, 242, 0) 31.88%, rgba(242, 242, 242, 0) 42.5%);
  background-size: 120px 120px, auto, auto, auto, auto, auto;
  background-blend-mode: overlay, normal, normal, normal, normal, normal;
}
@media (prefers-reduced-motion: reduce) {
  /* Ohne Pinning: die Verlaufsflaeche fuellt einfach die Sektion, kein Mitlaufen */
  .bloom-sticky {
    position: static !important;
    height: 100% !important;
  }
}

/* Gebogene Bildstrecke unter dem Kontakt. Aufbau und Logik: assets/js/tilted-grid.js.
   Der Streifen ist ein Container, alle Groessen im Script sind cqw/cqh dieses Kastens. */
.tilted-grid {
  container-type: size;
  position: relative;
  width: 100%;
  height: clamp(150px, 17vw, 300px);
  /* Kacheln ausserhalb des Bildes zaehlen sonst als Seitenbreite (waagerechtes Scrollen am Handy) */
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.tilted-grid .tg-band {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.tilted-grid .tg-band.is-ready {
  opacity: 1;
}
.tilted-grid .tg-tile {
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilted-grid .tg-slice {
  position: absolute;
  top: 0;
  overflow: hidden;
  backface-visibility: hidden;
}
.tilted-grid .tg-slice img {
  position: absolute;
  top: 0;
  display: block;
  max-width: none; /* Tailwind-Preflight setzt sonst max-width: 100 % */
  object-fit: cover;
}
/* Ausserhalb des Bildschirms und bei reduzierter Bewegung steht die Strecke still */
.tilted-grid.tg-offscreen .tg-tile {
  animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
  .tilted-grid .tg-tile {
    animation-play-state: paused !important;
  }
}

/* Kunden-Logo-Leiste: endlose Marquee */
.logo-marquee-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: logo-marquee 55s linear infinite;
}
@keyframes logo-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track {
    animation: none !important;
    transform: none !important;
  }
}
