/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f7f6f5;
  --dark:     #151515;
  --grey:     #a5a5a5;
  --white:    #ffffff;
  --radius:   3px;
  --font-body: 'DM Sans', sans-serif;
  --font-head: 'Darker Grotesque', sans-serif;
  --max-w:    393px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 16px;
  /* Figma: DM Sans mit opsz 14 → optimiert für kleine Größen */
  font-variation-settings: 'opsz' 14;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow-x: hidden;
}

/* Darker Grotesque: kein opsz, nur wght */
h1, h2, h3, .section__label, .stats__number,
.nav-overlay__link, .marquee__track span,
.footer__cta-text, .project-card__title,
.services__list li a, .um-heading {
  font-variation-settings: normal;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* ============================================================
   HEADER
   — transparent im Hero, Milchglas beim Scrollen
   — Logo: Visual Mark → Full Logo beim Scrollen
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 29px 20px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* Beim Scrollen: Milchglas */
.header.is-scrolled {
  background: rgba(247, 246, 245, 0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Logo-Container */
.header__logo {
  display: flex;
  align-items: center;
  gap: 0;
}

/* Visual Mark — immer sichtbar, wird weiß wenn Menü offen */
.logo--mark {
  width: 41px;
  height: 33px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: filter 0.3s ease;
}

/* Menü offen → Mark wird weiß */
.header.menu-is-open .logo--mark {
  filter: brightness(0) invert(1);
}

/* Text-Wrapper: overflow:hidden + max-width für Wipe-Effekt.
   Negatives margin-left = Text startet HINTER dem Icon */
.logo__text-wrap {
  overflow: hidden;
  max-width: 0;
  /* Startet überlappt mit dem Icon → schiebt sich heraus */
  margin-left: -8px;
  transition: max-width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              margin-left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Menü offen → Text gleitet aus dem Icon heraus */
.header.menu-is-open .logo__text-wrap {
  /* textlogo.svg viewBox 789.23×300.42 → bei 33px Höhe: ~87px breit */
  max-width: 100px;
  margin-left: 8px;
}

/* Text-Logo: gleiche Höhe wie Visual Mark (33px) für exakte Proportionen */
.logo--text {
  height: 33px;
  width: auto;
  display: block;
  flex-shrink: 0;
  /* SVG fill:#fff passt auf schwarzem Overlay */
}

.header__menu {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* CSS Burger-Bars: 3px Stärke, exakt wie Figma SVG (stroke-width: 3) */
.header__menu-bar {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--dark);
  border-radius: 1.5px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center center;
  transition:
    top    0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease;
}

/* Bar-Positionen: center des Buttons (15px) ± 4.27px (halber Abstand aus Figma viewBox) */
.header__menu-bar:first-child { top: 10px; }
.header__menu-bar:last-child  { top: 17px; }

/* Geöffnet → X: Beide Bars in Mitte, je ±45° */
.header__menu.is-open .header__menu-bar:first-child {
  top: 13px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
}
.header__menu.is-open .header__menu-bar:last-child {
  top: 13px;
  transform: translateX(-50%) rotate(-45deg);
  background: #fff;
}

/* Logo-Link: keine Unterstreichung */
.header__logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* ============================================================
   NAV OVERLAY
   — Figma: bg:#0a0a0a, Logo weiß oben links, Links weiß 40px
   ============================================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 98; /* Header (z:100) liegt darüber → Logo bleibt sichtbar */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 29px 48px;

  /* Startzustand: unsichtbar + leicht nach oben verschoben */
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Weißes Logo — Figma: left:29 top:80, Gruppe 16+17+18 */
.nav-overlay__logo {
  margin-bottom: 56px;
}

.nav-overlay__logo img {
  height: 32px;
  width: auto;
  /* SVG ist weiß → passt auf dunklem Hintergrund */
}

/* Nav-Links */
.nav-overlay__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Staggered Einblend-Animation pro Link */
.nav-overlay__links li {
  overflow: hidden;
}

.nav-overlay__link {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  color: #fff;
  line-height: 1;
  display: block;
  padding: 6px 0;
  text-decoration: none;
  /* Einfahren beim Öffnen */
  transform: translateY(110%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Links einfahren wenn Overlay offen */
.nav-overlay.is-open .nav-overlay__link { transform: translateY(0); }

/* Staggered Delay */
.nav-overlay.is-open .nav-overlay__links li:nth-child(1) .nav-overlay__link { transition-delay: 0.05s; }
.nav-overlay.is-open .nav-overlay__links li:nth-child(2) .nav-overlay__link { transition-delay: 0.10s; }
.nav-overlay.is-open .nav-overlay__links li:nth-child(3) .nav-overlay__link { transition-delay: 0.15s; }
.nav-overlay.is-open .nav-overlay__links li:nth-child(4) .nav-overlay__link { transition-delay: 0.20s; }
.nav-overlay.is-open .nav-overlay__links li:nth-child(5) .nav-overlay__link { transition-delay: 0.25s; }

/* ── Text-Roll Hover ──────────────────────────────────────── */
/* roll-clip: der sichtbare Ausschnitt — exakt 1em, kein Pixel zu viel */
.roll-clip {
  display: block;
  overflow: hidden;
  height: 1em;        /* = font-size × 1 → Klon startet genau am unteren Rand */
  line-height: 1;
}

/* roll-text: bewegt sich beim Hover nach oben */
.roll-text {
  display: block;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Klon: steht direkt unter dem sichtbaren Text */
.roll-text::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
}

/* Hover: Original raus, Klon rein */
.nav-overlay__link:hover .roll-text {
  transform: translateY(-100%);
}

/* ============================================================
   HERO
   ============================================================ */
/* ============================================================
   HERO
   — Figma: Section 393×854 / Bild left:-92 top:-172 578×1026
   — Gradient: top:725 height:129
   — Scroll down: left:152 top:725 / Pfeil left:245.53 top:729
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 854px;
  overflow: hidden;
  background: var(--bg);
}

/* Hintergrund-Rechteck links oben aus Figma */
.hero::before {
  content: '';
  position: absolute;
  left: -116px;
  top: 0;
  width: 170px;
  height: 120px;
  background: #f5f6f3;
  z-index: 0;
}

.hero__image-wrap {
  position: absolute;
  top: -172px;
  left: -92px;
  width: 578px;
  height: 1026px;
  z-index: 1;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient — Figma: top:725 height:129 */
.hero__gradient {
  position: absolute;
  top: 725px;
  left: 0;
  width: 100%;
  height: 129px;
  background: linear-gradient(to bottom, rgba(247,246,245,0), #f7f6f5);
  pointer-events: none;
  z-index: 2;
}

/* Scroll down — Figma: left:152 top:725 */
.hero__scroll {
  position: absolute;
  left: 152px;
  top: 725px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--dark);
  white-space: nowrap;
  z-index: 3;
}

/* Pfeil — Figma: 7.945×11.084 */
.hero__arrow {
  width: 8px;
  height: 11px;
  object-fit: contain;
}

/* ============================================================
   WORK STRIP
   ============================================================ */
.work-strip {
  padding: 0 9px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.work-strip__link {
  display: grid;
  grid-template-columns: 98px 1fr 98px;
  gap: 8px;
  cursor: pointer;
}

.work-strip__link img,
.work-strip__placeholder {
  width: 100%;
  height: 97px;
  object-fit: cover;
  border-radius: 2px;
}

.work-strip__placeholder {
  background: #e0dedd;
}

.work-strip__main {
  height: 97px !important;
}

.work-strip__last {
  position: relative;
}
.work-strip__last img:first-child {
  width: 100%;
  height: 97px;
  object-fit: cover;
}
.work-strip__arrow {
  position: absolute !important;
  bottom: 6px;
  right: 8px;
  width: 20px !important;
  height: auto !important;
}

/* ============================================================
   SECTIONS SHARED
   ============================================================ */
.section { padding: 40px 29px; }

.section__label {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 24px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__photo-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto 24px;
  width: 253px;
  height: 367px;
}

.about__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.about__cta {
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  line-height: 1.4;
  display: inline-block;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects { padding-top: 40px; }

.project-card {
  margin-bottom: 32px;
}

.project-card__img {
  width: 100%;
  height: 267px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.project-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 4px;
}

.project-card__type {
  font-weight: 600;
  font-size: 16px;
  color: var(--grey);
}

.projects__more {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn--dark {
  background: var(--dark);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 20px;
}

/* ============================================================
   LOGO-BAND (Kundenlogos Karussell)
   ============================================================ */
.logoband {
  overflow: hidden;
  padding: 32px 0;
  background: var(--bg);
}

.logoband__track {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  animation: logoband-scroll 22s linear infinite;
  white-space: nowrap;
}

.logoband__logo {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0); /* alle Logos einheitlich schwarz */
}

/* Gruppe 30 hat bereits schwarz+weiß — kein brightness(0), sonst wird alles ein schwarzer Block */
.logoband__logo[src="logo-band-5.svg"] {
  height: 44px;
  filter: none;
}

@keyframes logoband-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
}

.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  animation: marquee 20s linear infinite;
}

.marquee__track span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 80px;
  line-height: 1;
  white-space: nowrap;
}

.marquee__logo {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  /* mokkalogo.svg ist bereits dunkel — kein Filter nötig */
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Work-strip styles no longer needed but kept for safety */

/* ============================================================
   SERVICES
   ============================================================ */
.services__text {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.services__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 40px;
}

.services__list li a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  text-decoration: underline;
  line-height: 1.5;
}

/* Stats */
.stats {
  display: flex;
  gap: 0;
  justify-content: space-between;
  padding-top: 16px;
}

.stats__item {
  display: flex;
  flex-direction: column;
}

.stats__number {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  overflow: hidden;   /* Clip für Roll-Animation */
}

/* Inner span: wird per JS eingefügt, animiert von unten nach oben */
.counter__inner {
  display: block;
}

.stats__label {
  font-weight: 600;
  font-size: 16px;
  margin-top: 4px;
  line-height: 1.3;
}

/* ============================================================
   FOOTER — Block-Animation
   ============================================================ */
/* Footer als ganzer Block: scroll-anim übernimmt opacity+translateY,
   aber wir setzen einen festen Delay damit er nach dem Marquee kommt */
.footer.scroll-anim {
  transition-delay: 0ms !important;
  transition-duration: 0.7s;
}

/* ============================================================
   FOOTER
   — Figma: Social left:29 top:3405 / Address right:29 top:3407
   — CTA text left:29 top:3484 / Button left:29 top:3558
   — Impressum right top:3562 / Datenschutz right top:3580
   ============================================================ */
.footer {
  background: var(--bg);
  padding: 24px 29px 40px;
}

/* Social (links) + Adresse (rechts) */
.footer__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.footer__social {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__social a {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.55;
}

.footer__address {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.55;
  text-align: right;
}

/* CTA Heading — Figma: font-size:24 bold underlined */
.footer__cta-text {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.35;
  margin-bottom: 36px;
  color: var(--dark);
}

/* Button + Impressum nebeneinander */
.footer__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.footer__legal-link {
  font-weight: 600;
  font-size: 16px;
}

/* Datenschutz rechts */
.footer__datenschutz {
  display: flex;
  justify-content: flex-end;
}

/* ============================================================
   ANIMATIONS & FADE-IN / SCROLL-ANIM
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Scroll-driven fade-up (via IntersectionObserver in main.js) */
.scroll-anim {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-anim.in-view {
  opacity: 1;
  transform: none;
}

/* ============================================================
   SHARED FORM STYLES (Kontakt-Overlay + Marketing Check + Kontakt-Seite)
   ============================================================ */
.mc-form {
  display: flex;
  flex-direction: column;
}

.mc-field {
  position: relative;
  padding-top: 8px;
  border-bottom: 1px solid var(--dark);
  margin-bottom: 0;
}

.mc-field + .mc-field { margin-top: 24px; }

.mc-field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--grey);
  margin-bottom: 4px;
  pointer-events: none;
}

.mc-field input,
.mc-field textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--dark);
  outline: none;
  padding: 4px 0 8px;
  resize: none;
  -webkit-appearance: none;
}

.mc-field--textarea textarea { min-height: 80px; }

.mc-field:focus-within label { color: var(--dark); }

.mc-submit {
  width: 100%;
  height: 40px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  margin-top: 32px;
  transition: background 0.25s ease;
}

.mc-submit:hover { background: #333; }

.mc-mail-alt {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--grey);
  text-align: center;
  line-height: 1.5;
  margin: 24px 0 0;
}

.mc-mail-alt a {
  color: var(--grey);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Kontakt-Overlay Panel ─────────────────────────────────── */
#kt-panel {
  padding: 80px 29px 60px;
}

#kt-panel .kt-intro {
  padding: 0 0 40px;
}

#kt-panel .kt-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: var(--dark);
  margin: 0 0 24px;
}

#kt-panel .kt-address {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.75;
  color: var(--dark);
  font-style: normal;
}

#kt-panel .kt-address strong { font-weight: 700; }
#kt-panel .kt-address a {
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#kt-panel .kt-form-wrap { padding: 0; }
