/* ╔══════════════════════════════════════════════════════════════════════╗
   ║   VOGELFREI — SHARED STYLESHEET                                      ║
   ║                                                                      ║
   ║   Ordered to match how you walk the site.                            ║
   ║                                                                      ║
   ║     01  SETTINGS ............ colors, fonts, sizes                   ║
   ║     02  BASE ................ reset, body, focus                     ║
   ║     03  SHARED TYPE ......... headings, paragraphs, labels, links    ║
   ║     04  SHARED LAYOUT ....... wrap, section, divider, reveal         ║
   ║     05  HEADER .............. top of every page                      ║
   ║     06  FOOTER .............. bottom of every page                   ║
   ║     07  HOME — hero ......... index                                  ║
   ║     08  PROJECT BLOCK ....... index + every project page             ║
   ║     09  PROJECT IMAGES ...... index thumbnail, detail hero, caption  ║
   ║     10  FACTS ............... output / team / partners               ║
   ║     11  TEAM ................ ourteam                                ║
   ║     12  SUPPORT ............. support                                ║
   ║     13  PAGE HEADER ......... any page that still uses one           ║
   ║     14  GALLERY ............. click-through stills + frame ratios    ║
   ╚══════════════════════════════════════════════════════════════════════╝ */
/* ══════════════════════════════════════════════════════════════════════
   00  FONTS — self-hosted. Nothing is fetched from Google.
   Split by character set, so the browser pulls latin only, and reaches
   for latin-ext just on pages carrying Milojević, Mića or Spajić.
   ══════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/libre-baskerville-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* ══════════════════════════════════════════════════════════════════════
   01  SETTINGS — change a value here, it updates everywhere
   ══════════════════════════════════════════════════════════════════════ */

:root {

  /* Surfaces */
  --color-bg:            #ffffff;   /* page background                   */
  --color-bg-raised:     #f7f3e8;   /* cream — doc panel                 */

  /* Text */
  --color-text:          #1b1a18;   /* headings                          */
  --color-text-muted:    #55534e;   /* body copy                         */
  --color-text-faint:    #6e6e6e;   /* notes                             */
  --color-text-pale:     #A8A79D;   /* small serif captions              */

  /* The red */
  --color-accent:        #6E0902;
  --color-accent-bright: #8F1A10;   /* hover                             */

  /* The header bar — light grey, same family as the empty image frame */
  --color-bar:        #EAEAEA;
  --color-bar-solid:  #EAEAEA;   /* mobile drop-down, which is opaque */
  --color-on-bar:       #1b1a18;
  --color-on-bar-faint: #6e6e6e;

  /* Inversion for interactive states — black block, white type */
  --color-on-video:    #ffffff;   /* hero type, over the footage      */
  --color-invert-bg:   #000000;
  --color-invert-text: #ffffff;

  /* Empty image frame */
  --color-image-empty: #EAEAEA;

  /* Rules */
  --color-border:        rgba(27, 26, 24, 0.14);
  --color-border-strong: rgba(27, 26, 24, 0.28);

  /* Project type label — middle slot of the rail */
  --type-doc:            var(--color-text-faint);

  /* ── TYPE ────────────────────────────────────────────────────────────
     Branding is Baskerville, content is Helvetica. Libre Baskerville
     ships 400 and 700 only — the "thin" look is uppercase plus tracking
     at small size, never a light weight. Helvetica Neue is a system
     font, so nothing is loaded for it; Windows falls back to Arial,
     which has no 300, and renders the light copy at regular weight. */

  --font-display: 'Libre Baskerville', Baskerville, 'Times New Roman', Times, serif;
  --font-body:    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-label:   var(--font-body);

  --w-light: 300;   /* body copy, project prose, bios, hero dek  */
  --w-reg:   400;   /* labels, rails, footer, nav, captions      */
  --w-bold:  700;   /* index project titles, team names          */

  /* Logo. 1.39 is the bird's width:height. The header wrap sizes itself
     off --logo-w, so this one value drives the whole header-left
     geometry. Raising it past ~68px costs the wordmark/body-text
     alignment on screens under 1550px. */
  --logo-h:   62px;
  --logo-w:   calc(var(--logo-h) * 1.071);
  --logo-gap: 12px;

  --brand-name:    calc(var(--logo-h) * 0.552);
  --brand-eyebrow: calc(var(--logo-h) * 0.2436);

  /* Layout */
  --max-width:  1320px;
  --gutter:     48px;
  --nav-height: 84px;

  /* Hero headline. NEW YORK and MEDIA & INFORMATION are both 0.24 of
     this, so the two always match at any screen width. */
  /* Height-aware, not just width-aware. The hero is exactly one screen
     tall, so on a short laptop a purely vw-based title overflowed it and
     pushed the EXPLORE cue below the fold. min() takes whichever of the
     two viewport axes is tighter. */
  --hero-title: clamp(36px, min(8vw, 12vh), 104px);
  --hero-gap: clamp(10px, 2.2vh, 26px);
  --hero-rule-gap: clamp(14px, 3.4vh, 36px);
}

@media (max-width: 720px) {
  :root {
    --gutter: 24px;
    --nav-height: 68px;
    --logo-h: 48px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   02  BASE
   ══════════════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Column flex so a short page can push its footer to the bottom of the
   viewport instead of leaving it stranded mid-screen. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--w-light);
  font-size: 16.3px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   03  SHARED TYPE
   ══════════════════════════════════════════════════════════════════════ */

/* Baskerville regular is the default for headings. The two Helvetica
   bold exceptions — index project titles and team names — override it
   in sections 08 and 11. */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  line-height: 1.12;
  margin: 0;
  color: var(--color-text);
}

p {
  margin: 0 0 1.2em 0;
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}

em, i {
  color: var(--color-accent-bright);
  font-style: italic;
}

/* Labels — Helvetica regular, uppercase, tracked out.
   Project rail, section heads, footer. */

.label {
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12.5px;
  color: var(--color-accent);
}

.label-muted {
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--color-text-faint);
}

/* Middle rail slot. Matches .label-muted either side of it — same size,
   same grey. --type-doc stays as the hook if you ever want to colour by
   project type again. */
.label-doc {
  font-size: 12px;
  color: var(--type-doc);
}

/* Mono-style links. The padding gives the black hover block a body;
   the negative margin keeps the text optically aligned with the
   paragraph above it. */

.project-card-more {
  display: inline-block;
  margin-top: 28px;
  margin-left: -9px;
  padding: 5px 9px;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.project-card-more:hover,
.project-card-more:focus-visible {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  margin-left: -9px;
  padding: 5px 9px;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: background-color 0.15s ease, color 0.15s ease, gap 0.15s ease;
}

.text-link:hover,
.text-link:focus-visible {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  gap: 12px;
}

.text-link svg {
  width: 14px;
  height: 14px;
}


/* ══════════════════════════════════════════════════════════════════════
   04  SHARED LAYOUT
   ══════════════════════════════════════════════════════════════════════ */

/* The content column — everything visible sits inside one of these */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 110px 0;
}

/* The last section before the footer rail does not need the full 110px
   below it — the footer's own padding carries the rest of the gap. */
section:has(+ .divider) {
  padding-bottom: 56px;
}

/* Hairline rule above the footer. margin-top: auto eats the leftover
   height on a short page, carrying the rule and the footer with it. */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: auto 0 0;
}

/* Fade up on scroll — script.js adds .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  section {
    padding: 72px 0;
  }
  .hero-content {
    padding: var(--hero-gap) 0 80px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   05  HEADER
   Bird mark + wordmark left, nav right. Same on every page.
   Branding type: Baskerville, uppercase.
   ══════════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  /* No rule along the bottom — the grey bar against the white page is
     its own edge. */
  background: var(--color-bar);
}

/* Wider than the body column by one logo-plus-gap each side, so the bird
   sits out in the gutter and VOGELFREI lands on the body text column.
   On narrower screens it simply hits the viewport and the wordmark
   indents — nothing can overflow. */
.site-header .wrap {
  width: 100%;
  max-width: calc(var(--max-width) + 2 * (var(--logo-w) + var(--logo-gap)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ── Brand ─────────────────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: var(--logo-gap);
}

.brand img {
  height: var(--logo-h);
  width: auto;
  align-self: center;
  object-fit: contain;
}

/* Baskerville sets its capitals high in the line; top: .07em centres
   them, so the gap above the caps equals the gap below. */
.brand-text {
  font-family: var(--font-display);
  font-weight: var(--w-reg);
  text-transform: uppercase;
  line-height: 1.25;
}

/* Both sizes scale off --logo-h: at line-height 1.25 the stack measures
   exactly --logo-h, so text and bird are the same height by construction. */
.brand-text .name {
  display: block;
  font-size: var(--brand-name);
  letter-spacing: 0.04em;
  color: var(--color-on-bar);
}

.brand-text .eyebrow {
  display: block;
  font-size: var(--brand-eyebrow);
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--color-on-bar-faint);
}

/* ── Nav ───────────────────────────────────────────────────────────── */

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 5px 9px;
  margin: -5px -9px;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

/* SUPPORT carries the accent so it reads as the one action in the bar */
.nav-links a.nav-support {
  color: var(--color-accent);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
}

/* ── Hamburger ─────────────────────────────────────────────────────── */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-on-bar-faint);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-on-bar);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

/* ── Mobile: nav becomes a drop-down panel ─────────────────────────── */

@media (max-width: 900px) {
  .site-header {
    height: auto;
    min-height: var(--nav-height);
  }

  .site-header .wrap {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bar-solid);
    border-top: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links a {
    font-size: 16px;
    padding: 18px var(--gutter);
    margin: 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   06  FOOTER
   Two columns: the 501(c)(3) line and contact. No nav, no copyright.
   ══════════════════════════════════════════════════════════════════════ */

/* No border of its own — .divider immediately above IS the rail, and
   the two together were drawing a 2px double line. */
.site-footer {
  padding: 30px 0 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-grid .label {
  display: block;
  margin-bottom: 16px;
}

.footer-grid p {
  font-size: 15px;
  font-weight: var(--w-reg);
  max-width: none;
}

/* margin-bottom: 0 so the two contact lines stack on the same leading as
   the wrapped description beside them, and the rows line up. */
.footer-contact p {
  font-size: 15px;
  font-weight: var(--w-reg);
  margin-bottom: 0;
}

.footer-contact a {
  color: var(--color-accent-bright);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   07  HOME — HERO
   index only. The big centered lockup.
   ══════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  /* A definite height, not a minimum. .hero-scroll is pinned to the
     bottom of this box, so the box has to BE the first screen — with
     min-height the content could grow it past the fold and take the cue
     down with it. The type above scales to viewport height to fit. */
  height: calc(100vh - var(--nav-height));   /* fallback */
  height: calc(100svh - var(--nav-height));  /* real first screen */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  /* Black floor, so anything the video does not cover reads as part of
     the picture instead of flashing the white page. */
  background-color: #000;
}

/* ── Background video ──────────────────────────────────────────────────
   Full colour, full opacity, from the first frame. The lockup still
   fades in over it. */

.hero-video {
  position: absolute;
  /* Overdrawn by a pixel on every side. At some viewport heights the
     video box rounds to a fraction and the white page shows through as
     a hairline along an edge — most visible in fullscreen. The hero
     clips the overflow, so the extra pixel costs nothing. */
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  /* Own compositing layer — keeps iOS decoding it smoothly */
  transform: translateZ(0);
}

/* Contrast is measured, not guessed. script.js samples the frame behind
   the text several times a second and writes both values below.

   The video is what gives way: --tone-scrim is a neutral veil over it
   that strengthens only as far as it must, and sits at zero for most of
   the clip. --color-on-video is then whatever point on the greyscale
   holds the target ratio against the backdrop that results, so the text
   drifts between a mid grey and near-white rather than snapping between
   extremes. These two are the standing defaults, used until the first
   sample lands and wherever the poster fallback stands in. */
.hero {
  --color-on-video: #ffffff;
  --tone-scrim: rgba(0, 0, 0, 0.32);
  --cue-color: var(--color-accent);
}

/* Cross-fade rather than snap, so a passing bright frame is not a flash */
.hero-content,
.hero-content .label,
.hero-content h1,
.hero-content .dek {
  transition: color 0.45s linear;
}

.hero-rule {
  transition: background-color 0.45s linear;
}

/* The clip runs from mean luminance 135 down to 14 across its length, so
   white type is unreadable over the opening seconds without this. Delete
   the rule if you would rather have the footage clean. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--tone-scrim);
  transition: background-color 0.45s linear;
  pointer-events: none;
}

/* No autoplay (iOS Low Power Mode, data saver) — the poster stands in,
   styled to match so the hero never looks broken. */
.hero-video[data-failed] {
  display: none;
}

.hero.has-poster {
  background: url('assets/hero-poster.jpg') center / cover no-repeat;
}

/* Text arrives first, video turns after */
.hero-content,
.hero-scroll {
  animation: hero-in 1.6s ease both;
}

.hero-scroll {
  animation-delay: 0.8s;
}

@keyframes hero-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Landscape phone and tablet, and anything else under 540px tall. The
   dek's measure is tied to the title width, so shrinking the type makes
   the paragraph narrower AND taller — it fights itself. Below this the
   lockup and the cue are what have to survive, so the prose goes. */
@media (max-height: 540px) {
  .hero-rule,
  .hero-content .dek {
    display: none;
  }
}

/* A looping background is the thing reduced-motion users are asking to
   avoid, so drop it entirely rather than freeze it. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Floor of 72px keeps the text clear of the EXPLORE cue even once the
     gap has scaled right down on a short screen. */
  padding: var(--hero-gap) 0 max(72px, calc(var(--hero-gap) * 3));
  text-align: center;
  width: 100%;
  color: var(--color-on-video);
}

/* NEW YORK — an eyebrow above the lockup, sized independently of .sub
   now that .sub is width-locked to VOGELFREI. */
.hero-content .label {
  display: block;
  margin-bottom: var(--hero-gap);
  font-size: calc(var(--hero-title) * 0.24);
  color: var(--color-on-video);
}

/* VOGELFREI — the same lockup as the header, at hero scale: 0.04em
   tracking and line-height 1.25, so the stack is the header's geometry
   enlarged rather than a second set of numbers. */
.hero-content h1 {
  font-family: var(--font-display);
  font-weight: var(--w-reg);
  font-size: var(--hero-title);
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--color-on-video);
}

/* MEDIA & INFORMATION — exactly as wide as VOGELFREI above it.
   Measured in Libre Baskerville: VOGELFREI at 0.04em tracking sets
   7.0120em, MEDIA & INFORMATION at 0.1em tracking sets 15.8880em, so
   7.0120 / 15.8880 = 0.4413 makes the two lines the same width. That is
   the same ratio the header runs (0.2436 / 0.552), so the two lockups
   are one construction at two sizes. The gap comes from line-height
   alone, as it does in the header — no margin. */
.hero-content h1 .sub {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: var(--w-reg);
  font-size: 0.4413em;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--color-on-video);
  margin-top: 0;
}

.hero-rule {
  width: 64px;
  height: 1px;
  background: var(--color-on-video);
  margin: var(--hero-rule-gap) auto;
}

.hero-content .dek {
  max-width: calc(var(--hero-title) * 5.9);
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(14px, min(1.6vw, 2.1vh), 21px);
  font-weight: var(--w-reg);
  line-height: 1.5;
  color: var(--color-on-video);
}

/* ── EXPLORE cue — word above arrow, one highlight box ─────────────── */

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  text-align: center;
  z-index: 2;
  cursor: pointer;
  /* The brand red, held at its hue and moved only in lightness by
     script.js so it stays legible over whatever the video is doing
     underneath it. Falls back to the flat accent without JS. */
  color: var(--cue-color, var(--color-accent));
  transition: background-color 0.15s ease, color 0.45s linear;
}

/* The whole cue is one box, so word and arrow invert together */
.hero-scroll:hover,
.hero-scroll:focus-visible {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
}

.hero-scroll .label-muted {
  display: block;
  color: inherit;
}

/* Arrow sits under the word and inherits the box's colour */
.hero-scroll svg {
  width: 14px;
  height: 14px;
  color: inherit;
}

/* Sticky header would otherwise cover the top of the projects section */
#ongoing-work {
  scroll-margin-top: var(--nav-height);
}


/* ══════════════════════════════════════════════════════════════════════
   08  PROJECT BLOCK
   Big title, hairline rail of metadata, full-width text.
   Used on index and on every project page.
   ══════════════════════════════════════════════════════════════════════ */

.project {
  margin-bottom: 80px;
}

.project:last-child {
  margin-bottom: 0;
}

/* Baskerville by default — that covers every detail page */
.project-title {
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  font-size: clamp(27px, 3.9vw, 44px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Rail: year / discipline / location on one line ────────────────────
   Three slots on a 0.8fr + 1.2fr grid. Slot 2 starts at column two so
   it lines up with the body text below; slot 3 sits flush right in the
   same column. An empty .project-rail still draws the hairline. */

.project-rail {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: baseline;
  border-top: 1px solid var(--color-border-strong);
  padding-top: 10px;
  margin-bottom: 56px;
}

/* A rail with nothing in it is just a rule — it should not reserve the
   room a full metadata line needs. Mission uses these under each heading. */
.project-rail:empty {
  padding-top: 0;
  margin-bottom: 24px;
}

.project-rail > :nth-child(1) {   /* year / status */
  grid-column: 1;
  grid-row: 1;
}

.project-rail > :nth-child(2) {   /* discipline    */
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
}

.project-rail > :nth-child(3) {   /* location      */
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

/* ── Body ──────────────────────────────────────────────────────────── */

.project-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: start;
}

/* One-line summary, italic Baskerville */
.project-dek {
  font-family: var(--font-body);
  font-weight: var(--w-light);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.3;
  color: var(--color-text);
  margin: 0;
}

.project-text p {
  font-weight: var(--w-light);
}

.project-text p + p {
  margin-top: 28px;
}

.project-text a {
  color: var(--color-accent);
}

.project-text a:hover {
  color: var(--color-accent-bright);
}

/* ── Tablet and below: rail stacks left-aligned ────────────────────── */

@media (max-width: 1100px) {
  .project {
    margin-bottom: 96px;
  }

  .project-rail {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 32px;
  }

  .project-rail > :nth-child(1),
  .project-rail > :nth-child(2),
  .project-rail > :nth-child(3) {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .project-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   09  PROJECT IMAGES
   A. thumbnail beside the teaser on index
   B. full-width hero at the top of a project page
   C. caption under an image
   ══════════════════════════════════════════════════════════════════════ */

/* The image box. Flat grey when empty — drop an <img> in and it
   covers this. */

.feature-image {
  position: relative;
  min-height: 480px;
  background: var(--color-image-empty);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: flex-end;
  padding: 32px;
  overflow: hidden;
}

/* The dashed "Placeholder — swap for project photo" tag */
.feature-image .placeholder-note {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  border: 1px dashed var(--color-border-strong);
  padding: 5px 10px;
  text-transform: uppercase;
}

/* ── A. INDEX TEASER — image left, text in columns 2/3 ─────────────────
   Same grid as the rail, so the text starts under the middle label. */

.project-body-split {
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}

/* min-height: 0 cancels the 480px above, so the box is 16:9 not a slab */
.project-body-split .feature-image {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  align-items: stretch;
}

.project-body-split .feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cover + facts runs two thirds image, one third facts. Scoped with
   :has() so the index teasers keep their own 0.8fr + 1.2fr measure.

   Not a grid: the facts list is routinely taller than the cover, and a
   grid cell cannot spill under its neighbour — it just stretches the row
   and leaves a hole beside the image. Floating the cover lets the facts
   set in the last third while they run alongside it, then carry on at
   full width once they pass the bottom of the image.

   The width reproduces 2fr of a `2fr 1fr` grid with a 64px gap:
   (100% - 64px) * 2/3  =  66.667% - 42.667px. */
.project-body-split:has(.project-cover) {
  display: block;
}

.project-body-split:has(.project-cover) .project-cover {
  float: left;
  width: calc(66.667% - 42.667px);
  margin-right: 64px;
  margin-bottom: 8px;
}

/* Contain the float so the prose beneath never rides up beside it. */
.project-body-split:has(.project-cover)::after {
  content: "";
  display: block;
  clear: both;
}

/* ── C. COVER + FACTS — the top block of a project page ────────────────
   The same cover image the index uses, in the same 16/9 frame, running
   two thirds of the width. Facts squeeze into the last third. */

/* First fact heading sits at the top of its column, so it drops the
   20px lead-in it carries between groups lower down. */
.project-body-split .project-text > h4.fact:first-child {
  margin-top: 0;
}

/* Prose runs full width beneath the two-column block */
.project-prose {
  margin-top: 56px;
}

/* Gallery at the foot of the page */
.project-prose + .feature-image {
  margin-top: 56px;
}

/* Title ghosts in over the image on hover — matches the index titles */
.thumb-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.12;
  color: var(--color-invert-text);
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-image:hover .thumb-title,
.feature-image:focus-visible .thumb-title {
  opacity: 1;
}

@media (max-width: 1100px) {
  .project-body-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Too narrow to set a third-width column of facts beside the image:
     drop the float and let the cover sit full width above them. */
  .project-body-split:has(.project-cover) .project-cover {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-bottom: 28px;
  }
}

/* ── B. DETAIL HERO — full width, between the rail and the text ────── */

.project-hero {
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  align-items: stretch;
  margin-bottom: 56px;
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── C. CAPTION — small Baskerville caps under an image ────────────── */

.caption {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: var(--w-reg);
  font-size: 12.8px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--color-text-pale);
}

/* A caption directly under a hero needs the hero's bottom gap removed,
   or the two margins fight. */
.project-hero + .caption {
  margin-top: -40px;
  margin-bottom: 56px;
}


/* ══════════════════════════════════════════════════════════════════════
   10  FACTS
   OUTPUT / TEAM / PARTNERS at the foot of a project page.
   Helvetica regular, uppercase, so credits read as apparatus, not prose.
   Label tight above its values; space between groups.
   ══════════════════════════════════════════════════════════════════════ */

.project-text h4.fact,
.project-text p.fact {
  font-family: var(--font-label);
  font-weight: var(--w-reg);    /* cancels any bold on global h4 */
  font-size: 13.5px;
  letter-spacing: 0.12em;
  line-height: 1.7;
  text-transform: uppercase;
}

/* Group heading — bold black against the regular-weight values below it.
   font-weight here overrides the var(--w-reg) in the shared rule above. */
.project-text h4.fact {
  font-weight: var(--w-bold);
  color: var(--color-text);
  margin-top: 20px;
  margin-bottom: 4px;
}

/* margin-top: 0 cancels .project-text p + p, which would add 28px */
.project-text p.fact {
  margin-top: 0;
  margin-bottom: 0;
}

/* Trailing note — where it was developed, who supervised */
/* The 16px lead-in is for a note that follows a list of credits. Under
   its own NOTES heading it would collapse to 16px where every other
   group sits at 4px, so cancel it there. */
.project-text h4.fact + p.fact-note {
  margin-top: 0;
}

.project-text p.fact-note {
  margin-top: 16px;
  color: var(--color-text-faint);
}


/* ── Mission figure ────────────────────────────────────────────────────
   A 2:3 portrait at full width would stand 1980px tall, so it sits in
   the text instead and the prose wraps around it — the same float the
   project covers use. */
.mission-figure {
  float: right;
  width: 38%;
  aspect-ratio: 2 / 3;
  margin: 6px 0 24px 48px;
  background: var(--color-image-empty);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.mission-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contain it so the next section cannot ride up alongside. */
.project-text:has(.mission-figure)::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 860px) {
  .mission-figure {
    float: none;
    width: 100%;
    margin: 0 0 28px;
  }
}


/* ══════════════════════════════════════════════════════════════════════
   11  TEAM
   Three columns, no portraits.
   ══════════════════════════════════════════════════════════════════════ */

.founder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Hairline between collaborators and directors */
.founder-grid + .founder-grid {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--color-border-strong);
}

.founder-card {
  display: flex;
  flex-direction: column;
}

/* Same size and tracking as .project-title — a person is a title here,
   so the two have to agree. The grid is three columns, so a long name
   wraps to a second line rather than being shrunk out of the system. */
.founder-card h3 {
  font-family: var(--font-body);
  font-weight: var(--w-bold);
  font-size: clamp(27px, 3.9vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

/* "Director · Born in Vienna" — carries the hairline, so each card reads
   as a small project block: name, rule, role, text. */
.founder-card .role {
  display: block;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border-top: 1px solid var(--color-border-strong);
  padding-top: 10px;
  margin-top: 12px;
  margin-bottom: 20px;
}

.founder-card .bio {
  font-size: 16.3px;
  font-weight: var(--w-light);
}

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


/* ══════════════════════════════════════════════════════════════════════
   12  SUPPORT
   Tax status rows, donate buttons.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Document panel: label left, value right, on cream ─────────────── */

.doc-panel {
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
  padding: 44px;
}

.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}

.doc-row:last-child {
  border-bottom: none;
}

.doc-row .doc-label {
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.doc-row .doc-value {
  font-family: var(--font-body);
  font-weight: var(--w-reg);
  font-size: 19px;
  text-align: right;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .doc-panel {
    padding: 28px;
  }
}

/* ── Buttons ───────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 34px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-solid {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn-solid:hover {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  border-color: var(--color-invert-bg);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-invert-bg);
  color: var(--color-invert-text);
  border-color: var(--color-invert-bg);
}

.btn-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── Centered donate block ─────────────────────────────────────────── */

.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  font-size: clamp(36px, 5.6vw, 60px);
  max-width: 900px;
  margin: 0 auto 28px;
}

.cta-section .dek {
  max-width: 620px;
  margin: 0 auto 44px;
  font-size: 17.5px;
  font-weight: var(--w-light);
}

/* The paragraph is the last thing in the block while the donate button
   is out, so it should not hold the button's bottom gap. */
.cta-section .dek:last-child {
  margin-bottom: 0;
}

.cta-section .btn-row {
  justify-content: center;
}


/* ══════════════════════════════════════════════════════════════════════
   13  PAGE HEADER
   Big title + hairline. Only pages that still use one.
   ══════════════════════════════════════════════════════════════════════ */

.page-header {
  padding: 26px 0 60px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.page-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.page-header-watermark {
  position: absolute;
  right: -4%;
  top: -10%;
  width: 320px;
  opacity: 0.05;
  z-index: 0;
}

/* Tighten the gap between a page header and the first section under it */
.page-header + section {
  padding-top: 56px;
}

/* Heading left, copy right — used inside a page header */
.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
}

.split .label {
  display: block;
  margin-bottom: 18px;
}

.split h2 {
  font-size: clamp(28px, 3.6vw, 38px);
}

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


/* ══════════════════════════════════════════════════════════════════════
   14  GALLERY
   Click-through stills in a project hero. Images stack; one is visible.
   Default frame is the 16/9 of .project-hero. For anything else, add a
   ratio class: gallery-3x2, gallery-4x3, gallery-square, gallery-portrait.
   ══════════════════════════════════════════════════════════════════════ */

.gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery img.is-active {
  opacity: 1;
}

/* White arrow, no box. The drop shadow keeps it readable over pale
   areas of a photo. These are the gallery's only control, so they stay. */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, color 0.2s ease;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.gallery:hover .gallery-nav,
.gallery-nav:focus-visible {
  opacity: 1;
}

.gallery-nav:hover {
  color: var(--color-accent-bright);
}

.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

.gallery-nav svg {
  width: 24px;
  height: 24px;
}

.gallery-count {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  font-family: var(--font-label);
  font-weight: var(--w-reg);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: rgba(247, 243, 232, 0.8);
}

/* The global `em` rule paints italic red. Not in here. */
.gallery-count em {
  color: inherit;
  font-style: normal;
}

/* Arrows always visible on touch, where there is no hover */
@media (hover: none) {
  .gallery-nav { opacity: 1; }
}


/* ----------------------------------------------------------------------
   FRAME RATIOS
   .project-hero is 16/9 by default. These override it per gallery.
   One gallery = one ratio: pick the box that matches that page's source
   material, then crop every image in that gallery to it. Mixing ratios
   inside a single gallery either letterboxes or jumps the page.
   ---------------------------------------------------------------------- */

.gallery-3x2    { aspect-ratio: 3 / 2; }    /* 35mm photography          */
.gallery-4x3    { aspect-ratio: 4 / 3; }    /* older video, flatbed scans */
.gallery-square { aspect-ratio: 1 / 1; }

/* Portrait variant — vertical photographs. Narrower, centered, so a tall
   frame does not run the full page width. */
.gallery-portrait {
  aspect-ratio: 2 / 3;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-portrait img {
  object-fit: cover;
}
