/* Infused Instruments – Stilregeln aus der Designdokumentation.
   Ein leerer, dunkler Raum; Dinge entstehen aus Klang. Keine Rahmen, Karten, Schatten, Flächenverläufe,
   Kreise oder Kapseln. Trennung durch Abstand und dünne Linien. Bewusst nur dunkel (wie das Logo). */

:root {
  --bg: #050607;
  --fg: #e9e6df;
  --mute: #6f6d68;
  --line: #1c1e21;
  --accent: #cfd8d4;
  --display: 'Jost', 'Futura', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main { overflow: hidden; overflow: clip; }

::selection { background: rgba(207, 216, 212, .22); color: var(--fg); }

/* ---------- Sprachumschalter ---------- */
.lang {
  position: fixed; top: 16px; right: var(--gutter); z-index: 10;
  display: flex; align-items: baseline; gap: .5em;
  font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .2em;
  color: var(--mute);
}
.lang button {
  appearance: none; background: transparent; border: 0; padding: 4px 0; margin: 0;
  font: inherit; letter-spacing: inherit; color: var(--mute); cursor: pointer;
  transition: color .6s ease;
}
.lang button.is-active { color: var(--accent); }
.lang button:hover { color: var(--fg); }
.lang button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  padding: 56px var(--gutter) 64px;
}
.hero-mark {
  position: relative; z-index: 1;
  width: min(78vmin, 820px); aspect-ratio: 1; max-width: 100%;
}
.hero-mark canvas {
  width: 100%; height: 100%; display: block; background: var(--bg); touch-action: pan-y;
  /* weicher Auslauf, damit über dem Hintergrundfeld keine Kanvaskante steht */
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
}
.hero-text {
  position: relative; z-index: 1; text-align: center;
  opacity: 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 40%, transparent 60%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, #000 40%, transparent 60%, transparent 100%);
  -webkit-mask-size: 100% 300%; mask-size: 100% 300%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 0 0%; mask-position: 0 0%;
  transition: -webkit-mask-position 2.6s cubic-bezier(.45, 0, .25, 1), mask-position 2.6s cubic-bezier(.45, 0, .25, 1), opacity 1.2s ease;
}
.hero-text.is-in { opacity: 1; -webkit-mask-position: 0 100%; mask-position: 0 100%; }
.brand {
  margin: 0;
  font-family: var(--display); font-weight: 300; font-size: 26px;   /* doppelt so groß (Inhaber 16.10.2026; vorher 13px) */
  letter-spacing: .36em; text-transform: uppercase; color: var(--fg);
  padding-left: .36em; /* optische Mitte trotz Sperrung */
}
.hero-line {
  margin: 10px 0 0;
  font-weight: 300; font-size: 15px; letter-spacing: .02em; color: var(--mute);
}

/* ---------- Sektionen ---------- */
.m-section {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 18vh var(--gutter);
}
/* EIN Gewebeband fest hinter allen Sektionen: unten schwarz, beim Scrollen steigen die Figuren auf.
   Lage und Breite des Bands bestimmt jede Sektion (Text links frei, Medien und Bildplatz im Band). */
.field {
  position: fixed; left: 0; top: 0; right: 0;
  width: 100%; height: 100vh; height: 100lvh;
  display: block; z-index: 0; pointer-events: none;
  background: var(--bg);
  opacity: 0;
}
main, .foot { position: relative; z-index: 1; }
.content { position: relative; z-index: 1; width: 100%; }

/* Während der Manifestation steht nur der Shader; danach Kreuzblende zur HTML-Ebene */
.js .m-section .content { opacity: 0; pointer-events: none; }
.js .m-section.is-solid .content { opacity: 1; pointer-events: auto; transition: opacity .3s ease; }

/* Fließtext: blendet ruhig ein (aus der Bandrichtung, von unten), Absätze je 150 ms versetzt */
.js .m-section .prose p, .js .m-section .note {
  opacity: 0; transform: translateY(12px);
  transition: opacity .9s ease, transform .9s ease; transition-delay: calc(var(--ci, 0) * 150ms);
}
.js .m-section.is-solid .prose p, .js .m-section.is-solid .note { opacity: 1; transform: none; }

/* Bedienelemente, Bildunterschriften: kristallisieren zuletzt, vorher nicht bedienbar */
.late { opacity: 0; filter: blur(3px); pointer-events: none; transition: opacity .6s ease .1s, filter .6s ease .1s; }
.is-done .late, .no-js .late { opacity: 1; filter: none; pointer-events: auto; }

.col { max-width: 1080px; margin: 0 auto; }
.col > * { max-width: 680px; }

.label {
  margin: 0 0 28px;
  font-family: var(--mono); font-weight: 400; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}
.head {
  margin: 0 0 44px;
  font-family: var(--display); font-weight: 200;
  font-size: clamp(20px, 2.4vw, 30px); line-height: 1.5;
  letter-spacing: .22em; text-transform: uppercase; color: var(--fg);
  max-width: 34ch;
}
.prose p { margin: 0 0 1.25em; max-width: 65ch; }
.prose p:last-child { margin-bottom: 0; }
.note {
  margin: -20px 0 0;
  font-family: var(--mono); font-weight: 300; font-size: 12px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}
.caption {
  margin: 18px 0 0;
  font-family: var(--mono); font-weight: 300; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}

/* Instrument: Text und Bildplatz auf ruhiger Achse */
.split { max-width: 1080px; margin: 0 auto; display: grid; gap: 64px; align-items: center; }
.figure { margin: 0; justify-self: center; width: 100%; max-width: 400px; }
/* Bild- und Medienfenster: kein Rechteck, sondern ein Bild, das ins Gewebe übergeht.
   Ebenen (oben → unten): Feder waagerecht (16 %), Feder senkrecht (oben 22 %, unten 8 % – die Bedienleiste
   des Players bleibt frei), Innenfläche, Rauschen. Rauschen ∪ Innenfläche = innen voll, am Rand fransen
   die Kanten wie Gewebefäden aus (Einfluss ≤ 25 %). Verläufe S-förmig, nicht linear. */
.img-place, .media-frame {
  background: #0a0b0d;                /* sehr dunkel: als Ort erkennbar, ohne Kante */
  --feather-x: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 5.6%, rgba(0,0,0,.75) 11.2%, #000 16%, #000 84%, rgba(0,0,0,.75) 88.8%, rgba(0,0,0,.25) 94.4%, rgba(0,0,0,0) 100%);
  --feather-y: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 7.7%, rgba(0,0,0,.75) 15.4%, #000 22%, #000 92%, rgba(0,0,0,.75) 94.8%, rgba(0,0,0,.25) 97.2%, rgba(0,0,0,0) 100%);
  --inner: radial-gradient(closest-side, #000 55%, rgba(0,0,0,0) 85%);
  -webkit-mask-image: var(--feather-x), var(--feather-y), var(--inner), var(--edge-noise, linear-gradient(#000, #000));
          mask-image: var(--feather-x), var(--feather-y), var(--inner), var(--edge-noise, linear-gradient(#000, #000));
  -webkit-mask-size: 100% 100%, 100% 100%, 100% 100%, 256px 256px;
          mask-size: 100% 100%, 100% 100%, 100% 100%, 256px 256px;
  -webkit-mask-repeat: no-repeat, no-repeat, no-repeat, repeat;
          mask-repeat: no-repeat, no-repeat, no-repeat, repeat;
  -webkit-mask-position: 0 0, 0 0, center, 0 0;
          mask-position: 0 0, 0 0, center, 0 0;
  -webkit-mask-composite: source-in, source-in, source-over;
          mask-composite: intersect, intersect, add;
  animation: edge-drift 40s linear infinite;
}
@keyframes edge-drift {
  from { -webkit-mask-position: 0 0, 0 0, center, 0 0; mask-position: 0 0, 0 0, center, 0 0; }
  to   { -webkit-mask-position: 0 0, 0 0, center, 256px 256px; mask-position: 0 0, 0 0, center, 256px 256px; }
}
.img-place { aspect-ratio: 4 / 5; width: 100%; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 8vw; }
}

/* Hören: zwei Medienfenster ohne Kante */
.wide { max-width: 1080px; margin: 0 auto; }
.media-row { display: grid; gap: 56px; margin-top: 72px; }
@media (min-width: 760px) { .media-row { grid-template-columns: 1fr 1fr; gap: 48px; } }
.media { margin: 0; }
.media .caption { margin-top: 48px; }
.media-box { position: relative; aspect-ratio: 16 / 9; }
.media-frame { position: absolute; inset: 0; overflow: hidden; }
/* Fenster mit Bild im Gewebe: das Vorschaubild zeichnet der Shader, die HTML-Fläche ist nur Klickfläche.
   Nach dem Klick liegt der Player darüber, mit sehr breiter S-förmiger Feder und ausfransendem Rand. */
.media-frame.in-tissue:not(.css-thumb) { background: none; -webkit-mask-image: none; mask-image: none; animation: none; }
.media-frame.in-tissue:not(.css-thumb)::after { display: none; }
.is-playing .media-frame.in-tissue {
  /* Kontur kommt als gewürfelter, gerundeter, verrauschter Umriss aus manifest.js (Inline-Maske) – nie gerade, nie rechtwinklig */
  background: none; animation: none;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 0 0; mask-position: 0 0;
  -webkit-mask-composite: source-over; mask-composite: add;
}

.is-playing .media-frame.in-tissue iframe { transition-duration: .8s; }
.media-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; display: block; transition: opacity .6s ease; }
/* leichte Vignette auf dem Vorschaubild (Ecken etwa −25 %) */
.media-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(closest-corner, rgba(5,6,7,0) 60%, rgba(5,6,7,.25) 100%); transition: opacity .6s ease; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity .6s ease; }
.is-playing .media-frame iframe { opacity: 1; }
.is-playing .media-thumb, .is-playing .media-frame::after { opacity: 0; }
.controls { position: absolute; inset: 0; color: var(--accent); }
button.controls { appearance: none; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; width: 100%; }
button.controls:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
button.controls:hover .play { opacity: 1; }
.caption .credit { display: block; margin-top: 6px; color: var(--mute); opacity: .8; }
.controls .play { position: absolute; left: 50%; top: 50%; width: 18px; height: 20px; transform: translate(-40%, -50%); opacity: .8; }

/* Ausblick: Instrumentenreihe, Wort für Wort von links */
.next-row {
  margin: 56px 0 0;
  font-family: var(--mono); font-weight: 400; font-size: 11px; line-height: 2;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}
.next-row .row-word.is-first { color: var(--accent); }
.next-row .row-sep { white-space: pre; }   /* Abstände um „ · " bleiben trotz inline-block erhalten */
.next-row span { display: inline-block; opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform .9s ease; transition-delay: calc(.1s + var(--i, 0) * 150ms); }
.is-done .next-row span, .no-js .next-row span { opacity: 1; transform: none; }

/* ---------- Fußzeile ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 32px var(--gutter) max(32px, env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.foot p {
  margin: 0;
  font-family: var(--mono); font-weight: 300; font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}

/* ---------- Rückfall ohne WebGL ---------- */
.cym-fallback { width: 100%; height: 100%; display: block; background: var(--bg); }
.hero-mark .cym-fallback { position: absolute; inset: 0; }
.cym-mark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--fg); pointer-events: none;
}
.cym-mark-svg { width: 24%; height: auto; overflow: visible; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .m-section { padding: 14vh var(--gutter); }
  .head { letter-spacing: .18em; margin-bottom: 32px; }
}

/* ---------- Ruhe ---------- */
.is-instant .content, .is-instant .late, .is-instant .next-row span, .is-instant .prose p, .is-instant .note { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero-text { opacity: 1; -webkit-mask-image: none; mask-image: none; }
}

/* Fußzeile: Kontaktadresse, ruhig wie die übrige Fußzeile */
.foot a { color: inherit; text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--text, #e9e6df); }
.foot p + p { margin-top: 10px; }

/* ---------- Rechtstexte (Impressum, Datenschutz): ruhige Lesespalte ohne Gewebe ---------- */
.legal { max-width: 68ch; margin: 0 auto; padding: 96px var(--gutter) 120px; font-family: var(--display); font-weight: 300; font-size: 17px; line-height: 1.7; }
.legal h1 { font-weight: 200; font-size: 28px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 48px; }
.legal h2 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin: 48px 0 12px; }
.legal p, .legal ul { margin: 0 0 1em; }
.legal ul { padding-left: 1.2em; }
.legal a { color: inherit; }
.legal .back { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--mute); display: inline-block; margin-bottom: 64px; }

/* ---------- Standbild-Modus (schwache Geräte): Inhalt blendet weich ein ---------- */
.is-still .m-section.is-solid .content { transition: opacity 1.2s ease; }
.cym-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.still-band {
  position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: hidden;
  /* unter dem Logo ruht das Band; es kommt mit dem Verlassen des Logos herauf */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 70vh, #000 115vh);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 70vh, #000 115vh);
}
.still-band canvas { position: absolute; left: 0; width: 100%; display: block; opacity: 0; transition: opacity .6s ease; }
/* Bildschirm-Hülle wie im bewegten Band: unten immer schwarz, oben weicher Ausklang */
.still-env {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none;
  background:
    linear-gradient(to top, #050607 0%, #050607 4%, rgba(5,6,7,.84) 12%, rgba(5,6,7,.5) 19.5%, rgba(5,6,7,.16) 27%, rgba(5,6,7,0) 35%),
    linear-gradient(to bottom, rgba(5,6,7,.7) 0%, rgba(5,6,7,.35) 7.5%, rgba(5,6,7,0) 15%);
}
/* Schriften der Wortmarke kommen nur im Kanvas vor: unsichtbar im Dokument benutzen, damit jeder Browser sie lädt */
.font-warm { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; font-size: 10px; }
.font-warm i { font-family: 'Playfair Display', serif; font-style: normal; font-weight: 400; }
.font-warm b { font-family: 'Michroma', sans-serif; font-weight: 400; }

/* ---------- Klangregler: dieselbe Aufnahme, stufenlos von Cello zu Synthesizer ----------
   Bewusst als Schieberegler gezeichnet (breite Rille, großer Griff mit Pfeilen), nicht als Zeitleiste. */
.klang { margin: 12px 0 0; color: var(--accent); max-width: 640px; }
.klang[hidden] { display: none; }
.klang-ends { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.klang-end { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg); transition: opacity .2s linear; }
.klang-end.is-a { opacity: calc(1 - .6 * var(--x, 0)); }
.klang-end.is-b { opacity: calc(.4 + .6 * var(--x, 0)); }
.klang-hint { font-family: var(--mono); font-weight: 300; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); transition: opacity .8s ease; }
.klang.is-used .klang-hint { opacity: 0; }
.klang-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: grab; touch-action: pan-y; }
.klang-range:active { cursor: grabbing; }
.klang-range::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; border: 1px solid rgba(207,216,212,.45); background: linear-gradient(to right, rgba(207,216,212,.05), rgba(207,216,212,.32)); }
.klang-range::-moz-range-track { height: 10px; border-radius: 5px; border: 1px solid rgba(207,216,212,.45); background: linear-gradient(to right, rgba(207,216,212,.05), rgba(207,216,212,.32)); }
.klang-range::-webkit-slider-thumb { -webkit-appearance: none; width: 38px; height: 38px; margin-top: -15px; border-radius: 50%; border: 0;
  background: var(--fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cpath d='M15 13 L9 19 L15 25 M23 13 L29 19 L23 25' fill='none' stroke='%23050607' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  box-shadow: 0 0 0 6px rgba(233,230,223,.10), 0 2px 10px rgba(0,0,0,.6); transition: box-shadow .2s ease; }
.klang-range::-moz-range-thumb { width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cpath d='M15 13 L9 19 L15 25 M23 13 L29 19 L23 25' fill='none' stroke='%23050607' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  box-shadow: 0 0 0 6px rgba(233,230,223,.10), 0 2px 10px rgba(0,0,0,.6); }
.klang-range:hover::-webkit-slider-thumb, .klang-range:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(233,230,223,.14), 0 2px 10px rgba(0,0,0,.6); }
.klang-range:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.klang-play { appearance: none; background: transparent; border: 1px solid rgba(207,216,212,.45); border-radius: 22px; margin: 14px 0 0; padding: 0 20px 0 16px; height: 44px; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; transition: border-color .3s ease; }
.klang-play:hover { border-color: var(--accent); }
.klang-play:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.klang-play svg { width: 13px; height: 15px; overflow: visible; }
.klang-play-text { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.klang .ic-pause, .klang.is-on .ic-play { display: none; }
.klang.is-on .ic-pause { display: inline; }
.klang.is-busy .klang-play svg { animation: klang-wait 1.6s ease-in-out infinite; }
@keyframes klang-wait { 50% { opacity: .25; } }
.klang .caption { margin-top: 18px; }

.klang-stage { display: grid; grid-template-columns: auto 1fr auto; column-gap: 18px; align-items: center; }
.klang-mid { min-width: 0; padding-bottom: 12px; }
.klang-fig { width: 46px; height: 106px; color: var(--fg); overflow: visible; transition: opacity .2s linear; }
.klang-fig.is-a { opacity: calc(1 - .6 * var(--x, 0)); }
.klang-fig.is-b { opacity: calc(.4 + .6 * var(--x, 0)); }
@media (max-width: 520px) { .klang-stage { column-gap: 10px; } .klang-fig { width: 32px; height: 74px; } .klang-hint { display: none; } }

/* ---------- Kernaussagen (Abschnitt „Die Idee"): Stichwort links, ein Satz rechts ---------- */
.points { margin-top: 8px; max-width: 760px; }
.col > .points { max-width: 760px; }
.points p { display: grid; grid-template-columns: 190px 1fr; column-gap: 24px; align-items: baseline; margin: 0 0 22px; max-width: none; font-size: 19px; line-height: 1.55; }
.pt-label { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 700px) {
  .points p { grid-template-columns: 1fr; row-gap: 4px; font-size: 17px; margin-bottom: 26px; }
}
