/* Craig Kabrhel — Director
   Layout mirrors the original Squarespace site: transparent header over a full-bleed
   video hero, alternating text/video project rows, full-bleed six-still strips. */

:root {
  --black: #000;
  --white: #fff;
  --mute-on-dark: #d9d9d9;
  --grey: #8a8a8a;
  --font: "aktiv-grotesk", "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad-x: clamp(18px, 3vw, 44px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--black);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 85px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad-x);
  color: var(--white);
  transition: transform .5s var(--ease), background-color .4s, height .4s;
}
.site-header.is-solid { background: rgba(0,0,0,.92); height: 64px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header nav { display: flex; gap: 22px; font-size: 14.4px; font-weight: 500; letter-spacing: .01em; }
.site-header nav a { text-decoration: none; position: relative; }
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.site-header nav a:hover::after, .site-header nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-title { font-size: clamp(20px, 2.2vw, 28.3px); font-weight: 700; text-decoration: none; letter-spacing: -.005em; white-space: nowrap; }
.site-header .right { justify-self: end; }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; background: var(--white); mix-blend-mode: difference; transform-origin: left; transform: scaleX(0); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 520px; background: var(--black); overflow: hidden; color: var(--white); }
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.2s ease; z-index: 2; }
.hero.is-live .hero__poster { opacity: 0; }
.hero__frame { position: absolute; top: 50%; left: 50%; width: max(100vw, 177.78svh); height: max(100svh, 56.25vw); transform: translate(-50%, -50%) scale(var(--hero-zoom, 1.18)); pointer-events: none; }
/* low-res YouTube still: crop its letterbox bars and soften it until the film starts */
.hero__poster--soft { transform: scale(1.85); filter: blur(6px) brightness(.85); }
.hero__frame iframe { width: 100%; height: 100%; border: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.55)); pointer-events: none; }
.hero__meta {
  position: absolute; z-index: 4; left: var(--pad-x); right: var(--pad-x); bottom: 28px;
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  font-size: 14.4px; font-weight: 500;
}
.hero__meta .disciplines { display: flex; gap: 18px; flex-wrap: wrap; }
.hero__meta .disciplines span:not(:last-child)::after { content: "/"; margin-left: 18px; opacity: .5; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.scroll-cue i { display: block; width: 1px; height: 34px; background: currentColor; transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Filter bar ---------- */
.filters {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: 6px; padding: 30px var(--pad-x) 22px;
  background: var(--white); color: var(--black); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.filters button { padding: 6px 12px; border: 1px solid transparent; border-radius: 999px; transition: border-color .3s, background .3s, color .3s; }
.filters button:hover { border-color: currentColor; }
.filters button[aria-pressed="true"] { background: var(--black); color: var(--white); }
.filters .count { opacity: .45; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Project rows ---------- */
.project { --bg: var(--white); --fg: var(--black); --heading: var(--black); background: var(--bg); color: var(--fg); }
.project[data-theme="dark"] { --bg: var(--black); --fg: var(--white); --heading: var(--mute-on-dark); }
.project[hidden] { display: none; }
.project__row {
  display: grid; grid-template-columns: 4fr 1fr 7fr; align-items: center;
  padding: clamp(40px, 4.5vw, 72px) var(--pad-x);
  min-height: 515px;
}
.project.is-flipped .project__row { grid-template-columns: 7fr 1fr 4fr; }
.project__text { order: 1; }
.project__spacer { order: 2; }
.project__video { order: 3; }
.project.is-flipped .project__text { order: 3; }
.project.is-flipped .project__video { order: 1; }

.project__index { display: flex; gap: 14px; align-items: center; font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .6; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.project__index .rule { flex: 0 0 34px; height: 1px; background: currentColor; }
.project__title { margin: 0 0 22px; color: var(--heading); font-size: clamp(30px, 3.72vw, 52px); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.project__body { margin: 0; max-width: 34em; }
.credits { margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13px; line-height: 1.5; }
.credits dt { opacity: .55; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; padding-top: 2px; }
.credits dd { margin: 0; font-weight: 500; }

/* ---------- Player (YouTube, custom chrome) ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; overflow: hidden; isolation: isolate; }
.player__poster, .player__frame, .player__frame iframe, .player__shield { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__poster { object-fit: cover; z-index: 3; transition: opacity .6s ease, transform 1.4s var(--ease); }
.player:hover .player__poster { transform: scale(1.03); }
.player.is-started .player__poster { opacity: 0; pointer-events: none; }
.player__frame { z-index: 1; }
.player__frame iframe { pointer-events: none; }       /* keeps YouTube's own hover UI from appearing */
.player__shield { z-index: 4; cursor: pointer; background: transparent; transition: background .4s; }
.player.is-paused .player__shield { background: rgba(0,0,0,.28); }

.player__play {
  position: absolute; z-index: 5; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; color: var(--white); opacity: .9; pointer-events: none;
  transition: opacity .35s, transform .5s var(--ease);
}
.player__play svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 8px rgba(0,0,0,.45)); }
.player:hover .player__play { transform: scale(1.12); }
.player.is-playing .player__play { opacity: 0; transform: scale(.8); }
.player.is-loading .player__play::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player__bar {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 14px; padding: 22px 16px 12px;
  color: var(--white); background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s var(--ease);
}
.player.is-started:hover .player__bar, .player.is-paused .player__bar, .player:focus-within .player__bar { opacity: 1; transform: none; }
.player__bar button { width: 22px; height: 22px; display: grid; place-items: center; opacity: .85; }
.player__bar button:hover { opacity: 1; }
.player__bar svg { width: 15px; height: 15px; fill: currentColor; }
.player__track { position: relative; flex: 1; height: 14px; cursor: pointer; }
.player__track::before, .player__fill { content: ""; position: absolute; left: 0; top: 6px; height: 2px; background: rgba(255,255,255,.3); width: 100%; }
.player__fill { background: var(--white); width: 0; }
.player__track:hover::before, .player__track:hover .player__fill { top: 5px; height: 4px; }
.player .i-pause, .player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player .i-unmuted { display: none; }
.player.is-unmuted .i-unmuted { display: block; }
.player.is-unmuted .i-muted { display: none; }
.player:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }

/* ---------- Still strips ---------- */
.strip { overflow: hidden; background: var(--black); }
.strip__track { display: flex; width: max-content; will-change: transform; }
.strip__track img { width: calc(100vw / var(--per, 6)); aspect-ratio: 16 / 9; object-fit: cover; flex: none; filter: saturate(.92); transition: filter .5s; }
.strip__track img:hover { filter: saturate(1.15) brightness(1.05); }

/* ---------- Recognition marquee ---------- */
.recognition { background: var(--black); color: var(--white); padding: 70px 0 64px; overflow: hidden; border-top: 1px solid #1a1a1a; }
.recognition__label { padding: 0 var(--pad-x); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .55; margin-bottom: 22px; }
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { font-size: clamp(42px, 7vw, 108px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; padding-right: .55em; }
.marquee span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.55); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services / approach ---------- */
.approach { background: var(--white); color: var(--black); padding: clamp(70px, 9vw, 130px) var(--pad-x); }
.section-label { font-size: 12.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .55; margin: 0 0 18px; }
.approach h2 { font-size: clamp(30px, 3.72vw, 52px); line-height: 1.2; margin: 0 0 clamp(40px, 5vw, 70px); max-width: 20em; letter-spacing: -.01em; }
.approach__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.approach__grid article { border-top: 1px solid #000; padding-top: 18px; }
.approach__grid h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; }
.approach__grid p { margin: 0; font-size: 15px; line-height: 1.7; }
.clients { margin-top: clamp(56px, 7vw, 96px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 34px; }
.clients .section-label { flex-basis: 100%; }
.clients li { list-style: none; font-size: clamp(20px, 2.1vw, 28px); font-weight: 700; letter-spacing: -.01em; }
.clients ul { display: contents; }

/* ---------- Contact CTA ---------- */
.contact { background: var(--black); color: var(--white); text-align: center; padding: clamp(90px, 12vw, 170px) var(--pad-x); }
.contact h2 { margin: 0 auto 28px; font-size: clamp(38px, 6.4vw, 96px); line-height: 1.02; letter-spacing: -.025em; max-width: 12em; }
.contact p { margin: 0 auto 36px; max-width: 34em; color: var(--mute-on-dark); }
.btn { display: inline-block; padding: 21.6px 36px; background: var(--white); color: var(--black); text-decoration: none; font-size: 14.4px; font-weight: 500; transition: transform .4s var(--ease), background .3s, color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px #fff; }
.btn--dark { background: var(--black); color: var(--white); }
.contact .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--grey); padding: 28px var(--pad-x); display: flex; justify-content: space-between; gap: 20px; font-size: 13px; border-top: 1px solid #1a1a1a; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* ---------- About ---------- */
.about { position: relative; min-height: 100svh; color: var(--white); display: flex; align-items: center; padding: 130px var(--pad-x) 90px; overflow: hidden; }
.about__bg { position: absolute; top: -6%; left: 0; width: 100%; height: 112%; object-fit: cover; object-position: center; will-change: transform; }
.about::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,.72); }
.about__inner { position: relative; z-index: 2; width: min(100%, 760px); margin-left: clamp(0px, 6vw, 110px); }
.about__inner p { margin: 0 0 16px; font-size: 16px; }
.about__inner .lead { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.35; font-weight: 700; margin-bottom: 26px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 44px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.facts b { display: block; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.02em; }
.facts span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; }

/* ---------- Reveal-on-scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-mask { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal-mask.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-mask { opacity: 1; transform: none; clip-path: none; transition: none; }
  .marquee, .scroll-cue i { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .project__row, .project.is-flipped .project__row { grid-template-columns: 1fr; gap: 28px; min-height: 0; }
  .project__spacer { display: none; }
  .project .project__video, .project.is-flipped .project__video { order: 1; }
  .project .project__text, .project.is-flipped .project__text { order: 2; }
  .strip__track img { width: calc(100vw / min(var(--per, 6), 3)); }
  .approach__grid, .facts { grid-template-columns: 1fr; }
  .hero__meta .disciplines { display: none; }
  .filters { flex-wrap: wrap; gap: 2px; font-size: 12px; letter-spacing: .02em; }
  .filters button { padding: 6px 9px; }
  .site-header nav { gap: 14px; }
  .site-footer { flex-direction: column; }
}
@media (max-width: 520px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-header .right { display: none; }
  .site-title { justify-self: end; }
}

/* Muted autoplay: a quiet speaker cue until the visitor turns sound on */
.player::after {
  content: ""; position: absolute; z-index: 7; right: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.45) center / 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M2 6h3l4-3.5v11L5 10H2z'/%3E%3Cpath d='M11 5.5l4 5M15 5.5l-4 5' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E");
  opacity: 0; transform: scale(.8); transition: opacity .35s, transform .35s var(--ease); pointer-events: none;
}
.player.is-started.is-playing:not(.is-unmuted)::after { opacity: 1; transform: none; }
.player.is-started:hover::after { opacity: 0; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; z-index: 100; left: var(--pad-x); bottom: 22px; width: min(420px, calc(100vw - 2 * var(--pad-x)));
  padding: 22px 22px 20px; background: rgba(10,10,10,.94); color: var(--white);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
  font-size: 14px; line-height: 1.55; box-shadow: 0 20px 60px rgba(0,0,0,.4);
  transform: translateY(20px); opacity: 0; transition: transform .6s var(--ease), opacity .6s var(--ease);
}
.consent.is-open { transform: none; opacity: 1; }
.consent[hidden] { display: none; }
.consent__title { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.consent p { margin: 0 0 16px; color: var(--mute-on-dark); }
.consent a { color: var(--white); text-underline-offset: 3px; }
.consent__btns { display: flex; gap: 8px; }
.consent__btns button { flex: 1; padding: 12px 14px; font-size: 13.5px; font-weight: 500; transition: background .3s, color .3s, box-shadow .3s; }
.consent__accept { background: var(--white); color: var(--black); }
.consent__accept:hover { background: #e6e6e6; }
.consent__decline { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); color: var(--white); }
.consent__decline:hover { box-shadow: inset 0 0 0 1px #fff; }
.site-footer .linklike { font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.site-footer .linklike:hover { color: var(--white); }

/* ---------- Privacy page ---------- */
.legal { background: var(--white); color: var(--black); padding: 150px var(--pad-x) 100px; max-width: 860px; margin: 0 auto; }
.legal h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -.03em; margin: 0 0 30px; }
.legal h2 { font-size: 22px; margin: 40px 0 10px; }
.legal p { margin: 0 0 14px; }
.legal .btn { padding: 12px 20px; margin-left: 6px; }
body:has(.legal) { background: var(--white); }
body:has(.legal) .site-header:not(.is-solid) { color: var(--black); }
