/* ============================================================
   Prodifystudio — Case-Study-Template
   Prodifystudio-Grammatik (Inter + Playfair-Eyebrows) mit
   Marken-Akzenten je Sample. Läuft komplett ohne GSAP.
   ============================================================ */

:root {
  --black: #0e0e0e;
  --white: #f5f5f3;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* --- Markenwelten --- */
body.case--stein {
  --c-bg: #e8e6e1; --c-surface: #fff; --c-ink: #171717;
  --c-muted: #5f5e5a; --c-accent: #a16207; --c-hair: #d5d3cc;
  --c-display: "Archivo", var(--font);
}
body.case--noir {
  --c-bg: #0c0a09; --c-surface: #141110; --c-ink: #f5f0e8;
  --c-muted: rgba(245, 240, 232, 0.64); --c-accent: #d4a843; --c-hair: rgba(245, 240, 232, 0.14);
  --c-display: "Playfair Display SC", var(--serif);
}
body.case--verite {
  --c-bg: #f6f4f1; --c-surface: #fff; --c-ink: #09090b;
  --c-muted: #56555b; --c-accent: #e0257f; --c-hair: #e0ded8;
  --c-display: var(--serif);
}
body.case--lumen {
  --c-bg: #0b0d10; --c-surface: #12151a; --c-ink: #f4f6f8;
  --c-muted: rgba(244, 246, 248, 0.64); --c-accent: #e11d2e; --c-hair: rgba(244, 246, 248, 0.13);
  --c-display: "Syncopate", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Weiche Seitenübergänge — muss in beiden Dokumenten deklariert sein */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
::view-transition-new(root) { animation: vt-in 0.45s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; }

/* ---------- Nav: zwei Pills wie auf der Landing ---------- */
.cnav {
  position: fixed; inset: 14px var(--pad) auto;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 100;
  pointer-events: none;
}
.cnav a {
  pointer-events: auto;
  background: rgba(24, 24, 26, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--white);
  border-radius: 999px;
  padding: 0.78rem 1.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.25s var(--ease);
}
.cnav a:hover { transform: translateY(-2px); }

/* ---------- Hero ---------- */
.chero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(5rem + 46px) var(--pad) clamp(4.5rem, 8vw, 6.5rem);
}
.chero .wrap { position: relative; z-index: 1; width: 100%; }
/* Riesiges Markenwort, oben vom Viewport angeschnitten — Bühnenbild wie
   auf der Landing, hier in der Akzentfarbe der Markenwelt */
.chero__ghost {
  position: absolute;
  left: 50%; top: min(-3.5rem, -6vw);
  transform: translateX(-50%);
  font-family: var(--c-display);
  font-size: clamp(8rem, 26vw, 24rem);
  line-height: 1;
  white-space: nowrap;
  color: var(--c-accent);
  opacity: 0.92;
  user-select: none; pointer-events: none;
  z-index: 0;
}
body.case--stein .chero__ghost { font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; }
body.case--noir .chero__ghost { letter-spacing: 0.08em; }
body.case--verite .chero__ghost { font-style: italic; font-weight: 500; }
body.case--lumen .chero__ghost {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(5rem, 17.5vw, 16rem);
  top: min(-2.2rem, -3.5vw);
}
/* Feines Korn auf den dunklen Bühnen */
body.case--noir .chero::before,
body.case--lumen .chero::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}
/* Scroll-Cue wie auf der Landing */
.chero__cue {
  position: absolute;
  left: 50%; bottom: 1.6rem;
  width: 1px; height: 44px;
  margin-left: -0.5px;
  background: linear-gradient(to bottom, transparent, var(--c-ink));
  opacity: 0.65;
  overflow: hidden;
  z-index: 1;
}
.chero__cue::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--c-bg);
  animation: ccue 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes ccue {
  0% { transform: translateY(0); }
  55%, 100% { transform: translateY(103%); }
}
.chero__eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-bottom: 1rem;
}
.chero__title {
  font-family: var(--c-display);
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 1.6rem;
  overflow-wrap: anywhere;
}
body.case--noir .chero__title { font-weight: 400; letter-spacing: 0.05em; }
body.case--verite .chero__title { font-style: italic; font-weight: 500; }
body.case--lumen .chero__title {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.2rem, 8vw, 7rem);
}
body.case--stein .chero__title { text-transform: uppercase; }
.chero__lead {
  max-width: 44rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.45;
  color: var(--c-muted);
  margin-bottom: 1.8rem;
}
.chero__meta { display: flex; gap: 0.7rem; flex-wrap: wrap; list-style: none; }
.chero__meta li {
  font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  border: 1px solid var(--c-hair);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  color: var(--c-muted);
}
.chero__meta li.is-accent { color: var(--c-accent); border-color: currentColor; }

/* ---------- Textblöcke ---------- */
.cblock { padding: clamp(4rem, 9vw, 7.5rem) var(--pad); }
.cblock--line { border-top: 1px solid var(--c-hair); }
.cblock__eyebrow {
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.cblock__title {
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.12;
  max-width: 24ch;
  margin-bottom: 1.2rem;
}
.cblock__text {
  max-width: 46rem;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: var(--c-muted);
}

/* nummerierte Entscheidungs-Zeilen (wie Prozess auf der Landing) */
.crows { list-style: none; margin-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--c-hair); }
.crow {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding: clamp(1.4rem, 2.6vw, 2rem) 0;
  border-bottom: 1px solid var(--c-hair);
}
.crow__num {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--c-accent);
}
.crow h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  font-weight: 650; letter-spacing: -0.015em;
  margin-bottom: 0.35rem;
}
.crow p { color: var(--c-muted); max-width: 44rem; }

/* ---------- Design-Tokens ---------- */
.ctokens { padding: clamp(4rem, 9vw, 7.5rem) var(--pad); border-top: 1px solid var(--c-hair); }
.ctokens__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}
.specimen {
  background: var(--c-surface);
  border: 1px solid var(--c-hair);
  border-radius: 18px;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 1.5rem;
  min-height: 260px;
}
.specimen__glyph {
  font-family: var(--c-display);
  font-size: clamp(4.5rem, 9vw, 8rem);
  line-height: 1;
}
body.case--verite .specimen__glyph { font-style: italic; }
.specimen__label { font-size: 0.85rem; color: var(--c-muted); }
.specimen__label strong { color: var(--c-ink); font-weight: 600; }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.8rem, 1.5vw, 1.2rem); }
.swatch {
  border-radius: 14px;
  border: 1px solid var(--c-hair);
  min-height: 110px;
  display: flex; align-items: flex-end;
  padding: 0.9rem;
}
.swatch span {
  font-size: 0.68rem; font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.85);
  color: #17171a;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

/* ---------- Live-Preview (Tablet wie auf der Landing) ---------- */
.cpreview {
  padding: clamp(4rem, 9vw, 7.5rem) var(--pad);
  border-top: 1px solid var(--c-hair);
}
.tablet {
  position: relative;
  width: min(1060px, 100%);
  margin: clamp(1.5rem, 3vw, 2.5rem) auto 0;
  background: #101010;
  border-radius: clamp(18px, 2.4vw, 30px);
  padding: clamp(9px, 1.1vw, 15px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 50px 110px -30px rgba(0, 0, 0, 0.45);
}
.tablet__screen {
  position: relative; overflow: hidden;
  border-radius: clamp(10px, 1.4vw, 17px);
  aspect-ratio: 16 / 10;
  background: #0c0c0e;
}
.tablet__screen iframe {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 900px;
  border: 0; background: #0c0c0e;
  transform-origin: 0 0; display: block;
  pointer-events: none;
}
.tablet__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}
.tablet__play {
  z-index: 2;
  position: absolute;
  right: clamp(12px, 1.6vw, 22px); bottom: clamp(12px, 1.6vw, 22px);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(18, 18, 18, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: transform 0.25s var(--ease), background-color 0.25s;
}
.tablet__play:hover { transform: scale(1.08); background: rgba(18, 18, 18, 0.8); }
.tablet__play svg { width: 15px; height: 15px; fill: #fff; }
.tablet__play .i-play { display: none; }
.tablet__play.paused .i-pause { display: none; }
.tablet__play.paused .i-play { display: block; }
.cpreview__note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: 1.2rem;
}
.cpreview__note a { border-bottom: 1px solid currentColor; }

/* ---------- Full-Bleed-Bild mit Parallax ---------- */
.cimg {
  position: relative;
  overflow: hidden;
  height: clamp(46vh, 68vw, 78vh);
}
.cimg img {
  position: absolute;
  left: 0; top: -12%;
  width: 100%; height: 124%;
  object-fit: cover;
  will-change: transform;
}
.cimg__gl {
  position: absolute;
  left: 0; top: -12%;
  width: 100%; height: 124%;
  will-change: transform;
  pointer-events: none;
}
.cimg figcaption {
  position: absolute;
  left: var(--pad); bottom: 1.1rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: #fff;
  background: rgba(14, 14, 14, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

/* ---------- Marken-Marquee ---------- */
.cmarquee {
  overflow: hidden;
  border-top: 1px solid var(--c-hair);
  border-bottom: 1px solid var(--c-hair);
  padding: clamp(1.2rem, 2.4vw, 2rem) 0;
  white-space: nowrap;
}
.cmarquee__track {
  display: inline-flex;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: baseline;
  animation: cmarq 26s linear infinite;
}
.cmarquee span {
  font-family: var(--c-display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
  color: var(--c-accent);
}
body.case--stein .cmarquee span { font-weight: 800; text-transform: uppercase; }
body.case--verite .cmarquee span { font-style: italic; }
body.case--lumen .cmarquee span { font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 3.6vw, 3rem); }
.cmarquee i {
  font-style: normal;
  font-family: var(--font);
  font-size: 0.5em;
  color: var(--c-muted);
}
@keyframes cmarq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Pull-Quote ---------- */
.cquote {
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad);
  border-top: 1px solid var(--c-hair);
}
.cquote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.28;
  max-width: 26ch;
  text-wrap: balance;
}
.cquote blockquote em { color: var(--c-accent); font-style: inherit; }
.cquote figcaption {
  margin-top: 1.4rem;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--c-muted);
}

/* ---------- Stats ---------- */
.cstats {
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--pad);
  border-top: 1px solid var(--c-hair);
}
.cstats__row {
  display: flex; gap: clamp(2rem, 6vw, 5rem);
  flex-wrap: wrap;
}
.cstat { display: flex; flex-direction: column; gap: 0.3rem; }
.cstat__num {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent);
}
.cstat__num sup { font-size: 0.45em; font-weight: 600; }
.cstat__label { font-size: 0.9rem; color: var(--c-muted); max-width: 14rem; }

/* ---------- CTA + Footer ---------- */
.ccta {
  padding: clamp(5rem, 10vw, 8rem) var(--pad);
  border-top: 1px solid var(--c-hair);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.ccta h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 650; letter-spacing: -0.025em; line-height: 1.06;
}
.btn-rect {
  display: inline-block;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 0.82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 1.05rem 1.9rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.btn-rect:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -14px rgba(0, 0, 0, 0.4); }
.ccta__next { font-size: 0.85rem; color: var(--c-muted); }
.ccta__next a { color: var(--c-ink); border-bottom: 1px solid currentColor; }

.cfooter {
  border-top: 1px solid var(--c-hair);
  padding: 1.6rem var(--pad) 2rem;
  font-size: 0.78rem;
  color: var(--c-muted);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.cfooter a:hover { color: var(--c-ink); }

/* ---------- Reveals (IO-basiert, ohne GSAP) ---------- */
html.js [data-r] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js [data-r].r-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  /* Hero-Lücke schließen: Ghost größer, Bühne kompakter */
  .chero { min-height: 88svh; }
  .chero__ghost { font-size: clamp(11rem, 52vw, 16rem); top: min(-2rem, -9vw); }
  body.case--lumen .chero__ghost { font-size: clamp(6rem, 26vw, 9rem); }
  .ctokens__grid { grid-template-columns: 1fr; }
  .crow { grid-template-columns: 3rem 1fr; }
  .tablet__screen { aspect-ratio: 3 / 4; }
  .cstats__row { gap: 1.6rem; flex-direction: column; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html.js [data-r] { opacity: 1; transform: none; }
  .cmarquee__track { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .chero__cue::after { animation: none; transform: translateY(103%); }
}
