/* =============================================
   EASING CURVES
   ============================================= */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* =============================================
   RESET & BASE
   ============================================= */

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: #FAFAFA;
  color: #111111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* =============================================
   HEADER
   ============================================= */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 100px;
  background-color: #FAFAFA;
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.logo {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111111;
  flex-shrink: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 150ms ease;
}

.logo:hover {
  opacity: 0.38;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-right {
  margin-left: auto;
}

.nav-left a,
.nav-right a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #111111;
  transition: opacity 150ms ease;
  white-space: nowrap;
}

.nav-left a:hover,
.nav-right a:hover {
  opacity: 0.38;
}

.nav-active {
  opacity: 0.38;
}

/* =============================================
   HAMBURGER
   ============================================= */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background-color: #111111;
  transform-origin: center;
  transition: transform 200ms var(--ease-in-out), opacity 150ms ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =============================================
   MOBILE MENU
   ============================================= */

.mobile-menu {
  position: fixed;
  inset: 64px 0 0 0;
  background-color: #FAFAFA;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.mobile-menu nav a {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111111;
  transition: opacity 150ms ease;
}

.mobile-menu nav a:hover {
  opacity: 0.38;
}

/* =============================================
   PAGE LAYOUT
   ============================================= */

.page-main {
  margin-top: 64px;
}

/* =============================================
   HERO
   ============================================= */

.hero {
  position: relative;
  aspect-ratio: 3 / 2;
  margin-top: 64px;
  margin-left: 100px;
  margin-right: 100px;
  margin-bottom: 0;
  overflow: hidden;
}

/* Bottom gradient for readability of UI elements */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.28) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

/* =============================================
   CAROUSEL
   ============================================= */

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-link {
  display: block;
  width: 100%;
  height: 100%;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* =============================================
   HERO BOTTOM ELEMENTS
   ============================================= */

.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 40px 34px;
}

.hero-label-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-label-group > * {
  animation: heroLabelFadeIn 700ms var(--ease-out) both;
}

.hero-label-group > *:nth-child(1) { animation-delay: 500ms; }
.hero-label-group > *:nth-child(2) { animation-delay: 680ms; }
.hero-label-group > *:nth-child(3) { animation-delay: 860ms; }

@keyframes heroLabelFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-descriptor {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  user-select: none;
}


.hero-tagline {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  user-select: none;
}

@media (min-width: 1025px) {
  .hero-descriptor,
  .hero-tagline {
    font-size: 13px;
  }

  .hero-bottom {
    padding-bottom: 72px;
  }
}

.carousel-indicators {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.32);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 180ms ease, transform 200ms var(--ease-out);
}

.dot.active {
  background-color: rgba(255, 255, 255, 0.82);
  transform: scale(1.4);
}

.dot:active {
  transform: scale(0.7);
}

/* =============================================
   SELECTED WORK SECTION
   ============================================= */

.selected-work {
  padding: 90px 100px 120px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.section-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #BBBBBB;
  margin-bottom: 48px;
}

/* Mobile Spalten-Umschalter — nur unter 600px sichtbar, siehe Media Query */
.grid-toggle {
  display: none;
}

.grid-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px;
  color: #BBBBBB;
  cursor: pointer;
  transition: color 150ms ease;
}

.grid-toggle-btn svg rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.grid-toggle-btn[aria-pressed="true"] {
  color: #111111;
}

.project-back {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #111111;
  margin-bottom: 24px;
  transition: opacity 150ms ease;
}

.project-back:hover {
  opacity: 0.38;
}

/* =============================================
   WORK GRID — 3 FLEX COLUMNS (TRUE MASONRY)
   ============================================= */

.work-grid {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 1;
  transition: opacity 150ms ease;
}

.work-grid.grid-switching {
  opacity: 0;
}

.work-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Stagger columns on entry */
.work-col:nth-child(2) .work-item { transition-delay: 0.06s; }
.work-col:nth-child(3) .work-item { transition-delay: 0.12s; }

.work-item {
  display: block;
  position: relative;
  overflow: hidden;
  cursor: pointer;

  /* Scroll fade-in state */
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.work-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image placeholder */
.work-image {
  display: block;
  width: 100%;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .work-item:hover .work-image {
    transform: scale(1.03);
  }

  .project-gallery .work-item:hover .work-image {
    transform: none;
  }
}

.project-gallery .work-image {
  cursor: zoom-in;
}

.project-gallery .project-back {
  animation: heroLabelFadeIn 500ms var(--ease-out) both;
}

.project-gallery .section-label {
  animation: heroLabelFadeIn 500ms var(--ease-out) both;
  animation-delay: 80ms;
}

.project-gallery .work-item {
  animation: projectItemIn 550ms var(--ease-out) both;
}

@keyframes projectItemIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   LIGHTBOX
   ============================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox.active .lightbox-img {
  animation: lightboxEnter 250ms var(--ease-out) both;
}

@keyframes lightboxEnter {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #FAFAFA;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 8px;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-close:active {
  transform: scale(0.88);
}

/* Hover overlay */
.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 180ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .work-item:hover .work-overlay {
    opacity: 1;
  }
}

.work-title {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(6px);
  transition: transform 200ms var(--ease-out);
  line-height: 1.6;
  text-align: center;
}

@media (min-width: 1025px) {
  .work-title {
    font-size: 11px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .work-item:hover .work-title {
    transform: translateY(0);
  }
}

/* =============================================
   SITE FOOTER
   ============================================= */

.site-footer {
  display: flex;
  gap: 24px;
  padding: 24px 100px;
  border-top: 1px solid rgba(0, 0, 0, 0.055);
}

.site-footer a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #BBBBBB;
  transition: opacity 150ms ease;
}

.site-footer a:hover {
  opacity: 0.6;
}

@media (max-width: 1024px) {
  .site-footer {
    padding: 24px 40px;
  }
}

@media (max-width: 600px) {
  .site-footer {
    padding: 20px 20px calc(20px + 56px);
  }
}

/* =============================================
   MOBILE BOTTOM BAR
   ============================================= */

.mobile-bottom-bar {
  display: none;
}

@media (max-width: 600px) {
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: 56px;
    background-color: #FAFAFA;
    border-top: 1px solid rgba(0, 0, 0, 0.055);
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

  .mobile-bottom-bar a {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #111111;
    padding: 16px 32px;
    transition: opacity 150ms ease;
  }

  .mobile-bottom-bar a:hover {
    opacity: 0.38;
  }

  .mobile-bottom-bar .nav-active {
    opacity: 0.38;
  }
}

/* =============================================
   RESPONSIVE — TABLET
   ============================================= */

@media (max-width: 1024px) and (min-width: 601px) {
  #site-header {
    padding: 0 40px;
  }

  .hero {
    margin-left: 40px;
    margin-right: 40px;
  }

  .selected-work {
    padding: 90px 40px 120px;
  }

  .work-grid {
    gap: 8px;
  }

  .work-col {
    gap: 8px;
  }
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */

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

  .nav-left,
  .nav-right {
    display: none;
  }

  .logo {
    position: static;
    transform: none;
  }

  .hamburger {
    display: flex;
    margin-left: auto;
  }

  .hero {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-bottom {
    padding: 0 20px 26px;
  }

  .selected-work {
    padding: 64px 20px 96px;
  }

  .section-label {
    margin-bottom: 36px;
  }

  .grid-toggle {
    display: flex;
    gap: 4px;
    margin-top: -4px;
  }

  .work-grid {
    flex-direction: column;
    gap: 16px;
  }

  .work-col {
    gap: 16px;
  }

  .work-grid.grid-2col {
    flex-direction: row;
    gap: 8px;
  }

  .work-grid.grid-2col .work-col {
    gap: 8px;
  }

  .work-item {
    transition-delay: 0s !important;
  }

  /* Titel immer sichtbar (kein Hover auf Touch) — dezenter Verlauf unten links */
  .work-overlay {
    opacity: 1;
    align-items: flex-end;
    justify-content: flex-start;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 55%);
    padding: 12px;
  }

  .work-title {
    transform: none;
    text-align: left;
  }
}

/* =============================================
   PAGE ENTRANCE (about, contact, archive label)
   ============================================= */

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-statement {
  animation: pageIn 600ms var(--ease-out) both;
  animation-delay: 80ms;
}

.about-meta {
  animation: pageIn 600ms var(--ease-out) both;
  animation-delay: 240ms;
}

.about-video {
  animation: pageIn 600ms var(--ease-out) both;
  animation-delay: 380ms;
}

.contact-section .contact-info {
  animation: pageIn 600ms var(--ease-out) both;
  animation-delay: 80ms;
}

.impressum-block {
  animation: pageIn 600ms var(--ease-out) both;
}

.impressum-block:nth-child(2) { animation-delay: 80ms; }
.impressum-block:nth-child(3) { animation-delay: 160ms; }

/* =============================================
   ABOUT PAGE
   ============================================= */

.about-section {
  padding: 80px 100px 120px;
}

.about-intro {
  max-width: 560px;
  margin-bottom: 64px;
}

@media (min-width: 1025px) {
  .about-section {
    display: flex;
    align-items: flex-start;
    gap: 80px;
  }

  .about-intro {
    flex: 1;
    margin-bottom: 0;
  }

  .about-video {
    flex-shrink: 0;
  }
}

.about-statement {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: #111111;
  margin-bottom: 32px;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-meta-link,
.about-meta-location {
  font-size: 13px;
  font-weight: 300;
  color: #111111;
  line-height: 1.6;
}

.about-meta-link {
  transition: opacity 200ms ease;
}

.about-meta-link:hover {
  opacity: 0.38;
}

.about-video {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
}

.about-video video,
.about-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.about-video-placeholder {
  width: 100%;
  height: 100%;
  background-color: #EBEBEB;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-video-placeholder span {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #BBBBBB;
}

@media (max-width: 1024px) {
  .about-section {
    padding: 60px 40px 100px;
  }
}

@media (max-width: 600px) {
  /* Video als Hintergrund, Text liegt darüber */
  .about-section {
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
  }

  .about-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.48) 35%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .about-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    z-index: 0;
  }

  .about-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .about-intro {
    position: relative;
    z-index: 2;
    max-width: none;
    margin-bottom: 0;
    padding: 56px 20px 40px;
  }

  .about-statement,
  .about-meta-link,
  .about-meta-location {
    color: #FAFAFA;
  }

  .about-intro .contact-cta {
    border-color: #FAFAFA;
    color: #FAFAFA;
  }

  .about-intro .contact-cta:hover {
    background: #FAFAFA;
    color: #111111;
  }
}

/* =============================================
   CONTACT PAGE
   ============================================= */

.contact-section {
  padding: 80px 100px 120px;
}

.contact-info {
  max-width: 480px;
}

.contact-intro {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: #111111;
  margin-bottom: 32px;
}

.contact-cta {
  display: inline-block;
  border: 1px solid #111111;
  background: transparent;
  padding: 13px 32px;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
  margin-bottom: 48px;
}

.contact-cta:hover {
  background: #111111;
  color: #FAFAFA;
}

.contact-cta:active {
  transform: scale(0.97);
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 40px;
}

.contact-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #BBBBBB;
  margin-bottom: 4px;
}

.contact-info a,
.contact-info span {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.8;
  color: #111111;
  text-decoration: none;
  transition: opacity 150ms ease;
}

.contact-info a:hover {
  opacity: 0.38;
}

@media (max-width: 1024px) {
  .contact-section {
    padding: 60px 40px 100px;
  }
}

@media (max-width: 600px) {
  .contact-section {
    padding: 48px 20px 96px;
  }

  .contact-intro {
    margin-bottom: 24px;
  }

  .contact-cta {
    margin-bottom: 40px;
  }
}

/* =============================================
   404 PAGE
   ============================================= */

.error-section {
  padding: 140px 100px 160px;
  max-width: 480px;
}

.error-code {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: #BBBBBB;
  margin-bottom: 12px;
}

.error-section .contact-intro {
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .error-section {
    padding: 100px 40px 120px;
  }
}

@media (max-width: 600px) {
  .error-section {
    padding: 80px 20px 96px;
  }
}

/* =============================================
   IMPRESSUM PAGE
   ============================================= */

.impressum-section {
  padding: 80px 100px 120px;
  max-width: 640px;
}

.impressum-block {
  margin-bottom: 40px;
}

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

.impressum-text {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.75;
  color: #111111;
  margin-bottom: 12px;
}

.impressum-text:last-child {
  margin-bottom: 0;
}

.impressum-text a {
  color: #111111;
  transition: opacity 150ms ease;
}

.impressum-text a:hover {
  opacity: 0.38;
}

@media (max-width: 1024px) {
  .impressum-section {
    padding: 60px 40px 100px;
  }
}

@media (max-width: 600px) {
  .impressum-section {
    padding: 48px 20px 96px;
  }
}

/* =============================================
   REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  .slide,
  .work-item,
  .work-image,
  .work-overlay,
  .work-title,
  .dot,
  .mobile-menu,
  .hamburger span,
  .lightbox {
    transition: none;
  }

  .lightbox.active .lightbox-img {
    animation: none;
  }

  .hero-label-group > * {
    animation: none;
    opacity: 1;
  }

  .project-gallery .project-back,
  .project-gallery .section-label,
  .project-gallery .work-item {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .about-statement,
  .about-meta,
  .about-video,
  .contact-section .contact-info,
  .impressum-block {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
