/* Mehrwerk Theme – Main Stylesheet */

:root {
  --navy: #141B4D;
  --navy-deep: #0A0E2A;
  --cyan: #1BB8F0;
  --cyan-deep: #0EA4DA;
  --bg: #FAFAF7;
  --bg-alt: #F2F1EC;
  --ink: #0A0E2A;
  --ink-soft: #4A4E6B;
  --line: rgba(10, 14, 42, 0.12);
  --line-strong: rgba(10, 14, 42, 0.28);
  --accent: #1BB8F0; /* Überschrieben per Customizer */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
.display {
  font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-wrap: balance;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* Container */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 48px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* Section */
section { position: relative; padding: 120px 0; }
@media (max-width: 768px) { section { padding: 72px 0; } }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn svg { transition: transform 0.2s ease; }
.btn:hover svg { transform: translate(2px, -2px); }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  backdrop-filter: blur(12px);
  background: rgba(250, 250, 247, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* custom-logo-link = WP-eigenes <a> von the_custom_logo() UND unser Fallback */
.nav-inner > .custom-logo-link { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.nav-inner > .custom-logo-link img,
.nav-inner > .custom-logo-link .custom-logo { height: 64px !important; width: auto !important; max-width: none; display: block; }
.nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
/* wp_nav_menu() erzeugt ul > li > a – diese normalisieren */
.nav-links ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; padding: 0; }
.nav-links a { position: relative; padding: 6px 0; color: var(--ink); }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--ink); transition: width 0.25s ease; }
.nav-links a:hover::after { width: 100%; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-cta { display: none; } }

/* ── Mobile Kontakt-Button (zwischen Logo und Burger) ─────────────────────── */
.nav-contact-mobile {
  display: none;
}
@media (max-width: 900px) {
  .nav-contact-mobile {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--bg);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
    margin-left: auto; /* schiebt Button + Burger an den rechten Rand */
    margin-right: 12px;
  }
  .nav-contact-mobile:hover { background: var(--accent); color: var(--ink); }
}

/* ── Burger Button ────────────────────────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.nav-burger:hover { background: var(--bg-alt); }
.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) { .nav-burger { display: flex; } }

/* ── Mobile Nav Overlay ───────────────────────────────────────────────────── */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 247, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
  padding-top: 100px;
  padding-bottom: 40px;
  overflow-y: auto;
}
.nav-mobile.open { display: flex; align-items: center; justify-content: center; }
.nav-mobile nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 32px;
}
.nav-mobile nav a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 8vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 8px 0;
  transition: color 0.2s ease;
  text-align: center;
}
.nav-mobile nav a:hover { color: var(--accent); }
.nav-mobile-cta {
  font-family: 'Geist', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
  color: var(--bg) !important;
  margin-top: 24px;
  padding: 16px 32px !important;
}

/* ── Logo Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner > .custom-logo-link img,
  .nav-inner > .custom-logo-link .custom-logo { height: 40px !important; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { padding: 180px 0 120px; }
/* Hero: 2-Spalten-Grid (Headline links, Terminal rechts) */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1100px) { .hero-grid { gap: 40px; } }
@media (max-width: 900px)  { .hero-grid { grid-template-columns: 1fr; } }
/* Terminal-Spalte etwas schmaler halten */
.hero-right { max-width: 480px; width: 100%; justify-self: end; }
.hero-headline { font-size: clamp(48px, 8.5vw, 128px); display: flex; flex-direction: column; hyphens: none; overflow-wrap: normal; }
.hero-line { overflow: hidden; display: block; }
.hero-word {
  display: inline-block;
  transform: translateY(110%);
  animation: riseIn 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-word.italic { font-style: italic; font-weight: 400; }
.hero-word.accent { color: var(--accent); }
@keyframes riseIn { to { transform: translateY(0); } }
.hero-arrow {
  display: inline-block;
  color: var(--accent);
  transform: translateY(110%) rotate(-10deg);
  animation: riseInRot 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.6s;
}
@keyframes riseInRot { to { transform: translateY(0) rotate(0deg); } }
.hero-cta { display: flex; gap: 12px; margin-top: 48px; opacity: 0; animation: fadeIn 0.8s ease forwards; animation-delay: 1s; }
.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 1.2s;
}
@keyframes fadeIn { to { opacity: 1; } }
.hero-meta-block p:first-child { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.12em; }
.hero-meta-block p:last-child { font-size: 16px; max-width: 360px; }
@media (max-width: 768px) {
  .hero { padding: 140px 0 80px; }
  .hero-meta { grid-template-columns: 1fr; gap: 24px; }
  .hero-arrow svg { width: 48px !important; height: 48px !important; }
  .contact-title svg { width: 40px !important; height: 40px !important; }
}
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
}

/* ── Terminal Widget ────────────────────────────────────────────────────────── */
.hero-right {
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
  animation-delay: 0.8s;
}
.mw-terminal {
  background: #0d1117;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 32px 72px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.04);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.mw-terminal-bar {
  background: #1c2128;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mw-terminal-dots { display: flex; gap: 7px; flex-shrink: 0; }
.mw-dot { width: 13px; height: 13px; border-radius: 999px; }
.mw-dot-red    { background: #ff5f57; }
.mw-dot-yellow { background: #febc2e; }
.mw-dot-green  { background: #28c840; }
.mw-terminal-title { font-size: 12px; color: rgba(255,255,255,0.45); flex: 1; text-align: center; letter-spacing: 0.03em; }
.mw-terminal-body { padding: 24px 28px; min-height: 220px; }
.mw-terminal-code { color: #e6edf3; white-space: pre; margin: 0; font-size: 13px; line-height: 1.75; }
/* Syntax-Farben (GitHub-Dark-Stil) */
.t-kw   { color: #ff7b72; }   /* rot      – const / let */
.t-fn   { color: #d2a8ff; }   /* lila     – Variablenname */
.t-prop { color: #79c0ff; }   /* blau     – Eigenschaften */
.t-str  { color: #a5d6ff; }   /* hellblau – Strings */
.t-num  { color: #f2cc60; }   /* gelb     – Zahlen */
.t-op   { color: #8b949e; }   /* grau     – Operatoren / Klammern */
/* Blinkender Cursor */
.mw-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: mwBlink 1s step-end infinite;
}
@keyframes mwBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.mw-terminal-footer {
  background: #161b22;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.06);
  letter-spacing: 0.04em;
}
.mw-terminal-sep { opacity: 0.3; }
.mw-terminal-branch { color: #28c840; }

/* ── Terminal Scene + schwebende Badges ─────────────────────────────────────── */
.terminal-scene {
  position: relative;
  /* Padding = Überhang der Badges über die Terminal-Ecken */
  padding: 22px 22px 32px;
}
/* Badge-Wrapper: auf Desktop absolut über das Terminal gelegt */
.term-badges-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none; /* Klicks gehen durch zum Terminal */
}
/* Schwebende Badge-Karte – Plextec-Stil: fast weiß, minimaler Blur */
.term-badge {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 2px 16px rgba(10,14,42,0.08), 0 0 0 0.5px rgba(10,14,42,0.04);
  white-space: nowrap;
  z-index: 10;
}
/* Floating-Animationen */
@keyframes termFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}
/* Plextec-Anordnung: Badges überlappen die Ecken des Terminals */
.term-badge--tr {
  top: 0; right: 0;
  animation: termFloat 3.4s ease-in-out infinite;
}
.term-badge--bl {
  bottom: 0; left: 0;
  animation: termFloat 4.0s ease-in-out infinite;
  animation-delay: 0.7s;
}
.term-badge--br {
  bottom: 52px; right: 0;
  animation: termFloat 3.7s ease-in-out infinite;
  animation-delay: 1.4s;
}
/* Icon-Kreis */
.term-badge-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.term-badge-icon--b1 { background: rgba(66,133,244,0.12); color: #4285F4; }
.term-badge-icon--b2 { background: rgba(52,168,83,0.12);  color: #34A853; }
.term-badge-icon--b3 { background: rgba(27,184,240,0.12); color: var(--accent); }
/* Text */
.term-badge-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.term-badge-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.term-badge-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.term-badge-value--green  { color: #34A853; font-weight: 600; }
.term-badge-value--accent { color: var(--accent); font-weight: 600; }
/* Pulsierender Punkt (Live-Indikator) */
.term-badge-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: #34A853;
  position: relative;
  flex-shrink: 0;
}
.term-badge-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  background: rgba(52,168,83,0.3);
  animation: termPulse 1.8s ease-out infinite;
}
@keyframes termPulse {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(2);   opacity: 0; }
}
/* Mobile: Badges schweben weiterhin über das Terminal */
@media (max-width: 900px) {
  .terminal-scene { padding: 18px 16px 26px; }
  .term-badges-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .term-badge {
    position: absolute;
    pointer-events: auto;
    padding: 7px 10px;
    gap: 7px;
    border-radius: 11px;
  }
  /* Kleinere Icons auf Mobile */
  .term-badge .term-badge-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
  }
  .term-badge .term-badge-icon svg {
    width: 13px; height: 13px;
  }
  .term-badge .term-badge-label { font-size: 10px; }
  .term-badge .term-badge-value { font-size: 10px; }
  .term-badge .term-badge-dot   { width: 5px; height: 5px; }
  /* Drittes Badge auf Mobile ausblenden – zu wenig Platz */
  .term-badge--br { display: none; }
}

/* ── Marquee ──────────────────────────────────────────────────────────────── */
.marquee-section { padding: 64px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-label { text-align: center; margin-bottom: 32px; }
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee-track { display: flex; gap: 80px; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.client-logo { height: 56px; display: flex; align-items: center; font-weight: 700; font-size: 28px; letter-spacing: -0.02em; filter: grayscale(100%) contrast(0%) brightness(0.7); transition: filter 0.35s ease, transform 0.35s ease; flex-shrink: 0; transform-origin: center center; }
.client-logo img { height: 56px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.client-logo:hover { filter: none; transform: scale(1.25); }
@media (max-width: 768px) { .client-logo { height: 44px; } .client-logo img { height: 44px; } }

/* ── Leistungen ───────────────────────────────────────────────────────────── */
.services-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 80px; align-items: end; }
@media (max-width: 900px) { .services-head { grid-template-columns: 1fr; gap: 24px; } }
.services-title { font-size: clamp(40px, 6vw, 88px); }
.services-intro { max-width: 440px; color: var(--ink-soft); font-size: 18px; }
.service-list { border-top: 1px solid var(--ink); }
.service-item { border-bottom: 1px solid var(--ink); }
.service-row {
  padding: 40px 0;
  display: grid;
  grid-template-columns: 80px 1fr 1fr 48px;
  gap: 32px;
  align-items: center;
  position: relative;
  transition: padding 0.3s ease, color 0.3s ease;
}
.has-expand > .service-row { cursor: pointer; }
.service-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}
.service-row:hover { color: var(--bg); padding-left: 24px; padding-right: 24px; }
.service-row:hover::before { transform: scaleY(1); transform-origin: top; }
.service-row:hover .service-cta { background: var(--accent); color: var(--ink); }
.service-row:hover .service-desc { color: rgba(250,250,247,0.7); }
.service-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; opacity: 0.5; }
.service-name { font-family: 'Space Grotesk', sans-serif; font-size: clamp(32px, 4vw, 56px); font-weight: 700; letter-spacing: -0.03em; }
.service-desc { color: var(--ink-soft); font-size: 16px; max-width: 380px; transition: color 0.3s ease; }

/* Cta-Button (Plus / X) */
.service-cta { width: 48px; height: 48px; border-radius: 999px; background: var(--bg-alt); color: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.3s ease, color 0.3s ease; }
.service-cta svg { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.has-expand.open > .service-row .service-cta { background: var(--ink); color: var(--bg); }
.has-expand.open > .service-row .service-cta svg { transform: rotate(45deg); }

/* Expand-Bereich */
.service-expand { height: 0; overflow: hidden; transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.service-expand-inner {
  padding: 40px 80px 56px;
  border-top: 1px solid var(--line);
  max-width: 860px;
}
/* Rich-Text Styles innerhalb des Expandbereichs */
.service-expand-inner p { color: var(--ink-soft); font-size: 17px; line-height: 1.75; margin-bottom: 16px; }
.service-expand-inner p:last-child { margin-bottom: 0; }
.service-expand-inner strong { font-weight: 700; color: var(--ink); }
.service-expand-inner em { font-style: italic; }
.service-expand-inner u { text-decoration: underline; }
.service-expand-inner h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 28px 0 12px; }
.service-expand-inner h3 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); margin: 20px 0 10px; }
.service-expand-inner ul, .service-expand-inner ol { padding-left: 24px; margin-bottom: 16px; }
.service-expand-inner li { color: var(--ink-soft); font-size: 17px; line-height: 1.75; margin-bottom: 6px; }
.service-expand-inner a { color: var(--accent); text-decoration: underline; }

@media (max-width: 768px) {
  .service-row { grid-template-columns: 48px 1fr 40px; gap: 16px; padding: 28px 0; }
  .service-name { grid-column: 2; font-size: clamp(18px, 5vw, 28px); hyphens: auto; word-break: break-word; }
  .service-desc { grid-column: 2; grid-row: 2; }
  .service-cta { grid-column: 3; grid-row: 1; align-self: center; width: 36px; height: 36px; flex-shrink: 0; }
  .service-expand-inner { padding: 24px 0 32px; }
}

/* ── Cases ────────────────────────────────────────────────────────────────── */
.cases { background: var(--ink); color: var(--bg); }
.cases .eyebrow { color: rgba(250,250,247,0.6); }
.cases .eyebrow::before { background: var(--bg); }
.cases-head { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 80px; align-items: end; }
.cases-title { font-size: clamp(40px, 6vw, 88px); }
.cases-intro { color: rgba(250,250,247,0.7); max-width: 440px; font-size: 18px; }
@media (max-width: 900px) { .cases-head { grid-template-columns: 1fr; } }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .cases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .cases-grid { grid-template-columns: 1fr; } }
.case-card {
  border: 1px solid rgba(250,250,247,0.14);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease;
  background: rgba(250,250,247,0.02);
}
.case-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.case-thumb {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(250,250,247,0.04), rgba(250,250,247,0.04) 8px, rgba(250,250,247,0.08) 8px, rgba(250,250,247,0.08) 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.case-thumb-inner { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(250,250,247,0.5); text-transform: uppercase; letter-spacing: 0.12em; }
.case-chip { position: absolute; top: 16px; left: 16px; background: var(--accent); color: var(--ink); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; font-weight: 600; z-index: 1; }
.case-body { padding: 24px; }
.case-client { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.case-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 16px; }
.case-metrics { display: flex; gap: 24px; padding-top: 16px; border-top: 1px solid rgba(250,250,247,0.14); }
.case-metric strong { display: block; font-size: 24px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.case-metric span { font-size: 11px; color: rgba(250,250,247,0.6); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,14,42,0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg); color: var(--ink); border-radius: 24px; max-width: 880px; width: 100%; max-height: 85vh; overflow-y: auto; transform: scale(0.96); transition: transform 0.3s ease; position: relative; }
.modal-backdrop.open .modal { transform: scale(1); }
.modal-hero { padding: 48px; background: var(--bg-alt); border-bottom: 1px solid var(--line); position: relative; }
.modal-close { position: absolute; top: 24px; right: 24px; width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.modal-close:hover { background: var(--accent); color: var(--ink); }
.modal-body { padding: 48px; }
.modal-body h3 { font-family: 'Space Grotesk', sans-serif; font-size: 28px; margin-bottom: 16px; letter-spacing: -0.02em; }
.modal-body p { color: var(--ink-soft); margin-bottom: 24px; max-width: 640px; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; padding: 32px; background: var(--bg-alt); border-radius: 16px; }
.modal-stat strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 42px; font-weight: 700; letter-spacing: -0.03em; }
.modal-stat span { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Modal Carousel ─────────────────────────────────────────────────────────── */
.modal-carousel { position: relative; background: var(--ink); border-radius: 24px 24px 0 0; overflow: hidden; }
.modal-carousel[data-count="0"], .modal-carousel:not([data-count]) { display: none; }
/* Viewport: padding-bottom-Trick für 16:9 (zuverlässiger als aspect-ratio in scroll-Containern) */
.carousel-viewport { position: relative; width: 100%; height: 0; padding-bottom: 56.25%; overflow: hidden; }
/* Track = reiner Positionierungs-Container */
.carousel-track { position: absolute; inset: 0; }
/* Slides liegen absolut – JS setzt transform + transition individuell pro Slide */
.carousel-slide { position: absolute; inset: 0; will-change: transform; backface-visibility: hidden; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Prev/Next: relativ zu .modal-carousel (position:relative), NICHT zum Viewport */
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; background: rgba(10,14,42,0.7); color: #FAFAF7; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.15); transition: background 0.2s ease, color 0.2s ease; z-index: 10; }
.carousel-prev:hover, .carousel-next:hover { background: var(--accent); color: var(--ink); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.carousel-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.4); border: none; cursor: pointer; transition: background 0.2s ease, width 0.2s ease; padding: 0; }
.carousel-dot.active { background: var(--accent); width: 20px; }

/* Modal – Mobile Bottom Sheet */
@media (max-width: 600px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    border-radius: 24px 24px 0 0;
    max-width: 100%;
    max-height: 92vh;
    transform: translateY(40px);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .modal-backdrop.open .modal { transform: translateY(0); }
  /* Close-Button: fixed unten rechts – nie von Adressleiste verdeckt */
  .modal-close {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    right: 20px;
    top: auto;
    left: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--bg);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(10,14,42,0.35);
  }
  .modal-close:hover { background: var(--accent); color: var(--ink); }
  .modal-carousel { border-radius: 0; }
  .modal-hero { padding: 28px 24px 24px; }
  .modal-body { padding: 24px; }
  .modal-body h3 { font-size: 22px; }
  .modal-stats { grid-template-columns: 1fr; gap: 16px; padding: 20px; margin: 20px 0; }
  .modal-stat strong { font-size: 32px; }
}

/* ── Testimonials ─────────────────────────────────────────────────────────── */
.testimonials { background: var(--bg-alt); }
.testimonials-head { margin-bottom: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
@media (max-width: 900px) { .testimonials-head { grid-template-columns: 1fr; } }
.testimonials-title { font-size: clamp(40px, 6vw, 88px); }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial { background: var(--bg); padding: 32px; border-radius: 20px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; transition: transform 0.3s ease, border-color 0.3s ease; }
.testimonial:hover { transform: translateY(-4px); border-color: var(--accent); }
.testimonial-quote { font-family: 'Space Grotesk', sans-serif; font-size: 20px; line-height: 1.4; letter-spacing: -0.015em; flex: 1; }
.testimonial-mark { font-family: 'Space Grotesk', sans-serif; font-size: 48px; color: var(--accent); line-height: 0.5; margin-bottom: -8px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--navy); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.testimonial-name { font-weight: 600; font-size: 15px; }
.testimonial-role { font-size: 13px; color: var(--ink-soft); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Über uns ─────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }
.about-title { font-size: clamp(40px, 6vw, 88px); margin-bottom: 32px; }
.about-body p { font-size: 18px; color: var(--ink-soft); margin-bottom: 20px; max-width: 480px; }
/* Kasten (values) gleitet als Ganzes von rechts rein (Desktop) */
.values {
  display: grid; gap: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  opacity: 0;
  transform: translateX(110px);
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.1s ease;
}
.values.values-in { opacity: 1; transform: translateX(0); }
/* Mobile: von oben rein – kein horizontaler Overflow */
@media (max-width: 900px) {
  .values { transform: translateY(-40px); }
  .values.values-in { transform: translateY(0); }
}
/* Karten blenden gestaffelt ein sobald der Kasten da ist */
.values .value {
  background: transparent;
  padding: 32px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.65s ease;
}
.values .value:last-child { border-bottom: none; }
.values .value:hover { background: transparent; }
.values.values-in .value:nth-child(1) { opacity: 1; transition-delay: 0.45s; }
.values.values-in .value:nth-child(2) { opacity: 1; transition-delay: 0.68s; }
.values.values-in .value:nth-child(3) { opacity: 1; transition-delay: 0.91s; }
.values.values-in .value:nth-child(4) { opacity: 1; transition-delay: 1.14s; }
.values.values-in .value:nth-child(5) { opacity: 1; transition-delay: 1.37s; }
.value-num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); letter-spacing: 0.1em; padding-top: 4px; }
.value-title { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.value-desc { color: var(--ink-soft); font-size: 15px; }

/* ── Blog ─────────────────────────────────────────────────────────────────── */
.blog-head { margin-bottom: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
@media (max-width: 900px) { .blog-head { grid-template-columns: 1fr; } }
.blog-title { font-size: clamp(40px, 6vw, 88px); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--ink); padding-top: 24px; transition: transform 0.3s ease; }
.blog-card:hover { transform: translateY(-4px); }
.blog-meta { display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.1em; }
.blog-meta span:first-child { color: var(--accent); }
.blog-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.blog-card p { color: var(--ink-soft); font-size: 15px; }
.blog-card-link { display: inline-flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: auto; }
.blog-card:hover .blog-card-link { color: var(--accent); }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 96px; align-items: start; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 48px; } }
.faq-title { font-size: clamp(40px, 6vw, 88px); }
.faq-list { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--ink); }
.faq-q { width: 100%; padding: 28px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; text-align: left; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; transition: color 0.2s ease; }
.faq-q:hover { color: var(--accent); }
.faq-plus { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s ease, transform 0.3s ease, color 0.2s ease, border-color 0.2s ease; }
.faq-item.open .faq-plus { background: var(--ink); color: var(--bg); transform: rotate(45deg); border-color: var(--ink); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-a-inner { padding: 0 0 32px; color: var(--ink-soft); font-size: 17px; max-width: 640px; }
.faq-item.open .faq-a { max-height: 400px; }

/* ── Kontakt ──────────────────────────────────────────────────────────────── */
.contact { background: var(--ink); color: var(--bg); }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 96px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }
.contact-title { font-size: clamp(48px, 8vw, 120px); line-height: 0.95; }
.contact-title .italic { font-style: italic; font-weight: 400; }
.contact-sub { color: rgba(250,250,247,0.7); max-width: 440px; margin-top: 24px; font-size: 18px; }
.contact-info { margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(250,250,247,0.2); display: grid; gap: 8px; }
.contact-info-row { display: flex; justify-content: flex-start; align-items: center; gap: 24px; }
.contact-info-row .label { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(250,250,247,0.5); min-width: 120px; flex-shrink: 0; }
.contact-info-row .value { font-size: 16px; white-space: nowrap; }
@media (max-width: 600px) {
  .contact-info { gap: 20px; margin-top: 40px; }
  .contact-info-row { flex-direction: column; gap: 4px; align-items: center; text-align: center; }
  .contact-info-row .value { white-space: normal; word-break: break-word; font-size: 15px; }
  .contact-info-row .label { min-width: unset; }
}
.contact-info-row .value a { transition: color 0.2s ease; }
.contact-info-row .value a:hover { color: var(--accent); }

/* Formular */
.form { background: rgba(250,250,247,0.04); border: 1px solid rgba(250,250,247,0.14); border-radius: 20px; padding: 40px; display: grid; gap: 28px; }
#formFields { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; gap: 8px; }
.form-row.gap-top { margin-top: 12px; }
.form-row.two { grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.form label { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(250,250,247,0.7); }
.form input, .form textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(250,250,247,0.24);
  padding: 12px 0;
  color: var(--bg);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(250,250,247,0.3); }
.form input:focus, .form textarea:focus { border-bottom-color: var(--accent); }
.form textarea { resize: vertical; min-height: 80px; }
.form-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.form-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(250,250,247,0.24); font-size: 13px; color: rgba(250,250,247,0.8); transition: all 0.2s ease; }
.form-chip:hover { border-color: var(--accent); color: var(--accent); }
.form-chip.active { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.form .btn-primary { background: var(--accent); color: var(--ink); justify-content: center; margin-top: 12px; }
.form .btn-primary:hover { background: var(--bg); color: var(--ink); }
.form-success { text-align: center; padding: 48px 24px; display: none; }
.form-success.show { display: block; }
.form-success h3 { font-family: 'Space Grotesk', sans-serif; font-size: 32px; margin-bottom: 12px; }
.form-success p { color: rgba(250,250,247,0.7); }
.form-success .arrow-big { margin-bottom: 16px; display: inline-block; animation: bounce 1s ease infinite alternate; }
@keyframes bounce { to { transform: translateY(-8px); } }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { padding: 48px 0 32px; border-top: 1px solid rgba(250,250,247,0.14); background: var(--ink); color: rgba(250,250,247,0.7); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-logo { height: 24px; filter: brightness(0) invert(1); }
.footer-links { display: flex; gap: 24px; font-size: 13px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; font-size: 12px; color: rgba(250,250,247,0.5); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; flex-wrap: wrap; gap: 16px; }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .footer-top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-links { flex-wrap: wrap; gap: 16px 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
