/* ═══════════════════════════════════════════════════════
   LOVIZ AI — Workflow Visuals
   n8n-style node cards, bezier curves (service icons removed)
   ═══════════════════════════════════════════════════════ */

/* Site-wide content width — overrides Astro `--container`; keeps one rail with gutters */
:root {
  --content-max: 1200px;
  --content-pad-x: clamp(20px, 4vw, 32px);
  --container: min(var(--content-max), calc(100vw - 2 * var(--content-pad-x)));
  --font-display: "Inter", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Wider hero + section intros so they align visually with the new content rail */
.hero-content {
  max-width: min(960px, var(--container));
}

.hero-sub {
  max-width: min(52rem, calc(var(--container) - 2 * var(--content-pad-x)));
}

/* ───────────────────────────────────────────────────────
   Interactive hero refresh
   ─────────────────────────────────────────────────────── */
.hero--interactive {
  --hero-mx: 50%;
  --hero-my: 38%;
  isolation: isolate;
  min-height: max(720px, 100svh);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(6, 182, 212, 0.1), transparent 44%),
    linear-gradient(180deg, #06080f 0%, #070b13 48%, var(--bg-primary) 100%);
}

.hero--interactive::before,
.hero--interactive::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero--interactive::before {
  z-index: 1;
  background: radial-gradient(circle at var(--hero-mx) var(--hero-my), rgba(34, 211, 238, 0.12), transparent 22rem);
  opacity: 0.55;
  transition: background-position 0.2s var(--ease);
}

.hero--interactive::after {
  display: none;
}

.hero--interactive .hero-bg {
  transform: scale(1.02);
}

.hero--interactive .hero-bg img {
  opacity: 0.28;
  filter: saturate(1.12) contrast(1.05) brightness(0.86);
}

.hero--interactive .hero-overlay {
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.5), rgba(6, 8, 15, 0.72) 42%, var(--bg-primary));
}

.hero--interactive .hero-content {
  width: 100%;
  max-width: min(1080px, var(--container));
  padding: clamp(82px, 13vh, 132px) var(--content-pad-x) clamp(28px, 7vh, 72px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto clamp(28px, 4vw, 42px);
  padding: 8px 16px 8px 10px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.08);
  color: #7dd3fc;
  font-size: clamp(0.68rem, 1.3vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 30px rgba(6, 182, 212, 0.1);
}

.hero-kicker-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #7dd3fc 0 22%, rgba(125, 211, 252, 0.2) 24% 100%);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.45);
}

.hero--interactive h1 {
  margin: 0 auto clamp(22px, 3vw, 30px);
  font-size: clamp(3.05rem, 8.8vw, 6.7rem);
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero--interactive .hero-title-line {
  display: block;
  padding-bottom: 0.04em;
  color: #f8fafc;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.hero--interactive .hero-title-line--accent {
  margin-bottom: -0.04em;
  color: transparent;
  background: linear-gradient(90deg, #67d4f5 0%, #8eb8ff 52%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero--interactive .hero-rotator {
  display: inline-block;
  min-width: 3.2ch;
  padding-bottom: 0.08em;
  line-height: 1.14;
  vertical-align: baseline;
  color: transparent;
  background: linear-gradient(90deg, #67d4f5 0%, #8eb8ff 52%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), filter 0.24s var(--ease);
  will-change: opacity, transform, filter;
}

.hero--interactive .hero-rotator.is-switching {
  opacity: 0;
  transform: translateY(0.16em);
  filter: blur(8px);
}

.hero--interactive .hero-sub {
  margin-bottom: clamp(34px, 5vw, 52px);
  color: #aeb9cc;
  font-size: clamp(1.06rem, 2vw, 1.34rem);
  line-height: 1.65;
}

.hero--interactive .hero-ctas {
  margin-bottom: clamp(42px, 6vw, 64px);
}

.hero--interactive .btn {
  min-width: clamp(220px, 24vw, 260px);
  padding: 16px 30px;
  border-radius: 16px;
}

.hero--interactive .btn-primary {
  background: linear-gradient(135deg, #67d4f5, #5fb7d4);
  box-shadow: 0 16px 48px rgba(103, 212, 245, 0.28), inset 0 1px 0 rgba(255,255,255,0.32);
}

.hero--interactive .btn-secondary {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.hero-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  margin: 0 auto 12px;
}

.hero-flow-node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(46px, 9vw, 56px);
  height: clamp(46px, 9vw, 56px);
  flex: 0 0 auto;
  color: rgba(241, 245, 249, 0.66);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.32s var(--ease), color 0.32s var(--ease), border-color 0.32s var(--ease), box-shadow 0.32s var(--ease), background 0.32s var(--ease);
}

.hero-flow-node svg {
  width: 24px;
  height: 24px;
}

.hero-flow-node.is-active,
.hero-flow-node:hover {
  color: #cffafe;
  border-color: rgba(103, 232, 249, 0.55);
  background: rgba(6, 182, 212, 0.12);
  box-shadow: 0 0 0 10px rgba(6, 182, 212, 0.08), 0 0 34px rgba(6, 182, 212, 0.22), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-3px) scale(1.04);
}

.hero-flow-node--n8n {
  border-radius: 18px;
}

.hero-flow-connector {
  position: relative;
  width: clamp(16px, 6vw, 48px);
  height: 1px;
  flex: 0 1 clamp(16px, 6vw, 48px);
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.18), rgba(103, 232, 249, 0.42));
  overflow: hidden;
}

.hero-flow-connector::after {
  content: '';
  position: absolute;
  inset: -1px auto -1px 0;
  width: 36%;
  background: linear-gradient(90deg, transparent, #67e8f9, transparent);
  animation: heroFlowTravel 1.65s linear infinite;
}

.hero-workflow-caption {
  margin: 0;
  color: rgba(156, 163, 175, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.lang-de [data-lang="de"].hero-kicker {
  display: inline-flex !important;
}

@keyframes heroFlowTravel {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

@media (max-width: 768px) {
  .hero--interactive {
    min-height: 100svh;
  }

  .hero--interactive .hero-content {
    padding-top: clamp(76px, 11vh, 112px);
  }

  .hero--interactive h1 {
    font-size: clamp(2.55rem, 13vw, 4.9rem);
    letter-spacing: -0.05em;
  }

  .hero-kicker {
    max-width: min(100%, 390px);
    letter-spacing: 0.12em;
  }

  .hero--interactive .hero-ctas {
    align-items: stretch;
    width: min(100%, 320px);
    margin-inline: auto;
  }

  .hero--interactive .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .hero-workflow {
    width: 100%;
  }

  .hero-flow-node {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero--interactive::before,
  .hero-rotator,
  .hero-flow-node,
  .hero-flow-connector::after {
    animation: none !important;
    transition: none !important;
  }
}

.section .section-desc {
  max-width: min(52rem, calc(var(--container) - 2 * var(--content-pad-x)));
}

.cta-box {
  max-width: min(960px, var(--container));
}

/* Align horizontal padding with workflow-flow / about (Astro uses fixed 28px) */
.navbar-inner,
.section-header,
.tech-wrap,
.footer-grid {
  padding-inline: var(--content-pad-x);
}

/* ───────────────────────────────────────────────────────
   1. WORKFLOW FLOW CONTAINER
   ─────────────────────────────────────────────────────── */
.workflow-flow {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--content-pad-x) 80px;
}

.workflow-flow .flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

/* ───────────────────────────────────────────────────────
   2. WORKFLOW NODES — default state (shared)
   ─────────────────────────────────────────────────────── */
.workflow-node {
  position: relative;
  z-index: 2;
  min-width: 0;
  opacity: 0.4;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
  will-change: opacity, border-color, box-shadow;
}

.workflow-node.visible {
  opacity: 0.5;
}

.workflow-node.active {
  opacity: 1 !important;
  border-color: var(--border-accent) !important;
  box-shadow: 0 0 24px var(--accent-glow), 0 0 60px rgba(6, 182, 212, 0.08);
}

.workflow-node.passive {
  opacity: 0.3;
}

/* ───────────────────────────────────────────────────────
   4. DESKTOP — CLASSIC GRID (no workflow flow)
   ─────────────────────────────────────────────────────── */
@media (min-width: 769px) {
  /* Disable workflow flow container — use classic grids */
  .workflow-flow {
    display: block;
  }

  /* Hide bezier flow lines entirely */
  .workflow-flow .flow-lines {
    display: none;
  }

  /* Services: 3-column grid */
  .workflow-flow[data-section="services"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  /* Case Studies: 2-column grid */
  .workflow-flow[data-section="cases"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  /* Desktop nodes always fully visible */
  .workflow-node {
    opacity: 1 !important;
    animation: none !important;
  }

  /* Disable active state pseudo-elements on desktop */
  .workflow-node.active::before,
  .workflow-node.active::after {
    display: none;
  }

  /* Hover replaces scroll-active glow */
  .workflow-node:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 40px var(--accent-glow);
  }
}

/* ───────────────────────────────────────────────────────
   5. MOBILE — CENTER COLUMN LAYOUT
   ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .workflow-flow {
    padding: 20px var(--content-pad-x) 60px;
    display: block;
  }

  .workflow-flow .flow-lines {
    position: absolute;
  }

  .workflow-node {
    margin-bottom: 76px;
    max-width: 100%;
  }

  /* Align spine with cards: no translateY from .reveal / :active / :hover */
  .workflow-flow .workflow-node,
  .workflow-flow .workflow-node.reveal,
  .workflow-flow .workflow-node.reveal.vis {
    transform: none !important;
  }

  .workflow-flow .workflow-node.svc-card:hover,
  .workflow-flow .workflow-node.case-card:hover,
  .workflow-flow .workflow-node.about-card:hover {
    transform: none !important;
  }

  .workflow-node.active {
    position: relative;
    outline: none;
  }

  .workflow-node.active::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--r-lg) + 2px);
    background: conic-gradient(from var(--angle), var(--accent), transparent 30%, transparent 70%, var(--accent));
    z-index: -1;
    animation: rotateBorder 3s linear infinite;
  }

  .workflow-node.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--r-lg);
    background: var(--bg-secondary);
    z-index: -1;
  }

  @keyframes rotateBorder {
    to {
      --angle: 360deg;
    }
  }

  @property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
  }
}

/* ───────────────────────────────────────────────────────
   6. FLOW SPINE (single vertical thread, mobile)
   ─────────────────────────────────────────────────────── */
.flow-lines .flow-spine,
.flow-lines .flow-spine-highlight {
  fill: none;
  stroke-linecap: round;
}

.flow-lines .flow-spine {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.22;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  filter: none;
}

/* Per-gap highlight paths (one path per segment; dash + opacity from JS — no transition to avoid scroll jank). */
.flow-lines .flow-spine-highlight {
  stroke: #cffafe;
  stroke-width: 2.5;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.55)) drop-shadow(0 0 14px rgba(6, 182, 212, 0.32));
  transition: none;
  /* stroke-dasharray / offset set in JS from getTotalLength() */
}

/* ───────────────────────────────────────────────────────
   7. CARD-SPECIFIC STYLES TO ENSURE COMPATIBILITY
   ─────────────────────────────────────────────────────── */

/* Service card GSAP stage (large readable canvas) */
.svc-stage {
  width: 100%;
  min-height: clamp(168px, 20vw, 240px);
  aspect-ratio: 360 / 220;
  max-height: 260px;
  margin-bottom: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(6, 182, 212, 0.06), rgba(15, 23, 42, 0.35));
  overflow: hidden;
  flex-shrink: 0;
}

.svc-stage__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.svc-stage--pipeline .wf-node-outline {
  pointer-events: none;
}

.svc-stage--pipeline .wf-port {
  pointer-events: none;
}

/* Keep existing card padding and layout from Astro CSS */
.workflow-node.svc-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .svc-stage__svg .ai-core,
  .svc-stage__svg .ai-input,
  .svc-stage__svg .infra-layer {
    animation: none !important;
  }

  .svc-stage--pipeline .wf-bus-seg[data-seg='0'] {
    stroke: rgba(34, 197, 94, 0.88);
    opacity: 1;
  }

  .svc-stage--pipeline .wf-bus-seg[data-seg='1'] {
    stroke: rgba(6, 182, 212, 0.35);
    opacity: 0.55;
  }

  .svc-stage--pipeline .wf-node[data-idx='0'] .wf-node-outline,
  .svc-stage--pipeline .wf-node[data-idx='1'] .wf-node-outline {
    opacity: 1;
    stroke: #22c55e;
    stroke-width: 2.25px;
    filter: none;
  }

  .svc-stage--pipeline .wf-node[data-idx='2'] .wf-node-outline {
    opacity: 0.95;
    stroke: #6b7280;
    stroke-width: 2px;
    filter: none;
  }

  .svc-stage__svg .ai-spoke {
    opacity: 0.55;
    stroke-dashoffset: 0 !important;
  }

  .svc-stage__svg .ai-core {
    opacity: 1;
    transform: none;
  }

  .svc-stage__svg .infra-layer {
    opacity: 1;
    transform: none;
  }

  .svc-stage__svg .infra-led {
    fill: rgba(6, 182, 212, 0.55);
  }

  .svc-stage__svg .infra-pulse {
    opacity: 0.35;
  }

  .flow-lines .flow-spine,
  .flow-lines .flow-spine-highlight {
    animation: none !important;
  }

  .flow-lines .flow-spine-highlight {
    stroke: var(--accent);
    stroke-width: 2.5;
    opacity: 0.55;
  }

  .workflow-node.active {
    animation: none !important;
  }

  .workflow-node.active::before,
  .workflow-node.active::after {
    animation: none !important;
  }
}

.workflow-node.case-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding-top: 0;
  padding-bottom: 0;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.72), var(--bg-secondary) 58%);
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

.workflow-node.case-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--r-lg) - 1px);
  background: radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.14), transparent 34%),
              radial-gradient(circle at 82% 12%, rgba(139, 92, 246, 0.11), transparent 30%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.workflow-node.case-card:hover::before,
.workflow-node.case-card:focus-within::before {
  opacity: 1;
}

.workflow-node.case-card:hover,
.workflow-node.case-card:focus-within {
  transform: translateY(-6px);
}

.case-card__link {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
  outline: none;
}

.case-card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-lg);
}

.case-card__visual-mask {
  position: relative;
  margin: 0 -32px 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
  line-height: 0;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.case-card__visual-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 8, 15, 0.08) 0%, rgba(6, 8, 15, 0.16) 48%, rgba(6, 8, 15, 0.7) 100%),
    radial-gradient(circle at 50% 20%, transparent 0%, rgba(6, 8, 15, 0.16) 72%);
  z-index: 3;
  pointer-events: none;
}

.case-card__visual {
  margin: 0;
  max-height: clamp(180px, 24vw, 260px);
  overflow: hidden;
}

.case-card__visual img {
  width: 100%;
  height: clamp(180px, 24vw, 260px);
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(0.9) contrast(1.02) brightness(0.9);
  transform: scale(1.01);
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease);
}

.workflow-node.case-card:hover .case-card__visual img,
.workflow-node.case-card:focus-within .case-card__visual img {
  filter: saturate(1.02) contrast(1.05) brightness(0.98);
  transform: scale(1.035);
}

.case-card__visual--center img {
  object-position: center center;
}

.case-card__metric {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  max-width: calc(100% - 40px);
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(207, 250, 254, 0.24);
  background: rgba(6, 8, 15, 0.74);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(6, 182, 212, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  line-height: 1;
}

.case-card__metric strong {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #cffafe;
  letter-spacing: -0.03em;
}

.case-card__metric span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.case-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px 32px 30px;
}

.case-card .case-top {
  align-items: center;
  margin-bottom: 14px;
}

.case-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

.case-card__summary {
  margin-bottom: 20px;
}

.case-card .case-tags {
  margin-top: auto;
  padding-top: 4px;
}

.case-card .case-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: rgba(203, 213, 225, 0.72);
  background: rgba(255, 255, 255, 0.035);
}

.case-card__cta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 22px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-l);
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.workflow-node.case-card:hover .case-card__cta,
.workflow-node.case-card:focus-within .case-card__cta {
  color: #cffafe;
  transform: translateX(4px);
}

@media (max-width: 480px) {
  .case-card__visual {
    max-height: clamp(150px, 46vw, 188px);
  }

  .case-card__visual img {
    height: clamp(150px, 46vw, 188px);
  }

  .case-card__body {
    padding: 22px 22px 26px;
  }

  .case-card__metric {
    left: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }
}

@media (max-width: 768px) {
  .workflow-node.case-card:hover,
  .workflow-node.case-card:focus-within {
    transform: none !important;
  }

  .case-card__visual-mask {
    margin-inline: -32px;
  }

  .case-card__visual {
    max-height: clamp(160px, 48vw, 230px);
  }

  .case-card__visual img {
    height: clamp(160px, 48vw, 230px);
  }

  .workflow-node.case-card:hover .case-card__visual img,
  .workflow-node.case-card:focus-within .case-card__visual img {
    transform: scale(1.01);
    filter: saturate(1.05) contrast(1.02);
  }
}

@media (max-width: 480px) {
  .case-card__visual {
    max-height: clamp(150px, 46vw, 188px);
  }

  .case-card__visual img {
    height: clamp(150px, 46vw, 188px);
  }
}


/* About: image column + stacked cards */
.about-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x) 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: stretch;
}

/* About cards use the same mobile flow engine as Services (SVG + .workflow-node) */
.about-layout .workflow-flow[data-section="about"] {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  align-self: stretch;
}

.workflow-node.about-card {
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: opacity 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              transform 0.25s var(--ease);
}

/* Second card grows with the column so the layout balances the tall image */
.about-layout .about-card--fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-value-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.about-value-tags span {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.about-visual {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  min-height: 0;
  align-self: stretch;
}

.about-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    padding: 0 var(--content-pad-x) 40px;
  }

  .about-visual img {
    min-height: 200px;
    max-height: 320px;
    object-position: center 34%;
  }
}

/* Tech stack: brand icon row above chips */
.tech-icon-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px 28px;
  margin: 0 auto 28px;
  padding: 0;
  max-width: 100%;
}

.tech-icon-row span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-icon-row img {
  width: 36px;
  height: 36px;
  opacity: 0.82;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease), transform 0.2s var(--ease);
}

.tech-icon-row img:hover {
  opacity: 1;
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(34, 211, 238, 0.35));
  transform: translateY(-2px);
}

/* Card body above in-flow paint; mobile active ring uses negative-z pseudos */
.workflow-node > * {
  position: relative;
  z-index: 2;
}

/* ───────────────────────────────────────────────────────
   8. MOBILE RESPONSIVE TWEAKS FOR WORKFLOW
   ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .workflow-flow {
    padding: 16px var(--content-pad-x) 40px;
  }

  .workflow-node {
    margin-bottom: 64px;
  }
}

/* Case Study Metrics */
.case-metrics {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent, #06b6d4);
  line-height: 1.2;
  margin-top: 12px;
  padding: 0;
}
.case-metrics span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary, #9ca3af);
}

/* ───────────────────────────────────────────────────────
   9. MOBILE MENU FULL-SCREEN OVERLAY (append-only fix)
   ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar-links {
    display: none !important;
  }
  .navbar-links.open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-height: calc(100vh - 72px) !important;
    height: auto !important;
    max-height: none !important;
    background: #06080ff2 !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 20px 28px !important;
    gap: 0 !important;
    z-index: 900 !important;
    overflow-y: auto !important;
    justify-content: flex-start !important;
  }
  .navbar-links.open li {
    display: block !important;
    width: 100% !important;
  }
  .navbar-links.open li[data-lang="de"] {
    display: none !important;
  }
  body.lang-de .navbar-links.open li[data-lang="en"] {
    display: none !important;
  }
  body.lang-de .navbar-links.open li[data-lang="de"] {
    display: block !important;
  }
  .navbar-links.open a {
    display: block !important;
    padding: 16px 0 !important;
    font-size: 1.2rem !important;
    color: #ddd !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left !important;
  }
  .navbar-links.open .navbar-cta {
    margin-top: 16px !important;
    text-align: center !important;
    display: block !important;
  }
}

/* ───────────────────────────────────────────────────────
   10. HOW IT WORKS — PROCESS GRID
   ─────────────────────────────────────────────────────── */
#process {
  overflow: hidden;
}

#process .section-header {
  max-width: min(760px, var(--container));
  margin-inline: auto;
  text-align: center;
}

#process .section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

body.lang-de #process [data-lang="de"].section-label {
  display: inline-flex !important;
}

#process .section-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.65));
}

#process .section-header h2 {
  max-width: 720px;
  margin-inline: auto;
  text-wrap: balance;
}

#process .section-desc {
  max-width: 640px;
}

.process-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(44px, 7vw, 92px);
  max-width: min(1040px, var(--container));
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.process-grid::before {
  content: "";
  position: absolute;
  top: 27px;
  left: calc(var(--content-pad-x) + 14%);
  right: calc(var(--content-pad-x) + 14%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.28) 10%, rgba(103, 232, 249, 0.28) 90%, transparent);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.08);
  pointer-events: none;
}

.process-card {
  position: relative;
  z-index: 1;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: transform 0.3s var(--ease);
}

.process-card:hover {
  transform: translateY(-3px);
}

.process-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 52px;
  border: 1px solid rgba(103, 232, 249, 0.1);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(103, 232, 249, 0.08), transparent 58%),
    #080d16;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 18px 42px rgba(0, 0, 0, 0.28);
  color: rgba(203, 213, 225, 0.54);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  opacity: 1;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}

.process-card:hover .process-step {
  border-color: rgba(103, 232, 249, 0.28);
  color: rgba(226, 232, 240, 0.82);
  box-shadow: 0 0 0 1px rgba(103, 232, 249, 0.08), 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 32px rgba(6, 182, 212, 0.1);
}

.process-card h3 {
  margin-bottom: 18px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text);
  letter-spacing: -0.02em;
}

.process-card p {
  max-width: 300px;
  margin: 0 auto;
  color: rgba(148, 163, 184, 0.86);
  font-size: 0.92rem;
  line-height: 1.78;
}

@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .process-grid::before {
    top: 23px;
    bottom: 23px;
    left: calc(var(--content-pad-x) + 23px);
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.24), rgba(103, 232, 249, 0.08));
  }

  .process-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
    text-align: left;
    padding: 0;
  }

  .process-card:hover {
    transform: none;
  }

  .process-step {
    width: 46px;
    height: 46px;
    margin: 0;
    font-size: 0.78rem;
  }

  .process-card h3,
  .process-card p {
    grid-column: 2;
  }

  .process-card h3 {
    margin: 2px 0 8px;
  }

  .process-card p {
    max-width: none;
    margin: 0;
    font-size: 0.88rem;
  }
}

/* ───────────────────────────────────────────────────────
   11. TESTIMONIALS
   ─────────────────────────────────────────────────────── */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.testimonial-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-text::before {
  content: "\201C";
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 0;
  position: relative;
  top: 14px;
  margin-right: 4px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testimonial-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(103, 232, 249, 0.24);
  background: var(--bg-tertiary);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-author-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ───────────────────────────────────────────────────────
   12. INLINE CTAS (between sections)
   ─────────────────────────────────────────────────────── */
.section-cta-inline {
  max-width: var(--container);
  margin: clamp(48px, 6vw, 76px) auto 0;
  padding: 0 var(--content-pad-x);
}

.cta-inline-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 32px;
  row-gap: 8px;
  align-items: center;
  overflow: hidden;
  padding: 44px 50px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(103, 232, 249, 0.08), transparent 34%),
    linear-gradient(145deg, rgba(13, 20, 33, 0.98), rgba(7, 11, 20, 0.96) 58%, rgba(8, 15, 26, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 24px 70px rgba(0, 0, 0, 0.26);
  text-align: left;
}

.cta-inline-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 42%, rgba(103, 232, 249, 0.025));
  pointer-events: none;
}

.cta-inline-box h3 {
  position: relative;
  grid-column: 1;
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.03em;
}

.cta-inline-box p {
  position: relative;
  grid-column: 1;
  max-width: 660px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.cta-inline-box .btn {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  white-space: nowrap;
}

body.lang-de .cta-inline-box .btn[data-lang="de"] {
  display: inline-flex !important;
}

@media (max-width: 768px) {
  .cta-inline-box {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 30px 22px;
    text-align: center;
  }

  .cta-inline-box h3,
  .cta-inline-box p,
  .cta-inline-box .btn {
    grid-column: 1;
    grid-row: auto;
  }

  .cta-inline-box h3 {
    font-size: 1.2rem;
  }

  .cta-inline-box p {
    font-size: 0.88rem;
  }

  .cta-inline-box .btn {
    justify-self: center;
    text-align: center;
  }
}


/* ───────────────────────────────────────────────────────
   13. CASE STUDY DETAIL PAGE
   ─────────────────────────────────────────────────────── */
.case-detail-hero {
  margin-top: 72px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.case-detail-img {
  margin: -72px 0 0;
  max-height: 420px;
  overflow: hidden;
  position: relative;
}

.case-detail-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

.case-detail-img--inner {
  margin: 0;
}

.case-detail-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg-primary));
}

.case-detail-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow2);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(6,182,212,.15);
  display: inline-block;
  margin-bottom: 8px;
}

.case-detail-metrics {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.case-detail-metric {
  text-align: center;
  flex: 1;
}

.case-detail-metric .metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.case-detail-metric .metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.case-detail-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--content-pad-x);
}

.case-detail-content {
  padding: 60px 0;
}

.case-detail-content .case-study-section {
  max-width: 740px;
  margin-bottom: 40px;
}

.case-detail-content h2,
.case-detail-content .section-header h2 {
  margin-bottom: 16px;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.case-detail-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--accent);
  border: 1px solid var(--border-accent, var(--border));
  border-radius: var(--r-md);
  transition: all 0.3s ease;
  text-decoration: none;
}

.back-link:hover {
  background: var(--accent-glow2);
}

@media (max-width: 768px) {
  .case-detail-hero { margin-top: 72px; }
  .case-detail-img { max-height: 260px; margin: 0; }
  .case-detail-metrics { flex-direction: column; gap: 16px; }
  .case-detail-content { padding: 40px 0; }
}

/* ═══════════════════════════════════════════════════════
   14. LANGUAGE TOGGLE
   ═══════════════════════════════════════════════════════ */
[data-lang="de"] {
  display: none !important;
}

body.lang-de [data-lang="de"] {
  display: block !important;
}

body.lang-de [data-lang="de"].section-label {
  display: inline-block !important;
}

body.lang-de [data-lang="de"].hero-sub {
  display: block !important;
}

body.lang-de .btn[data-lang="de"],
body.lang-de .back-link[data-lang="de"] {
  display: inline-flex !important;
}

body.lang-de .case-detail-website-link[data-lang="de"] {
  display: inline !important;
}

body.lang-de [data-lang="en"] {
  display: none !important;
}

body.lang-de .case-card .case-type[data-lang="de"] {
  display: inline-flex !important;
}

body.lang-de .case-card__metric [data-lang="de"] {
  display: inline !important;
}

body.lang-de .case-card__cta[data-lang="de"] {
  display: inline-flex !important;
}

.lang-toggle {
  margin-left: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
  user-select: none;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .lang-toggle {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
    width: 100%;
  }
}

/* ───────────────────────────────────────────────────────
   16. COMPREHENSIVE SPACING FIXES — 2026-04-18 v2
   Combines: section breathing, hero→content gap,
   card equalization, lang-toggle margin safety,
   case detail padding, CTA box refinement
   ─────────────────────────────────────────────────────── */

/* === GLOBAL SECTION RHYTHM === */
:root {
  --section-pad-y: clamp(120px, 12vw, 200px);
  --section-pad-y-mobile: clamp(80px, 15vw, 112px);
  --section-content-gap: clamp(36px, 4vw, 56px);
  --section-content-gap-mobile: clamp(28px, 8vw, 40px);
}

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.section-header {
  margin-bottom: var(--section-content-gap);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--section-pad-y-mobile);
    padding-bottom: var(--section-pad-y-mobile);
  }

  .section-header {
    margin-bottom: var(--section-content-gap-mobile);
  }
}

/* === CONTENT BLOCKS — section padding owns vertical rhythm === */
@media (min-width: 769px) {
  .workflow-flow {
    padding-top: 0;
    padding-bottom: 0;
  }

  .workflow-flow[data-section="cases"],
  .workflow-flow[data-section="services"] {
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .workflow-flow {
    padding-top: 0;
    padding-bottom: 0;
  }

  .workflow-flow .workflow-node:last-child {
    margin-bottom: 0;
  }
}

.about-layout,
.process-grid,
.testimonial-grid {
  padding-bottom: 0;
}

/* === CASE CARD HEIGHT EQUALIZATION === */
@media (min-width: 769px) {
  .workflow-flow[data-section="cases"] .workflow-node.case-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* === LANG-TOGGLE MARGIN SAFETY === */
/* Prevent hidden sibling elements from pushing margin */
[data-lang="de"] p,
[data-lang="de"] h2,
[data-lang="de"] h3,
[data-lang="de"] .section-desc,
[data-lang="de"] .section-header {
  margin: 0;
}
body.lang-de [data-lang="de"] p,
body.lang-de [data-lang="de"] h2,
body.lang-de [data-lang="de"] h3 {
  margin-bottom: 16px;
}
body.lang-de [data-lang="de"] .section-desc {
  margin-bottom: 12px;
}
body.lang-de [data-lang="de"] .section-header {
  margin-bottom: 12px;
}

/* === CASE DETAIL PAGE — FIX ALL SPACING === */

/* Increase content padding bottom so it does not crowd footer */
.case-detail-content {
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .case-detail-content {
    padding-bottom: 80px;
  }
}

/* Hero → Content: add proper gap instead of relying on combined sections */
.case-detail .section-header {
  margin-bottom: 48px;
}

/* More space between challenge/solution/results */
.case-detail-content .case-study-section {
  margin-bottom: 48px;
}

/* More space between last text section and metrics */
.case-detail-metrics {
  margin: 48px 0 40px;
  padding: 28px;
}

/* Back link more prominent */
.back-link {
  margin-top: 64px;
  padding: 14px 24px;
}

/* Mobile back link full-width centered */
@media (max-width: 768px) {
  .back-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .case-detail-content .case-study-section {
    margin-bottom: 36px;
  }
  .case-detail-metrics {
    padding: 20px;
  }
}

/* === CTA BOXES MORE BREATHING ROOM === */
@media (min-width: 769px) {
  .cta-inline-box {
    padding: 48px 36px;
  }
}

@media (max-width: 768px) {
  .cta-inline-box {
    padding: 32px 20px;
  }
}

/* === FOOTER TOP SPACING === */


/* ───────────────────────────────────────
   DATENSCHUTZ PAGE — proper formatting
   ─────────────────────────────────────── */
.datenschutz-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
}

.datenschutz-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary, #f1f5f9);
}

.datenschutz-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-secondary, #94a3b8);
}

.datenschutz-content p {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--text-secondary, #cbd5e1);
}

.datenschutz-content a {
  color: var(--accent, #06b6d4);
  text-decoration: underline;
}

.datenschutz-content ul {
  margin: 8px 0 16px 24px;
  list-style: disc;
}

.datenschutz-content ul li {
  margin-bottom: 6px;
  line-height: 1.6;
  color: var(--text-secondary, #cbd5e1);
}

.datenschutz-stand {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.1));
}

/* ─── IMPRESSUM PAGE ─── same styling reuse ─── */
.impressum-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
}

.impressum-content p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-secondary, #cbd5e1);
}

.impressum-content a {
  color: var(--accent, #06b6d4);
  text-decoration: underline;
}


/* Stable case-detail spacing hooks generated from source templates */
.case-detail-tags {
  margin-top: 24px;
}

.case-detail-website {
  margin-top: 16px;
  font-size: 0.85rem;
}

.case-detail-website-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.case-detail-website-link:hover,
.case-detail-website-link:focus-visible {
  color: var(--accent-l);
  border-bottom-color: var(--accent-l);
}

.case-detail-cta {
  margin-top: 32px;
}

/* Case study detail refresh */
.case-detail-hero {
  position: relative;
  isolation: isolate;
  margin-top: 72px;
  padding: clamp(52px, 7vw, 96px) var(--content-pad-x) clamp(46px, 6vw, 82px);
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 14%, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #070a12 0%, #080c15 58%, var(--bg-primary) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.case-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
}

.case-detail-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.08fr);
  align-items: center;
  gap: clamp(32px, 6vw, 76px);
  width: min(100%, var(--container));
  margin: 0 auto;
}

.case-detail-hero__copy {
  max-width: 620px;
}

.case-detail-hero__back {
  display: flex;
  align-items: center;
  width: max-content;
  margin-bottom: clamp(22px, 3vw, 34px);
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.case-detail-hero__back:hover,
.case-detail-hero__back:focus-visible {
  color: var(--accent-l);
  transform: translateX(-3px);
}

.case-detail-hero .case-detail-type {
  display: inline-flex;
  margin-bottom: clamp(16px, 2.2vw, 22px);
  padding: 7px 13px;
  color: #9be8f7;
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(103, 232, 249, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 30px rgba(6, 182, 212, 0.08);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-detail-hero h1 {
  margin: 0 0 clamp(18px, 3vw, 26px);
  color: #f8fafc;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.case-detail-hero__lead {
  max-width: 56ch;
  margin: 0;
  color: #aeb9cc;
  font-size: clamp(1.04rem, 1.8vw, 1.28rem);
  line-height: 1.65;
}

.case-detail-img {
  position: relative;
  margin: 0;
  max-height: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(22px, 3vw, 34px);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.45), 0 0 80px rgba(6, 182, 212, 0.12);
}

.case-detail-img::after {
  inset: 0;
  height: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(0deg, rgba(6, 8, 15, 0.28), transparent 48%);
}

.case-detail-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.94) contrast(1.03) brightness(0.95);
}

.section.case-detail {
  padding-top: clamp(54px, 7vw, 88px);
  padding-bottom: 0;
}

.case-detail-content {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 var(--content-pad-x) clamp(84px, 9vw, 124px);
  counter-reset: case-detail-section;
}

.case-detail-content .case-study-section {
  position: relative;
  max-width: none;
  margin-bottom: 24px;
  padding: clamp(28px, 4vw, 42px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(11, 15, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(20px, 2.4vw, 28px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.case-detail-content .case-study-section::before {
  counter-increment: case-detail-section;
  content: "0" counter(case-detail-section);
  position: absolute;
  top: clamp(24px, 4vw, 38px);
  right: clamp(24px, 4vw, 38px);
  color: rgba(103, 232, 249, 0.13);
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
}

.case-detail-content .case-study-section h2 {
  position: relative;
  max-width: 18rem;
  margin-bottom: 22px;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  letter-spacing: -0.035em;
}

.case-detail-content .case-study-section p {
  position: relative;
  max-width: 74ch;
  color: #b6c0d0;
  font-size: clamp(0.97rem, 1.2vw, 1.05rem);
  line-height: 1.82;
}

.case-detail-content .case-study-section p:last-child {
  margin-bottom: 0;
}

.case-detail-content .case-study-section strong {
  color: #edf6ff;
}

.case-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: clamp(34px, 5vw, 54px) 0 clamp(30px, 4vw, 44px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.case-detail-metric {
  padding: clamp(22px, 3vw, 30px) 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.16), transparent 70%),
    rgba(11, 15, 26, 0.78);
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.case-detail-metric .metric-value {
  display: block;
  margin-bottom: 8px;
  color: transparent;
  background: linear-gradient(90deg, #67d4f5, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
  line-height: 1;
}

.case-detail-metric .metric-label {
  display: block;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.case-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.case-detail-tags span {
  padding: 7px 11px;
  color: rgba(203, 213, 225, 0.82);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.case-detail-website {
  margin-top: 20px;
}

.case-detail-website-link {
  font-weight: 700;
}

.case-detail-cta {
  margin-top: 38px;
}

.case-detail-content > .back-link {
  margin-top: 38px;
}

body.lang-de .case-detail-hero__back[data-lang="de"] {
  display: flex !important;
}

body.lang-de .case-detail-hero .case-detail-type[data-lang="de"] {
  display: inline-flex !important;
}

body.lang-de .case-detail-hero__lead[data-lang="de"] {
  display: block !important;
}

@media (max-width: 980px) {
  .case-detail-hero__inner {
    grid-template-columns: 1fr;
  }

  .case-detail-hero__copy {
    max-width: 760px;
  }
}

@media (max-width: 768px) {
  .case-detail-hero {
    padding-top: clamp(42px, 10vw, 64px);
  }

  .case-detail-hero h1 {
    font-size: clamp(2.55rem, 14vw, 4.2rem);
  }

  .case-detail-img {
    border-radius: 22px;
  }

  .case-detail-content {
    padding-bottom: 86px;
  }

  .case-detail-content .case-study-section {
    padding: 28px 22px;
  }

  .case-detail-content .case-study-section::before {
    top: 18px;
    right: 18px;
  }

  .case-detail-metrics {
    grid-template-columns: 1fr;
  }
}

/* ───────────────────────────────────────────────────────
   17. THEMATIC SECTION RHYTHM — 2026-06-09
   Group each inline CTA with the section it concludes and
   give brand-new thematic chapters more breathing room.
   ─────────────────────────────────────────────────────── */

/* New thematic chapters get extra separation from the
   preceding CTA / section to signal a fresh topic. */
@media (min-width: 769px) {
  #process,
  #about {
    padding-top: clamp(150px, 15vw, 240px);
  }

  /* Final closing CTA — strongest separation. */
  #contact {
    padding-top: clamp(160px, 16vw, 256px);
  }
}

@media (max-width: 768px) {
  #process,
  #about,
  #contact {
    padding-top: clamp(96px, 18vw, 128px);
  }
}
