* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  padding-top: 40px;
  background: #ffffff;
  color: #111111;
  font-family: "Century Gothic";
  font-size: 18px;
  line-height: 1.35;
}

body.project-page {
  padding-top: 0;
  overflow: hidden;
}

button,
input,
textarea,
select {
  font-family: "Century Gothic";
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  width: 100%;
  /* Header-Abstand links/rechts aendern */
  padding: 0 30px;
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.site-header::before {
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.78);
}

.site-header::after {
  top: 100%;
  height: 34px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
}

.nav-link {
  line-height: 1;
}

.brand {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-weight: 400;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  line-height: 1;
  overflow: visible;
}

.brand-logo--landing {
  width: 58px;
  height: 58px;
}

.brand-logo--project {
  width: 58px;
  height: 58px;
}

.brand-logo--static {
  width: 51px;
  height: 51px;
}

.brand-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brand-mark rect,
.brand-mark path {
  fill: #000000;
  transform-box: fill-box;
  transform-origin: center;
}

/* Header Animationen getrennt halten:
   Landing: .landing-logo-animation
   Projekt: .project-back-grid-animation
   Groesse hier aendern: width/height.
   Geschwindigkeit spaeter in js/script.js bei frameDuration aendern. */
.landing-logo-animation,
.landing-logo-static,
.project-back-grid-animation {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.landing-logo-animation,
.project-back-grid-animation {
  pointer-events: none;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 18px;
}

.project-nav-context {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.active-filter-label {
  /* Farbe vom aktiven Filter auf den Projektseiten aendern */
  color: #a8a8a8;
}

.nav-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-button:focus {
  outline: none;
}

.nav-button:focus-visible {
  outline: none;
}

body.filter-is-open .nav-button {
  width: 28px;
  height: 28px;
  overflow: hidden;
  background: url("../images/x.svg") center / 24px 24px no-repeat;
  color: transparent;
  font-size: 0;
}

.nav-link:hover,
.nav-link:focus-visible,
.filter-option:hover,
.filter-option:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.is-current {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filter-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 19;
  background: transparent;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.filter-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)) top left / 100% 58px no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)) top 58px left / 100% 34px no-repeat,
    linear-gradient(to right, rgba(255, 255, 255, 0.78) 0, rgba(255, 255, 255, 0.78) 280px, rgba(255, 255, 255, 0) 336px) top 58px left / 336px calc(100% - 58px) no-repeat;
}

.filter-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  width: min(280px, 78vw);
  padding: 84px 30px 26px;
  pointer-events: auto;
}

body.filter-is-open .site-header::before,
body.filter-is-open .site-header::after {
  display: none;
}

.filter-option {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.filter-option.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Landing-Raster: Aussenabstand, Maximalbreite und Spaltenabstand aendern */
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  gap: clamp(16px, 4vw, 150px);
  padding-block: clamp(80px, 9vw, 130px) clamp(40px, 6vw, 90px);
  padding-inline: clamp(16px, 8vw, 500px);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1 / 1;
  transform: translateZ(0);
}

.project-card[hidden] {
  display: none;
}

.project-card img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center top;
  transition:
    transform 620ms cubic-bezier(0.2, 1.35, 0.34, 1),
    filter 620ms cubic-bezier(0.2, 1.35, 0.34, 1);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-card::after {
  content: none;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  min-height: clamp(42px, 15%, 78px);
  display: flex;
  align-items: flex-start;
  padding: clamp(12px, 2vw, 18px);
  text-align: left;
  background: #fff;
  transform: translate3d(0, -8px, 0);
  opacity: 0.88;
  transition:
    transform 620ms cubic-bezier(0.2, 1.35, 0.34, 1),
    opacity 260ms ease;
}

.project-overlay strong {
  /* Hover-Titel hinter Projektkacheln:
     font-size = Schriftgroesse
     font-weight = Schriftstaerke
     letter-spacing = Laufweite
     line-height = Zeilenabstand */
  display: block;
  font: 700 18px/1 "Century Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

.project-overlay small {
  display: none;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: translate3d(0, clamp(46px, 16%, 86px), 0) scale(0.985);
  filter: saturate(0.96);
}

.project-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #777;
}

.project-detail {
  height: 100vh;
  width: 100%;
  /* Projekt-Galerie: Aussenabstand wie beim Landing-Raster aendern */
  padding-block: clamp(92px, 11vh, 140px) clamp(38px, 7vh, 90px);
  padding-inline: clamp(16px, 8vw, 300px);
}

.project-text {
  align-self: start;
  max-width: 280px;
}

.project-kicker,
.slide-caption,
.slide-counter {
  color: #6f6f6f;
}

.project-kicker {
  margin: 0 0 16px;
}

.project-text h1 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.project-text p {
  margin: 0 0 14px;
}

.project-viewer {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 1100px;
  height: 100%;
  min-height: 0;
  margin-inline: auto;
  overflow: hidden;
  background: #ffffff;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-navigation-guide {
  position: absolute;
  inset: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.project-navigation-guide.is-visible {
  opacity: 1;
}

.project-guide-arrow {
  position: absolute;
  display: block;
  opacity: 0.28;
}

.project-guide-left,
.project-guide-right {
  top: 50%;
  width: 64px;
  height: 42px;
  margin-top: -21px;
  background: url("../images/pfeil-rechts.svg") center / contain no-repeat;
}

.project-guide-left {
  left: 6%;
  transform: scaleX(-1);
}

.project-guide-right {
  right: 6%;
}

.project-guide-up,
.project-guide-down {
  left: 50%;
  width: 84px;
  height: 42px;
  margin-left: -42px;
  background: url("../images/pfeil-unten.svg") center / contain no-repeat;
}

.project-guide-up {
  top: 20px;
  transform: rotate(180deg);
}

.project-guide-down {
  bottom: 20px;
}

.has-js .project-viewer,
.has-js body.project-page .project-detail {
  cursor: none;
}

.project-slide {
  display: none;
  margin: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-media-slide {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
}

.project-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: contain !important;
  object-position: center center !important;
}

.project-video {
  cursor: auto;
}

body.video-slide-active .project-switch {
  pointer-events: none;
}

body.video-slide-active .project-media-slide.is-active {
  cursor: auto;
}

.project-slide.is-active {
  display: block;
}

.project-media-slide.is-active {
  display: block;
}

.project-info-slide.is-active {
  display: flex;
}

.project-info-slide {
  flex-direction: column;
  justify-content: center;
  width: min(620px, 100%);
  max-height: 100%;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  text-align: left;
}

.project-info-slide h1 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.project-info-slide p {
  margin: 0 0 14px;
}

.project-switch {
  position: absolute;
  left: 50%;
  z-index: 11;
  width: min(380px, 70%);
  /* Hoehe der Klickflaechen fuer vorheriges/naechstes Projekt */
  height: 120px;
  transform: translateX(-50%);
  cursor: none;
}

.project-switch-previous {
  /* Bleibt trotz tieferem Bildbereich direkt unter dem Header anklickbar */
  position: fixed;
  top: 58px;
  height: 178px;
}

.project-switch-next {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(80px, 12vh, 130px);
  transform: none;
}

.project-switch-cursor {
  position: fixed;
  z-index: 13;
  display: none;
  width: 84px;
  height: 42px;
  margin: -21px 0 0 -42px;
  pointer-events: none;
}

.project-switch-cursor.is-visible {
  display: block;
}

.project-switch-cursor-arrow {
  display: block;
  width: 84px;
  height: 42px;
  background: url("../images/pfeil-unten.svg") center / contain no-repeat;
}

.project-switch-cursor.is-previous .project-switch-cursor-arrow {
  transform: rotate(180deg);
}

.project-switch-cursor.is-next .project-switch-cursor-arrow {
  transform: none;
}

.project-switch-cursor-label {
  display: none;
}

.custom-cursor {
  position: fixed;
  z-index: 12;
  display: none;
  width: 64px;
  height: 42px;
  margin: -21px 0 0 -32px;
  background: url("../images/pfeil-rechts.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  pointer-events: none;
}

.custom-cursor.is-visible {
  display: block;
}

.custom-cursor.is-left {
  transform: scaleX(-1);
}

.about-content {
  display: grid;
  justify-items: stretch;
  padding: 100px 350px 18vh;
}

.about-block {
  width: 100%;
  margin: 0 0 34vh;
  text-align: left;
}

.about-block:last-child {
  margin-bottom: 0;
}

.about-intro {
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.18;
}

.about-block h1,
.about-block h2 {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 400;
}

.about-block p {
  margin: 0 0 12px;
}

.about-list p {
  color: #6f6f6f;
}

@media (max-width: 720px) {
  body {
    padding-top: 54px;
  }

  body.project-page {
    min-height: 100%;
    overflow: auto;
  }

  .site-header {
    min-height: 54px;
  }

  .filter-inner {
    padding: 76px 20px 22px;
  }

  .filter-panel {
    top: 0;
    width: 100%;
  }

  .filter-panel::before {
    background:
      linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)) top left / 100% 54px no-repeat,
      linear-gradient(to bottom, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)) top 54px left / 100% 34px no-repeat,
      linear-gradient(to right, rgba(255, 255, 255, 0.78) 0, rgba(255, 255, 255, 0.78) 260px, rgba(255, 255, 255, 0) 316px) top 54px left / 316px calc(100% - 54px) no-repeat;
  }

  .filter-inner {
    width: min(260px, 80vw);
  }

  .site-nav {
    gap: 14px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: clamp(14px, 5vw, 28px);
    padding-inline: 16px;
  }

  .project-detail {
    display: block;
    height: auto;
    padding: 70px 16px 24px;
  }

  .project-text {
    max-width: none;
    margin-bottom: 22px;
  }

  .project-viewer {
    height: 62vh;
    min-height: 62vh;
    max-width: none;
  }

  .project-guide-left {
    left: 3%;
  }

  .project-guide-right {
    right: 3%;
  }

  .project-guide-up {
    top: 14px;
  }

  .project-guide-down {
    bottom: 14px;
  }

  .project-slide {
    max-height: 62vh;
  }

  .project-info-slide {
    min-height: 62vh;
    max-height: none;
    padding: 0;
    overflow-y: visible;
  }

  .has-js .project-viewer,
  .has-js body.project-page .project-detail {
    cursor: pointer;
  }

  .custom-cursor {
    display: none !important;
  }

  .project-switch {
    width: min(280px, 82%);
    height: 90px;
    cursor: pointer;
  }

  .project-switch-next {
    left: 0;
    right: 0;
    width: 100%;
    height: 96px;
    transform: none;
  }

  .project-switch-previous {
    top: 54px;
    height: 144px;
  }

  .project-switch::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 68px;
    height: 34px;
    background: url("../images/pfeil-unten.svg") center / contain no-repeat;
    transform: translateX(-50%);
  }

  .project-switch-previous::after {
    top: 10px;
    transform: translateX(-50%) rotate(180deg);
  }

  .project-switch-next::after {
    bottom: 10px;
  }

  .project-switch-cursor {
    display: none !important;
  }

  .about-block {
    margin-bottom: 24vh;
  }

  .about-content {
    padding: 70px 16px 18vh;
  }
}

@media (max-width: 430px) {
  .site-header {
    padding: 0 20px;
  }

  .site-nav {
    gap: 10px;
  }

  .nav-button {
    width: 28px;
    height: 22px;
    overflow: hidden;
    background:
      linear-gradient(#111111, #111111) left 2px / 28px 2px no-repeat,
      linear-gradient(#111111, #111111) left 10px / 28px 2px no-repeat,
      linear-gradient(#111111, #111111) left 18px / 28px 2px no-repeat;
    color: transparent;
    font-size: 0;
  }

  body.filter-is-open .nav-button {
    width: 28px;
    height: 28px;
    background: url("../images/x.svg") center / 24px 24px no-repeat;
  }

  .site-nav > a[href="about.html"] {
    width: 18px;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    text-align: right;
  }

  .site-nav > a[href="about.html"]::after {
    content: "a";
    color: #111111;
    font-size: 18px;
  }
}
