@view-transition {
  navigation: auto;
}

/* Gestaltungsregeln (Grundlage für die gesamte Seite) */
:root {
  --font-size: 10pt;
  --layout-margin: 4px;
  --media-gap: 4px;
  --slider-text-gap: var(--layout-margin);
  --text-color: #000;
  --bg-color: #fff;
  --frame-height: 100vh;
  --free-hold: 190px;
  --overlay-safespace: 100px;
  --slider-min-ratio: 0.3;
  --highlight-color: #a6a6a6; /* Highlightfarbe: Name, Projekttitel */
  --project-title-gap: 15px;
  --hero-gap-min: 100px;
  --hero-gap-max: 400px;
  --media-col-landscape: 1;
  --media-col-square: 0.7;
  --media-col-portrait-min: 0.4;
  --media-col-portrait-max: 0.7;
  --media-col-tall: 0.5;
  --sequence-max-height: 70vh;
  --slider-scale: 1;
  --viewport-fit: 1;
}

@supports (height: 100dvh) {
  :root {
    --frame-height: 100dvh;
  }
}

/* Mobile: Layout auf großer Höhe (lvh); sichtbarer Fit per --viewport-fit Transform. */
@supports (height: 100lvh) {
  @media (max-width: 768px) {
    :root {
      --frame-height: 100lvh;
    }
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  /* Desktop Safari: Subpixel = vollere Striche. */
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

/* iOS/Mobile: kein Subpixel — subpixel-antialiased wird oft zu dünnem Grayscale.
   System-Default wirkt näher am Desktop-Gewicht. */
@media (max-width: 768px) {
  html {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-weight: 700;
  font-style: normal;
  font-synthesis: none;
  line-height: 1;
  color: var(--text-color);
  background: var(--bg-color);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

p {
  margin: 0;
  width: 100%;
}

.text-block {
  padding: var(--layout-margin);
  width: 100%;
}

.media-block {
  margin: var(--media-gap);
}

/* Slider – volle Framebreite, skaliert in der Höhe von oben */
.hero-unit {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}

/* Desktop + Mobile: Shell bleibt layout-groß, Shrink nur per Transform —
   kein Relayout der Strip-Pixel beim Scroll → kein Zucken. */
.landing-shell {
  height: var(--frame-height);
  width: calc(100% / var(--slider-scale));
  overflow: hidden;
  transform: scale(var(--slider-scale));
  transform-origin: top left;
  will-change: transform;
  /* Kein layout-contain: Safari bricht sonst %-Höhe der Slider-Medien. */
  contain: paint;
}

.hero-body {
  background: var(--bg-color);
  padding-top: var(--slider-text-gap);
  transform: translate3d(
    0,
    calc(var(--frame-height) * (var(--slider-scale) - 1)),
    0
  );
  will-change: transform;
}

@media (max-width: 768px) {
  .landing-shell {
    width: calc(100% / (var(--slider-scale) * var(--viewport-fit)));
    transform: scale(calc(var(--slider-scale) * var(--viewport-fit)));
  }

  .hero-body {
    transform: translate3d(
      0,
      calc(var(--frame-height) * (var(--slider-scale) * var(--viewport-fit) - 1)),
      0
    );
  }
}

.landing {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-color);
}

.landing-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.landing-track {
  display: inline-flex;
  flex-wrap: nowrap;
  vertical-align: top;
  height: 100%;
  gap: 0;
  column-gap: 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.landing-strip {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  flex-shrink: 0;
  height: 100%;
  min-height: 0;
  gap: 0;
  column-gap: 0;
}

.landing-item {
  flex: 0 0 auto;
  flex-shrink: 0;
  height: 100%;
  width: auto;
  max-height: 100%;
  display: block;
  /* 1px Overlap schließt Subpixel-Nähte (weiße Blitzer) zwischen Slides. */
  margin-right: -1px;
  object-fit: contain;
  object-position: left center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  content-visibility: visible;
}

.landing-item--video {
  background: #000;
}

.hero-copy.text-block {
  padding-top: 0;
}

.intro-text {
  color: var(--text-color);
}

@media (max-width: 768px) {
  .intro-text {
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .intro-text-highlight {
    hyphens: none;
    -webkit-hyphens: none;
    white-space: nowrap;
  }
}

.intro-text-highlight {
  color: var(--highlight-color);
}

.intro-text em,
.intro-text i {
  font-style: normal;
  font-weight: inherit;
  color: var(--highlight-color);
}

/* Fließtext-Links: gleicher Style, klickbar, keine Auto-Unterstreichung (iOS). */
.intro-text a.intro-link {
  color: inherit;
  font: inherit;
  font-weight: inherit;
  font-style: inherit;
  text-decoration: none;
  -webkit-text-decoration: none;
  text-decoration-skip-ink: none;
  border-bottom: 0;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.intro-text a.intro-link:hover,
.intro-text a.intro-link:focus,
.intro-text a.intro-link:active,
.intro-text a.intro-link:visited {
  text-decoration: none;
  -webkit-text-decoration: none;
}

.intro-text a.intro-link:visited {
  color: inherit;
}

.intro-text a.intro-link:active {
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .intro-text a.intro-link:hover,
  .intro-text a.intro-link:focus-visible {
    color: var(--highlight-color);
  }
}

.project-title {
  display: none;
  margin: var(--project-title-gap) 0 0;
  color: var(--highlight-color);
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  text-transform: uppercase;
}

.project-title.is-visible {
  display: block;
}

.project-title-fly {
  position: fixed;
  z-index: 20;
  margin: 0;
  padding: 0;
  color: var(--highlight-color);
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
  min-height: calc(1em + 4px);
  display: flex;
  align-items: center;
}

.contact-menu-fly {
  position: fixed;
  top: var(--layout-margin);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (max-width: 768px) {
  .contact-menu-fly {
    top: auto;
    bottom: 25px;
  }
}

.contact-mark-fly {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  text-transform: uppercase;
  white-space: nowrap;
  min-height: calc(1em + 4px);
}


.project-hero-fly {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 5;
  /* Größe kommt von HeroSizing (inline px) — CSS nur als Fallback. */
  max-width: 100%;
  max-height: calc(100% - (var(--layout-margin) + 1em + 4px + var(--hero-gap-min)));
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
  transform: translate3d(0, 100%, 0);
  pointer-events: none;
}

.project-hero-fly.is-in {
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .project-hero-fly {
    transition: none;
  }
}

html.is-leaving-to-project {
  overflow: hidden;
  pointer-events: none;
}

html.is-leaving-to-project .intro-text {
  opacity: 0;
  transition: none;
}

html.is-leaving-to-project .scroll-content {
  opacity: 0;
  pointer-events: none;
}

html.is-leaving-to-project .legal-block {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: none !important;
}

html.is-project-hover {
  cursor: pointer;
}

html.is-slider-edge-left {
  cursor: w-resize;
}

html.is-slider-edge-right {
  cursor: e-resize;
}

html.is-slider-dragging {
  cursor: grabbing;
  user-select: none;
}

/* Scroll-Inhalt – erzeugt Scroll-Distanz; Klicks gehen durch zum Hero-Text */
.scroll-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.free-spacer,
.shrink-spacer,
.overlay-safespace {
  pointer-events: none;
}

html.is-return-from-project #overlay-section,
html.is-return-from-project #overlay-safespace {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.is-return-from-project .hero-unit {
  z-index: 2;
}

.overlay-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--frame-height);
  margin-bottom: 70px;
}

.overlay-slide:last-of-type {
  margin-bottom: 0;
}

.overlay-svg {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}

@media (max-width: 768px) {
  .overlay-slide {
    height: auto;
    margin-bottom: 25px;
    overflow: hidden;
  }

  .overlay-svg {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
  }

  /* Logo1 / Logo3: 1px größer — schließt Haarlinien/Blitzer am Rand. */
  .overlay-svg--bleed {
    width: calc(100% + 2px);
    margin-left: -1px;
  }
}

.overlay-safespace {
  width: 100%;
  height: var(--overlay-safespace);
}

.free-spacer {
  width: 100%;
  height: calc(var(--frame-height) + var(--free-hold));
}

.shrink-spacer {
  width: 100%;
}

/* Imprint — aufklappbarer Text unten im Weißraum (30%-Ansicht) */
.legal-block {
  position: fixed;
  left: var(--layout-margin);
  right: var(--layout-margin);
  bottom: var(--layout-margin);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 4px, 0);
  transition:
    opacity 480ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 480ms;
}

@media (max-width: 768px) {
  .legal-block {
    right: auto;
    max-width: min(42em, calc(100% - (2 * var(--layout-margin))));
  }
}

html.is-slider-locked .legal-block {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s;
}

.legal-nav-link {
  display: inline;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  text-decoration: none;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

html.is-slider-locked .legal-nav-link {
  pointer-events: auto;
}

.legal-nav-link:hover,
.legal-nav-link:focus,
.legal-nav-link:active {
  color: var(--text-color);
  text-decoration: none;
  outline: none;
}

.legal-nav-link.is-close,
.legal-nav-link.is-close:hover,
.legal-nav-link.is-close:focus,
.legal-nav-link.is-close:active {
  color: var(--highlight-color);
}

.legal-panel {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  transition: grid-template-rows 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.is-legal-open .legal-panel {
  grid-template-rows: 1fr;
  pointer-events: auto;
}

.legal-panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.is-legal-open .legal-panel-inner {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.legal-panel-body {
  padding: 0 0 0.85em;
  color: var(--text-color);
  font-family: "MinionProBold", Georgia, serif;
  font-size: var(--font-size);
  font-weight: 700;
  line-height: 1;
}

.legal-panel-body p {
  margin: 0 0 0.85em;
  width: 100%;
}

.legal-panel-body p:last-child {
  margin-bottom: 0;
}

.legal-panel-body strong {
  color: var(--highlight-color);
  font-weight: 700;
}

.legal-panel-body a {
  color: inherit;
  text-decoration: none;
}

html.is-scroll-locked,
html.is-full-hold {
  overscroll-behavior: none;
}

/* Mobile: Rubber-Band am 30%-Stop unterbinden.
   Desktop bewusst nicht — body ist eigener Scrollport; overscroll-behavior:none
   dort blockiert die Weitergabe nach oben (Seite wirkt am 30%-Stop festgeklemmt). */
@media (max-width: 768px) {
  html.is-slider-locked {
    overscroll-behavior: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-track {
    transform: none !important;
  }

  .hero-unit,
  .contact-menu-fly,
  .project-title-fly,
  .legal-block,
  .legal-panel,
  .legal-panel-inner {
    transition: none;
  }
}
