:root {
  --ink: #f5f5f2;
  --muted: #a5a9b4;
  --bg: #090b10;
  --bg-deep: #050609;
  --panel: #13161d;
  --panel-raised: #1a1e27;
  --line: rgba(255, 255, 255, 0.13);
  --paper: #f0efe9;
  --dark-text: #11131a;
  --accent: #6b63ff;
  --green: #c9ff6b;
  --shell: min(1760px, calc(100% - 40px));
  --font-display: "Cabinet Grotesk", "Arial Black", sans-serif;
  --font-body: "Satoshi", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

.icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--dark-text);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.gallery-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  padding-inline: max(20px, calc((100vw - 1760px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(9, 11, 16, 0.84);
  backdrop-filter: blur(18px);
  transition: background 200ms ease, border-color 200ms ease;
}

.gallery-header.is-scrolled {
  border-color: var(--line);
  background: rgba(9, 11, 16, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 34px;
  height: 24px;
  object-fit: contain;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 42px);
}

.gallery-nav a {
  color: #c6c9d0;
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease;
}

.gallery-nav a:hover,
.gallery-nav a[aria-current="page"] {
  color: var(--ink);
}

.gallery-nav a[aria-current="page"]::after {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 4px;
  background: var(--green);
  content: "";
}

.header-cta,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #090b10;
  font-size: 13px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.header-cta:hover,
.action-button:hover {
  background: #dbff9b;
  transform: translateY(-2px);
}

.gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.55fr);
  align-items: end;
  gap: clamp(48px, 8vw, 150px);
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(132px, 11vw, 184px) 0 clamp(48px, 5vw, 78px);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.dialog-label {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-intro h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 7.2vw, 116px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.78;
}

.intro-copy {
  max-width: 520px;
  margin: 0 0 4px;
  color: #c1c4cc;
  font-size: clamp(15px, 1.15vw, 18px);
}

.archive {
  width: var(--shell);
  margin-inline: auto;
  padding: 0 0 clamp(100px, 10vw, 170px);
}

.board-controls {
  position: sticky;
  top: 72px;
  z-index: 60;
  padding: 14px 0 18px;
  background: rgba(9, 11, 16, 0.9);
  backdrop-filter: blur(20px);
}

.gallery-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--panel-raised);
  transition: border-color 180ms ease, background 180ms ease;
}

.gallery-search:focus-within {
  border-color: rgba(201, 255, 107, 0.62);
  background: #1d222b;
}

.gallery-search > .icon {
  color: #d4d6dc;
  font-size: 23px;
}

.gallery-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.gallery-search input::placeholder {
  color: #9b9faa;
  opacity: 1;
}

.gallery-search input::-webkit-search-cancel-button {
  filter: invert(1);
}

.search-count {
  color: #8f949f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.style-filter {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 1px;
  overflow-x: auto;
  scrollbar-width: none;
}

.style-filter::-webkit-scrollbar {
  display: none;
}

.style-filter button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #aeb2bd;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.style-filter button span {
  font-size: 12px;
  font-weight: 800;
}

.style-filter button[aria-selected="true"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--dark-text);
}

@media (hover: hover) {
  .style-filter button:not([aria-selected="true"]):hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: #1b1f28;
    color: var(--ink);
  }
}

.gallery-grid {
  --gallery-columns: 6;
  column-gap: 14px;
  padding-top: 2px;
}

.gallery-loading,
.gallery-error,
.gallery-empty {
  column-span: all;
  margin: 0;
  padding: 72px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.gallery-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-raised);
  color: var(--ink);
  cursor: pointer;
}

.gallery-reset:hover {
  border-color: var(--green);
}

.gallery-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
  break-inside: avoid;
  transform-origin: center bottom;
}

.gallery-card-visual {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
}

.gallery-card-visual::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.gallery-card img {
  width: 100%;
  height: auto;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), filter 320ms ease;
}

.gallery-card-visual--short {
  aspect-ratio: 1 / 1.04;
}

.gallery-card-visual--tall {
  aspect-ratio: 3 / 4;
}

.gallery-card-visual--short img,
.gallery-card-visual--tall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 9px 4px 0;
  color: #e7e8e4;
}

.gallery-card-label span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card-label .icon {
  flex: 0 0 auto;
  color: #777d89;
  font-size: 16px;
  transition: color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
  .gallery-card:hover img {
    filter: saturate(1.07) contrast(1.03);
    transform: scale(1.035);
  }

  .gallery-card:hover .gallery-card-label .icon {
    color: var(--green);
    transform: translate(2px, -2px);
  }
}

.motion-ready .gallery-card {
  opacity: 0;
  transform: translateY(62px) scale(0.965);
  transition:
    opacity 640ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-ready .gallery-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: clamp(100px, 12vw, 190px) 32px;
  border-top: 1px solid rgba(17, 19, 26, 0.12);
  background: var(--paper);
  color: var(--dark-text);
  text-align: center;
}

.gallery-action .eyebrow {
  color: #554dde;
}

.gallery-action h2 {
  max-width: 960px;
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(54px, 7vw, 108px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.gallery-action > p:not(.eyebrow) {
  max-width: 650px;
  margin: 28px auto 0;
  color: #535862;
  font-size: 18px;
}

.gallery-action .action-button {
  min-height: 54px;
  margin-top: 38px;
  padding-inline: 28px;
  border-color: var(--dark-text);
  background: var(--dark-text);
  color: #fff;
}

.gallery-action .action-button:hover {
  background: #252936;
}

.gallery-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 42px;
  width: var(--shell);
  min-height: 180px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 13px;
}

.footer-brand img {
  width: 142px;
  height: auto;
}

.gallery-footer p {
  margin: 0;
}

.gallery-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.gallery-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 800;
}

.gallery-footer-links a:hover {
  color: var(--green);
}

.dialog-disclosure {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.gallery-dialog {
  width: min(1240px, calc(100vw - 48px));
  max-width: none;
  height: min(860px, calc(100vh - 48px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: #0b0d12;
  color: var(--ink);
}

.gallery-dialog::backdrop {
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(12px);
}

.dialog-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.7fr);
  width: 100%;
  height: 100%;
}

.dialog-visual {
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: #06070a;
}

.dialog-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialog-details {
  display: flex;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  padding: clamp(64px, 6vw, 92px) clamp(28px, 4vw, 54px) 42px;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.dialog-details h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.8vw, 70px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.dialog-reference-block {
  display: grid;
  gap: 16px;
}

.dialog-references {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dialog-references img {
  width: 100%;
  height: min(220px, 24vh);
  padding: 8px;
  background: #eceae2;
  object-fit: contain;
}

.dialog-close,
.dialog-arrow {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(8, 9, 13, 0.82);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.dialog-close {
  top: 18px;
  right: 18px;
  font-size: 24px;
}

.dialog-arrow {
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.dialog-arrow-prev {
  left: 18px;
}

.dialog-arrow-next {
  left: calc(70.8% - 66px);
}

@media (max-width: 1600px) {
  .gallery-grid {
    --gallery-columns: 5;
  }
}

@media (max-width: 1180px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .gallery-grid {
    --gallery-columns: 4;
  }
}

@media (max-width: 900px) {
  .gallery-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-copy {
    max-width: 600px;
  }

  .gallery-grid {
    --gallery-columns: 3;
    column-gap: 12px;
  }
}

@media (max-width: 700px) {
  :root {
    --shell: calc(100% - 20px);
  }

  .gallery-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding-inline: 12px;
  }

  .gallery-nav {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding-inline: 12px;
  }

  .gallery-intro {
    padding: 108px 0 38px;
  }

  .gallery-intro h1 {
    margin-top: 14px;
    font-size: clamp(54px, 18vw, 78px);
    line-height: 0.8;
  }

  .intro-copy {
    font-size: 14px;
  }

  .board-controls {
    top: 64px;
    margin-inline: -10px;
    padding: 10px 10px 14px;
  }

  .gallery-search {
    min-height: 50px;
    padding-inline: 14px;
    border-radius: 15px;
  }

  .gallery-search > .icon {
    font-size: 21px;
  }

  .gallery-search input {
    font-size: 15px;
  }

  .search-count {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .style-filter {
    gap: 6px;
    margin-top: 8px;
  }

  .style-filter button {
    min-height: 44px;
    padding-inline: 12px;
  }

  .style-filter button span {
    font-size: 11px;
  }

  .gallery-grid {
    --gallery-columns: 2;
    column-gap: 8px;
  }

  .gallery-card {
    margin-bottom: 10px;
  }

  .gallery-card-visual {
    border-radius: 12px;
  }

  .gallery-card-label {
    min-height: 31px;
    padding: 7px 2px 0;
  }

  .gallery-card-label span {
    font-size: 10px;
  }

  .gallery-card-label .icon {
    font-size: 14px;
  }

  .gallery-action {
    padding: 100px 16px;
  }

  .gallery-action h2 {
    font-size: clamp(48px, 14vw, 76px);
  }

  .gallery-action > p:not(.eyebrow) {
    font-size: 16px;
  }

  .gallery-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
    padding: 48px 0;
  }

  .gallery-dialog {
    width: 100vw;
    height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .dialog-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.4fr) auto;
    overflow-y: auto;
  }

  .dialog-visual {
    min-height: 58svh;
  }

  .dialog-details {
    overflow-y: visible;
    gap: 34px;
    padding: 32px 20px 42px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dialog-details h2 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .dialog-close {
    position: fixed;
  }

  .dialog-arrow {
    top: 31svh;
  }

  .dialog-arrow-next {
    right: 14px;
    left: auto;
  }

  .dialog-arrow-prev {
    left: 14px;
  }
}

@media (max-width: 420px) {
  .brand span {
    font-size: 15px;
  }

  .brand-mark {
    width: 30px;
  }

  .header-cta {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Preserve selected compositions, including multi-scene images. */
.gallery-card-visual { aspect-ratio: auto; }
.gallery-card-visual img { display: block; height: auto; object-fit: contain; }
.dialog-reference-block[hidden] { display: none; }

/* Staggered masonry from the first row, preserving the full images. */
.gallery-grid { position: relative; column-count: auto; }
.gallery-card { position: absolute; margin: 0; }
.dialog-references a { display: block; border-radius: 8px; overflow: hidden; background: white; }
.dialog-references a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.dialog-references a img { width: 100%; height: 120px; object-fit: contain; }

/* 2026-09-23: Marken-Hinweis */
.intro-disclaimer {
  display: block;
  margin-top: 12px;
  color: #8a8e99;
  font-size: 13px;
  line-height: 1.5;
}

/* 2026-09-23: Galerie im selben Violett wie die Startseite (statt Lime). */
:root {
  --green: #8b85ff;
}

.header-cta,
.action-button {
  border-color: #6257ee;
  border-radius: 999px;
  background: #6257ee;
  color: #fff;
  box-shadow: 0 8px 24px rgba(75, 64, 209, 0.18);
}

.header-cta:hover,
.action-button:hover {
  background: #6a60ed;
}

.style-filter button[aria-selected="true"] {
  color: #151329;
}

.gallery-search:focus-within {
  border-color: rgba(139, 133, 255, 0.62);
}

.gallery-action .action-button {
  border-color: #6257ee;
  background: #6257ee;
}

.gallery-action .action-button:hover {
  background: #6a60ed;
}
