/* vaclavk.com — hybrid: original site's landing page and logo, with the first redesign's
   typography (Archivo at varying widths), project-page layout and palette:
   blue-graphite screening-room ground, blue-tinted secondary text, projector-lamp amber accent. */
@font-face {
  font-family: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/archivo-black.woff") format("woff");
}
:root {
  --black: #191c22;       /* page ground: blue-graphite of a dark screening room */
  --bar: #21252d;         /* frames behind loading images */
  --head: #232a38;        /* header bar */
  --text: #eee9e0;        /* running text, warm projected white */
  --white: #f7f4ee;       /* headlines, buttons */
  --muted: #9ba1ac;       /* secondary text, slightly blue */
  --line: #2e333d;        /* hairlines */
  --red: #f2a93b;         /* accent: projector-lamp amber (hover, active, logo circle) */
  --on-accent: #191c22;   /* text on amber */
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --logo-font: "Archivo Black", "Archivo", "Arial Black", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --measure: 62ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--red); color: var(--on-accent); padding: .4em .8em; z-index: 20; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 32px;
  min-height: clamp(112px, calc(8vw + 40px), 148px);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  background: var(--head); border-bottom: 1px solid var(--line);
}
.landing .top { position: absolute; inset: 0 0 auto 0; background: linear-gradient(rgba(10,12,16,.6), transparent); border-bottom: 0; }
.logo { display: inline-flex; align-items: center; gap: clamp(8px, 1vw, 14px); text-decoration: none; min-width: 0; color: var(--white); }
.logo:hover { color: var(--white); }
.logo-name {
  font-family: var(--logo-font); font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1; letter-spacing: -.01em;
  text-transform: uppercase; white-space: nowrap;
}
.logo-face { flex: none; width: clamp(64px, 6.5vw, 92px); display: block; }
.logo-face img { width: 100%; height: auto; transition: transform .3s ease; }
.logo:hover .logo-face img { transform: scale(1.05) rotate(-3deg); }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 32px); flex-wrap: wrap; justify-content: flex-end; }
.top nav a { text-decoration: none; color: var(--white); font-size: .95rem; white-space: nowrap; padding-block: 4px; border-bottom: 1px solid transparent; }
.top nav a:hover { color: var(--white); border-bottom-color: var(--white); }
.top nav a[aria-current="page"] { border-bottom-color: var(--red); }
@media (max-width: 640px) {
  .top { flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding-block: 20px; }
  .logo-name { font-size: 1.15rem; }
  .logo-face { width: 60px; }
  .top nav { gap: 18px; }
}

/* ---------- Landing ---------- */
.intro { position: relative; height: 100vh; height: 100svh; min-height: 480px; display: grid; place-items: center; overflow: hidden; }
.intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(25,28,34,.5), rgba(25,28,34,.2) 70%), linear-gradient(transparent 70%, var(--black)); }
.intro-text { position: relative; z-index: 1; text-align: center; padding: 0 var(--gutter); min-width: 0; }
.intro h1 { display: grid; gap: .3em; }
.intro-name {
  color: var(--white); font-weight: 800; letter-spacing: -.02em; line-height: .92;
  font-size: clamp(2.6rem, 8.5vw, 8rem); font-variation-settings: "wdth" 125;
  text-shadow: 0 2px 40px rgba(0,0,0,.4); overflow-wrap: anywhere;
}
.intro-role { color: var(--red); font-weight: 300; font-style: italic; font-size: clamp(1.2rem, 2.3vw, 1.9rem); letter-spacing: .01em; }
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px clamp(20px, 4vw, 48px); margin: clamp(28px, 4vw, 48px) 0 0; }
.button {
  display: inline-block; min-width: 9em; padding: .95em 2.2em; text-align: center; text-decoration: none;
  background: var(--white); color: var(--black); font-weight: 700; font-size: .95rem; font-variation-settings: "wdth" 112;
  transition: background .2s, color .2s;
}
.button:hover { background: var(--red); color: var(--on-accent); }

/* ---------- Works grid ---------- */
.grid {
  list-style: none; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 0; max-width: 1600px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px) clamp(16px, 2.5vw, 40px);
}
@media (max-width: 700px) { .grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1920px; } }
.grid a { display: grid; gap: .45rem; text-decoration: none; color: var(--text); }
.frame { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bar); margin-bottom: .45rem; }
.frame img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.9); transition: filter .35s ease, transform .6s ease; }
.grid a:hover .frame img, .grid a:focus-visible .frame img { filter: none; transform: scale(1.025); }
.grid-title { font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.2; font-variation-settings: "wdth" 115; color: var(--white); }
.grid a:hover .grid-title { color: var(--red); }
.grid-meta { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.sep { margin: 0 .5em; opacity: .5; }

/* ---------- Project page ---------- */
.hero-player { background: #000; }
.hero-player .player { max-height: 82vh; margin-inline: auto; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: var(--bar); overflow: hidden; }
.hero-player .player { width: min(100%, calc(82vh * 16 / 9)); }
.player > img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.2); transition: background .2s; }
.play:hover { background: rgba(0,0,0,.05); }
.play-icon { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--white); position: relative; transition: background .2s, border-color .2s; }
.play-icon::after { content: ""; position: absolute; left: 32px; top: 25px; border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent var(--white); }
.play:hover .play-icon, .play:focus-visible .play-icon { background: var(--red); border-color: var(--red); }
.play:hover .play-icon::after { border-left-color: var(--on-accent); }

.work-body {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 48px);
  padding: clamp(32px, 5vw, 72px) var(--gutter) 0; max-width: 1200px; margin-inline: auto;
}
@media (min-width: 960px) {
  .work-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; }
  .credits { grid-column: 1 / -1; }
}
.work-head h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.02; font-weight: 800; letter-spacing: -.015em; font-variation-settings: "wdth" 118; color: var(--white); }
.facts { margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; }
.facts div:last-child dd { color: var(--red); }
.prose { max-width: var(--measure); min-width: 0; }
.prose p { margin: 0 0 1.1em; }
.prose p:first-child { font-size: 1.15rem; }
.prose a { color: var(--white); }

/* End-credits roll */
.credits { border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 48px); text-align: center; }
.credits h3 { font-size: .95rem; font-weight: 600; color: var(--muted); margin: 1.75rem 0 .75rem; }
.credits dl { margin: 0; display: grid; gap: .35rem; }
.credits dl > div { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.credits dt { text-align: right; color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; padding-top: .18em; }
.credits dd { text-align: left; margin: 0; }
.credits .solo { grid-template-columns: 1fr; }
.credits .solo dd { text-align: center; }

.media { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: clamp(24px, 3vw, 40px); }
.more, .gallery { margin-top: clamp(48px, 7vw, 96px); }
.gallery img { width: 100%; height: auto; background: var(--bar); }
.caption { margin: 0; max-width: var(--measure); color: var(--muted); }

.pager { max-width: 1200px; margin: clamp(56px, 8vw, 104px) auto 0; padding: 24px var(--gutter) 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.5rem); line-height: 1.2; font-variation-settings: "wdth" 112; color: var(--white); min-width: 0; }
.pager a:hover { color: var(--red); }
.pager span { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); margin-bottom: .3rem; font-variation-settings: "wdth" 100; }
.pager .next { grid-column: 2; text-align: right; }

/* ---------- About ---------- */
.about-grid {
  max-width: 1200px; margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
}
@media (min-width: 860px) { .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bar); }
.about-text h1 { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variation-settings: "wdth" 125; color: var(--white); }
.about-name { color: var(--red); font-style: italic; font-weight: 300; font-size: 1.2rem; margin: .6rem 0 1.75rem; }
.about-social { display: flex; gap: 18px; margin: 1.8em 0 .6em; }
.about-social a, .foot-social a { display: inline-flex; color: var(--white); }
.about-social svg, .foot-social svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.about-social svg .dot, .foot-social svg .dot { fill: currentColor; stroke: none; }
.about-social a:hover, .foot-social a:hover { color: var(--red); }
.about-mail a { font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 700; text-decoration: none; font-variation-settings: "wdth" 112; color: var(--white); overflow-wrap: anywhere; }
.about-mail a:hover { color: var(--red); }
.company { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--muted); font-size: .95rem; }
.company h2 { font-size: .95rem; font-weight: 600; color: var(--text); margin-bottom: .5em; }
.company p { margin: 0 0 .8em; }

/* ---------- Footer ---------- */
.foot {
  margin-top: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line);
  padding: 36px var(--gutter) calc(36px + env(safe-area-inset-bottom, 0px));
  display: grid; justify-items: center; gap: 8px; text-align: center; font-size: .9rem; color: var(--muted);
}
.foot p { margin: 0; max-width: 60ch; }
.foot-social { display: flex; gap: 18px; margin-bottom: 8px !important; }
.landing .foot { margin-top: 0; border-top: 0; }

.notfound { padding: 18vh var(--gutter); text-align: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; font-variation-settings: "wdth" 118; color: var(--white); margin-bottom: 1em; }

@media (max-width: 520px) {
  .facts div { grid-template-columns: 6rem minmax(0, 1fr); }
  .credits dl > div { grid-template-columns: 1fr; gap: 0; margin-bottom: .5rem; }
  .credits dt, .credits dd { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Landing line, awards ---------- */
.intro-line { margin: 1rem 0 0; color: var(--text); font-size: clamp(1rem, 1.5vw, 1.2rem); letter-spacing: .01em; text-shadow: 0 1px 20px rgba(0,0,0,.5); }
.awards { margin: 1.4em 0 0; padding-top: 1.1em; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- AI films ---------- */
.ai-intro { max-width: 1200px; margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--gutter) 0; }
.ai-intro h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variation-settings: "wdth" 125; color: var(--white); }
.ai-lead { max-width: 52ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); margin: 1.2rem 0 0; }
.ai-how { max-width: 1200px; margin: clamp(40px, 6vw, 80px) auto 0; padding: 0 var(--gutter); }
.ai-how h2, .how-made h2 { font-size: .95rem; font-weight: 600; color: var(--muted); margin-bottom: 1.2rem; }
.process { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 24px 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.process li { counter-increment: step; border-top: 2px solid var(--red); padding-top: .9rem; min-width: 0; }
.process li::before { content: counter(step); display: block; color: var(--red); font-weight: 800; font-size: 1.6rem; line-height: 1; font-variation-settings: "wdth" 125; margin-bottom: .5rem; }
.process img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: .7rem; background: var(--bar); }
.process h3 { font-size: 1.05rem; font-weight: 700; font-variation-settings: "wdth" 112; color: var(--white); margin-bottom: .35rem; }
.process p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.ai-page .grid { margin-top: clamp(24px, 4vw, 48px); }
.empty { max-width: 1200px; margin: clamp(48px, 7vw, 96px) auto 0; padding: 0 var(--gutter); color: var(--muted); }
.how-made { margin-top: clamp(48px, 7vw, 96px); display: block; }

/* ---------- Client logos on stills ---------- */
.frame, .player { position: relative; }
.frame img.logo-badge, .player > img.logo-badge {
  position: absolute; z-index: 1; pointer-events: none;
  --s: 1; width: calc(17% * var(--s)); height: auto; max-height: calc(20% * var(--s)); object-fit: contain;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.35)); transform: none; opacity: 1; background: none;
}
img.logo-badge.pos-top-right { top: 5%; right: 4%; object-position: right top; }
img.logo-badge.pos-top-left { top: 5%; left: 4%; object-position: left top; }
img.logo-badge.pos-bottom-right { bottom: 5%; right: 4%; object-position: right bottom; }
img.logo-badge.pos-bottom-left { bottom: 5%; left: 4%; object-position: left bottom; }
.grid a:hover .frame img.logo-badge { transform: none; }
.player iframe { z-index: 2; }
.play { z-index: 1; }

/* ---------- Client logos on the landing page ---------- */
/* Each logo gets an equal cell; --cols cells per row; the last row stays centred. */
.intro { grid-template-rows: 1fr auto; }
.intro-text { align-self: center; }
.client-logos {
  --cell: calc(var(--logo-h) * 3.6);
  position: relative; z-index: 1; list-style: none; margin: 0 auto; padding: 0 var(--gutter) clamp(28px, 5vh, 56px);
  width: min(100%, calc(var(--cols) * var(--cell) + 2 * var(--gutter)));
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: clamp(14px, 2.2vh, 24px);
}
.client-logos li { flex: 0 0 var(--cell); max-width: var(--cell); height: var(--logo-h); display: flex; align-items: center; justify-content: center; }
.client-logos img { --s: 1; max-height: calc(100% * var(--s)); max-width: calc(82% * var(--s)); width: auto; height: auto; object-fit: contain; opacity: .85; }
@media (max-width: 640px) {
  .client-logos { --cell: 30%; width: 100%; }
  .client-logos li { height: calc(var(--logo-h) * .75); }
}
