@font-face {
  font-family: "Avenir Next";
  src: url("fonts/AvenirNext-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("fonts/AvenirNext-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("fonts/AvenirNext-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("fonts/AvenirNext-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f1ea;
  --ink: #0c0c0c;
  --ink-soft: #5a5854;
  --rule: #d6d2c6;
  --brand: var(--ink); /* per-project accent, set on case pages; falls back to ink */
  /* Type scale: 3 sizes, 2 weights (400 / 700), one family */
  --fs-display: clamp(44px, 9vw, 150px);
  --fs-head: clamp(23px, 2.8vw, 38px);
  --fs-base: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }

/* Header */
.site {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px;
  background: var(--bg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: var(--fs-base);
  opacity: 0;
  animation: fade-in 0.6s ease-out 0.05s forwards;
}
/* All three header items share identical size, weight (from .site) and color */
.site__name,
.site__label,
.site__contact {
  color: inherit;
  font: inherit;
  opacity: 1;
}
.site__nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.site__name:hover,
.site__label[href]:hover,
.site__contact:hover { opacity: 0.6; transition: opacity 0.2s; }

.site--over-hero {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  z-index: 5;
  padding: 28px 64px;
}

/* Homepage grid: edge-to-edge 4-col */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
  opacity: 0;
  transform: scale(0.92);
  animation: tile-in 0.7s cubic-bezier(.2, .7, .2, 1) forwards;
}
.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.tile:hover .tile__img { transform: scale(1.08); }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
/* EppicDrive: logo mark sits small on its own green field */
.tile[data-slug="eppic"] { background: #0c3b32; }
.tile[data-slug="eppic"] .tile__img { object-fit: contain; padding: 32%; }
.tile[data-slug="eppic"]:hover .tile__img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .tile { animation: none; opacity: 1; transform: none; }
  .tile:hover .tile__img { transform: none; }
}

/* Case page */
.case {
  opacity: 0;
  animation: fade-in 0.6s ease-out 0.1s forwards;
}

.case__hero {
  position: relative;
  width: 100%;
  opacity: 0;
  transform: scale(1.02);
  animation: hero-in 1s cubic-bezier(.2, .7, .2, 1) 0.05s forwards;
}

/* Overlay hero — full-bleed photo, title over the image */
.case__hero--overlay {
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #111;
  color: #fff;
}
.case__hero--overlay .case__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Cover hero — cream, brand-mark/logo + brand-color title; the whole header is brand-tinted */
.case__hero--cover {
  min-height: 92vh;
  background: var(--bg);
  color: var(--brand);
  display: flex;
  flex-direction: column;
}
.case__hero--cover .site { background: transparent; }
.case__mark {
  width: 132px;
  height: 132px;
  background: var(--brand);
  align-self: center;
  margin-top: clamp(48px, 18vh, 200px);
}
.case__mark--logo {
  width: clamp(160px, 22vw, 240px);
  height: clamp(160px, 22vw, 240px);
  background: transparent;
  object-fit: contain;
}
.case__hero-text {
  margin-top: auto;
  padding: 40px clamp(20px, 4vw, 64px);
}
.case__hero--cover .case__eyebrow { color: inherit; opacity: 0.7; }
.case__title--brand { color: var(--brand); }

.case__hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px clamp(20px, 4vw, 64px);
  pointer-events: none;
}
.case__hero-overlay > * { pointer-events: auto; }
.case__hero--ink-light { color: #f6f4ee; }
.case__hero--ink-dark { color: #0a0a0a; }

.case__eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-base);
  margin: 0 0 24px;
  opacity: 0;
  transform: translateY(12px);
  animation: rise-in 0.7s cubic-bezier(.2,.7,.2,1) 0.45s forwards;
}
.case__title {
  font-family: "Avenir Next", -apple-system, sans-serif;
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 0 -0.05em; /* optical: pull cap left to align ink with the eyebrow */
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(28px);
  animation: rise-in 0.9s cubic-bezier(.2,.7,.2,1) 0.55s forwards;
}

.case__meta {
  display: flex;
  align-items: flex-start;
  gap: clamp(36px, 6vw, 96px);
  padding: 48px clamp(20px, 4vw, 64px);
  margin: 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  animation: fade-in 0.6s ease-out 0.8s forwards;
}
.case__meta > div { display: flex; flex-direction: column; gap: 10px; }
.case__meta dt {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.case__meta dd {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 700;
}
.case__website {
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  background: var(--brand);
  color: var(--bg);
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.case__website[hidden] { display: none; }
.case__website:hover { opacity: 0.85; }

.case__body {
  padding: 64px clamp(20px, 4vw, 64px) 96px;
  max-width: 1200px;
  opacity: 0;
  transform: translateY(20px);
  animation: rise-in 0.8s cubic-bezier(.2, .7, .2, 1) 1s forwards;
}
.case__lede {
  font-family: "Avenir Next", sans-serif;
  font-weight: 400;
  font-size: var(--fs-head);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  max-width: 1000px;
}

/* Stats band */
.case__stats {
  display: flex;
  margin-top: 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.case__stats[hidden] { display: none; }
.case__stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px 48px;
  border-left: 1px solid var(--rule);
}
.case__stat:first-child { padding-left: 0; border-left: none; }
.case__stat:last-child { padding-right: 0; }
.case__stat-num {
  font-weight: 700;
  font-size: var(--fs-head);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--brand);
}
.case__stat-label {
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Artist credits */
.case__artists {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}
.case__artists[hidden] { display: none; }
.case__artists-heading {
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.case__artist-list {
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.7;
  max-width: 1100px;
}
.case__artist { color: var(--ink); white-space: nowrap; }
.case__artist--link { transition: color 0.15s; }
.case__artist--link:hover {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Separator rides with each name (::after) so a wrapped line never begins with it */
.case__artist:not(:last-child)::after { content: "·"; color: var(--rule); padding: 0 0.5ch; }

/* ---- Rich blocks (editorial story, e.g. The Drops) ---- */
.case__blocks { display: flex; flex-direction: column; }
.case__blocks[hidden] { display: none; }

.block { width: 100%; }

/* Chapter — centered editorial intro */
.block--chapter {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(72px, 12vh, 140px) clamp(20px, 4vw, 64px) clamp(40px, 6vh, 72px);
  text-align: center;
}
.block--chapter h2 {
  font-family: "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: var(--fs-head);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 24px;
}
.block--chapter p {
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 60ch;
}

/* Full-bleed media (image or video) with optional caption */
.block--media { margin: 0; }
.block--media img,
.block--media video {
  display: block;
  width: 100%;
  height: auto;
  background: #1a1a1a;
}
/* Wide media: full-bleed image/video with a top/bottom band of its own background color */
.block--media.block--wide {
  padding: clamp(28px, 5vw, 80px) 0;
}
.block--media.block--wide img,
.block--media.block--wide video {
  width: 100%;
  display: block;
  background: transparent;
}

/* Inset media: image centered on a full-width band of its own background color */
.block--media.block--inset {
  padding: clamp(32px, 6vw, 88px) clamp(20px, 4vw, 64px);
}
.block--media.block--inset img,
.block--media.block--inset video {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
}
.block--media.block--contain {
  background: #0c0c0c;
}
.block--media.block--contain img,
.block--media.block--contain video {
  width: 100%;
  max-height: 92vh;
  object-fit: contain;
}
.block--media figcaption,
.block__caption {
  display: block;
  padding: 16px clamp(20px, 4vw, 64px) 0;
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

/* Grid of works */
.block--grid { padding: 0; }
.block__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 0;
  background: #1a1a1a;
}
.block__cell { aspect-ratio: 1 / 1; overflow: hidden; background: #1a1a1a; }
.block__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.block__caption { padding-top: 16px; }

/* Scrolling phone mockup — full-bleed on the mockup's own background */
.block--phone {
  padding: 0;
  background: #edeff1;
}
.phone__stage {
  position: relative;
  max-width: none;
  margin: 0;
}
.phone__frame {
  position: relative;
  z-index: 2;
  width: 100%;
  display: block;
  pointer-events: none;
}
.phone__clip {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  border-radius: 7% / 3.2%;
  background: #fff;
}
.phone__shot {
  width: 100%;
  display: block;
  transform: translateY(0);
  will-change: transform;
}

/* Tour map — where & when */
.block--map {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 104px) clamp(20px, 4vw, 64px);
}
.map__heading {
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.map__canvas { position: relative; width: 100%; }
.map__canvas img { width: 100%; display: block; }
.map__pin { position: absolute; transform: translate(-50%, -50%); }
.map__dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px color-mix(in srgb, var(--brand) 30%, transparent);
}
.map__tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.map__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0 28px;
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}
.map__row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.map__city { font-weight: 700; font-size: var(--fs-base); }
.map__when { font-size: var(--fs-base); color: var(--ink-soft); }
@media (max-width: 600px) {
  .map__tag { display: none; }
}

/* Stats / artists wrapped as blocks get the section padding */
.block--stats { padding: 0 clamp(20px, 4vw, 64px); }
.block--artists { padding: clamp(48px, 8vh, 88px) clamp(20px, 4vw, 64px) clamp(24px, 4vh, 48px); }
.block--stats .case__stats { margin-top: 0; }
.block--artists .case__artists { margin-top: 0; padding-top: 0; border-top: none; }

/* Artist spotlight — one piece + text, alternating sides */
.block--spotlight {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(40px, 7vh, 96px) clamp(20px, 4vw, 64px);
  max-width: 1320px;
  margin: 0 auto;
}
.block--spotlight-right .spotlight__media { order: 2; }
.block--spotlight-right .spotlight__text { order: 1; }
.spotlight__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
}
.spotlight__media img,
.spotlight__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.spotlight__drop {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.spotlight__name {
  font-family: "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: var(--fs-head);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--brand);
}
.spotlight__meta {
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.spotlight__body {
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  max-width: 46ch;
}
.spotlight__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
}
.spotlight__links a {
  font-size: var(--fs-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.spotlight__links a:hover { border-color: currentColor; }

@media (max-width: 820px) {
  .block--spotlight { grid-template-columns: 1fr; gap: 24px; padding-block: clamp(32px, 6vh, 56px); }
  .block--spotlight-right .spotlight__media,
  .block--spotlight-right .spotlight__text { order: 0; }
  .spotlight__body { max-width: none; }
}
@media (max-width: 720px) {
  .block__grid { grid-template-columns: repeat(2, 1fr); }
}

.case__gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #1a1a1a;
  opacity: 0;
  animation: fade-in 0.8s ease-out 1.15s forwards;
}
.case__gallery[hidden] { display: none; }
.case__gallery figure {
  margin: 0;
  overflow: hidden;
}
.case__gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.case__missing {
  padding: 120px 28px;
  text-align: center;
}
.case__missing h1 {
  font-family: "Avenir Next", sans-serif;
  font-weight: 700;
  font-size: var(--fs-display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.case__missing a {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink);
}

@media (max-width: 720px) {
  .case__meta { flex-wrap: wrap; padding: 32px 20px; }
  .case__website { margin-left: 0; align-self: flex-start; flex-basis: 100%; }
  .case__body { padding: 48px 20px 64px; }
  .case__hero--overlay { height: 80vh; min-height: 500px; }
  .case__hero--cover { min-height: 78vh; }
  .case__stats { flex-wrap: wrap; }
  .case__stat { flex: 1 1 50%; padding: 24px; border-left: none; }
  .case__stat:first-child { padding-left: 0; }
}

@keyframes fade-in { to { opacity: 1; } }
@keyframes tile-in { to { opacity: 1; transform: scale(1); } }
@keyframes hero-in { to { opacity: 1; transform: scale(1); } }
@keyframes rise-in { to { opacity: 1; transform: translateY(0); } }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  padding: 40px clamp(20px, 4vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-base);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); transition: color 0.15s; }
.site-footer a:hover { color: var(--ink); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 18px clamp(20px, 4vw, 64px);
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  transform: translateY(110%);
  transition: transform 0.45s cubic-bezier(.2, .7, .2, 1);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner p { margin: 0; font-size: var(--fs-base); line-height: 1.5; max-width: 72ch; }
.cookie-banner a { color: var(--bg); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner button {
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-base);
  padding: 10px 22px;
  border-radius: 100px;
  border: 2px solid var(--bg);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  transition: opacity 0.2s;
}
.cookie-banner button:hover { opacity: 0.82; }
.cookie-banner button.is-primary { background: var(--bg); color: var(--ink); }

/* ---- About / Contact page ---- */
.about {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(72px, 16vh, 200px) clamp(20px, 4vw, 64px);
  opacity: 0;
  animation: rise-in 0.8s cubic-bezier(.2, .7, .2, 1) 0.1s forwards;
  transform: translateY(20px);
}
.about__intro {
  font-family: "Avenir Next", sans-serif;
  font-weight: 400;
  font-size: var(--fs-head);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(36px, 6vh, 64px);
}
.about__intro a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.about__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-base);
  transition: opacity 0.2s;
}
.about__cta:hover { opacity: 0.85; }

/* ---- Legal pages (Impressum / Datenschutz) ---- */
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 4vw, 64px) 96px;
}
.legal h1 {
  font-family: "Avenir Next", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--fs-head);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 40px;
}
.legal h2 {
  font-weight: 700;
  font-size: var(--fs-base);
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
}
.legal p, .legal li {
  font-weight: 400;
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
}
.legal address { font-style: normal; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal .legal__note {
  color: var(--ink-soft);
  font-size: var(--fs-base);
  border-left: 2px solid var(--rule);
  padding-left: 14px;
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile, .case, .case__hero, .case__meta, .case__body, .case__gallery,
  .case__eyebrow, .case__title, .case__stats, .case__artists, .site {
    opacity: 1 !important;
    transform: none !important;
  }
}
