/* Home: signature, a loose collage of one still per category, categories in Necto Mono */
@font-face {
  font-family: "Necto Mono"; src: url("assets/fonts/NectoMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root { --bg: #fdfcfa; --ink: #24221e; --soft: #6e6a60; --choc: #ebe5dc; --mat-blue: #aab2b3; }
html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.home {
  min-height: 100vh; min-height: 100svh; font-family: "Necto Mono", ui-monospace, Menlo, monospace;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(26px, 5vh, 54px) 20px clamp(30px, 6vh, 60px);
}
.stage { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: clamp(20px, 4vh, 44px); }

.sig { display: block; width: clamp(200px, 22vw, 320px); }
.sig img { display: block; width: 100%; height: auto; }

/* collage stage: positions are % of the stage, sizes follow each still's own ratio */
.collage {
  position: relative; width: min(1320px, 94vw, calc((100svh - 300px) * 2)); aspect-ratio: 2;
}
.shot {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  opacity: 0; translate: 0 14px; animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0s);
}
.shot .frame { display: block; aspect-ratio: var(--ar); overflow: hidden; }
.shot img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
  filter: saturate(.78) contrast(.96); transition: filter .5s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.shot.matted .frame { background: var(--mat); padding: var(--pad, 5px); }
.shot.matted .frame img { aspect-ratio: var(--ar); height: auto; }
.shot.matted .frame { aspect-ratio: auto; }
.shot .cap {
  display: inline-block; margin-top: 9px; font-family: "Necto Mono", ui-monospace, Menlo, monospace; font-size: 12.5px;
  letter-spacing: .01em; color: var(--soft); font-synthesis: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s;
}
.shot:hover .cap, .shot:focus-visible .cap { color: var(--ink); border-color: var(--ink); }
.shot:hover img, .shot:focus-visible img { filter: none; transform: scale(1.025); }
.shot:focus-visible { outline: none; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }

@media (max-width: 640px) {
  .collage { width: 94vw; aspect-ratio: .68; }
  .shot { left: var(--mx, var(--x)); top: var(--my, var(--y)); width: var(--mw, var(--w)); }
  .shot .cap { font-size: 11.5px; margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot { animation: none; opacity: 1; translate: none; }
  .shot img { transition: none; }
}

/* "about me" cue at the bottom of the first screen */
.to-about {
  display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: clamp(14px, 3vh, 28px);
  font-family: "Necto Mono", ui-monospace, Menlo, monospace; font-size: 12px; color: var(--soft); transition: color .3s;
}
.to-about svg { width: 10px; height: 20px; animation: nudge 2.4s ease-in-out infinite; }
.to-about:hover, .to-about:focus-visible { color: var(--ink); outline: none; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
#about { scroll-margin-top: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .to-about svg { animation: none; } }

/* Directing still: Garden Salad loop fades in over it once YouTube is steadily playing */
.shot .frame.yt { position: relative; container-type: size; }
.shot .frame.yt iframe {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; border: 0; pointer-events: none;
  --content: 2.76; --src: 1.7778;                     /* the film is ~2.76:1 inside a 16:9 frame: crop the bars */
  --cw: max(100cqw, 100cqh * var(--content)); width: var(--cw); height: calc(var(--cw) / var(--src));
  opacity: 0; transition: opacity .38s ease; filter: saturate(.78) contrast(.96);
}
.shot .frame.yt.live iframe { opacity: 1; }
.shot:hover .frame.yt iframe { filter: none; }

/* Social still: a little vertical feed that flicks up to the next clip */
.feed { display: block; position: relative; aspect-ratio: var(--ar); overflow: hidden; background: #e2dccf; }
.feed-track { display: flex; flex-direction: column; height: 100%; transition: transform .62s cubic-bezier(.2, .85, .25, 1); will-change: transform; }
.feed .clip { flex: none; height: 100%; display: block; }
.feed video {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  filter: saturate(.78) contrast(.96); transition: filter .5s ease;
}
.shot:hover .feed video { filter: none; }

/* category links under the signature (same as the work pages) */
.home-nav { margin-top: clamp(14px, 2.4vh, 22px); }
.home-nav ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px clamp(18px, 2.6vw, 34px); list-style: none;
  font-family: "Necto Mono", ui-monospace, Menlo, monospace; font-size: 12.5px; letter-spacing: .01em; font-synthesis: none;
}
.home-nav a { color: var(--soft); padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.home-nav a:hover, .home-nav a:focus-visible { color: var(--ink); border-color: var(--ink); outline: none; }

/* draggable stills (desktop) */
@media (min-width: 901px) and (pointer: fine) {
  .collage .shot { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
  .collage .shot img { -webkit-user-drag: none; }
  .collage .shot.dragging { cursor: grabbing; }
  .collage .shot.dragging .frame { box-shadow: 0 18px 40px -18px rgba(36, 34, 30, .35); }
}

/* titles under the stills only show on hover (always visible on touch screens, which can't hover) */
@media (hover: hover) {
  .collage .shot .cap { opacity: 0; translate: 0 -3px; transition: opacity .35s ease, translate .35s ease, color .3s, border-color .3s; }
  .collage .shot:hover .cap, .collage .shot:focus-visible .cap, .collage .shot.dragging .cap { opacity: 1; translate: 0 0; }
}
