/* =========================================================================
   Vinzent Trenkler — Portfolio
   Sektion 1 (Du) · Übergang (Reißverschluss-Naht) · Sektion 2 (Crunchtime)
   ========================================================================= */

/* ---- Selbst gehostete Schriften (DSGVO-konform, keine externen CDNs) ---- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fraunces-latin-400-normal.woff2") format("woff2"); }

:root {
  /* ---- Welt 1 — Du (weiß, bold) ---- */
  --du-bg:      #ffffff;
  --du-ink:     #0b0b0a;
  --du-muted:   #55504a;
  --du-line:    #0b0b0a;

  /* ---- Welt 2 — Crunchtime (Performance) ---- */
  --ct-bg:      #052945;     /* Markenfarbe */
  --ct-bg-2:    #021727;     /* dunkler Verlaufspunkt */
  --ct-bg-3:    #0a4068;     /* hellerer Verlaufspunkt */
  --ct-accent:  #ffff33;     /* Markenakzent */
  --ct-ink:     #f3f7fb;
  --ct-muted:   #9db4c6;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ct-bg);            /* verhindert weißen Rand nach dem Pin */
  color: var(--du-ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

em { font-style: italic; }
a  { color: inherit; }

/* =========================================================================
   Grundlayout der Szene
   Default (ohne JS / reduzierte Bewegung): zwei gestapelte 100vh-Sektionen.
   Mit Klasse .fx (JS aktiv): Welt 2 liegt als Overlay über Welt 1 und wird
   durch eine wachsende Clip-Maske enthüllt.
   ========================================================================= */
.scene { position: relative; }

.world {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.world--du {
  background: var(--du-bg);
  color: var(--du-ink);
}

.world--ct {
  background:
    radial-gradient(130% 100% at 50% 18%, var(--ct-bg-3) 0%, var(--ct-bg) 42%, var(--ct-bg-2) 100%);
  color: var(--ct-ink);
}

/* ---- Overlay-Modus (nur mit JS) ---- */
/* #pin wird von ScrollTrigger gepinnt; der Pin-Spacer erzeugt die Scroll-Distanz.
   overflow:hidden klippt die weit auslaufenden Naht-Bögen auf den Viewport. */
.fx .pin { position: relative; height: 100vh; overflow: hidden; }

.fx .world {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: 100vh;
}
.fx .world--du { z-index: 1; }
.fx .world--ct {
  z-index: 2;
  /* Startzustand: vollständig geschlossen (unsichtbar) – JS setzt den Pfad */
  clip-path: path("M 0 0 L 0 0 L 0 0 Z");
  will-change: clip-path;
}
.fx .seam { display: block; }

/* =========================================================================
   Topbar (Wortmarke)
   ========================================================================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 3;
}
.wordmark {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
}

/* =========================================================================
   SEKTION 1 — Du
   ========================================================================= */
/* Zweispaltig: links das Porträt, rechts die Botschaft.
   Im Markup steht der Text zuerst (Vorlesereihenfolge); die Spalten werden
   hier explizit zugewiesen. */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  text-align: left;
  /* leicht nach oben rücken, damit die Naht unter dem Hero mittig startet */
  transform: translateY(-4%);
  max-width: 72rem;
  margin: 0 auto;
  padding-bottom: 8vh;
}

.hero__text {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

/* Porträt im Hochformat 2:3 (Original 1001×1500) – exakt das Seitenverhältnis
   der Datei, es wird also nichts beschnitten. Der vh-Term in der Breite
   begrenzt die Höhe, damit auf flachen Bildschirmen unter dem Foto Platz für
   den Naht-Ansatz bleibt. */
.hero__figure {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  justify-self: start;
  width: min(26rem, 32vw, 40vh);
}

.hero__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: clamp(14px, 1.6vw, 22px);
  object-fit: cover;
  object-position: center;
}

.hero__title {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.7vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  /* kräftiger Unterstrich als Betonung von „Form geben" */
  background: linear-gradient(transparent calc(100% - .12em), var(--du-ink) 0);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding-bottom: .04em;
}

.hero__sub {
  margin: 0;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.5;
  color: var(--du-muted);
  font-weight: 500;
  max-width: 32rem;
}

/* Social-Icons (dezent) */
.social {
  list-style: none;
  display: flex;
  gap: .35rem;
  padding: 0;
  margin: .4rem 0 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--du-muted);
  transition: color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.social svg { width: 19px; height: 19px; fill: currentColor; }
.social a:hover {
  color: var(--du-ink);
  background: rgba(22,21,15,.06);
  transform: translateY(-2px);
}

/* =========================================================================
   SEKTION 2 — Crunchtime
   ========================================================================= */
.ct {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1rem, 2.4vw, 1.6rem);
  max-width: 56rem;
  margin: 0 auto;
}
.ct__bridge {
  margin: 0 0 .3rem;
  font-size: clamp(1.02rem, 1.9vw, 1.32rem);
  line-height: 1.5;
  color: var(--ct-ink);
  max-width: 42rem;
  font-weight: 500;
}
.ct__bridge .hl {
  color: var(--ct-accent);
  font-weight: 600;
}
.ct__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.ct__sub {
  margin: 0;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  color: var(--ct-muted);
  line-height: 1.55;
}
.ct__btn {
  margin-top: .6rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  background: var(--ct-accent);
  color: #052033;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  letter-spacing: .005em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
  box-shadow: 0 10px 30px -12px rgba(255,255,51,.6);
}
.ct__btn svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease);
}
.ct__btn:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(255,255,51,.75); }
.ct__btn:hover svg { transform: translateX(4px); }

/* Footer mit Rechts-Links (dezent) */
.legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .55rem;
  padding-top: 1rem;
  font-size: .82rem;
  color: var(--ct-muted);
  z-index: 3;
}
.legal a {
  color: var(--ct-muted);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .2s var(--ease);
}
.legal a:hover { color: var(--ct-accent); }
.legal a:focus-visible {
  outline: 2px solid var(--ct-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================================
   ÜBERGANG — Die Naht (SVG-Overlay)
   ========================================================================= */
.seam {
  display: none;               /* erst mit .fx aktiv */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  /* Horizontale Linie: zu beiden Enden hin auslaufen lassen – die Naht wirkt
     so aus der Mitte heraus am kräftigsten und reißt von dort auf. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 13%, #000 87%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 13%, #000 87%, transparent 100%);
}
#seamPath {
  fill: none;
  stroke: var(--du-line);
  stroke-width: 2.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* =========================================================================
   Responsive
   ========================================================================= */
/* Schmale Viewports: eine Spalte, Porträt oben – wie die zentrierte Urfassung. */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    /* sonst strecken sich die beiden Zeilen über die volle Höhe und Foto und
       Text driften auseinander */
    align-content: center;
    justify-items: center;
    text-align: center;
    gap: clamp(1.4rem, 4vw, 2.2rem);
    max-width: 40rem;
  }
  .hero__figure {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: min(15rem, 40vw, 32vh);
  }
  .hero__text {
    grid-column: 1;
    grid-row: 2;
    align-items: center;
  }
  .hero__photo { border-radius: clamp(12px, 3vw, 18px); }
}

@media (max-width: 640px) {
  .br-desktop { display: none; }
  .social a { width: 40px; height: 40px; }
}

/* Reduzierte Bewegung: JS lässt den Overlay-/Pin-Effekt weg und stapelt die
   beiden Sektionen einfach untereinander (siehe main.js). */
