/* ============================================================
   PLAYGROUND — Design Refinement Layer v1
   Global rhythm, typography, motion und spacing normalization.
   Wirkt subtil auf alle Seiten. Überschreibt inkonsistente
   Inline-Styles und harmonisiert die visuelle Sprache.
   ============================================================ */

/* ---------- 1. TYPOGRAFIE-SKALA — 7 Stufen ---------- */
:root {
  /* Font-Sizes als Design-Tokens */
  --fs-hero: clamp(56px, 10vw, 140px);
  --fs-display: clamp(44px, 7vw, 88px);
  --fs-h1: clamp(38px, 5.5vw, 64px);
  --fs-h2: clamp(28px, 4vw, 44px);
  --fs-h3: clamp(22px, 2.6vw, 28px);
  --fs-body: clamp(15px, 1.15vw, 17px);
  --fs-small: clamp(12px, .95vw, 13px);
  --fs-eyebrow: 11px;

  /* Line-Heights */
  --lh-tight: 0.9;
  --lh-headline: 1.05;
  --lh-body: 1.6;

  /* Letter-Spacing */
  --ls-hero: -.035em;
  --ls-display: -.03em;
  --ls-h1: -.025em;
  --ls-h2: -.02em;
  --ls-body: -.005em;
  --ls-eyebrow: .32em;

  /* Rhythm-Skala (Section-Padding) */
  --sp-xs: 40px;
  --sp-s: 64px;
  --sp-m: 96px;
  --sp-l: 128px;
  --sp-xl: 160px;

  /* Container-Widths */
  --container-narrow: 720px;
  --container-editorial: 900px;
  --container-standard: 1200px;
  --container-wide: 1400px;

  /* Cinematic Easings */
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  --ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-natural: cubic-bezier(.2, .9, .2, 1);
}

/* Font-Rendering global schöner */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Headlines global auf die Skala normalisieren — subtile Overrides */
h1.disp,
h2.disp,
h3.disp {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800;
  line-height: var(--lh-headline);
  letter-spacing: var(--ls-h1);
  text-wrap: balance;
}

/* Eyebrow-Konsistenz */
.eyebrow,
.eb,
.b4-panel-head .kicker + .eb,
.pr-hero .eb {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: var(--fs-eyebrow) !important;
  letter-spacing: var(--ls-eyebrow) !important;
  text-transform: uppercase;
}

/* Body-Text mehr Atmen */
.muted,
p.muted {
  line-height: var(--lh-body);
  text-wrap: pretty;
}

/* Bessere Zeilenumbrüche in Headlines */
.disp,
.uu-hero h1,
.b4-cover h2,
.pr-hero h1,
.mag-feature-txt h2 {
  text-wrap: balance;
}


/* ---------- 2. SECTION-SPACING RHYTHMUS ---------- */
/* Standard-Sections bekommen 3 klare Größen: s/m/l */
section.wrap[style*="padding:112px 0"],
section.wrap[style*="padding:120px 0"] {
  padding: var(--sp-l) 20px !important;
}

section.wrap[style*="padding:80px 0"] {
  padding: var(--sp-m) 20px !important;
}

section.wrap[style*="padding:60px"] {
  padding: var(--sp-s) 20px !important;
}


/* ---------- 3. HOVER-STATES KONSOLIDIEREN ---------- */
/* Alle Card-Hover: nur subtle lift, kein Scale, kein Rotate */
.card:hover,
.pg-testi:hover,
.pr-card:hover,
.b4-case:hover,
.br-case:hover,
.mag-feature-img:hover,
.uu2-people-img:hover {
  transform: translateY(-4px) !important;
}

/* Case-Bilder haben Ken-Burns beim Hover — smoother machen */
.b4-case,
.pr-card-img,
.mag-feature-img {
  overflow: hidden;
}
.b4-case img,
.pr-card-img img,
.mag-feature-img img {
  transition: transform 900ms var(--ease-out-expo) !important;
}
.b4-case:hover img,
.pr-card-img:hover img,
.mag-feature-img:hover img {
  transform: scale(1.05) !important;
}

/* Alle CTAs (.pill) — einheitlicher smooth hover */
.pill {
  transition: transform 250ms var(--ease-out-quart),
              box-shadow 350ms var(--ease-out-quart) !important;
}
.pill:hover {
  transform: translateY(-2px) !important;
}


/* ---------- 4. FOCUS-STATES (a11y) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--lime, #D6FE09);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ---------- 5. MOBILE PADDING/ATMUNG ---------- */
@media (max-width: 640px) {
  section.wrap,
  .uu-hero,
  .uu-mani,
  .uu-diff,
  .uu-vals,
  .uu-fam,
  .uu-cta,
  .b4-hero,
  .b4-panels,
  .br-hero,
  .pr-hero,
  .pr-why,
  .pr-cards,
  .pr-cta,
  .mag-feature,
  .mag-nl,
  .pg-modes,
  .pg-quotes,
  .pg-clients {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* Reduzierte Section-Höhen auf Mobile */
  section.wrap[style*="padding:112px"],
  section.wrap[style*="padding:120px"],
  section.wrap[style*="padding:140px"],
  section.wrap[style*="padding:160px"] {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }

  /* Headlines auf Mobile nie riesig */
  .uu-hero h1,
  .b4-cover h2,
  .pr-hero h1,
  .uu-cta h2,
  .br-hero h1,
  .b4-hero h1 {
    font-size: clamp(40px, 10vw, 64px) !important;
    line-height: 1 !important;
  }

  /* Container Padding-Overrides für Sticky-Nav Kollisionen */
  .b4-tabs {
    padding: 16px 20px !important;
  }
  .b4-tabs-wrap {
    gap: 6px !important;
  }
  .b4-tab {
    padding: 12px 18px !important;
    font-size: 13px !important;
  }
  .b4-tab .n {
    display: none;
  }
}


/* ---------- 6. STAGGERED REVEALS mit Cinematic-Curve ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out-expo),
              transform 900ms var(--ease-out-expo);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .b4-case img,
  .pr-card-img img {
    transition: none !important;
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* ---------- 7. HYPER-DETAIL POLISH ---------- */

/* Bessere Selection */
::selection {
  background: var(--lime, #D6FE09);
  color: #000;
  text-shadow: none;
}

/* Scrollbar (Webkit) subtiler */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(239, 239, 239, .12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(239, 239, 239, .22);
}

/* Bilder default smoother rendering */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Video-Loading verhindert flash */
video {
  background: #000;
}

/* Konsistente Rounded-Corners auf allen Cards — 22px als System */
.pg-testi,
.pg-mode,
.pr-card,
.br-case,
.mag-feature-img,
.uu2-people-img,
.uu-fam-img,
.pr-why-img {
  border-radius: 22px !important;
}

/* Sticky Nav — smoother backdrop */
.nav.scrolled {
  background: rgba(0, 0, 0, .78) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
}

/* CTA-Section: mehr Atem drum herum */
.uu-cta,
.pr-cta,
.b4-global-cta,
.uu2-cta {
  padding-top: var(--sp-xl) !important;
  padding-bottom: var(--sp-xl) !important;
}
@media (max-width: 640px) {
  .uu-cta,
  .pr-cta,
  .b4-global-cta,
  .uu2-cta {
    padding-top: 96px !important;
    padding-bottom: 96px !important;
  }
}

/* Kleine editorial Verbesserung: max-width für Fließtext */
.uu-hero .lead,
.br-hero .lead,
.b4-hero .lead,
.pr-hero .lead {
  max-width: 620px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.uu-hero,
.br-hero,
.b4-hero,
.pr-hero {
  text-align: center;
}
.uu-hero p.lead {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left;
  max-width: 640px !important;
}


/* ---------- 8. SEKTIONS-ÜBERGÄNGE ---------- */
/* Subtle Divider zwischen benachbarten Dark-Sections mit gleicher BG */
section + section:not(.b4-panels *):not([class*="bg-"]) {
  position: relative;
}

/* Kein doppelter Border zwischen Sections */
.br-services + .br-cases,
.uu-mani + .uu-diff,
.pg-quotes + .pg-modes {
  border-top: none !important;
}


/* ---------- 9. NAV VERBESSERUNGEN ---------- */
/* Nav-Item Hover: smoother, keine hektischen shadow-flips */
.nav .links a {
  transition: color 300ms var(--ease-out-quart),
              background 300ms var(--ease-out-quart) !important;
}
.nav .links a:hover {
  box-shadow: none !important;
}


/* ---------- 10. SPECIFIC PAGE POLISH ---------- */
/* Preise-Seite: Preis-Nummern etwas kompakter */
.pr-card .price .num {
  font-size: clamp(28px, 3vw, 36px) !important;
}

/* Magazin: Feature-Article gleicher Radius wie Cards */
.mag-feature-img {
  border-radius: 24px !important;
}

/* Branchen: Cover-Headline nicht zu groß auf Mid-Screens */
@media (min-width: 641px) and (max-width: 960px) {
  .b4-cover h2 {
    font-size: clamp(48px, 7vw, 80px) !important;
  }
}

/* Founder-Team: Grid enger, harmonischer */
.teamgrid3 {
  gap: 18px !important;
}
@media (min-width: 720px) {
  .teamgrid3 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}


/* ---------- 11. SUBTILE MICRO-ANIMATIONS ---------- */
/* Fade beim initial-Load, sanft */
@keyframes pgFadeInBody {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body {
  animation: pgFadeInBody 600ms var(--ease-out-quart) both;
}

/* Nav-Item Underline-Reveal */
.nav .links a::after {
  content: "";
  display: block;
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 400ms var(--ease-out-quart);
  opacity: .5;
}
.nav .links a:hover::after {
  transform: scaleX(1);
}
.nav .links a.pill::after {
  display: none;
}
