/* ============================================================
   Thomas Wachholz — white-cube minimalism, monochrome
   ============================================================ */

/* self-hosted fonts (variable), no third-party requests */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --ink: #111110;
  --muted: #5a5753;
  --accent: #b5b0a9;
  --hairline: #e2dfda;
  --max: 1280px;
  --pad: clamp(20px, 5vw, 72px);
  --work-gap: clamp(48px, 8vh, 110px);
  --z-nav: 30;
  --z-lightbox: 50;
}

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

::selection { background: var(--accent); color: #fff; }

html { scroll-behavior: smooth; }

body {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px var(--pad);
  mix-blend-mode: darken; /* stays legible over the off-white page */
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.wordmark {
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 26px;
}

.site-nav { display: flex; gap: clamp(16px, 3vw, 40px); }

.site-nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 200ms ease;
  padding: 6px 0; /* enlarge tap area */
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 250ms ease;
}

.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---------- nav extras: socials + language toggle ---------- */

.social-link {
  display: inline-flex;
  align-items: center;
  padding: 6px;
  color: var(--muted);
  transition: color 200ms ease;
}
.social-link:hover { color: var(--accent); }

.lang-toggle {
  border: 1px solid var(--hairline);
  background: none;
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  padding: 4px 9px;
  color: var(--muted);
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- news ---------- */

.news-list { list-style: none; max-width: 880px; }

.news-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}

.news-date {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

.news-body h3 {
  font-family: "Archivo", system-ui, sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
}

.news-body h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: color 200ms ease;
}
.news-body h3 a:hover { color: var(--accent); }

.news-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- contact social ---------- */

.contact-social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 200ms ease;
}
.contact-social:hover { color: var(--accent); }

/* ---------- contact galleries ---------- */

.contact-galleries {
  margin-top: clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--hairline);
  padding-top: 28px;
}

.contact-galleries h3 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.gallery-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.gallery-list li a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  transition: color 200ms ease;
}

.gallery-list li a:hover { color: var(--accent); }

.gallery-list li a strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.gallery-list li a span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
  margin-top: 3px;
}

.gallery-list li a .gallery-country {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

@media (max-width: 860px) {
  .gallery-list { grid-template-columns: repeat(2, 1fr); }
}

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

/* ---------- footer nav ---------- */

.footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { transition: color 200ms ease; display: inline-flex; align-items: center; white-space: nowrap; }
.footer-nav a:hover { color: var(--accent); }
.footer-login { font-size: 12px; color: var(--accent); opacity: 0.75; }

/* ---------- legal subpage ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px var(--pad) 100px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 36px 0 10px;
}

.legal p { color: #2e2c29; max-width: 62ch; }
.legal a { color: var(--accent); }

/* ---------- texts & press ---------- */

.press-list { list-style: none; max-width: 880px; }

.press-entry {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.press-year {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.press-body {
  min-width: 0;
}

.press-title {
  display: block;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

a.press-title {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  transition: color 200ms ease, border-color 200ms ease;
}

a.press-title:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.press-source {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.press-type {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
  align-self: center;
}

/* expandable entries (full text stored per entry) */

button.press-title {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  display: inline;
  border-bottom: 1px solid var(--hairline);
  transition: color 200ms ease, border-color 200ms ease;
}

button.press-title:hover {
  color: var(--accent);
  border-color: var(--accent);
}

button.press-title::after {
  content: "+";
  margin-left: 9px;
  color: var(--accent);
  font-weight: 500;
}

.press-entry.is-open button.press-title::after { content: "\2013"; }

.press-content {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 450ms ease;
}

.press-content-inner { overflow: hidden; }

.press-entry.is-open .press-content { grid-template-rows: 1fr; }

.press-text { padding: 16px 0 6px; }

.press-text p {
  font-size: 14.5px;
  line-height: 1.75;
  color: #2e2c29;
  max-width: 68ch;
  margin: 0 0 14px;
}

.press-ext { padding-bottom: 8px; }

.press-ext a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

@media (max-width: 640px) {
  .press-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .press-type {
    justify-self: start;
    margin-top: 6px;
  }
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.hero > :not(.hero-stream) { position: relative; z-index: 1; }

/* works drifting slowly right-to-left behind the name — full viewport width */
.hero-stream {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: drift var(--hero-duration, 260s) linear infinite;
  animation-direction: var(--hero-anim-dir, normal);
  will-change: transform;
}

.hero-set { display: flex; }

.hero-set img {
  height: var(--h, 40vh);
  width: auto;
  margin-top: var(--y, 0);
  margin-right: clamp(36px, 5vw, 96px);
}

@keyframes drift { to { transform: translateX(-50%); } }

/* hero centered title (optional, toggled in admin) */
.hero-title {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  mix-blend-mode: darken;
  pointer-events: none;
  line-height: 1.1;
}

.hero-title span {
  display: block;
}

/* wordmark hide-in-hero: hidden until scrolled past hero */
.wordmark.hide-in-hero {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 350ms ease, transform 350ms ease;
  pointer-events: none;
}
.wordmark.hide-in-hero.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero > .scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  padding: 12px;
  transition: color 200ms ease, transform 300ms ease;
}
.hero > .scroll-hint:hover { color: var(--accent); transform: translateX(-50%) translateY(4px); }

/* ---------- sections ---------- */

section { padding: clamp(70px, 11vh, 140px) var(--pad); max-width: var(--max); margin: 0 auto; }

.section-label {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  margin-bottom: clamp(40px, 6vh, 72px);
}

.section-label .num {
  color: var(--accent);
  font-weight: 400;
}

/* ---------- works ---------- */

/* uniform vertical rhythm: one gap value between every block,
   no per-figure margins that would stack with grid gaps */
.works {
  display: flex;
  flex-direction: column;
  gap: var(--work-gap);
}

.works .section-label { margin-bottom: 0; }

.work-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

/* catalogue grid for single works */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 48px);
  align-items: start;
}

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

.work-frame {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

.work-frame img {
  transition: transform 600ms cubic-bezier(0.19, 1, 0.22, 1), opacity 400ms ease;
}

.work-frame:hover img { transform: scale(1.015); }

figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

figcaption em {
  font-family: "Archivo", system-ui, sans-serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- about ---------- */

.pull {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.25;
  max-width: 22ch;
  margin-bottom: clamp(40px, 6vh, 72px);
}

.pull em { color: var(--accent); font-style: italic; }

.about-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about-cols { max-width: 62ch; }

.portrait { margin: 0; }

.portrait img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  filter: grayscale(1); /* keep b/w even if the source photo is ever swapped */
}

.about-cols p {
  break-inside: avoid;
  margin-bottom: 1.4em;
  color: #2e2c29;
  max-width: 62ch;
}

/* ---------- cv ---------- */

.cv-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
}

.cv h3 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.cv h3 + ul + h3 { margin-top: 44px; }

.cv ul { list-style: none; }

.cv li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
}

.cv li span { color: var(--muted); font-variant-numeric: tabular-nums; }
.cv li .cv-entry { color: inherit; font-variant-numeric: normal; }
.cv li i { color: var(--muted); font-style: normal; font-size: 12.5px; }

.galleries li { display: block; padding: 0; }

.galleries a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 400;
  transition: color 200ms ease, padding-left 250ms ease;
  cursor: pointer;
}

.galleries a span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 300;
  margin-top: 2px;
}

.galleries a:hover { color: var(--accent); padding-left: 10px; }

/* ---------- contact / footer ---------- */

.contact-line {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: clamp(22px, 2.6vw, 32px);
}

.contact-line a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  transition: opacity 200ms ease;
}
.contact-line a:hover { opacity: 0.65; }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 28px var(--pad);
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--muted);
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer p { flex-shrink: 0; }

.back-top { transition: color 200ms ease; padding: 8px 0; }
.back-top:hover { color: var(--accent); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(17, 17, 16, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 64px);
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lightbox-stage img {
  max-width: min(100%, calc(100vw - 160px));
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 300ms ease;
}

.lightbox.zoomed .lightbox-stage img {
  transform: scale(2);
  cursor: zoom-out;
}

.lightbox-caption {
  font-size: 13.5px;
  color: rgba(250, 249, 247, 0.85);
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 70ch;
}

.lightbox-caption em {
  font-family: "Archivo", system-ui, sans-serif;
  font-style: italic;
  font-size: 15.5px;
  color: #fff;
}

.lightbox.zoomed .lightbox-caption,
.lightbox.zoomed .lightbox-nav,
.lightbox.zoomed .lightbox-counter { opacity: 0; pointer-events: none; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: rgba(250, 249, 247, 0.7);
  cursor: pointer;
  transition: color 200ms ease, opacity 200ms ease;
  z-index: 2;
}
.lightbox-nav:hover { color: #fff; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-counter {
  position: absolute;
  bottom: 22px;
  right: 28px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(250, 249, 247, 0.55);
  font-variant-numeric: tabular-nums;
  transition: opacity 200ms ease;
}

@media (max-width: 640px) {
  .lightbox-stage img { max-width: calc(100vw - 32px); max-height: calc(100vh - 200px); }
  .lightbox-nav { width: 44px; height: 44px; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  transition: color 200ms ease;
}
.lightbox-close:hover { color: var(--accent); }

/* ---------- hamburger toggle (mobile only) ---------- */

.nav-toggle {
  display: none; /* hidden on desktop */
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
  z-index: 2;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 350ms cubic-bezier(0.19, 1, 0.22, 1), opacity 250ms ease;
}

.nav-toggle-bar + .nav-toggle-bar { margin-top: 7px; }

/* X state */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .cv-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-layout { grid-template-columns: 1fr; }
  .portrait { max-width: 480px; }
}

/* hero vertical scroll option (toggled via .hero-vertical class on body) */
@media (max-width: 1024px) {
  .hero-vertical .hero-stream { overflow: hidden; }
  .hero-vertical .hero-track {
    flex-direction: column; width: 100%; height: max-content;
    animation: drift-up var(--hero-duration-mobile, 180s) linear infinite;
    animation-direction: var(--hero-anim-dir, normal);
  }
  .hero-vertical .hero-set { flex-direction: column; width: 100%; }
  .hero-vertical .hero-set img {
    height: auto; width: 100%; margin-top: 0; margin-right: 0; margin-bottom: 8px;
  }
  @keyframes drift-up { to { transform: translateY(-50%); } }
}

/* tablet/mobile layout switch */
@media (max-width: 1024px) {
  /* mobile hero: images fill 100vh together — one top, one bottom.
     max-width constrains so two are always visible side by side. */
  .hero-set img {
    height: calc(var(--h, 40vh) * 1.15);
    max-width: 70vw;
    object-fit: cover;
    object-position: center;
    margin-top: calc(var(--y, 0vh) * 0.85);
    margin-right: 10px;
  }

  .work-row { grid-template-columns: 1fr; row-gap: var(--work-gap); }
  .work-grid { grid-template-columns: 1fr; row-gap: var(--work-gap); }

  /* header: logo left, hamburger right */
  .site-header {
    padding: 16px 18px;
    justify-content: space-between;
    align-items: center;
  }
  .wordmark { font-size: 18px; }

  /* show hamburger */
  .nav-toggle { display: block; }

  /* reset mix-blend-mode when nav overlay is open so backdrop-filter works */
  .site-header:has(.site-nav.is-open) {
    mix-blend-mode: normal;
  }

  /* nav as full-screen slide-in overlay from right */
  .site-nav {
    position: fixed;
    inset: 0;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: rgba(250, 249, 247, 0.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 450ms cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
    padding: 80px 40px;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav a {
    font-size: 22px;
    letter-spacing: 0.12em;
    padding: 18px 0;
  }

  .site-nav .social-link { margin-top: 32px; }
  .site-nav .social-link svg { width: 22px; height: 22px; }

  .site-nav .lang-toggle {
    margin-top: 16px;
    font-size: 14px;
    padding: 8px 16px;
  }
}

/* ---------- works teaser grid (main page) ---------- */

/* Grid column classes set by backend (default: 1 column) */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
}
.works-grid.cols-2 { grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); }
.works-grid.cols-3 { grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }

/* single-column: fill the content width, same presence as the project page gallery.
   Explicit width is required: as a flex item with margin:auto the grid would otherwise
   shrink-to-fit to the image's intrinsic srcset width. */
.works-grid:not(.cols-2):not(.cols-3) { width: 100%; }

.teaser {
  display: block;
  text-decoration: none;
  color: inherit;
}

.teaser img {
  /* natural aspect ratio — no crop */
  width: 100%;
  height: auto;
  transition: transform 600ms cubic-bezier(0.19, 1, 0.22, 1), opacity 400ms ease;
}

.teaser:hover img { transform: scale(1.02); }

.teaser-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.teaser-caption strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}

@media (max-width: 860px) {
  .works-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet/mobile: reset desktop multi-column to 1fr, then apply mobile-cols classes */
@media (max-width: 1024px) {
  .works-grid.cols-2,
  .works-grid.cols-3 { grid-template-columns: 1fr; }

  .works-grid.mobile-cols-1 { grid-template-columns: 1fr; }
  .works-grid.mobile-cols-2 { grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 2vw, 20px); }
  .works-grid.mobile-cols-3 { grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.5vw, 16px); }

  /* remove single-column max-width constraint on mobile when multi-col is active */
  .works-grid.mobile-cols-2,
  .works-grid.mobile-cols-3 { max-width: none; }
}

/* ---------- project page ---------- */

.project-header {
  padding: clamp(100px, 14vh, 160px) var(--pad) clamp(40px, 6vh, 72px);
  max-width: var(--max);
  margin: 0 auto;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(32px, 5vh, 56px);
  transition: color 200ms ease;
}

.project-back:hover { color: var(--ink); }

.project-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.project-meta {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.project-description {
  max-width: 72ch;
  padding: 0 var(--pad) clamp(40px, 6vh, 72px);
  max-width: var(--max);
  margin: 0 auto;
}

.project-description p {
  font-size: 16px;
  line-height: 1.65;
  color: #2e2c29;
  max-width: 62ch;
  margin-bottom: 1.2em;
}

/* project slider */
.project-gallery {
  padding: 0 var(--pad) clamp(70px, 11vh, 140px);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--work-gap);
}

.project-gallery figure { margin: 0; }

/* inactive by default: page scroll & touch gestures pass through; click activates */
.viewer-3d { position: relative; }

.viewer-3d iframe {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 2px;
  background: #fff;
  pointer-events: none;
}

.viewer-3d.is-active iframe { pointer-events: auto; }

.viewer-3d-hint {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 250ms ease;
}

.viewer-3d.is-active .viewer-3d-hint { opacity: 0; visibility: hidden; }

.project-gallery img {
  cursor: pointer;
  transition: opacity 300ms ease;
}

.project-gallery img:hover { opacity: 0.92; }

.project-gallery figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.project-gallery figcaption em {
  font-family: "Archivo", system-ui, sans-serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
}

/* short viewports (landscape phones) */
@media (max-height: 560px) {
  .hero > .scroll-hint { display: none; }
}

/* ---------- cookie banner ---------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  border-top: 1px solid var(--hairline);
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 14px;
  line-height: 1.5;
  transform: translateY(0);
  transition: transform 400ms ease;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner.dismissed { transform: translateY(100%); }

.cookie-text { max-width: 56ch; font-size: 14px; line-height: 1.6; }
.cookie-links { display: block; margin-top: 6px; font-size: 13px; }
.cookie-links a { color: var(--muted); border-bottom: 1px solid var(--hairline); margin-right: 16px; transition: color 200ms ease; }
.cookie-links a:hover { color: var(--ink); }

.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-accept,
.cookie-reject {
  flex-shrink: 0;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 200ms ease;
  border-radius: 0;
}
/* DSK: Akzeptieren und Ablehnen müssen gleichwertig sein (gleiche Größe, Kontrast, Sichtbarkeit) */
.cookie-accept {
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}
.cookie-reject {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.cookie-accept:hover,
.cookie-reject:hover { opacity: 0.8; }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; gap: 12px; text-align: center; }
  .cookie-buttons { justify-content: center; }
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px var(--pad);
  }
  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .work-frame img { transition: none; }
  .site-nav { transition: none; }
}
