/* ==========================================================================
   Nico Sanft — styles
   Colors: white = read first · grey = supporting · lime = interactive/accent
   ========================================================================== */

:root {
  --bg: #0D0D0D;
  --fg: #E5E5E5;
  --fg-strong: #F2F2F2;
  --muted: #808080;
  --muted-2: #6E6E6E;
  --credit: #B0B0B0;
  --line: #262626;
  --accent: #D7E5AE;
  --tint: rgba(215, 229, 174, 0.25);
  --gap: 9px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --section: clamp(64px, 9vw, 112px);

}
@media (min-width: 1800px) { :root { --max: 1600px; } }

/* ---------- Video player (Plyr) — original look, unchanged ---------- */
:root {
  --plyr-color-main: rgba(0, 0, 0, 0);
  --plyr-menu-background: rgba(13, 13, 13, 1);
  --plyr-menu-color: rgba(255, 255, 255, 0.5);
  --plyr-menu-item-arrow-color: rgba(255, 255, 255, 0.5);
  --plyr-menu-border-color: rgba(0, 0, 0, 0);
  --plyr-menu-shadow: 0 1px 2px rgba(0, 0, 0, 0);
  --plyr-range-fill-background: #D7E5AE;
  --plyr-video-control-color-hover: #D7E5AE;
  --plyr-font-size-base: 1rem;
  --plyr-font-size-small: 1rem;
  --plyr-font-size-large: 1.5rem;
  --plyr-font-size-xlarge: 2rem;
  --plyr-font-family: 'Inter', sans-serif;
  --plyr-captions-text-color: #ffc414;
  --plyr-captions-background: rgba(0, 0, 0, 0);
  --plyr-menu-arrow-color: #393939;
  --plyr-badge-background: #393939;
  --plyr-menu-back-border-color: #393939;
  --plyr-menu-back-border-shadow-color: rgba(0, 0, 0, 0);
}
.plyr__caption {
  text-shadow:
    0 0 1px rgba(215, 229, 174, 1),
    0 0 2px rgba(215, 229, 174, 1),
    0 0 3px rgba(215, 229, 174, .5),
    1px 1px 2px rgba(0, 0, 0, 1),
    2px 2px 2px rgba(0, 0, 0, 1),
    3px 3px 2px rgba(0, 0, 0, 1);
}
.plyr__captions { padding-bottom: 5%; padding-left: 10%; padding-right: 10%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Keep gutters inside the painted page, not on the browser viewport. */
html { height: 100%; overflow: hidden; background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  height: 100%; height: 100dvh; overflow-y: auto; overscroll-behavior-y: none;
  scrollbar-gutter: stable both-edges; scrollbar-color: var(--muted-2) var(--bg);
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--fg); text-decoration: none; transition: color .2s ease-in-out; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p, figure { margin: 0; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--accent); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; color: var(--bg); }

/* ---------- Type tokens (from the original site) ---------- */
.nm { text-transform: uppercase; font-weight: 700; }          /* names, events */
.pos { font-weight: 300; color: var(--muted); }              /* roles, awards */
.sub { font-style: italic; font-weight: 500; text-transform: uppercase; color: var(--muted); } /* format line */
.label { display: block; color: var(--muted-2); text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.page-title { font-size: clamp(30px, 4vw, 40px); line-height: 1; font-weight: 800; text-transform: uppercase; color: var(--fg-strong); }
.section-title { font-size: clamp(24px, 3vw, 32px); line-height: 1; font-weight: 800; text-transform: uppercase; color: var(--muted); }

/* ---------- Header ---------- */
.site-header { max-width: var(--max); margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(24px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; justify-content: space-between; }
.logo { display: flex; flex-direction: column; gap: 6px; -webkit-user-select: none; user-select: none; }
.logo-name { font-size: clamp(24px, 3vw, 32px); line-height: 1; font-weight: 800; text-transform: uppercase; }
.logo-role { font-weight: 300; text-transform: uppercase; font-size: 15px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(20px, 3vw, 40px); padding-top: 4px; font-weight: 600; text-transform: uppercase; }
.nav a { min-height: 32px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav .lang { font-weight: 400; color: var(--muted); }
.nav .lang:hover { color: var(--accent); }

/* ---------- Image tiles ---------- */
.tile { position: relative; display: block; overflow: hidden; background: #1A1A1A; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tint { position: absolute; inset: 0; background: rgba(13, 13, 13, .32); }
.cap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 0 6%; color: var(--fg); }
.cap-title { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.3; font-weight: 600; text-transform: uppercase; }
.cap-sub { font-size: 13px; font-style: italic; font-weight: 500; text-transform: uppercase; opacity: .6; }
.cap-kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; opacity: .7; }

/* ---------- Home ---------- */
.tile .img-missing { font-size: 0; }
.img-missing { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 2.39 / 1; height: 100%; background: #1A1A1A; color: #4A4A4A; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.featured { aspect-ratio: 2.39 / 1; margin-bottom: var(--gap); }
.featured .tint { background: none; }
.featured .cap { inset: auto 0 0 0; align-items: flex-start; text-align: left; gap: 4px; padding: 80px clamp(16px, 2.5vw, 32px) clamp(16px, 2vw, 28px); background: linear-gradient(transparent, rgba(13, 13, 13, .55)); }
.featured .cap-title { font-size: clamp(26px, 3.4vw, 44px); line-height: 1; font-weight: 800; }
/* Lead film: slow push-in and an arrow, so it feels alive and clickable */
.featured img, .featured video { transition: transform 1.2s cubic-bezier(.2, .6, .2, 1); }
.featured:hover img, .featured:hover video, .featured:focus-visible img { transform: scale(1.035); }
.featured .cap-title::after { content: '→'; margin-left: .3em; display: inline-block; opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .3s; }
.featured:hover .cap-title::after, .featured:focus-visible .cap-title::after { opacity: 1; transform: none; }
.featured:hover .cap-title { color: var(--fg); }
@media (max-width: 720px) { .featured { aspect-ratio: 4 / 3; } .filters { gap: 0 16px; } .filters button { font-size: 13px; } }

.filters { display: flex; flex-wrap: wrap; gap: 0 clamp(16px, 2vw, 28px); padding: 20px 0 12px; }
.filters button { min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1; text-transform: uppercase; color: var(--fg); transition: color .2s; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--accent); }
.count { font-weight: 300; color: var(--muted); margin-left: 4px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--gap); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.work-item { display: flex; flex-direction: column; gap: 10px; }
.work-item[hidden] { display: none; }
.work-item .tile { aspect-ratio: 16 / 10; }
.work-item .tint { background: none; }
.below { display: flex; flex-direction: column; gap: 2px; }
.below-title { font-size: 15px; line-height: 1.3; font-weight: 800; text-transform: uppercase; }
.below-sub { font-size: 12px; font-style: italic; font-weight: 500; text-transform: uppercase; color: var(--muted); }
.work-item:hover .below-title { color: var(--accent); }

/* Desktop with a mouse: clean grid; title appears on the hovered tile only */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .grid { row-gap: var(--gap); }
  .work-item { position: relative; gap: 0; }
  .featured:hover .tint, .featured:focus-visible .tint { background: none; }
  .work-item .tint, .work-item:hover .tint, .work-item:focus-visible .tint { background: none; box-shadow: none; }
  .below { position: absolute; inset: auto 0 0 0; align-items: flex-start; text-align: left; padding: 48px 20px 16px; background: linear-gradient(transparent, rgba(13, 13, 13, .7)); opacity: 0; pointer-events: none; }
  .work-item:hover .below, .work-item:focus-visible .below { opacity: 1; }
  .below-title { font-size: 17px; }
  .work-item:hover .below-title { color: var(--fg); }
  .below-sub { color: var(--fg); opacity: .6; }
}

/* ---------- Project page ---------- */
.project-top { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 48px); align-items: flex-start; }
.project-info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.project-head { display: flex; flex-direction: column; gap: 16px; }
.project-media { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
@media (min-width: 1000px) { .project-media { order: -1; } }
.project-title { font-size: clamp(30px, 4vw, 40px); line-height: 1; font-weight: 800; text-transform: uppercase; color: var(--fg-strong); }
.title-row { display: flex; flex-direction: column; gap: 4px; }
/* Second title next to the main one: same size, thin and faint (original-title style of the old site) */
.project-alt { font-size: clamp(30px, 4vw, 40px); line-height: 1; font-weight: 300; text-transform: uppercase; color: rgba(229, 229, 229, .2); }
.project-logline { font-size: 17px; line-height: 1.45; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.actions a, .actions button { min-height: 44px; display: inline-flex; align-items: center; padding: 0; background: none; border: 0; cursor: pointer; color: var(--fg); text-transform: inherit; font-weight: inherit; transition: color .2s; }
.actions a:hover, .actions button:hover, .actions a:focus-visible, .actions button:focus-visible { color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.meta span + span::before { content: '/'; margin: 0 .7em; color: #4A4A4A; }
.fest { font-size: 15px; line-height: 1.45; border-top: 1px solid var(--line); padding-top: 20px; }
.notes { font-size: 13px; line-height: 1.4; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }

.player { position: relative; background: #1A1A1A; }
.player { overflow: hidden; }
.player > img { width: 100%; transition: transform 1.2s cubic-bezier(.2, .6, .2, 1); }
/* Play: same language as the lead film tile — caps label bottom-left, arrow, slow push-in */
.play { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 80px clamp(16px, 2.5vw, 32px) clamp(16px, 2vw, 28px); background: linear-gradient(transparent 55%, rgba(13, 13, 13, .55)); border: 0; cursor: pointer; color: var(--fg); text-align: left; }
.play-label { font-size: clamp(14px, 1.4vw, 17px); font-weight: 700; text-transform: uppercase; transition: color .2s ease-in-out; }
.play .arrow { display: inline-block; transition: transform .3s ease; }
.player:hover > img { transform: scale(1.035); }
.play:hover .play-label, .play:focus-visible .play-label { color: var(--accent); }
.play:hover .arrow, .play:focus-visible .arrow { transform: translateX(6px); }
.player.is-loading .play-label { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .player:hover > img { transform: none; } .player.is-loading .play-label { animation: none; } }
.player video { width: 100%; background: #000; }
.player .plyr { width: 100%; }
.player-error { position: absolute; inset: auto 0 0 0; padding: 12px 16px; font-size: 13px; text-transform: uppercase; color: var(--fg); background: rgba(13,13,13,.8); }
.stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.stills img { width: 100%; }
.stills img:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2.39 / 1; object-fit: cover; }
@media (max-width: 560px) {
  .stills { grid-template-columns: 1fr; }
  .stills img:last-child:nth-child(odd) { aspect-ratio: auto; }
}

/* Credits recede, like on the original site */
.credits { margin-top: var(--section); border-top: 1px solid var(--line); padding-top: 32px; display: flex; flex-direction: column; gap: 24px; color: var(--muted); }
.credit-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 32px clamp(24px, 4vw, 72px); align-items: start; font-size: 15px; }
@media (max-width: 720px) { .credit-cols { grid-template-columns: 1fr; } }
.credit-col { display: flex; flex-direction: column; line-height: 1.45; }
.credit-col .label { margin-bottom: 8px; }
.credits .nm, .credits a { color: var(--credit); }
.credits a:hover { color: var(--accent); }
.credits .pos { color: #7A7A7A; }
.credit-col.thanks .nm, .credit-col.thanks a { color: #8C8C8C; font-weight: 500; }
.credit-col.thanks a:hover { color: var(--accent); }


/* ---------- About ---------- */
.about { display: flex; flex-wrap: wrap; gap: clamp(32px, 4vw, 56px); align-items: flex-start; }
.about-portrait { flex: 1 1 320px; max-width: 560px; }
.about-portrait img { width: 100%; }
.about-portrait figcaption:empty { display: none; }
.about-portrait figcaption { margin-top: 10px; font-size: 12px; font-style: italic; font-weight: 500; text-transform: uppercase; color: var(--muted); }
.bio a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
.bio a:hover { text-decoration-color: var(--accent); }
.bio a, .social { transition: color .2s ease-in-out, text-decoration-color .2s ease-in-out; }
.about-body { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); }
.intro { display: flex; flex-direction: column; gap: 20px; }
.intro p { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; font-weight: 500; max-width: 760px; }
.contact { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; }
.contact .footer-mail { font-size: clamp(18px, 2vw, 24px); }
.contact .footer-mail:hover { color: var(--accent); }
.bio { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.5; max-width: 720px; }
.currently { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; font-size: 17px; }
.currently .label { font-size: 14px; }
.awards { display: flex; flex-direction: column; gap: 26px; margin-top: 24px; }
.award-row { display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; padding: 8px 0; line-height: 1.4; border-bottom: 1px solid var(--line); font-size: 15px; }
.award-row .year, .award-row .film { color: var(--muted); }
.award-row .film { text-transform: uppercase; }
@media (max-width: 560px) {
  .award-row { grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; padding: 6px 0; }
  .award-row .pos { display: block; }
  .award-row .film { grid-column: 2; }
}

/* ---------- Footer ---------- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: calc(var(--section) + 16px) var(--gutter) 40px; }
.footer-main { border-top: 1px solid var(--line); padding-top: 32px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-end; justify-content: space-between; }
.footer-kicker { display: block; font-size: 14px; font-weight: 300; text-transform: uppercase; color: var(--muted); }
.footer-mail { display: inline-block; margin-top: 8px; font-size: clamp(18px, 2vw, 24px); line-height: 1.1; font-weight: 800; text-transform: none; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 14px; font-weight: 600; text-transform: uppercase; }
.links a { min-height: 32px; display: inline-flex; align-items: center; }
.legal { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; align-items: center; padding-top: 40px; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.legal .links { font-size: 13px; font-weight: 400; }
.legal a { color: var(--muted); }
.legal a:hover { color: var(--accent); }
.site-footer.compact .legal { border-top: 1px solid var(--line); padding-top: 32px; }

/* ---------- Legal pages ---------- */
.legal-page { display: flex; flex-direction: column; gap: 24px; }
.legal-page section { display: flex; flex-direction: column; gap: 10px; }
.legal-page p { line-height: 1.5; }
.legal-page .label { font-size: 13px; color: var(--muted); }
.legal-page a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.todo { color: var(--accent); }

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

@media (prefers-reduced-motion: reduce) { .featured:hover img { transform: none; } }

/* Grid films: same slow push-in as the lead film (desktop with a mouse only) */
@media (hover: hover) and (pointer: fine) {
  .work-item .tile img { transition: transform 1.2s cubic-bezier(.2, .6, .2, 1); }
  .work-item:hover .tile img, .work-item:focus-visible .tile img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { .work-item:hover .tile img { transform: none; } }


/* Festivals & Awards: film link hover */
.award-row a.film { transition: color .2s ease-in-out; }
.award-row a.film:hover, .award-row a.film:focus-visible { color: var(--accent); }
/* Every lime hover fades the same way */
.below-title, .count { transition: color .2s ease-in-out; }

/* Back / Next: big type, no images — the page ends on this film's stills */
.more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 48px; margin-top: var(--section); border-top: 1px solid var(--line); padding-top: 32px; }
.more-link { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.more-link.next { text-align: right; align-items: flex-end; margin-left: auto; }
.more-kicker { font-size: 14px; font-weight: 300; text-transform: uppercase; color: var(--muted); transition: color .2s ease-in-out; }
.more-title { font-size: clamp(22px, 3vw, 32px); line-height: 1.05; font-weight: 800; text-transform: uppercase; color: var(--fg); transition: color .2s ease-in-out; }
.more-link:hover .more-title, .more-link:focus-visible .more-title { color: var(--accent); }
.more .arrow { display: inline-block; transition: transform .3s ease; }
.more-link.back:hover .arrow, .more-link.back:focus-visible .arrow { transform: translateX(-6px); }
.more-link.next:hover .arrow, .more-link.next:focus-visible .arrow { transform: translateX(6px); }
@media (max-width: 560px) { .more { flex-wrap: nowrap; gap: 24px; } .more-link { flex: 1 1 0; } .more-title { font-size: 20px; } .more-kicker { font-size: 12px; } }

/* Titles never break inside a word; main.js shrinks a single long word until it fits */
.project-title, .project-alt { overflow-wrap: normal; word-break: normal; hyphens: manual; }
/* Touch / small screens: caption sits on the image, always visible (like the featured tile) */
@media not ((hover: hover) and (pointer: fine) and (min-width: 900px)) {
  .work-item { position: relative; gap: 0; }
  .below { position: absolute; inset: auto 0 0 0; align-items: flex-start; text-align: left; gap: 4px; padding: 56px clamp(16px, 4vw, 24px) clamp(14px, 3.5vw, 20px); background: linear-gradient(transparent, rgba(13, 13, 13, .6)); pointer-events: none; }
  .below-title { font-size: clamp(20px, 5.5vw, 26px); line-height: 1; font-weight: 800; }
  .below-sub { font-size: 13px; color: var(--fg); opacity: .7; }
  .work-item:hover .below-title { color: var(--fg); }
}
/* Touch: arrow appears on tap, like the featured tile */
@media not ((hover: hover) and (pointer: fine) and (min-width: 900px)) {
  .below-title::after { content: '→'; margin-left: .3em; display: inline-block; opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
  .work-item:active .below-title::after, .work-item:focus-visible .below-title::after { opacity: 1; transform: none; }
  .featured:active .cap-title::after { opacity: 1; transform: none; }
}
.about-portrait img { aspect-ratio: 4 / 4.7; object-fit: cover; object-position: center 85%; }
@media (max-width: 720px) { .site-header { flex-direction: column; align-items: center; text-align: center; } .logo { align-items: center; } .nav { width: 100%; justify-content: center; } }
/* Crew list: long lists span two tracks and flow into two columns aligned with the grid */
.crew-list { display: flex; flex-direction: column; }
.credit-col.crew.long { grid-column: 2 / -1; }
.credit-col.crew.long .crew-list { display: block; columns: 2; column-gap: clamp(24px, 4vw, 72px); }
.credit-col.crew.long .crew-list > span { display: block; break-inside: avoid; }
@media (max-width: 720px) { .credit-col.crew.long { grid-column: auto; } .credit-col.crew.long .crew-list { columns: 1; } }
/* Card sublines: same design as the project-page meta line */
.cap-sub, .below-sub { display: flex; flex-wrap: wrap; font-size: 13px; font-style: normal; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.cap-sub span + span::before, .below-sub span + span::before { content: '/'; margin: 0 .7em; opacity: .5; }
.below-sub span + span::before { margin: 0 .4em; }
