/* Roi Kayzerman — site styles.
   The interface stays neutral (black, greys) so the grade is the only colour on the page. */
@font-face { font-family: "Host Grotesk"; src: url("fonts/host-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Host Grotesk"; src: url("fonts/host-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #000;
  --text: #d6d6d6;      /* body */
  --strong: #e6e6e6;    /* titles, active */
  --muted: #8a8a8a;     /* secondary, 5.9:1 on black */
  --faint: #808080;     /* footer, 5.3:1 on black */
  --pad: 40px;
  --gap: 16px;
  --font: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--font); letter-spacing: 0.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1px solid var(--strong); outline-offset: 4px; }

.skip { position: absolute; left: -9999px; top: 0; padding: 12px 16px; background: var(--strong); color: #000; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1600px; margin: 0 auto; padding: 0 var(--pad); }

/* Header */
.site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding: 36px 0 56px; }
.brand { display: flex; flex-direction: column; color: var(--strong); }
.brand b { font-weight: 500; }
.brand span { color: var(--muted); }
.nav { display: flex; gap: 36px; flex-wrap: wrap; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--strong); }

/* Work grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 44px; }
.tile a { display: flex; flex-direction: column; gap: 12px; }
.tile .frame { aspect-ratio: 16 / 9; background: #0a0a0a; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.js .tile img { opacity: 0; transition: opacity .4s ease; }
.js .tile img.is-loaded { opacity: 1; }
.cap { display: flex; flex-direction: column; }
.cap .t { color: var(--strong); transition: color .15s; }
.cap .m { color: var(--muted); }
.tile a:hover .t { color: #fff; }
.tile a:hover .m { color: #a8a8a8; }

/* Footer */
.site-foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 120px 0 36px; color: var(--faint); font-size: 13px; }
.site-foot nav { display: flex; gap: 28px; }
.site-foot a:hover { color: var(--strong); }

/* Tablet */
@media (max-width: 999px) {
  :root { --pad: 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
}
/* Phone */
@media (max-width: 639px) {
  :root { --pad: 16px; --gap: 12px; }
  .site-head { flex-direction: column; gap: 8px; padding: 22px 0 24px; }
  .nav { gap: 24px; }
  .nav a { padding: 10px 0; }
  .grid { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .tile a { gap: 10px; }
  .site-foot { flex-direction: column-reverse; gap: 8px; padding: 80px 0 28px; }
}
/* Desktop with a mouse: bigger frames, title appears on the frame on hover (tablets and phones keep captions below). */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) {
  .wrap { max-width: 2000px; padding: 0 32px; }
  .grid { row-gap: var(--gap); }
  .tile a { position: relative; gap: 0; }
  .tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 18px 14px; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
  .tile a:hover .cap, .tile a:focus-visible .cap { opacity: 1; }
  .tile .cap .t { color: #fff; }
  .tile .cap .m { color: #d9d9d9; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .js .tile img { opacity: 1; }
}

/* ---------- Project page ---------- */
.project { display: flex; flex-direction: column; }
.p-head { display: flex; flex-direction: column; margin-bottom: 20px; }
.p-head h1 { margin: 0; font-size: 14px; font-weight: 500; color: var(--strong); }
.p-head span { color: var(--muted); }
.player { position: relative; width: min(100%, 1040px, calc(80vh * var(--r, 1.7778))); align-self: center; background: #0a0a0a; }
.player img { width: 100%; height: 100%; object-fit: contain; }
.player { overflow: hidden; }
/* 2px bleed on every side hides sub-pixel gaps between the player and its frame */
.player iframe { position: absolute; top: -2px; left: -2px; width: calc(100% + 4px); height: calc(100% + 4px); border: 0; background: #000; opacity: 0; transition: opacity .35s ease; z-index: 1; }
.player iframe.is-ready { opacity: 1; }
.player.is-loading .play { opacity: .35; }
.player-start { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.player iframe:focus { outline: none; }
.play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.75); background: rgba(0,0,0,.25); transition: background .2s, border-color .2s; }
.play::after { content: ""; position: absolute; left: 31px; top: 25px; border-left: 18px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.player-start:hover .play { background: rgba(0,0,0,.45); border-color: #fff; }
.player .todo { position: absolute; left: 16px; bottom: 12px; color: rgba(255,255,255,.75); font-size: 13px; }
.credits { margin: 56px auto 0; width: 100%; max-width: 1040px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px var(--gap); }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; color: var(--strong); }
.stills { margin-top: 88px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: #0a0a0a; cursor: zoom-in; }
.zoom img { width: 100%; height: auto; }
.p-nav { margin-top: 88px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.p-nav a { display: flex; flex-direction: column; color: var(--muted); }
.p-nav b { font-weight: 400; color: var(--strong); }
.p-nav .all { justify-self: center; }
.p-nav .next { text-align: right; align-items: flex-end; }
.p-nav a:hover, .p-nav a:hover b { color: #fff; }

/* ---------- 35mm Photography ---------- */
.photos { columns: 3; column-gap: var(--gap); }
.photos .zoom { break-inside: avoid; margin-bottom: var(--gap); }
.photos.is-js { columns: auto; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.photos.is-js .col { display: flex; flex-direction: column; gap: var(--gap); }
.photos.is-js .zoom { margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); align-items: start; }
.portrait { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.c-text { grid-column: 2 / 4; max-width: 560px; display: flex; flex-direction: column; gap: 56px; }
.bio p { margin: 0 0 14px; }
.bio .lead { color: var(--strong); }
.c-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--gap); }
.c-cols div { display: flex; flex-direction: column; }
.c-cols h2 { margin: 0 0 6px; font-size: inherit; font-weight: 400; color: var(--muted); }
.c-cols a:hover { color: #fff; }
.c-cols .ig { align-self: flex-start; margin-top: 10px; padding: 4px 0; opacity: .85; transition: opacity .15s; }
.c-cols .ig:hover, .c-cols .ig:focus-visible { opacity: 1; }
.c-cols .ig img { width: 22px; height: 22px; }

/* ---------- Text pages ---------- */
.text-page { max-width: 640px; }
.text-page h1 { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--strong); }
.text-page .updated { margin: 0 0 40px; color: var(--muted); }
.text-page h2 { margin: 48px 0 0; font-size: inherit; font-weight: 500; color: var(--strong); }
.text-page h3 { margin: 24px 0 6px; font-size: inherit; font-weight: 400; color: var(--muted); }
.text-page p { margin: 0 0 10px; }
.u { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Full screen viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; grid-template-rows: 64px minmax(0, 1fr) 64px; grid-template-columns: 96px minmax(0, 1fr) 96px; color: var(--muted); }
.lb[hidden] { display: none; }
.lb-count { grid-row: 1; grid-column: 1 / 3; align-self: center; padding-left: var(--pad); }
.lb-close { grid-row: 1; grid-column: 3; justify-self: end; align-self: center; margin-right: calc(var(--pad) - 8px); min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.lb-stage { grid-row: 2; grid-column: 2; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-stage { overflow: hidden; touch-action: none; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: 0 0; will-change: transform; user-select: none; -webkit-user-drag: none; }
.lb-stage img.is-zoomed { cursor: grab; }
.lb-btn { grid-row: 2; align-self: center; justify-self: center; width: 48px; height: 48px; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lb-btn svg path { stroke: #bdbdbd; transition: stroke .15s; }
.lb-btn:hover svg path { stroke: #fff; }
.lb-close:hover { color: #fff; }
body.lb-open { overflow: hidden; }

@media (max-width: 999px) {
  .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photos { columns: 2; }
}
@media (max-width: 639px) {
  .credits { margin-top: 32px; }
  .stills { margin-top: 48px; grid-template-columns: minmax(0, 1fr); }
  .p-nav { margin-top: 48px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-nav .all { grid-column: 1 / 3; grid-row: 2; padding: 12px 0; }
  .play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .play::after { left: 24px; top: 18px; border-left-width: 15px; border-top-width: 11px; border-bottom-width: 11px; }
  .contact { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .c-text { grid-column: auto; gap: 32px; }
  .c-cols { grid-template-columns: minmax(0, 1fr); }
  .c-cols a, .c-cols span { padding: 4px 0; }
  .lb { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .lb-btn { position: absolute; top: 50%; z-index: 2; width: 44px; height: 72px; margin-top: -36px; }
  .lb-prev { left: 2px; } .lb-next { right: 2px; }
  .lb-btn svg { width: 10px; height: 19px; filter: drop-shadow(0 0 2px rgba(0,0,0,.9)); }
  .lb-btn svg path { stroke: #fff; stroke-width: 1.6; }
  .lb.is-zoomed .lb-btn { opacity: 0; pointer-events: none; }
  .lb { grid-template-rows: 68px minmax(0, 1fr) 40px; }
  .lb-count { grid-column: 2; justify-self: start; padding-left: 20px; }
  .lb-close { grid-column: 2; margin-right: 12px; min-height: 52px; min-width: 76px; padding: 0 18px; font-size: 16px; }
}
