:root {
  --bg-dark: #0a0a0a;
  --bg-cream: #0a0a0a;
  --text-light: #ede9dd;
  --text-white: #ffffff;
  --on-photo: #ffffff;
  --accent: #ff4b1f;
  --gray: #9c948a;
  --gray-line: rgba(237, 233, 221, 0.14);
  --font: "pragmatica-extended", "Helvetica Neue", Arial, sans-serif;
  --font-body: "pragmatica-extended", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  background: var(--bg-cream);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-light);
  background: var(--bg-dark);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, strong, b {
  font-weight: 700;
}

/* Pragmatica bleibt den echten Überschriften vorbehalten, der Rest der
   Seite läuft über die Systemschrift (--font-body). */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
}

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

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

/* <picture> ist nur ein unsichtbarer Wrapper fuer die WebP/JPG-Fallback-
   Auswahl (siehe generate_webp.py) - soll die bestehenden img-Styles
   (width/height/object-fit) unveraendert durchreichen. */
picture {
  display: block;
}
.grid-item picture,
.pg-figure picture,
.marquee-track picture {
  width: 100%;
  height: 100%;
}
.about-wrap picture {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header (Liquid-Glass-Leiste) ---------- */

header {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
  border-radius: 22px;
  background: rgba(10, 10, 10, 0.35);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 680px) {
  header {
    top: 12px;
    left: 14px;
    right: 14px;
    padding: 13px 20px;
    border-radius: 18px;
  }
}

.logo {
  font-family: var(--font);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* Normale, dauerhaft sichtbare Nav-Leiste im Header (Desktop). Erst unter
   680px wird daraus ein Vollbild-Overlay hinter dem Hamburger-Button. */
nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  line-height: 1;
  color: var(--gray);
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1px;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--gray);
  transition: color 0.3s ease;
}

.nav-icon:hover {
  color: var(--text-light);
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

/* ---- Hamburger (nur mobil sichtbar) ---- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-light);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

body.nav-lock {
  overflow: hidden;
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 99;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    background: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: clamp(20px, 3.6vw, 30px);
    letter-spacing: 0.02em;
  }

  .nav-link::after {
    bottom: -8px;
  }

  .nav-icons {
    margin-top: 12px;
  }

  .nav-icon {
    width: 26px;
    height: 26px;
  }
}

/* ---------- Homepage (Work-Grid) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 110px 36px 36px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.grid-item-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-dark);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grid-item:hover .grid-item-overlay {
  opacity: 0.75;
}

.grid-item-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 21px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grid-item:hover .grid-item-label {
  opacity: 1;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.grid-item:hover img {
  transform: scale(1.05);
}

/* Quellbild hat einen ~10px weißen Rand; leicht reinzoomen, damit er
   in der Kachel nicht sichtbar ist. */
.grid-item--zoom img {
  transform: scale(1.06);
}

.grid-item--zoom:hover img {
  transform: scale(1.11);
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); padding: 90px 24px 24px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
}

/* Auf Touch-Geräten gibt es kein Hover: Schleier + Projektname dauerhaft
   sichtbar statt erst nach Tap. */
@media (max-width: 680px), (hover: none) {
  .grid-item-overlay {
    opacity: 0.38;
  }

  .grid-item-label {
    opacity: 1;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- Footer (schlicht, zentriert) ---------- */

.site-footer {
  padding: 56px 24px;
  text-align: center;
  border-top: 1px solid var(--gray-line);
}

.site-footer-contact {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 18px;
  transition: color 0.3s ease;
}

.site-footer-contact:hover {
  color: var(--accent);
}

.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer-links a {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.3s ease;
}

.site-footer-links a:hover {
  color: var(--text-light);
}

/* ---------- Leistungen ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  background: var(--bg-dark);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.28);
  z-index: 0;
}

.hero-tag {
  position: relative;
  z-index: 1;
  font-size: 9.12px;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 22px;
}

.hero-title {
  position: relative;
  z-index: 1;
  font-size: clamp(32px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--text-light);
  max-width: 900px;
}

.section-label {
  display: block;
  font-size: 9.6px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Clients / logo marquee ---- */

.clients {
  padding: 56px 0;
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
  overflow: hidden;
}

.marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 90px;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track a {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.marquee-track a:hover {
  opacity: 1;
}

.marquee-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---- Services ---- */

.services {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 36px 120px;
}

.services-head {
  margin-bottom: 44px;
}

.services-head .section-label {
  margin-bottom: 16px;
}

.services-title {
  font-size: 22.8px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  max-width: 640px;
}

.services-list {
  list-style: none;
}

.services-list li {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-line);
  transition: padding-left 0.3s ease, opacity 0.3s ease;
}

.services-list li:first-child {
  border-top: 1px solid var(--gray-line);
}

.services-list li:hover {
  padding-left: 12px;
}

.services-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
}

.services-name {
  font-size: 17.76px;
  font-weight: 700;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.services-note {
  margin-top: 24px;
  padding-left: 48px;
  font-size: 11px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-light);
  opacity: 0.55;
}

@media (max-width: 700px) {
  .services { padding-left: 24px; padding-right: 24px; }
  .marquee-track { gap: 60px; }
  .marquee-track a { width: 110px; height: 110px; }
  .services-name { font-size: 14px; }
}

/* ---------- About ---------- */

.about-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 150px 44px 100px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 70px;
  align-items: flex-start;
}

.about-wrap img {
  border-radius: 0;
  width: 100%;
}

.about-copy h1 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.about-copy p {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 20px;
  max-width: 560px;
}

.about-copy .contact-label {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-light);
  margin-top: 28px;
}

.about-copy .contact-email {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  margin-top: 8px;
}

@media (max-width: 760px) {
  .about-wrap { grid-template-columns: 1fr; padding: 120px 24px 80px; }
}

/* ---------- Projekt-Detail (Text mittig, Galerie als Grid) ---------- */

.project-top {
  max-width: 640px;
  margin: 0 auto;
  padding: 150px 24px 50px;
  text-align: center;
}

.project-top-text h1 {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.project-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-light);
  opacity: 0.8;
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 680px) {
  .project-top { padding: 120px 24px 36px; }
}

/* ---- Galerie: einheitliches Grid, großzügiges Seiten-Padding ---- */

.project-grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 8px 90px 60px;
}

.project-grid-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pg-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.pg-figure img,
.pg-figure video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.pg-figure:hover img,
.pg-figure:hover video {
  transform: scale(1.04);
}

/* Bilder mit eigenem weißen Rahmen (z.B. BOSS Open) nicht beschneiden -
   komplett samt Rahmen einpassen statt object-fit:cover. */
.pg-figure--framed {
  background: var(--bg-dark);
}

.pg-figure--framed img {
  object-fit: contain;
}

.pg-figure--framed:hover img {
  transform: scale(1.015);
}

.pg-figure .is-clickable {
  cursor: zoom-in;
}

/* ---- Lightbox ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
}

.lightbox-content img,
.lightbox-content video {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  color: var(--on-photo);
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 600px) {
  .lightbox { padding: 20px; }
}

@media (max-width: 1000px) {
  .project-grid { padding: 8px 50px 60px; }
}

@media (max-width: 900px) {
  .project-grid-masonry { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 600px) {
  .project-grid { padding: 8px 24px 48px; }
  .project-grid-masonry { grid-template-columns: 1fr; }
}

.project-nav {
  display: flex;
  justify-content: space-between;
  padding: 20px 36px 60px;
  font-size: 10.56px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-nav a:hover {
  color: var(--accent);
}

.project-nav .spacer {
  flex: 1;
}

/* ---------- Imprint ---------- */

.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 140px 24px 100px;
}

.legal-wrap h1 {
  font-size: 26.4px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 30px;
}

.legal-wrap h2 {
  font-size: 17.76px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 34px 0 12px;
}

.legal-wrap h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 22px 0 8px;
}

.legal-wrap p, .legal-wrap li {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 12px;
}

.legal-wrap ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-wrap a {
  color: var(--text-light);
  text-decoration: underline;
}

/* ---------- Kontakt ---------- */

.contact-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 150px 24px 120px;
}

.contact-wrap h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.contact-intro {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-light);
  opacity: 0.8;
  max-width: 480px;
  margin-bottom: 44px;
}

.contact-status {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 14px 18px;
  border: 1px solid var(--gray-line);
  margin-bottom: 30px;
}

.contact-status--success {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-status--error {
  color: var(--gray);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray-line);
  padding: 10px 2px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit {
  align-self: flex-start;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: var(--text-light);
  border: none;
  padding: 15px 32px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.contact-submit:hover {
  background: var(--accent);
  color: var(--text-light);
}

@media (max-width: 680px) {
  .contact-wrap { padding: 120px 24px 90px; }
}

/* ---------- Motion / Interaktion ---------- */

/* Scroll-Reveal. Ohne JS (oder bevor JS läuft) hat .reveal allein keine
   Opacity-Regel - Inhalt bleibt also immer normal sichtbar. Erst wenn
   motion.js ein Element aktiv beobachtet, bekommt es .reveal-armed und
   wird unsichtbar/verschoben, bis es beim Scrollen in den Viewport kommt
   und .is-visible erhält. */
.reveal.reveal-armed {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-armed.is-visible {
  opacity: 1;
  transform: none;
}

/* Wort-für-Wort-Reveal für große Headlines. motion.js zerlegt den Text
   in .word-Spans; ohne JS bleibt der Text einfach normaler Fließtext. */
.split-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  animation: word-in 0.7s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i) * 45ms);
}

@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-armed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .split-reveal .word {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Video-Hover-Preview auf Grid-Kacheln ---- */

.grid-item-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.grid-item-overlay,
.grid-item-label {
  z-index: 1;
}

.grid-item.is-previewing .grid-item-video {
  opacity: 1;
}

/* ---- Seitenübergänge ----
   Frueher: native View Transition (Browser-Crossfade) beim Seitenwechsel.
   Rausgenommen, weil sie zeitgleich mit dem eigenen Scroll-Reveal (motion.js)
   lief - dadurch schwang der Seiteninhalt sichtbar zweimal ein (Crossfade,
   dann nochmal per JS) und ruckelte vor allem auf Mobile/Mac spuerbar.
   Das JS-Reveal allein reicht als Einflug-Effekt. */
