/* Archivo, self-hosted (no requests to Google from a German site). One family; the width axis does the work. */
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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: 'Archivo';
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The animator's desk: cool paper, graphite, and the non-photo blue roughs are drawn in. */
:root {
  color-scheme: light;
  --paper: #f4f6f7;
  --sheet: #ffffff;
  --graphite: #1f2328;
  --lead: #5a626b;
  --rough: #9cc3e6;
  --ink: #1d4f9c;

  --font: 'Archivo', system-ui, sans-serif;
  --wide: 125%;
  --narrow: 82%;

  /* A 4:3 modular scale from a 17px body. */
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.4167rem;
  --step-2: 1.8889rem;
  --step-3: 2.5185rem;
  --display: clamp(2.5rem, 1.6rem + 4.4vw, 5.25rem);

  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --measure: 66ch;
  --max: 88rem;
  --rule: 1px solid color-mix(in srgb, var(--graphite) 14%, transparent);
}

/* Page frame, type, links, masthead, footer. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font: 400 var(--step-0)/1.55 var(--font);
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--rough); }

a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--rough);
  text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--sheet); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { top: 0.5rem; }

.display {
  font-size: var(--display);
  font-stretch: var(--wide);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.prose { max-width: var(--measure); }
.prose p + p, .prose p + h4, .prose h4 + p { margin-top: 0.9em; }
.prose h4 { font-size: var(--step-0); font-weight: 650; margin-top: 1.6em; }
.prose > p > strong:only-child { display: block; font-size: var(--step-1); font-stretch: var(--wide); margin-top: 1.4em; }

/* Masthead */
.masthead {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: var(--rule);
}
.wordmark { color: var(--graphite); text-decoration: none; font-size: 1.6rem; font-stretch: var(--wide); line-height: 1; letter-spacing: -0.02em; }
.wordmark__hahn { font-weight: 800; }
.wordmark__film { font-weight: 300; }
.wordmark--small { font-size: 1.25rem; }
.masthead__nav ul { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.masthead__nav a { color: var(--graphite); text-decoration: none; font-stretch: var(--narrow); font-weight: 500; font-size: var(--step-0); padding-block: 0.25rem; }
.masthead__nav a:hover, .masthead__nav [aria-current] { box-shadow: inset 0 -2px var(--rough); }
.masthead__nav [aria-current] { box-shadow: inset 0 -2px var(--graphite); }
.masthead__toggle { display: none; }

@media (max-width: 48rem) {
  .masthead__toggle {
    display: block; font: inherit; font-stretch: var(--narrow); font-weight: 600;
    background: none; border: 1px solid var(--graphite); border-radius: 99px; padding: 0.3rem 0.9rem; color: var(--graphite);
  }
  .masthead__nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--paper); border-bottom: var(--rule); }
  .masthead.is-open .masthead__nav { display: block; }
  .masthead__nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .masthead__nav a { display: block; padding: 0.6rem 0; font-size: var(--step-1); }
}

/* Sections */
.section { padding: clamp(3rem, 8vw, 7rem) var(--gutter) 0; max-width: var(--max); margin-inline: auto; }
.section__title {
  font-size: var(--step-2); font-stretch: var(--wide); font-weight: 800; letter-spacing: -0.01em;
  padding-bottom: 0.6rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); border-bottom: 2px solid var(--graphite);
}
.page-head { padding: clamp(3rem, 8vw, 6rem) var(--gutter) 0; max-width: var(--max); margin-inline: auto; display: grid; gap: 1.5rem; }
.page-head__text { color: var(--lead); }

/* Footer */
.colophon {
  margin-top: clamp(4rem, 10vw, 8rem); padding: 2.5rem var(--gutter); border-top: var(--rule);
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 1rem 2.5rem; align-items: baseline;
  font-size: var(--step--1); color: var(--lead);
}
.colophon address { font-style: normal; }
.colophon__legal { display: flex; gap: 1.25rem; }
.colophon a:not(.wordmark) { color: inherit; }
@media (max-width: 48rem) { .colophon { grid-template-columns: 1fr; } }

.legal { padding: clamp(3rem, 8vw, 6rem) var(--gutter) 0; max-width: var(--max); margin-inline: auto; display: grid; gap: 2.5rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Homepage: key-art reel, intro, work, company, contact. */
.reel { background: var(--graphite); }
.reel__frame { position: relative; aspect-ratio: 16 / 9; max-height: 78svh; width: 100%; overflow: hidden; margin-inline: auto; }
.reel__slide { position: absolute; inset: 0; transition: opacity 0.9s ease; }
.reel__slide[hidden] { display: block; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s 0.9s; }
.reel__slide img { width: 100%; height: 100%; object-fit: cover; }

.reel__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding: 1rem var(--gutter); background: var(--paper); border-bottom: var(--rule);
}
.reel__caption { font-size: var(--step-1); font-stretch: var(--wide); font-weight: 700; letter-spacing: -0.01em; }
.reel__caption a { color: var(--graphite); text-decoration: none; }
.reel__caption a:hover { box-shadow: inset 0 -3px var(--rough); }
.reel__thumbs { display: flex; gap: 0.5rem; }
.reel__thumbs button {
  position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer;
  width: clamp(3.5rem, 7vw, 6rem); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 3px;
  opacity: 0.55; transition: opacity 0.2s;
}
.reel__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.reel__thumbs button:hover, .reel__thumbs [aria-current] { opacity: 1; }
.reel__thumbs [aria-current] { outline: 2px solid var(--graphite); outline-offset: 2px; }
/* How long until the next slide: a blue pencil line drawn under the current thumbnail. */
.reel__thumbs [aria-current]::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--rough); transform-origin: left; animation: reel-timer var(--reel-time, 6s) linear forwards;
}
.reel.is-paused [aria-current]::after { animation-play-state: paused; }
@keyframes reel-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.intro { padding: clamp(3.5rem, 9vw, 8rem) var(--gutter) 0; max-width: var(--max); margin-inline: auto; display: grid; gap: 1.75rem; }
.intro .display { max-width: 16ch; }
.intro__now { font-size: var(--step-1); color: var(--lead); max-width: 40ch; line-height: 1.35; }

/* Work: text on one side, a three-picture spread on the other. */
.work {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem clamp(2rem, 5vw, 5rem);
  grid-template-areas: 'head strip' 'text strip'; grid-template-rows: auto 1fr;
  align-items: start; padding-block: clamp(2rem, 5vw, 4rem); border-top: var(--rule);
}
.section__title + .work { border-top: 0; padding-top: 0; }
.work:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'strip head' 'strip text'; }
.work__head { grid-area: head; display: grid; gap: 0.75rem; }
.work__title { font-size: var(--step-3); font-stretch: var(--wide); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.work__title a { color: var(--graphite); text-decoration: none; }
.work__title a:hover { box-shadow: inset 0 -4px var(--rough); }
.work__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-stretch: var(--narrow); font-weight: 500; }
.work__text { grid-area: text; color: var(--lead); }
.strip { grid-area: strip; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: var(--rough); }
.strip img:first-child { grid-column: 1 / -1; }

@media (max-width: 60rem) {
  .work, .work:nth-of-type(even) { grid-template-columns: 1fr; grid-template-areas: 'head' 'strip' 'text'; }
}

.company__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 6vw, 6rem); }
.company__text { font-size: var(--step-1); line-height: 1.45; max-width: 34ch; }
.company__text p { max-width: none; }
.company__group h3 { font-size: var(--step-0); font-weight: 650; margin-bottom: 0.75rem; }
.company__group li { padding-block: 0.55rem; border-top: var(--rule); font-stretch: var(--narrow); }
@media (max-width: 60rem) { .company__body { grid-template-columns: 1fr; } }

.contact__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 6vw, 6rem); }
.contact__address { font-style: normal; font-size: var(--step-2); font-stretch: var(--wide); font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
.contact__address p { margin-top: 1.25rem; font-size: var(--step-1); font-weight: 500; }
.contact__directions { color: var(--lead); display: grid; gap: 1.25rem; align-content: start; }
.contact__directions dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.contact__directions dt { font-weight: 650; color: var(--graphite); }
@media (max-width: 60rem) { .contact__grid { grid-template-columns: 1fr; } }

/* Listings, the filmography, and project pages. */
.slates {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem);
  padding: clamp(3rem, 7vw, 5rem) var(--gutter) 0; max-width: var(--max); margin-inline: auto;
}
.slate__title { font-size: var(--step-0); font-weight: 650; padding-bottom: 0.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--graphite); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 2.5rem); }
.tiles--feature { grid-template-columns: 1fr; }
.tile { display: grid; gap: 0.35rem; color: var(--graphite); text-decoration: none; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; margin-bottom: 0.6rem; background: var(--rough); transition: transform 0.35s ease; }
.tile:hover img { transform: scale(1.015); }
.tile__name { font-size: var(--step-1); font-stretch: var(--wide); font-weight: 750; line-height: 1.1; letter-spacing: -0.01em; }
.tile:hover .tile__name { text-decoration: underline 3px var(--rough); text-underline-offset: 0.18em; }
.tile__sub { display: block; font-size: var(--step-0); font-weight: 400; font-stretch: 100%; color: var(--lead); margin-top: 0.15rem; }
.tile__facts { font-stretch: var(--narrow); color: var(--lead); }

/* The catalogue reads as a filmography, newest first. */
.filmography { border-bottom: var(--rule); }
.film a {
  display: grid; align-items: center; gap: 0.25rem 1.5rem;
  grid-template-columns: 8.5rem 8rem minmax(0, 1fr) minmax(0, 15rem) 7rem;
  padding: 0.85rem 0.5rem; border-top: var(--rule); color: var(--graphite); text-decoration: none;
}
.film a:hover { background: var(--sheet); }
.film__year { font-stretch: var(--wide); font-weight: 700; font-variant-numeric: tabular-nums; }
.film__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: var(--rough); }
.film__title { font-size: var(--step-1); font-stretch: var(--wide); font-weight: 750; line-height: 1.1; letter-spacing: -0.01em; }
.film a:hover .film__title { text-decoration: underline 3px var(--rough); text-underline-offset: 0.18em; }
.film__sub { display: block; font-size: var(--step-0); font-weight: 400; font-stretch: 100%; color: var(--lead); }
.film__format, .film__runtime { font-stretch: var(--narrow); color: var(--lead); }
.film__runtime { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 60rem) {
  .film a { grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-areas: 'thumb year' 'thumb title' 'thumb format'; column-gap: 1rem; }
  .film__thumb { grid-area: thumb; align-self: start; }
  .film__year { grid-area: year; font-size: var(--step--1); }
  .film__title { grid-area: title; font-size: var(--step-0); }
  .film__format { grid-area: format; font-size: var(--step--1); }
  .film__runtime { display: none; }
}

/* Project page */
.project { max-width: var(--max); margin-inline: auto; padding: 1.5rem var(--gutter) 0; display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.crumbs { font-stretch: var(--narrow); font-weight: 500; }
.crumbs a::before { content: '‹ '; }
.project__lead img { width: 100%; max-height: 80svh; object-fit: cover; border-radius: 6px; background: var(--rough); }
.project__head { display: grid; gap: 0.5rem; }
.project__sub { font-size: var(--step-2); font-stretch: var(--wide); font-weight: 300; color: var(--lead); line-height: 1.1; }
.project__body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.project__text { font-size: var(--step-1); line-height: 1.45; }
.project__credit { font-size: var(--step--1); color: var(--lead); }
@media (max-width: 60rem) { .project__body { grid-template-columns: 1fr; } .project__text { order: -1; } }

.facts > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: 0.6rem; border-top: var(--rule); }
.facts > div:last-child { border-bottom: var(--rule); }
.facts dt { font-stretch: var(--narrow); color: var(--lead); }
.facts dd { font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.75rem; }
.gallery a { display: block; border-radius: 4px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--rough); transition: transform 0.35s ease; }
.gallery a:hover img { transform: scale(1.03); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 2px solid var(--graphite); padding-top: 1.25rem; }
.pager a { color: var(--graphite); text-decoration: none; font-size: var(--step-1); font-stretch: var(--wide); font-weight: 750; line-height: 1.15; }
.pager a:hover { text-decoration: underline 3px var(--rough); text-underline-offset: 0.18em; }
.pager a[rel='next'] { text-align: right; }
.pager span { display: block; font-size: var(--step--1); font-stretch: var(--narrow); font-weight: 500; color: var(--lead); margin-bottom: 0.25rem; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: color-mix(in srgb, var(--graphite) 92%, transparent); }
.lightbox img { max-width: 94vw; max-height: 86vh; width: auto; border-radius: 4px; }
.lightbox__bar { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.lightbox button { font: inherit; font-stretch: var(--narrow); font-weight: 600; color: var(--paper); background: none; border: 1px solid var(--paper); border-radius: 99px; padding: 0.35rem 1rem; cursor: pointer; }
