/* =========================================================
   Kristof Schloesser – new look (layout & type after the
   felixschelhasse.de concept). Loaded on every page; on
   project/legal pages it sits on top of style.css.
   ========================================================= */
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/rubik.woff2) format("woff2"); }
@font-face { font-family: "Rubik"; font-style: italic; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-italic.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700 900; font-display: swap; src: url(fonts/outfit.woff2) format("woff2"); }

:root {
  --bg: #fff;
  --text: #000;
  --accent: #000;
  --grey: #f2f4f3;
  --panel: #000;
  --display: "Outfit", "Rubik", system-ui, sans-serif;
  --fs: clamp(16px, 0.55vw + 10px, 17.75px);
  --side: 5vw;
  --ease: cubic-bezier(.19, 1, .22, 1);
}

body {
  font: 400 var(--fs)/1.45 "Rubik", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body.dark { --bg: #1c1c1c; --text: #fff; --accent: #fff; --grey: #232323; --panel: #2a2a2a; background: var(--bg); color: var(--text); }
em { color: inherit; }

/* ---------- header: handwritten logo top left, like Felix ---------- */
.header {
  padding: 22px var(--side) !important;
  align-items: center;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.header::before { display: none; }
.logo img, body.scrolled .logo img { height: clamp(52px, 5.4vw, 78px); }
.nav a { font-family: "Rubik", sans-serif; font-weight: 500; font-size: 19px; }
.nav a::after { color: inherit; opacity: .45; }
.nav a[aria-current] span { color: inherit; }
.nav ul { gap: 30px; }
body.dark.scrolled .header::before { background: rgb(28 28 28 / .82); }
/* light backdrop for readability once content scrolls under the header */
body.scrolled .header { padding-top: 12px !important; padding-bottom: 12px !important; }
body.scrolled .logo img { height: 48px; }
body.scrolled .header::before {
  display: block; opacity: 1;
  background: rgb(255 255 255 / .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* ---------- footer: black, centered, like Felix ---------- */
.footer {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px var(--side) 22px;
  background: #151515; color: #fff; text-align: center; font-size: 14px;
  border-top: 1px solid rgb(255 255 255 / .12);
}
.footer img { width: 120px; height: auto; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer small { opacity: .6; font-size: 13px; }

/* ---------- buttons (pill, like the shop buttons) ---------- */
.pill {
  display: inline-block; padding: .78em 1.45em;
  border-radius: 9999px; background: var(--text); color: var(--bg);
  font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background .25s, color .25s, transform .4s var(--ease);
}
.pill:hover { background: #2b2b2b; }
.pill.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--text); }
.pill.ghost:hover, .pill.ghost[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- project & legal pages: same layout as before, new type ---------- */
.project h1, .legal h1, .notfound h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; }
.project h2, .project h4, .legal h2 { font-family: var(--display); font-weight: 800; }
.project .caption h2, .next .caption h2 { font-family: "Rubik", sans-serif; font-weight: 500; }
.next-label { color: var(--text); font-family: var(--display); font-weight: 800; }
.icon { stroke: currentColor; }
.cursor { background: #000; }
/* "View" circle styled as the Fresnel lens of the favicon: white rim, dark gap,
   warm glowing lens with stepped rings, dark lettering */
body.dark .cursor {
  color: #111; mix-blend-mode: normal; opacity: 1;
  background: #fff; border: 0; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.button:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.col a, .legal a { text-decoration-color: currentColor; }

/* =========================================================
   HOME
   ========================================================= */
.home main { padding: 0; max-width: none; }
.home .header .nav { opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.home.past-hero .header .nav { opacity: 1; visibility: visible; }

/* ----- hero: nav column 30% + full-height picture 70% ----- */
.hero { display: flex; min-height: 100vh; min-height: 100svh; }
.hero-nav { flex: 0 0 30%; display: flex; align-items: center; padding: 120px 5vw; }
.hero-nav ul { list-style: none; margin: 0; padding: 0; }
.hero-nav a {
  display: inline-block; padding: 9px 18px 9px 0;
  font-weight: 500; font-size: clamp(19px, 1.5vw, 22px); text-decoration: none;
  position: relative;
}
.hero-nav a::after {
  content: ""; position: absolute; left: 0; right: 18px; bottom: 6px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.hero-nav a:hover::after { transform: scaleX(1); }
.hero-pic { flex: 0 0 70%; position: relative; overflow: hidden; background: #111; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hero-pic.grabbing { cursor: grabbing; }
.hero-pic .slide { -webkit-user-drag: none; }
.slide {
  position: absolute; inset: 0; display: block; color: #fff; text-decoration: none;
  transform: translateX(100%); visibility: hidden;
}
.slide.is-active, .slide.is-prev { visibility: visible; transition: transform 5s cubic-bezier(.65, 0, .25, 1), visibility 0s; }
.slide.is-active { transform: none; z-index: 2; }
.slide.is-prev { z-index: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 9s linear; }
.slide.is-active img { transform: scale(1.05); }       /* slow drift while a slide is shown */
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / .4) 0%, rgb(0 0 0 / 0) 22%); }
.slide-cap { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; }
.slide-cap strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; letter-spacing: .01em; }
.slide-cap em { display: block; margin-top: .15em; font-size: 12.5px; font-style: normal; opacity: .7; }
.hero-count { display: none; position: absolute; z-index: 3; right: 24px; bottom: 22px; color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: .85; }

/* ----- about: black media-text block, like Felix ----- */
.about-block {
  display: grid; grid-template-columns: 50% 1fr;
  max-width: 1340px; margin: clamp(90px, 10vw, 160px) auto;
  width: calc(100% - 2 * var(--side));
  background: var(--panel); color: #fff;
}
.about-block figure { margin: 0; position: relative; min-height: clamp(420px, 46vw, 680px); }
.about-block figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.about-text { padding: clamp(36px, 4vw, 72px) clamp(28px, 3.4vw, 48px); align-self: center; }
.about-text > * { max-width: 620px; }
.about-text p { margin: 0 0 1.05em; }
.about-text strong { font-weight: 700; }
.about-text a { color: inherit; text-underline-offset: 3px; }
.about-text .label { font-size: inherit; line-height: inherit; font-weight: 700; margin: 0 0 .6em; }
.services { list-style: none; margin: 0 0 1.05em; padding: 0; }
.services li { padding: .15em 0; }
.services li::before { content: "▸"; display: inline-block; width: 1.1em; font-size: .8em; opacity: .8; }

/* ----- portfolio: grey band, centered heading, 3-col grid ----- */
.portfolio { background: var(--grey); padding: clamp(90px, 10vw, 144px) 0; }
.section-title {
  margin: 0 0 .5em; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.35rem); line-height: 1;
}
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 clamp(48px, 5vw, 72px); }
.filters .pill { font-size: 15px; cursor: pointer; border: 0; font-family: inherit; }

.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(32px, 3.6vw, 56px); row-gap: clamp(110px, 9vw, 150px); align-items: start;
  max-width: 1340px; margin: 0 auto; padding: 0 var(--side);
}
.card { position: relative; }
.card[hidden] { display: none; }
.card > a { display: block; text-decoration: none; color: inherit; }
.card .media { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: rgb(127 127 127 / .15); }
.card .media img, .card .media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 2.7s var(--ease), opacity .5s, translate 1.1s cubic-bezier(.65, 0, .25, 1);
}
.card .media video { opacity: 0; }
/* hover slideshow: further pictures of the project push each other in from the right */
.card .media img.hs { -webkit-user-drag: none; }
/* hover: picture zooms in just a little */
.card > a:hover .media img, .card > a:hover .media video { transform: scale(1.2); }
.card > a.playing video { opacity: 1; }

/* the playful coloured banner from the current site */
.card .frame { position: relative; }
.card .caption {
  position: absolute; left: -16px; top: calc(100% - 30px); bottom: auto; z-index: 1;
  max-width: calc(100% + 16px); margin: 0; padding: 12px 20px 10px;
  background: var(--cap-bg, #111); will-change: transform, translate;
}
.card .caption h3 { margin: 0; font-family: "Rubik", sans-serif; font-weight: 500; font-size: 20px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cap-name, #fff); }
.card .caption span { display: block; font-size: 13.5px; line-height: 1.5; color: var(--cap-cat, #fff); opacity: .92; }

/* reveal */
/* hidden only while home.js runs (it sets html.js), so the portfolio never stays empty without it */
.js .card .media { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); }
.js .card .caption { opacity: 0; transform: translateY(16px); transition: opacity .7s .25s, transform .7s .25s var(--ease); }
.js .card.in .media { clip-path: inset(0); }
.js .card.in .caption { opacity: 1; transform: none; }

/* ----- contact: text left, picture right, like Felix' "Support" ----- */
.contact-block { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 4vw, 64px); padding: clamp(40px, 4vw, 64px) var(--side); }
.contact-block h2 { margin: 0 0 .35em; font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.35rem); line-height: 1; }
.contact-block .links { padding-top: 2.85em; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 30px; }
.links a, .links span { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.02em; }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.links svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.contact-block figure { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; max-height: 86vh; justify-self: end; width: min(100%, 640px); }
.contact-block figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
  .about-block { grid-template-columns: 1fr; }
  .about-block figure { aspect-ratio: 4 / 3; min-height: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- mobile ---------- */
@media (max-width: 767px) {
  .header { padding: 14px var(--side) !important; }
  .nav a { font-size: 40px; }
  .home .header .nav, .home.past-hero .header .nav { opacity: 0; visibility: hidden; }
  .home.menu-open .header .nav { opacity: 1; visibility: visible; }
  body:not(.dark) .nav { background: var(--bg); }

  .hero { flex-direction: column; }
  .hero-nav { flex: none; padding: 110px var(--side) 28px; }
  .hero-nav ul { display: flex; gap: 22px; }
  .hero-pic { flex: none; height: 72svh; }

  .about-block { width: 100%; margin: 72px 0; }
  .about-block figure { aspect-ratio: 4 / 5; }
  .cards { grid-template-columns: 1fr; row-gap: 96px; }
  .card .caption h3 { font-size: 18px; }
  .card .caption { left: -8px; }
  .contact-block { grid-template-columns: 1fr; }
  .contact-block figure { justify-self: stretch; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .slide.is-active img { transform: none; }
  .js .card .media { clip-path: none; }
  .js .card .caption { opacity: 1; transform: none; }
}

/* home: header stays transparent while the hero is on screen */
.home:not(.past-hero) .header::before { display: none; }
.home:not(.past-hero) .header { padding-top: 22px !important; padding-bottom: 22px !important; }
.home:not(.past-hero) .logo img { height: clamp(52px, 5.4vw, 78px); }
@media (max-width: 767px) { .home:not(.past-hero) .header { padding-top: 14px !important; padding-bottom: 14px !important; } }

/* About block 30 % smaller overall (picture, text, spacing) on larger screens */
@media (min-width: 1025px) {
  .about-block { zoom: 0.7; max-width: 1556px; grid-template-columns: minmax(0, 670fr) minmax(0, 886fr); }
  .about-text { font-size: calc(1em / 0.7); }  /* text back to its normal size */
  .about-text > * { max-width: none; }  /* let the text use the full, wider column */
}

/* scrolling: header bar and menu disappear, only the logo stays */
body.scrolled .header::before, body.dark.scrolled .header::before { display: none; }
.header .nav { transition: opacity .35s, visibility .35s; }
.logo img { transition: height .5s var(--ease), filter .35s; }
body.scrolled .logo img { filter: drop-shadow(0 1px 4px rgb(0 0 0 / .65)); }
@media (min-width: 768px) {
  body.scrolled .header .nav,
  body.home.past-hero.scrolled .header .nav { opacity: 0; visibility: hidden; }
}

/* small spotlight icon: level with the logo, 50 px left of the carousel */
.hero { position: relative; }
.hero-icon {
  position: absolute; z-index: 51; top: 10px; right: calc(70% + 18px);  /* lamp sits ~8 px from the carousel */
  height: clamp(76px, 7.84vw, 114px); aspect-ratio: 170 / 250;           /* 20 % larger */
}
.hero-icon img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* lamp body 40 % larger, scaled around the lens so the light beam still starts there */
.hero-icon .hi-lamp { transform: scale(1.4); transform-origin: 72% 15%; }
/* the lamp is always in colour; the light beam only appears on hover */
.hero-icon .hi-beam { opacity: 0; transition: opacity 4s ease; }          /* slow fade out */
.hero-icon.lit .hi-beam { opacity: 1; transition-duration: .4s; }
@media (max-width: 767px) { .hero-icon { display: none; } }

/* portfolio: "Load more" button below the grid */
.load-more { display: flex; justify-content: center; margin-top: clamp(64px, 6vw, 96px); }
.load-more[hidden] { display: none; }
.load-more .pill { font-size: 15px; cursor: pointer; border: 0; font-family: inherit; }


/* carousel: small, quiet text link to the project, left-aligned with the name */
.slide-link {
  display: inline-flex; align-items: center; gap: .35em; margin-top: 3px; padding: 0; line-height: 1.2;
  color: #fff; text-decoration: none; font-size: 11.5px; letter-spacing: .02em; opacity: .8;
  transition: opacity .25s;
}
.slide-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.slide-link span { transition: transform .25s; }
.slide-link:hover span { transform: translateX(3px); }
.slide-cap { display: flex; flex-direction: column; align-items: flex-start; }   /* title and link stacked tightly */

/* video play button: small translucent white disc (40 % transparent) with a dark triangle
   (the accent is white in the dark design, so the old white-on-white triangle was invisible) */
.video button::before {
  width: 52px; height: 52px;
  background: rgb(255 255 255 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231c1c1c'%3E%3Cpath d='M7.5 5v14l11-7z'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 6px 24px rgb(0 0 0 / .25);
}
@media (max-width: 767px) { .video button::before { width: 42px; height: 42px; background-size: 19px; } }

/* project pages: descriptive texts in justified type (with hyphenation against gaps);
   the narrow credits column stays left-aligned */
.project .text p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.project .col[style*="33.333"] .text p { text-align: left; -webkit-hyphens: manual; hyphens: manual; }

/* project pages: lighter, more open bold for labels and lead-ins (Rubik 700/900 looked clogged
   white-on-dark); a <strong> inside a label no longer jumps to 900 */
.project .text em, .project .text strong { font-weight: 600; letter-spacing: .015em; }
.project .text em strong { font-weight: inherit; }

/* header menu: "Portfolio" opens a small submenu – Showproduction / Archiv */
.nav li.has-sub { position: relative; }
.nav .sub {
  position: absolute; top: 100%; left: -16px; z-index: 5;
  display: flex; flex-direction: column; gap: 2px; min-width: max-content;
  padding: 10px 16px 12px; margin-top: 6px;
  background: rgb(28 28 28 / .94); border-radius: 8px; box-shadow: 0 10px 30px rgb(0 0 0 / .35);
  /* slides out of the "Portfolio" text: it unrolls downwards from the top edge */
  opacity: 0; visibility: hidden; transform: translateY(-14px); clip-path: inset(0 0 100% 0 round 8px);
  transition: opacity .6s ease, visibility .9s, transform .9s cubic-bezier(.33, 0, .2, 1), clip-path .9s cubic-bezier(.33, 0, .2, 1);
}
.nav .sub li { opacity: 0; transform: translateY(-8px); transition: opacity .5s ease, transform .8s cubic-bezier(.33, 0, .2, 1); }
.nav li.has-sub:hover .sub li, .nav li.has-sub:focus-within .sub li { opacity: 1; transform: none; }
.nav li.has-sub:hover .sub li:nth-child(1), .nav li.has-sub:focus-within .sub li:nth-child(1) { transition-delay: .2s; }
.nav li.has-sub:hover .sub li:nth-child(2), .nav li.has-sub:focus-within .sub li:nth-child(2) { transition-delay: .35s; }
.nav .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }  /* hover bridge */
.nav li.has-sub:hover .sub, .nav li.has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; clip-path: inset(-20px -20px -40px -20px round 8px); transition-delay: 0s; }
.nav .sub a { font-size: 15px; font-weight: 400; line-height: 1.7; }
@media (max-width: 767px) {
  /* mobile menu overlay: the two categories sit right under "Portfolio" */
  .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; clip-path: none; background: none; box-shadow: none;
              padding: 2px 0 8px 4px; margin: 0; gap: 0; }
  .nav .sub li { opacity: 1; transform: none; }
  .nav .sub::before { display: none; }
  .nav .sub a { font-size: 22px; line-height: 1.45; opacity: .75; }
}

/* archive (video production) pages: no big title on top, more air between text and video */
.video-project .row:has(> .col > .video) { margin-top: clamp(70px, 8vw, 120px); }
/* credit lists in the half-width columns stay left-aligned (no justified gaps) */
.project .col[style*="--w:50"] .text p, .project .col[style*="--w:50"] .text { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
/* archive pages: the two credit columns get 50 px more room between them */
.video-project .row .row { gap: 70px; }
/* archive pages: 20 px more space between stacked videos (20 → 40 px) */
.video-project .video + .video { margin-top: 40px; }
/* archive pages: texts use the full width; the names flow in up to three columns */
.video-project .credits-list { columns: 3 230px; column-gap: 70px; }
.video-project .credits-list p { margin: 0 0 .35em; break-inside: avoid; text-align: left; -webkit-hyphens: manual; hyphens: manual; }
/* few names: fill three columns row by row instead of balancing them into two */
.video-project .credits-grid { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 70px; }
@media (max-width: 1024px) { .video-project .credits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .video-project .credits-grid { grid-template-columns: 1fr; } .video-project .credits-grid p { white-space: normal !important; } }
@media (min-width: 1025px) { .video-project .credits-grid .col-2 { grid-column: 2; } }

/* photos come as <picture> (AVIF first, JPG fallback): the wrapper must not change the layout */
picture { display: block; }
.slide picture { display: contents; }
.col > picture > img { width: 100%; }
.gallery picture img, .col > picture > img { pointer-events: none; }

/* photo protection (together with main.js / home.js): no dragging, no selection,
   no long-press "save image" menu on iOS */
img, video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* smaller "View" circle (was 86 px) */
.cursor { width: 50px; height: 50px; margin: -25px 0 0 -25px; font-size: 12px; }

/* hide the system pointer over the cards, the white "View" circle replaces it */
@media (hover: hover) and (pointer: fine) {
  .card .media, .card .media * { cursor: none !important; }
}

/* project pages with long credit names (e.g. UNISON): credits column 40 %, text 60 %,
   so no name wraps; the 33.333 / 66.666 styling rules still apply */
@media (min-width: 768px) {
  /* as wide as the longest credit line (max. half the row), the text takes the rest */
  .col.wide-credits { flex: 0 0 auto; width: max-content; max-width: 50%; }
  .col.wide-credits p { white-space: nowrap; }
  .col.wide-credits p:has(a) { white-space: normal; }
  .col.wide-credits + .col { flex: 1 1 0; }
}

/* phones: 50 px more space between the credits and the text (16 → 66 px) */
@media (max-width: 767px) {
  .project .row:not(.pair) { gap: 66px; }
}
