@font-face {
  font-family: 'ArimoLight';
  src: url('../fonts/arimo-light.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'AuthenticSignature';
  src: url('../fonts/Authentic_Signature.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ─── Variables ──────────────────────────────── */
:root {
  --bg: #f2f2f2;
  --outer-bg: #87837f;
  --text: #1e1e1e;
  --text-muted: #8a8680;
  --max-width: 1200px;
  --font-sans: 'ArimoLight', sans-serif;
  --font-script: 'AuthenticSignature', cursive;
}

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

html, body {
  height: 100%;
  height: -webkit-fill-available;
}

body {
  background: var(--bg);
  font-family: var(--font-sans);
  font-weight: normal;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─── Site Wrapper ───────────────────────────── */
.site-wrapper {
  background: var(--bg);
  max-width: var(--max-width);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─────────────────────────────────── */
.site-header {
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  align-items: start;
  padding: 38px 48px 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.site-header .instagram {
  justify-self: end;
}

/* Home header: only nav + instagram, no center brand */
.site-header--home {
  grid-template-columns: 1fr 1fr;
}

.site-header--home .header-brand {
  display: none;
}

/* ─── Navigation ─────────────────────────────── */
.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav a {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  line-height: 1.9;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 0.5;
}

.nav a.active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Brand (header version) ─────────────────── */
.header-brand {
  justify-self: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.brand-name {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  line-height: 1;
  font-size: 1.25rem;
}

.brand-tagline {
  font-family: var(--font-script);
  font-weight: normal;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  margin-top: -2px;
  display: block;
}

/* ─── Instagram Icon ─────────────────────────── */
.instagram a {
  display: flex;
  color: var(--text);
  opacity: 0.85;
  transition: opacity 0.2s;
  text-decoration: none;
}

.instagram a:hover {
  opacity: 0.45;
}

.instagram svg {
  width: 25px;
  height: 25px;
}

/* ─── HOME ───────────────────────────────────── */
.page--home {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-brand {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: block;
  z-index: 50;
  width: max-content;
  white-space: nowrap;
  animation: homeBrandFadeIn 0.8s ease forwards;
}

.home-brand .brand-name {
  font-size: 1.9rem;
  letter-spacing: 0.32em;
}

.home-brand .brand-tagline {
  font-size: 2.7rem;
  margin-top: -4px;
}

.home-footer {
  padding: 0 48px 44px;
  text-align: center;
}

.home-footer p {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── WORK / Galerie ─────────────────────────── */
.page--work {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 48px 100px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  display: block;
  background: #d8d4ce;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

@media (prefers-reduced-motion: reduce) {
  .gallery-item { transition: none; opacity: 1; transform: none; }
  .about-content,
  .contact-layout,
  .home-brand { animation: none; opacity: 1; }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}

.gallery-item:hover img {
  opacity: 0.88;
}

/* ─── Referenzen ─────────────────────────────── */
.referenzen {
  padding: 0 48px 100px;
  text-align: center;
}

.referenzen p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 960px;
  margin: 0 auto;
}

.referenzen strong {
  color: var(--text-muted);
  font-weight: 600;
}

@media (max-width: 768px) {
  .referenzen {
    padding: 36px 20px 52px;
  }
}

/* ─── Lightbox ───────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 24, 22, 0.93);
  align-items: center;
  justify-content: center;
  padding: 40px 0 20px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__container {
  position: relative;
  max-width: var(--max-width);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
}

.lightbox__close {
  position: fixed;
  top: 28px;
  right: 28px;
  background: none;
  border: none;
  color: #e0dbd5;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
  font-family: var(--font-sans);
  font-weight: 300;
  z-index: 1001;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__close:focus,
.lightbox__prev:focus,
.lightbox__next:focus {
  outline: none;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #e0dbd5;
  font-size: 1.6rem;
  cursor: pointer;
  width: 28px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
  user-select: none;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

.lightbox__prev {
  left: 0;
}

.lightbox__next {
  right: 0;
}

/* ─── ABOUT ──────────────────────────────────── */
.page--about {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page--about main {
  flex: 1;
}

.about-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 0 48px 80px;
  animation: galleryFadeIn 0.6s ease forwards;
}

.about-content h2 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  margin-top: 0;
}

.about-content p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0;
}

.about-content .spacer {
  height: 28px;
}

.about-content .closing {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 36px;
}

/* ─── CONTACT ────────────────────────────────── */
.page--contact {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page--contact main {
  flex: 1;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
  padding: 0 48px 28px;
  animation: galleryFadeIn 0.6s ease forwards;
}

.contact-photo {
  width: 100%;
  height: auto;
  display: block;
}

.contact-text {
  padding-top: 4px;
}

.contact-text h2 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.contact-text p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0;
}

.process-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.process-steps {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 22px;
}

.direct {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-text .process-steps {
  margin-bottom: 22px;
}

.contact-text .direct {
  margin-bottom: 32px;
}

.contact-text .closing {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 36px;
}

/* ─── Adresse ────────────────────────────────── */
.address {
  display: block;
  margin-top: 32px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-decoration: none;
  transition: opacity 0.2s;
}

.address:hover {
  opacity: 0.6;
}

.address--tel {
  margin-top: 4px;
}

/* ─── Button ─────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--text);
  color: #ebe7de;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  padding: 12px 22px;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.72;
}

.btn--subtle {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn--subtle:hover {
  opacity: 0.6;
}

/* ─── Impressum Link (Contact Footer) ───────── */
.page-footer {
  padding: 40px 48px 44px;
  text-align: center;
}

.impressum-link {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}

.impressum-link:hover {
  opacity: 0.5;
}

@media (max-width: 768px) {
  .page-footer {
    padding: 28px 20px 36px;
  }
}

/* ─── IMPRESSUM Page ─────────────────────────── */
.page--impressum {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page--impressum main {
  flex: 1;
}

.page--impressum .about-content a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.page--impressum .about-content a:hover {
  opacity: 0.6;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 60px 1fr 60px;
    padding: 20px 20px 12px;
    align-items: center;
  }

  .site-header--home {
    grid-template-columns: 1fr 1fr;
  }

  .site-header--home .header-brand {
    display: none;
  }

  .header-brand {
    display: block;
  }

  .header-brand .brand-name {
    font-size: 0.85rem;
    letter-spacing: 0.25em;
  }

  .header-brand .brand-tagline {
    font-size: 1.08rem;
    margin-top: -2px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 24px 20px 48px;
  }

  .home-brand .brand-name {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
  }

  .home-brand .brand-tagline {
    font-size: 1.7rem;
  }

  .home-footer {
    padding: 0 20px 60px;
  }

  .home-footer p {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    white-space: normal;
    text-align: center;
    color: #6e6a66;
  }

  .about-content {
    padding: 24px 20px 60px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 20px 12px;
  }

  .contact-text {
    text-align: center;
  }


  .lightbox__container {
    padding: 0 20px;
  }

  .lightbox__prev { left: 0; }
  .lightbox__next { right: 0; }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .page--about main,
  .page--impressum main {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .page--contact main {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

}
