/* ============================================================
   TTURBAN — Contemporary Gallery
   White wall, viel Weissraum, präzise Typografie.
   Farbe kommt ausschliesslich aus den Werken.
   ============================================================ */

/* ---------- 1. TOKENS ---------- */

:root {
  /* Wall */
  --wall:    #ffffff;
  --wall-2:  #f4f3f1;
  --ink:     #111110;
  --muted:   #77776f;
  --line:    #e5e4e0;
  --line-2:  #d4d3ce;

  /* Einziger Interaktionsakzent — sehr sparsam eingesetzt */
  --accent:  #111110;

  /* Farbfläche (Hero + Seitenköpfe). Die Formen selbst liegen in
     assets/img/colorfield.svg — dort auch die beiden Flächenfarben. */
  --field-base: #F5BE3E;

  /* Type */
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;

  /* Fluid scale */
  --step--2: clamp(0.68rem, 0.66rem + 0.1vw, 0.74rem);
  --step--1: clamp(0.8rem, 0.78rem + 0.12vw, 0.88rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.16vw, 1.05rem);
  --step-1:  clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.25rem + 1.6vw, 2.7rem);
  --step-3:  clamp(2.2rem, 1.4rem + 3.6vw, 4.6rem);
  --step-4:  clamp(2.8rem, 1.3rem + 6.6vw, 7.6rem);

  /* Layout */
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --maxw: 1680px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- 2. RESET / BASE ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}

p { margin: 0 0 1em; }

::selection { background: var(--ink); color: var(--wall); }

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

/* ---------- 3. GLOBALE LAYER ---------- */

/* Farbfläche: randlose Ebene aus flachen Cut-out-Formen.
   Liegt hinter Hero und Seitenköpfen, nie hinter der Galerie. */
.colorfield {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: var(--field-base);
  background-image: url("../img/colorfield.svg?v=2");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
/* Gespiegelt, damit Seitenköpfe nicht identisch zum Hero aussehen */
.colorfield--flip { transform: scaleX(-1); }

/* Auf der Farbfläche ist alles schwarz — kein Grau, wie im flachen Plakat */
.on-field,
.on-field .muted,
.on-field .eyebrow,
.on-field .nav__link,
.on-field .lang,
.on-field .social-link { color: var(--ink); }

/* Sehr feines Papierkorn — nur eine Ahnung von Textur */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--ink);
  z-index: 9997;
}

/* Cursor: nur ein feiner Ring */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
.cursor {
  width: 30px; height: 30px;
  border: 1px solid rgba(17, 17, 16, 0.4);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background-color 0.35s var(--ease-out), border-color 0.35s, opacity 0.25s;
}
.cursor-dot {
  width: 4px; height: 4px;
  background: var(--ink);
}
.cursor.is-hot {
  width: 84px; height: 84px;
  background: var(--ink);
  border-color: var(--ink);
}
.cursor.is-hot ~ .cursor-dot { opacity: 0; }
.cursor .cursor-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wall);
  opacity: 0;
  transition: opacity 0.25s;
}
.cursor.is-hot .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

/* ---------- 4. PRELOADER ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--wall);
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__inner { text-align: center; width: min(280px, 60vw); }
.loader__word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 0.2em;
}
.loader__word span {
  display: inline-block;
  transform: translateY(110%);
  animation: loadLetter 0.6s var(--ease-out) forwards;
}
@keyframes loadLetter { to { transform: translateY(0); } }
.loader__bar {
  margin-top: 1.1rem;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 0.2s linear;
}
.loader__pct {
  margin-top: 0.7rem;
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 5. HEADER ---------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: transform 0.5s var(--ease-out), background-color 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--line);
}
.header.is-hidden { transform: translateY(-102%); }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.9vw, 1.9rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.46em;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.8rem);
}
.nav__link {
  position: relative;
  font-size: var(--step--1);
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 0.3rem 0;
  transition: color 0.3s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.45s var(--ease-out);
}
/* Am Seitenanfang steht der Header auf der Farbfläche — dort alles in Schwarz */
.header:not(.is-stuck) .nav__link,
.header:not(.is-stuck) .lang,
.header:not(.is-stuck) .lang button,
.header:not(.is-stuck) .social-link { color: var(--ink); }
.header:not(.is-stuck) .brand em { color: var(--ink); opacity: 0.55; }

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav-tools { display: flex; align-items: center; gap: 1.1rem; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.lang button {
  padding: 0.2rem 0.1rem;
  transition: color 0.25s;
  text-transform: uppercase;
}
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.lang span { opacity: 0.4; }

.social-link {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  color: var(--muted);
  transition: color 0.3s;
}
.social-link:hover { color: var(--ink); }
.social-link svg { width: 16px; height: 16px; }

/* Burger */
.burger {
  display: none;
  width: 34px; height: 34px;
  position: relative;
}
.burger i {
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 1px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out), opacity 0.2s;
}
.burger i:first-child { transform: translate(-50%, calc(-50% - 4px)); }
.burger i:last-child  { transform: translate(-50%, calc(-50% + 4px)); }
.burger.is-open i:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.burger.is-open i:nth-child(2) { opacity: 0; }
.burger.is-open i:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

/* Mobile takeover */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: var(--wall);
  display: grid;
  align-content: center;
  padding: 6rem var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
  overflow-y: auto;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-nav a {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: clamp(2.2rem, 10vw, 3.6rem);
  line-height: 1.25;
  padding: 0.3em 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.mobile-nav.is-open a { opacity: 1; transform: none; }
.mobile-nav.is-open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: 0.16s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: 0.22s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: 0.28s; }

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: block; }
}
@media (min-width: 901px) {
  .mobile-nav { display: none; }
}

/* ---------- 6. LAYOUT ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: clamp(4.5rem, 12vw, 11rem); }
.section--tight { padding-block: clamp(3rem, 7vw, 6.5rem); }

.section--tint { background: var(--wall-2); }

.eyebrow {
  display: block;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.h-huge { font-size: var(--step-4); }
.h-xl   { font-size: var(--step-3); }
.h-lg   { font-size: var(--step-2); }

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  letter-spacing: -0.012em;
  max-width: 46ch;
}
.muted { color: var(--muted); }
.measure { max-width: 62ch; }

hr.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Links im Fliesstext */
.link {
  position: relative;
  padding-bottom: 1px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease-out);
}
.link:hover { background-size: 0% 1px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--wall);
  border-radius: 999px;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn svg { width: 0.95em; height: 0.95em; transition: transform 0.4s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--ink); color: var(--wall); border-color: var(--ink); }

/* Textlink mit Pfeil */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.35s var(--ease-out);
}
.arrow-link:hover { gap: 1rem; }
.arrow-link svg { width: 0.9em; height: 0.9em; }

/* ---------- 7. TICKER (dezent) ---------- */

.marquee {
  --speed: 20s;   /* niedriger = schneller. 60s wirkte wie Stillstand. */
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 1.1rem 0;
  border-block: 1px solid var(--line);
  user-select: none;
}
.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: 3.5rem;
  padding-right: 3.5rem;
  align-items: center;
  animation: marquee var(--speed) linear infinite;
  white-space: nowrap;
}
.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 3.5rem;
  font-size: var(--step--1);
  font-weight: 450;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee__track span::after {
  content: "";
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--line-2);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 8. HERO ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 7rem clamp(2.5rem, 6vw, 5rem);
  isolation: isolate;
}

/* Text links, Werkbild rechts */
.hero__grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: clamp(1.6rem, 5vw, 2.6rem); }
  /* Auf dem Handy steht das Werk zuoberst */
  .hero__figure { order: -1; }
}

/* Werkbild — der Held der Seite */
.hero__figure {
  margin: 0;
  justify-self: end;
  max-width: 100%;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.15s forwards;
}
.hero__figure img {
  display: block;
  width: 100%;
  max-height: clamp(320px, 76svh, 940px);
  object-fit: contain;
  object-position: center;
}
@media (max-width: 900px) {
  .hero__figure { justify-self: start; }
  .hero__figure img { object-position: left center; max-height: clamp(260px, 42svh, 520px); }
}
.hero__figure figcaption {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: right;
}
@media (max-width: 900px) {
  .hero__figure figcaption { text-align: left; }
}

/* Titel bewusst zurückgenommen — das Werkbild führt */
.hero__title {
  font-size: clamp(2rem, 5.6vw, 5.2rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-block: 0.08em;
  margin-block: -0.075em;
}
/* Zweite und dritte Zeile leicht eingerückt, wie im Plakatsatz */
.hero__title .line:nth-child(2) { margin-left: 0.055em; }
.hero__title .line:nth-child(3) { margin-left: 0.11em; }

/* Die Zeilen sind während der Einblendung beschnitten (overflow:hidden),
   damit der Text von unten hereinfahren kann. Danach hebt main.js die
   Beschneidung auf — sonst würde der wackelnde Smiley oben abgeschnitten.
   Hinweis: overflow ist in CSS nicht animierbar, deshalb per JavaScript. */
.hero__title .line.is-unclipped { overflow: visible; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: riseIn 1.1s var(--ease-out) forwards;
}
.hero__title .line:nth-child(1) > span { animation-delay: 0.1s; }
.hero__title .line:nth-child(2) > span { animation-delay: 0.19s; }
.hero__title .line:nth-child(3) > span { animation-delay: 0.28s; }
@keyframes riseIn { to { transform: none; } }
.hero__title .thin { font-weight: 300; }

/* Kleine Zeile über dem Titel, wie „Our New Site Is Coming Soon" */
.hero__kicker {
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
  max-width: 22ch;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}

.hero__meta {
  margin-top: clamp(1.8rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.75s forwards;
}
.hero__sub {
  max-width: 44ch;
  font-size: var(--step-0);
  margin: 0;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Handgezeichneter Akzent neben der Schlusszeile */
.hero__doodle {
  display: inline-block;
  vertical-align: baseline;
  width: 0.82em;          /* skaliert mit der Titelgrösse */
  height: 0.82em;
  margin-left: 0.12em;
  margin-bottom: -0.06em;
  transform-origin: 50% 60%;
  animation: doodleWobble 2.8s var(--ease-io) infinite;
}
/* Kräftiger Wackler — die Bewegung liegt bewusst in der Drehung,
   nicht in der Höhe, damit der Smiley nicht in die Zeile darüber ragt. */
@keyframes doodleWobble {
  0%   { transform: rotate(-13deg) scale(1); }
  20%  { transform: rotate(13deg)  scale(1.08); }
  40%  { transform: rotate(-10deg) scale(1); }
  55%  { transform: rotate(8deg)   scale(1.05); }
  70%  { transform: rotate(-5deg)  scale(1); }
  100% { transform: rotate(-13deg) scale(1); }
}

.scroll-cue {
  position: absolute;
  left: var(--gutter); bottom: clamp(2rem, 5vw, 4rem);
  display: none;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (min-width: 961px) { .scroll-cue { display: inline-flex; } }
.scroll-cue i {
  display: block;
  width: 40px; height: 1px;
  background: var(--line-2);
  overflow: hidden;
  position: relative;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-100%);
  animation: cueSlide 2.4s var(--ease-io) infinite;
}
@keyframes cueSlide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- 9. REVEALS ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal="wipe"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s var(--ease-io);
  transition-delay: var(--d, 0s);
}
[data-reveal="wipe"].is-in { clip-path: inset(0 0 0 0); }

[data-reveal="scale"] { transform: translateY(26px); }
[data-reveal="scale"].is-in { transform: none; }

/* Bild-Reveal: Maske fährt hoch, Bild zoomt aus */
.reveal-img { overflow: hidden; }
.reveal-img img {
  transform: scale(1.12);
  transition: transform 1.4s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal-img.is-in img { transform: scale(1); }

/* Split-Text */
.split .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .word > i {
  display: inline-block;
  font-style: normal;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 0.05s);
}
.split.is-in .word > i { transform: none; }

/* ---------- 10. GALERIE ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
/* Auf schmalen Displays enger setzen, damit die Filter in zwei Zeilen passen */
@media (max-width: 520px) {
  .filters { gap: 0.7rem 1.1rem; }
}
.chip {
  position: relative;
  font-size: var(--step--1);
  font-weight: 450;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding-bottom: 0.35rem;
  transition: color 0.3s;
}
.chip::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease-out);
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); }
.chip[aria-pressed="true"]::after { transform: scaleX(1); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.6rem, 3.5vw, 3.4rem) clamp(1.2rem, 2.5vw, 2.6rem);
}
.grid--home { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

.card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
}
.card.is-hidden { display: none; }

.card__media {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--wall-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.card:hover .card__media img { transform: scale(1.045); }

.card__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
}
.card__title {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-0);
  letter-spacing: -0.015em;
  line-height: 1.2;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.5s var(--ease-out);
}
.card:hover .card__title { background-size: 100% 1px; }
.card__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--step--2);
  color: var(--muted);
  letter-spacing: 0.04em;
}
.card__num {
  font-size: var(--step--2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ---------- 11. LIGHTBOX ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--wall);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.lightbox__count {
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lightbox__actions { display: flex; align-items: center; gap: 1.4rem; }
.lightbox__close {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  color: var(--muted);
  transition: color 0.3s, transform 0.4s var(--ease-out);
}
.lightbox__close:hover { color: var(--ink); transform: rotate(90deg); }

.lightbox__body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter);
  overflow-y: auto;
  align-items: start;
}
@media (max-width: 900px) {
  .lightbox__body { grid-template-columns: 1fr; }
}
.lightbox__figure {
  display: grid;
  place-items: center;
  position: sticky;
  top: 0;
  min-height: min(74svh, 900px);
}
.lightbox__figure img {
  max-height: min(74svh, 900px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  animation: lbIn 0.7s var(--ease-out);
}
@keyframes lbIn { from { opacity: 0; transform: translateY(14px); } }

.lightbox__title { font-size: var(--step-2); margin-bottom: 0.9rem; }
.lightbox__tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.tag {
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.lightbox__text p { color: var(--muted); font-size: var(--step-0); }
.lightbox__text p:first-child { color: var(--ink); font-size: var(--step-1); line-height: 1.45; letter-spacing: -0.01em; }

.lightbox__nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.lb-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--muted);
  transition: color 0.3s, gap 0.35s var(--ease-out);
}
.lb-arrow:hover { color: var(--ink); gap: 0.85rem; }
.lb-arrow:disabled { opacity: 0.3; pointer-events: none; }

/* ---------- 12. EDITORIAL BLÖCKE ---------- */

.feature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
}
.feature--flip > *:first-child { order: 2; }
@media (max-width: 800px) {
  .feature--flip > *:first-child { order: 0; }
}
.feature__media { margin: 0; overflow: hidden; }
.feature__media img { width: 100%; }

/* Intro: Überschrift steht MIT im linken Feld, damit das Werkbild rechts
   auf gleicher Höhe beginnt. Sonst schiebt die Überschrift alles nach unten
   und zwischen Text und Bild entsteht eine grosse Leerfläche. */
.feature--intro {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 800px) {
  .feature--intro { grid-template-columns: 1fr; }
}

/* Grosses Werkbild neben einer bewusst kurz gehaltenen Textspalte */
.feature__media--big {
  align-self: start;
  justify-self: end;
  max-width: 100%;
}
.feature__media--big img {
  max-height: clamp(420px, 78svh, 940px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 800px) {
  .feature__media--big { justify-self: start; }
}

/* Textspalte daneben kompakter setzen, damit die Sektion nicht auseinanderläuft */
.measure--tight { align-self: start; }
.measure--tight .lede { font-size: var(--step-0); line-height: 1.55; max-width: 40ch; }
.measure--tight p { margin-bottom: 0.75em; max-width: 42ch; }
.measure--tight p:last-child { margin-bottom: 0; }
.feature__caption {
  margin-top: 0.8rem;
  font-size: var(--step--2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Nummerierte Kapitel */
.chapter { display: grid; gap: 0.9rem; }
.chapter__num {
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Zitat */
.quote {
  font-family: var(--display);
  font-weight: 300;
  font-size: var(--step-2);
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 24ch;
  margin: 0;
}

/* Kennzahlen */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat span {
  display: block;
  margin-top: 0.5rem;
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 13. SEITENKOPF ---------- */

.pagehead {
  position: relative;
  padding-block: clamp(9rem, 17vw, 15rem) clamp(3rem, 7vw, 6rem);
  isolation: isolate;
}
.pagehead__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.pagehead h1 {
  font-size: clamp(2.8rem, 10.5vw, 10rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.05em;
}
@media (max-width: 860px) {
  .pagehead__grid { grid-template-columns: 1fr; }
}
/* Direkt nach dem Seitenkopf reicht weniger Luft */
.pagehead + .section { padding-top: clamp(3rem, 7vw, 6rem); }

/* ---------- 13b. EINGEBETTETE FREMDSEITE ---------- */

/* Randlose Einbettung: der Rahmen ist so hoch wie die fremde Seite,
   damit man NICHT innerhalb des Rahmens scrollen muss.

   Die Höhen sind gemessen (artboxy-Profil, Stand 13 Werke) — eine fremde
   Domain lässt ihre Inhaltshöhe nicht auslesen, sie muss also fest stehen.
   Gemessen bei Fensterbreite → Seitenhöhe:
     620px → 7858    (eine Spalte)
     820px → 4158    (zwei Spalten)
     920px → 4332
    1000px → 3070    (drei Spalten)
    1400px → 3418
    2821px → 3549
   Kommen auf artboxy Werke dazu, hier die Werte nachziehen. */
.embed {
  width: 100%;
  background: var(--wall);
  border-block: 1px solid var(--line);
  overflow: hidden;
}
.embed iframe {
  display: block;
  width: 100%;
  border: 0;
  height: 3640px;              /* ab 1500px Fensterbreite */
}
@media (max-width: 1499px) {
  .embed iframe { height: 3520px; }   /* drei Spalten */
}
@media (max-width: 999px) {
  .embed iframe { height: 4450px; }   /* zwei Spalten */
}
@media (max-width: 699px) {
  .embed iframe { height: 8150px; }   /* eine Spalte */
}

.embed__fallback {
  margin-top: 1.2rem;
  font-size: var(--step--1);
  color: var(--muted);
}
/* Sichtbarer Datenschutzhinweis über dem fremden Inhalt */
.embed__notice {
  max-width: 74ch;
  margin: 0 0 1.4rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line-2);
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- 13c. RECHTSTEXTE ---------- */

.legal { max-width: 74ch; }
.legal h2 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.7rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.legal h3 {
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
}
.legal p { color: var(--muted); }
.legal ul { color: var(--muted); padding-left: 1.1rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.35rem; }
.legal address {
  font-style: normal;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1em;
}
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--muted); }
.legal__meta {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}
/* Für Angaben, die noch ergänzt werden müssen */
.legal mark {
  background: #fff3b0;
  color: var(--ink);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* ---------- 14. KONTAKT ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.contact-card {
  background: var(--wall);
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2.4rem);
  transition: background-color 0.4s var(--ease-out);
}
.contact-card:hover { background: var(--wall-2); }
.contact-card h3 { font-size: var(--step-1); margin-bottom: 0.7rem; font-weight: 500; }
.contact-card p { color: var(--muted); max-width: 34ch; }
.contact-card a.big {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-1);
  letter-spacing: -0.025em;
  word-break: break-word;
  line-height: 1.2;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.45s var(--ease-out);
}
.contact-card a.big:hover { background-size: 0% 1px; }

/* ---------- 15. FOOTER ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 6rem) 2rem;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 2.5rem;
}
.footer__cols > div:first-child { grid-column: span 1; }
.footer h4 {
  font-family: var(--body);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer ul a { font-size: var(--step--1); transition: color 0.3s; color: var(--ink); }
.footer ul a:hover { color: var(--muted); }
.footer__legal {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: var(--step--2);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- 16. REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .split .word > i { transform: none !important; }
  .reveal-img img { transform: none !important; }
  .grain, .cursor, .cursor-dot { display: none; }
}
