/* Backstage – Figma "05 Backstage" (644:5283) */

/* hero + logo row together fill the screen; claim centred in the space above the logos */
.backstage-hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.backstage-hero__content {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-96);
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-48)) var(--layout-margin) var(--space-128);
  text-align: center;
}

.backstage-hero .text-lead {
  max-width: 680px;
}

/* ---------- Values (Figma 731:12222) ---------- */

.values {
  display: flex;
  flex-direction: column;
  gap: var(--space-64);
  background: var(--color-surface-warm);
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
  align-items: stretch;
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  padding: var(--space-32);
  border-radius: var(--radius-24);
  background: var(--color-surface-raised);
}

.value-card__number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-fixed-dark);
  color: var(--color-fixed-light);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.value-card .text-body {
  color: var(--color-text-secondary);
}

.value-card__number {
  margin-bottom: var(--space-8);
}

@media (max-width: 1023px) {
  .values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Behind the scenes (Figma 731:12351) ---------- */

.scenes {
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
}

.scenes__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-24);
}

.photo-caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.photo-caption__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-16);
  background: var(--color-surface-raised);
}

.photo-caption__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption figcaption {
  color: var(--color-text-secondary);
}

.tools {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 340;
}

.tools__item {
  position: absolute;
  translate: -50% -50%;
}

.tools__item img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

/* floating: the object drifts up and down, a soft floor shadow below shrinks as it rises
   (replaces the drop-shadow filter, which rendered as a boxy patch) */
.tools__item::after {
  content: "";
  position: absolute;
  /* --gap: empty space under the object inside its image (%), --side: empty space left/right */
  left: calc(var(--side, 0) * 1% + 10%);
  right: calc(var(--side, 0) * 1% + 10%);
  bottom: calc(var(--gap, 0) * 1% - 12%);
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.22), rgb(0 0 0 / 0));
  pointer-events: none;
}

/* measured transparent margins of the object photos */
.tools__item:nth-child(1) { --gap: 18;   --side: 17; }
.tools__item:nth-child(3) { --gap: 25.8; --side: 28; }
.tools__item:nth-child(4) { --gap: 9.4;  --side: 1; }
.tools__item:nth-child(6) { --gap: 28;   --side: 10.5; }

@keyframes tool-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

@keyframes tool-shadow {
  0%, 100% { scale: 1; opacity: 1; }
  50%      { scale: 0.78; opacity: 0.55; }
}

@media (prefers-reduced-motion: no-preference) {
  .tools__item img,
  .tools__item::after {
    animation: tool-float var(--float, 6s) ease-in-out var(--float-delay, 0s) infinite;
  }

  .tools__item::after {
    animation-name: tool-shadow;
  }

  .tools__item:nth-child(2n) { --float: 7.5s; --float-delay: -2s; }
  .tools__item:nth-child(3n) { --float: 5.5s; --float-delay: -4s; }
  .tools__item:nth-child(5n) { --float: 8s;   --float-delay: -1s; }
  .tools__item:nth-child(7n) { --float: 6.5s; --float-delay: -3s; }
}

/* floating tool logos (Figma 731:12328): centre and rotation from Figma in a 1200 × 340 box
   (pencil removed; hard drive and the icon after it spread out to close the gap).
   Widths evened out (Leoš): every object reads ~80px like the 76px app icons; the width
   compensates the empty space inside each image (camera 47 % filled).
   App icons all read 68px (sources cropped tight, no baked-in shadow; one CSS shadow for all). */
.tools__item:nth-child(1) { left: 7.33%; top: 29.82%; width: 10%; rotate: 4.53deg; }
.tools__item:nth-child(2) { left: 19.71%; top: 33.59%; width: 5.67%; rotate: 1.86deg; }
.tools__item:nth-child(3) { left: 37.92%; top: 33.85%; width: 12.75%; rotate: 1.12deg; }
.tools__item:nth-child(4) { left: 75.11%; top: 34.29%; width: 7%; rotate: 7.73deg; }
.tools__item:nth-child(5) { left: 6.12%; top: 71.74%; width: 5.67%; rotate: 2.89deg; }
.tools__item:nth-child(6) { left: 18.60%; top: 75.79%; width: 8.33%; rotate: -1.99deg; }
.tools__item:nth-child(7) { left: 49.62%; top: 69.29%; width: 5.67%; rotate: -3.67deg; }
.tools__item:nth-child(8) { left: 64.2%; top: 71.29%; width: 6.67%; rotate: -1.02deg; }
.tools__item:nth-child(9) { left: 93.27%; top: 73.26%; width: 5.67%; rotate: 7.62deg; }
.tools__item:nth-child(10) { left: 56.43%; top: 32.68%; width: 5.67%; rotate: -3.51deg; }
.tools__item:nth-child(11) { left: 30.38%; top: 76.65%; width: 5.67%; rotate: 2.44deg; }
.tools__item:nth-child(12) { left: 78.7%; top: 69.71%; width: 5.67%; rotate: 1.91deg; }
.tools__item:nth-child(13) { left: 40.16%; top: 71.21%; width: 5.67%; rotate: -3.59deg; }
.tools__item:nth-child(14) { left: 27.57%; top: 31.56%; width: 5.67%; rotate: 3.95deg; }
.tools__item:nth-child(15) { left: 48.24%; top: 28.38%; width: 5.67%; rotate: 0.27deg; }
.tools__item:nth-child(16) { left: 64.34%; top: 27.76%; width: 5.67%; rotate: -2.15deg; }
.tools__item:nth-child(17) { left: 88.23%; top: 32.18%; width: 5.67%; rotate: -3.71deg; }
.tools__item:nth-child(18) { left: 95.70%; top: 33.62%; width: 5.67%; rotate: 5.41deg; }

/* Data in Europe: its own clearly framed card; small flag next to the title, text beside (desktop) or below */
.data-hosting {
  display: grid;
  grid-template-columns: min(560px, 50%) 1fr;
  gap: var(--space-24) var(--space-64);
  align-items: center;
  padding: var(--space-48);
  border-radius: var(--radius-24);
  background: var(--color-surface-raised);
  color: var(--color-text-secondary);
}

.data-hosting__head {
  display: flex;
  gap: var(--space-24);
  align-items: center;
  color: var(--color-text-primary);
}

.data-hosting__head .text-h2 {
  hyphens: manual;
  text-wrap: balance;
}

.eu-flag {
  display: block;
  flex-shrink: 0;
  width: 64px;
  height: auto;
  border-radius: var(--radius-4);
  box-shadow: 0 6px 12px -6px rgb(0 0 0 / 0.35);
}

/* ---------- Work with us: link rows (Figma "Case Link" 192:192) ---------- */

.jobs {
  /* own surface, so it reads as a new section after "Hinter den Kulissen" / data */
  display: flex;
  flex-direction: column;
  gap: var(--space-48);
  background: var(--color-surface-raised);
}

.link-row {
  display: flex;
  gap: var(--space-24);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-24) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: padding 0.2s ease;
}

.link-row .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: color 0.2s ease;
}

.link-row:hover {
  padding-left: var(--space-16);
}

.link-row:hover .icon {
  color: var(--color-interactive-primary);
}

@media (max-width: 1023px) {
  .data-hosting {
    grid-template-columns: 1fr;
    gap: var(--space-24);
    padding: var(--space-32);
  }
}

@media (max-width: 600px) {
  .values__grid,
  .scenes__grid {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }

  .value-card {
    padding: var(--space-32);
  }

}

/* Mobile: the scattered 1200 × 340 cluster gets too small, so the tools wrap in loose rows.
   --fill = share of each image the object covers; width and negative margins compensate it,
   so every object reads --size (objects 64px, app icons 52px). */
@media (max-width: 767px) {
  .scenes {
    overflow-x: clip;
  }

  .tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-24) var(--space-16);
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
  }

  .tools__item,
  .tools__item:nth-child(n) {
    --size: 52px;
    --fill: 1;
    position: relative;
    top: auto;
    left: auto;
    width: calc(var(--size) / var(--fill));
    margin: calc((var(--size) - var(--size) / var(--fill)) / 2);
    translate: none;
  }

  .tools__item:nth-child(1) { --size: 64px; --fill: 0.67; }
  .tools__item:nth-child(3) { --size: 64px; --fill: 0.47; }
  .tools__item:nth-child(4) { --size: 64px; --fill: 0.98; }
  .tools__item:nth-child(6) { --size: 64px; --fill: 0.79; }
  .tools__item:nth-child(8) { --size: 56px; --fill: 1; }
  .tools__item:nth-child(2),
  .tools__item:nth-child(5),
  .tools__item:nth-child(7),
  .tools__item:nth-child(9) { --fill: 1; }
}

@media (max-width: 600px) {
  .data-hosting {
    padding: var(--space-24);
  }

  .data-hosting__head {
    flex-direction: column;
    gap: var(--space-16);
    align-items: flex-start;
  }

  .eu-flag {
    width: 48px;
  }

  .value-card {
    gap: var(--space-8);
    padding: var(--space-24);
  }

  .value-card__number {
    margin-bottom: var(--space-8);
  }

  .link-row .text-h2 {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
  }
}
