/* /ueber-werkecht/ in der Welt „Durch die Fuge“ (12.11.2026).
   Kick: Gegenstück zur Startseite. Beim Scrollen schieben sich WERK und ECHT von außen zusammen, die Fuge
   setzt sich dazwischen, zuletzt dreht sich die Schraube fest. Reines CSS (scroll-driven animations),
   kein JS. Ohne Unterstützung bzw. mit reduzierter Bewegung steht die Wortmarke fertig da.
   Diese Datei liegt in public/ und wird nicht minifiziert; animation-timeline steht trotzdem in eigenen Regeln. */

/* ---------- Szene: Name ---------- */
.ue-szene {
  position: relative;
  background: var(--tinte);
  color: var(--hell);
  overflow-x: clip;
  view-timeline: --ue-szene block;
  /* ohne Einzug: html hat scroll-padding-top, das sonst die Zeitachse verschiebt */
  view-timeline-inset: 0;
}
.ue-buehne {
  --wm: min(100%, max(40%, calc((100svh - 27rem) * 4.1912)));
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  /* wie die Startseite: Wortmarke mittig im freien Raum, H1 unten */
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: clamp(28px, 4svh, 48px);
  padding: 96px var(--innen) clamp(32px, 5svh, 56px);
}
.ue-zeichen {
  width: var(--wm);
  align-self: center;
}
.ue-marke {
  width: 100%;
  height: auto;
  overflow: visible;
}
.ue-marke .wm-werk,
.ue-marke .wm-echt {
  fill: var(--hell);
}
.ue-marke .wm-fuge,
.ue-marke .wm-schlitz {
  fill: var(--gelb);
}
.ue-marke .wm-kopf {
  fill: var(--tinte);
}
.ue-marke .wm-fuge,
.ue-marke .wm-schraube {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* Wörterbuch: jede Erklärung steht unter ihrer Hälfte (WERK endet bei 51,2 %, ECHT beginnt bei 57,3 %) */
.ue-woerter {
  display: grid;
  grid-template-columns: 51.2% 6.1% minmax(0, 1fr);
  margin-top: clamp(14px, 2svh, 22px);
}
.ue-woerter > div:first-child {
  grid-column: 1;
}
.ue-woerter > div:last-child {
  grid-column: 3;
}
.ue-woerter dd {
  max-width: 17em;
  padding-top: 10px;
  border-top: 1px solid var(--linie-dunkel);
  font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.1875rem);
  line-height: 1.4;
  color: var(--text-auf-dunkel);
}
.ue-szene h1 {
  font-size: clamp(2.25rem, 1.2rem + 3.2vw, 4.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  word-spacing: 0.05em;
  text-wrap: balance;
  max-width: 13em;
}
@media (max-width: 599px) {
  .ue-buehne {
    --wm: 100%;
    padding-top: 88px;
  }
  /* schmal: kein Versatz. Die Wortmarke füllt die Spalte, WERK und ECHT stehen von Anfang an im
     Textraster (ein Versatz von wenigen Pixeln ragte nur über den Rand); Fuge und Schraube bewegen sich weiter */
  .ue-marke {
    --ue-weg: 0px;
  }
  .ue-szene h1 {
    font-size: clamp(2.25rem, 11vw, 2.75rem);
  }
}

/* Bewegung nur, wo der Browser Scroll-Zeitachsen kann und Bewegung erwünscht ist */
@supports (animation-timeline: view()) {
  /* nur bei genug Höhe; Handy quer: Wortmarke steht fertig, nichts klebt */
  @media (prefers-reduced-motion: no-preference) and (min-height: 561px) {
    .ue-szene {
      height: 260vh;
      height: 260svh;
    }
    .ue-buehne {
      position: sticky;
      top: 0;
      height: 100vh;
      height: 100svh;
      min-height: 0;
    }
    .ue-marke .wm-werk {
      animation: ue-werk linear both;
    }
    .ue-marke .wm-echt {
      animation: ue-echt linear both;
    }
    .ue-marke .wm-fuge {
      animation: ue-fuge linear both;
    }
    .ue-marke .wm-schraube {
      animation: ue-schraube linear both;
    }
    .ue-person__bild img {
      animation: ue-oeffnen linear both;
    }
    .ue-person__bild::before {
      animation: ue-kante-l linear both;
    }
    .ue-person__bild::after {
      animation: ue-kante-r linear both;
    }
  }
  @media (prefers-reduced-motion: no-preference) and (min-height: 561px) and (max-width: 767px) {
    .ue-szene {
      height: 210vh;
      height: 210svh;
    }
  }
}
@supports (animation-timeline: view()) {
  /* nur bei genug Höhe; Handy quer: Wortmarke steht fertig, nichts klebt */
  @media (prefers-reduced-motion: no-preference) and (min-height: 561px) {
    .ue-marke :is(.wm-werk, .wm-echt, .wm-fuge, .wm-schraube) {
      animation-timeline: --ue-szene;
      animation-range: contain 0% contain 100%;
    }
    figure.ue-person__bild img,
    figure.ue-person__bild::before,
    figure.ue-person__bild::after {
      animation-timeline: --ue-bild;
      animation-range: entry 15% cover 45%;
    }
  }
}

/* Handy (bis 599 px): Bühne begrenzt, damit die H1 sicher im ersten Bildschirm steht und über der Marke
   weniger Leere bleibt. Ohne Bewegung folgt der nächste Abschnitt direkt. Mit Bewegung ist die Szene genau
   eine Bildschirmhöhe länger als die Bühne: Die Marke ist fertig, wenn der nächste Abschnitt von unten kommt. */
@media (max-width: 599px) {
  .ue-buehne {
    min-height: 78vh;
    min-height: 78svh;
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-height: 561px) and (max-width: 599px) {
    .ue-szene {
      height: 178vh;
      height: 178svh;
    }
    .ue-buehne {
      height: 78vh;
      height: 78svh;
    }
  }
}

/* Startzustand bei Scroll 0: das Logo ist schon erkennbar. Die Hälften stehen nur ein Stück auseinander
   (--ue-weg, in viewBox-Einheiten, skaliert also mit der Wortmarke), die Fuge ist zu gut einem Drittel da.
   Beim Scrollen schieben sich die Hälften zusammen (bremsen am Ende), die Fuge wächst ganz aus der Mitte,
   die Schraube steht klein und schräg in der Fuge und dreht sich zuletzt fest. Endzustand = Logo, transform: none. */
:where(.ue-marke) {
  --ue-weg: 20px; /* schmal: 14px (siehe oben), :where hält die Spezifität bei 0 */
}
@keyframes ue-werk {
  0% {
    transform: translateX(calc(-1 * var(--ue-weg)));
    animation-timing-function: cubic-bezier(0.3, 0.05, 0.2, 1);
  }
  52%,
  100% {
    transform: none;
  }
}
@keyframes ue-echt {
  0% {
    transform: translateX(var(--ue-weg));
    animation-timing-function: cubic-bezier(0.3, 0.05, 0.2, 1);
  }
  52%,
  100% {
    transform: none;
  }
}
@keyframes ue-fuge {
  0%,
  20% {
    transform: scaleY(0.35);
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  66%,
  100% {
    transform: none;
  }
}
/* Die Schraube ist von Anfang an da (Markenzeichen im ersten Bild), nur kleiner und noch nicht festgedreht;
   ab 62 % dreht sie sich fest und wächst auf volle Größe. */
@keyframes ue-schraube {
  0%,
  62% {
    transform: rotate(-300deg) scale(0.7);
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  100% {
    transform: none;
  }
}

/* ---------- Henrik ---------- */
.ue-person {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 40px;
  padding: clamp(64px, 8vw, 120px) var(--innen) var(--abschnitt-gross);
  background: var(--tinte);
  border-top: 1px solid var(--linie-dunkel);
}
/* Das Porträt öffnet sich wie die Fuge aus der Mitte, mit zwei gelben Kanten */
.ue-person__bild {
  position: relative;
  overflow: hidden;
  width: min(100%, 460px);
  margin: 0;
  view-timeline: --ue-bild block;
  view-timeline-inset: 0;
}
.ue-person__bild img {
  width: 100%;
  /* Studio-Schwarz läuft weich in die Tinte aus, keine harte Bildkante */
  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      #000 14%,
      #000 86%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 10%,
      #000 72%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      #000 14%,
      #000 86%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 10%,
      #000 72%,
      transparent 100%
    );
  mask-composite: intersect;
}
.ue-person__bild::before,
.ue-person__bild::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 18%;
  width: 50%;
  pointer-events: none;
  background: linear-gradient(var(--gelb), var(--gelb)) no-repeat;
  background-size: 6px 100%;
  opacity: 0;
}
.ue-person__bild::before {
  left: 0;
  background-position: right top;
}
.ue-person__bild::after {
  right: 0;
  background-position: left top;
}
@keyframes ue-oeffnen {
  0% {
    clip-path: inset(0 50% 0 50%);
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes ue-kante-l {
  0% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}
@keyframes ue-kante-r {
  0% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.ue-person h2,
.ue-hell h2,
.ue-handwerk h2,
.ue-schluss h2 {
  font-size: var(--h-mittel);
  font-weight: var(--gewicht-gross);
  line-height: 1;
  letter-spacing: -0.035em;
  word-spacing: 0.04em;
  text-wrap: balance;
}
.ue-person__lead {
  margin-top: 22px;
  max-width: 32em;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.5;
  color: var(--hell);
}
.ue-person__text > p:not(.ue-person__lead) {
  margin-top: 16px;
  max-width: 34em;
  color: var(--text-auf-dunkel);
}
.ue-stamm {
  margin-top: 32px;
  max-width: 34em;
  border-top: 1px solid var(--linie-dunkel);
}
.ue-stamm > div {
  display: grid;
  grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr);
  gap: 4px 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--linie-dunkel);
}
.ue-stamm dt {
  font-size: 0.9375rem;
  color: var(--grau-auf-dunkel);
  line-height: 1.5;
}
.ue-stamm dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ue-stamm a {
  text-decoration-color: rgba(241, 241, 238, 0.4);
}
.ue-person .knopf {
  margin-top: 32px;
}
@media (min-width: 900px) {
  .ue-person {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2.4vw, 40px);
    align-items: center;
  }
  .ue-person__bild {
    grid-column: 1 / span 5;
    width: 100%;
  }
  .ue-person__text {
    grid-column: 7 / -1;
  }
}

/* ---------- Haltung auf hellem Grund ---------- */
.ue-hell {
  --fokus: var(--tinte);
  background: var(--grund);
  color: var(--tinte);
  color-scheme: light;
  -webkit-font-smoothing: auto;
}
.ue-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 40px;
  padding: var(--abschnitt) var(--innen);
}
.ue-block + .ue-block {
  padding-top: 0;
}
.ue-block + .ue-block > * {
  min-width: 0;
}
.ue-text {
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
}
.ue-text p + p {
  margin-top: 1em;
}
.ue-belege {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--linie-hell);
  max-width: 40em;
}
.ue-belege li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  column-gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--linie-hell);
  font-size: 1.0625rem;
  line-height: 1.5;
}
.ue-belege li::before {
  content: "";
  width: 8px;
  height: 1.1em;
  margin-top: 0.2em;
  background: var(--gelb);
  border-radius: 1px;
}
.ue-belege a {
  font-weight: 600;
  text-decoration-thickness: 1px;
}
@media (hover: hover) and (pointer: fine) {
  .ue-belege a:hover {
    text-decoration-thickness: 2px;
  }
}
@media (min-width: 1000px) {
  .ue-block {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }
  .ue-block > h2 {
    grid-column: 1 / span 5;
  }
  .ue-block > .ue-text {
    grid-column: 7 / -1;
  }
  .ue-block--neu > h2 {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }
  .ue-block--neu > .ue-text {
    grid-column: 1 / span 5;
  }
  .ue-block--neu > .ue-belege {
    grid-column: 7 / -1;
  }
}
.ue-trenner {
  margin: 0 var(--innen);
  border: 0;
  border-top: 1px solid var(--linie-hell);
}

/* ---------- Handwerk und Schluss auf Tinte ---------- */
.ue-handwerk {
  background: var(--tinte);
  padding: var(--abschnitt-gross) var(--innen) 0;
}
.ue-handwerk__text {
  display: grid;
  gap: 1em clamp(24px, 5vw, 80px);
  margin-top: 24px;
  color: var(--text-auf-dunkel);
}
.ue-handwerk__text p {
  max-width: 32em;
}
@media (min-width: 900px) {
  .ue-handwerk__text {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ue-schluss {
  background: var(--tinte);
  padding: var(--abschnitt-gross) var(--innen) var(--abschnitt-gross);
}
.ue-schluss__innen {
  display: grid;
  gap: 20px clamp(24px, 5vw, 80px);
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--linie-dunkel);
}
.ue-schluss p {
  max-width: 30em;
  color: var(--text-auf-dunkel);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}
.ue-schluss__handlungen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 420px) {
  .ue-schluss__handlungen > * {
    width: 100%;
    justify-content: center;
  }
}
@media (min-width: 900px) {
  .ue-schluss__innen {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2.4vw, 40px);
    align-items: start;
  }
  .ue-schluss__innen > h2 {
    grid-column: 1 / span 5;
  }
  .ue-schluss__innen > div {
    grid-column: 7 / -1;
  }
}
