/* schalkfilm. Onepager – schwarz mit Farbverlauf wie auf der Rechnung */
@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("assets/fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-display: swap; src: url("assets/fonts/jost-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 700; font-display: swap; src: url("assets/fonts/jost-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #a3a3a3;
  --soft: #d4d4d4;
  --line: #262626;
  --tile: #141414;
  --accent: #c8ff00;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Farbbahnen in den Rechnungsfarben, über die ganze Seite verteilt.
   Beim Scrollen bewegen sie sich unterschiedlich schnell (Parallax, siehe main.js). */
body { position: relative; }
.bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: .6; }
.blob {
  /* breite, schräge Farbbahnen statt runder Flecken: der Verlauf läuft quer über die
     Fläche und blendet zu beiden Seiten weich aus, die Enden liegen außerhalb des Bildes */
  position: absolute;
  top: var(--y);
  left: -50vw;
  width: 200vw;
  height: var(--s);
  background: linear-gradient(var(--a), transparent 22%, var(--c) 50%, transparent 78%);
  /* Maske blendet alle vier Ränder des Elements weich aus, damit nirgends eine Kante entsteht */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent),
    linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent),
    linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
  mask-composite: intersect;
  will-change: transform;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1400px; }
.label { margin: 0; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
/* Zarte Trennlinie über jedem Abschnitt: 1 px, läuft zu den Seiten hin weich aus
   (keine harte Kante). */
.divided { position: relative; }
.divided::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14) 20%, rgba(255, 255, 255, .14) 80%, transparent);
  pointer-events: none;
}

/* Header */
.header { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-block: 32px; }
.header img { height: 40px; width: auto; }
/* Navigation verteilt sich über die ganze Zeile rechts vom Logo */
.nav { flex: 1; display: flex; flex-wrap: wrap; justify-content: space-around; gap: 8px 32px; margin-left: 48px; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .2em; }
.nav a { text-decoration: none; color: var(--soft); padding-block: 10px; transition: color .25s; }
.nav a:hover { color: var(--ink); }
/* Button: weiß, dahinter zwei weiche Farbebenen (Cyan/Violett) als Glow.
   Hover: Ebenen ziehen auseinander, Button wird Lime, kurzer Blur-/Farbsplit-Puls (main.js setzt .hit). */
.pill {
  --ease: cubic-bezier(.2, .8, .2, 1);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  font-size: 16px; font-weight: 700; text-decoration: none;
  border-radius: 999px;
  color: #000;
  transition: transform .35s var(--ease);
}
.pill > span {
  position: relative;
  display: block;
  padding: 14px 26px;
  border-radius: inherit;
  background: #fff;
  transition: background .35s var(--ease);
}
.pill:hover > span { background: var(--accent); }
.pill::before,
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  filter: blur(12px);
  opacity: .22;
  transition: transform .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
  pointer-events: none;
}
.pill::before { background: #40ffdc; transform: translateX(-4px); }
.pill::after  { background: #d246ff; transform: translateX(4px); }
.pill:hover {
  color: #000;
  transform: translateY(-2px) scale(1.03);
}
.pill:hover::before { transform: translateX(-8px); opacity: .38; filter: blur(10px); }
.pill:hover::after  { transform: translateX(8px); opacity: .38; filter: blur(10px); }
.pill:active { transform: translateY(0) scale(.98); }
.pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 32px; padding-block: 96px 64px; }
.hero h1 { margin: 0; font-size: clamp(40px, 7vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -0.02em; max-width: 14ch; }

/* Projekte */
.projects { display: flex; flex-direction: column; gap: 40px; padding-block: 72px 96px; }
.projects h2 { margin: 0; font-size: 32px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 56px 32px; }
.card { display: flex; flex-direction: column; gap: 16px; }
.card .client { margin: 0; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin: 0; font-size: 22px; font-weight: 500; }
.card .meta { display: flex; flex-direction: column; gap: 4px; }

.media { position: relative; aspect-ratio: 16 / 9; background: var(--tile); border-radius: 8px; overflow: hidden; }
.media img, .media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  width: 100%; border: 0; padding: 0; background: rgba(0, 0, 0, .25); cursor: pointer; transition: background .2s;
}
.play:hover { background: rgba(0, 0, 0, .05); }
.play span { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 999px; background: #fff; }
.play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.media .hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: #e5e5e5; text-shadow: 0 1px 2px #000; pointer-events: none; }
.soon > img { filter: brightness(.45); }
.soon__logos {
  position: absolute; right: 20px; bottom: 18px;
  display: flex; align-items: center; gap: 16px;
}
.media .soon__logos img { position: static; width: auto; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .6)); }
.soon__label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(28px, 4vw, 48px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* Ablauf-Animation als Loop zwischen Projekten und Über mich.
   Hintergrund im Video ist auf Schwarz gezogen, "screen" macht Schwarz durchsichtig. */
.loop { padding-block: 0 96px; }
.loop--hero { padding-block: 8px 96px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.loop video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; mix-blend-mode: screen; }
.loop__cta { display: flex; justify-content: center; margin-top: 8px; }
.pill--big { font-size: 20px; }
.pill--big > span { padding: 18px 36px; }

/* Über mich */
/* Foto links, Überschrift und Text rechts daneben; erst am Handy untereinander */
.about { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 48px 64px; align-items: center; padding-block: 96px; }
.about__photo { width: 100%; height: auto; border-radius: 8px; }
.about__body { display: flex; flex-direction: column; gap: 32px; }
.about__head { display: flex; flex-direction: column; gap: 16px; }
.about__head h2 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 700; line-height: 1.1; }
.about__head p:last-child { margin: 0; font-size: 18px; color: var(--muted); }
.about__text { display: flex; flex-direction: column; gap: 20px; font-size: 20px; line-height: 1.6; }
.about__text p { margin: 0; }
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 360px; }
}

/* Kontakt */
.contact { display: flex; flex-direction: column; gap: 24px; padding-block: 96px; }
.contact h2 { margin: 0; font-size: clamp(32px, 5vw, 56px); font-weight: 700; }
.contact p { margin: 0; font-size: 18px; color: var(--muted); max-width: 46ch; }
.contact__links { display: flex; flex-wrap: wrap; gap: 16px 40px; font-size: 20px; }
.contact__links a { text-decoration: none; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-block: 32px 48px; font-size: 14px; color: var(--muted); }
.footer a { color: var(--muted); }

/* Rechtstexte */
.legal { display: flex; flex-direction: column; gap: 24px; padding-block: 72px 96px; font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 820px; }
.legal h1, .legal h2 { color: var(--ink); font-weight: 500; margin: 0; }
.legal h1 { font-size: 40px; }
.legal h2 { font-size: 22px; margin-top: 16px; }
.legal p, .legal ul { margin: 0; }
.legal strong { color: var(--ink); font-weight: 500; }

/* Claim: Buchstaben erscheinen einzeln – unscharf mit Farbsplit, dann scharf (wie in der Kontakt-Animation) */
.reveal .word { display: inline-block; white-space: nowrap; }
.reveal .char {
  display: inline-block;
  opacity: 0;
  animation: reveal 1.1s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(.3s + var(--i) * 55ms);
}
@keyframes reveal {
  0% {
    opacity: 0;
    color: #c8ff6a;
    filter: blur(12px);
    transform: translateX(-.12em) scale(1.08);
    text-shadow: -.14em 0 #a0ff00, .14em 0 #d246ff, 0 0 .3em #40ffdc;
  }
  35% {
    opacity: 1;
    color: #e9ffd0;
    filter: blur(5px);
    text-shadow: -.09em 0 #a0ff00, .09em 0 #d246ff, 0 0 .2em #40ffdc;
  }
  70% {
    color: #fff;
    filter: blur(1px);
    text-shadow: -.03em 0 rgba(160, 255, 0, .7), .03em 0 rgba(210, 70, 255, .7);
  }
  100% {
    opacity: 1;
    color: #fff;
    filter: blur(0);
    transform: none;
    text-shadow: none;
  }
}
.fx .word { display: inline-block; white-space: nowrap; }
.fx .char { display: inline-block; }
.fx .char.done { opacity: 1; animation: none; }
.fx .char.done.hit { animation: hit .75s cubic-bezier(.2, .7, .2, 1) var(--hit-delay, 0ms) both; }
@keyframes hit {
  0% { filter: blur(0); text-shadow: none; }
  25% {
    color: #e9ffd0;
    filter: blur(4px);
    transform: translateX(-.05em) scale(1.05);
    text-shadow: -.1em 0 #a0ff00, .1em 0 #d246ff, 0 0 .2em #40ffdc;
  }
  65% {
    color: #fff;
    filter: blur(1px);
    text-shadow: -.03em 0 rgba(160, 255, 0, .7), .03em 0 rgba(210, 70, 255, .7);
  }
  100% { filter: blur(0); transform: none; text-shadow: none; }
}
/* Button-Puls beim Drüberfahren: der ganze Button verschwimmt kurz und
   spaltet sich in Cyan/Violett auf. Alle Keyframes haben dieselbe Filterliste,
   damit der Browser weich interpoliert. */
.pill.hit { animation: pill-hit .6s var(--ease); }
@keyframes pill-hit {
  0%   { filter: blur(0)     drop-shadow(0 0 0 rgba(64, 255, 220, 0))     drop-shadow(0 0 0 rgba(210, 70, 255, 0)); }
  28%  { filter: blur(1.4px) drop-shadow(-6px 0 0 rgba(64, 255, 220, .8)) drop-shadow(6px 0 0 rgba(210, 70, 255, .8)); }
  60%  { filter: blur(.4px)  drop-shadow(-2px 0 0 rgba(64, 255, 220, .45)) drop-shadow(2px 0 0 rgba(210, 70, 255, .45)); }
  100% { filter: blur(0)     drop-shadow(0 0 0 rgba(64, 255, 220, 0))     drop-shadow(0 0 0 rgba(210, 70, 255, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal .char { opacity: 1; animation: none; }
  .fx .char.done.hit { animation: none; }
  .pill.hit { animation: none; }
  .pill, .pill::before, .pill::after { transition: none; }
}
