/* Zack portfolio v1. Neutral greys only (r = g = b). Green is used once, for the status dot. */

@font-face { font-family: "Gantari"; src: url("../fonts/Gantari-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gantari"; src: url("../fonts/Gantari-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gantari"; src: url("../fonts/Gantari-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
/* Dev switch ?font=gotham: uses the copy installed on Zack's PC, nothing is shipped. */
@font-face { font-family: "Gotham Local"; src: local("Gotham Book"), local("Gotham-Book"); font-weight: 400; }
@font-face { font-family: "Gotham Local"; src: local("Gotham Bold"), local("Gotham-Bold"); font-weight: 700; }
@font-face { font-family: "Gotham Local"; src: local("Gotham Black"), local("Gotham-Black"); font-weight: 900; }

:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --panel: #171717;
  --line: #2b2b2b;
  --text: #ededed;
  --dim: #a0a0a0;
  --dimmer: #707070;
  --white: #ffffff;
  --green: #36c86c;
  --bar: 48px;
  --hh: calc(var(--bar) + env(safe-area-inset-top, 0px));
  --pad: clamp(16px, 3.4vw, 44px);
  --pl: max(var(--pad), env(safe-area-inset-left, 0px));
  --pr: max(var(--pad), env(safe-area-inset-right, 0px));
  --font: "Gantari", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
}
.font-gotham { --font: "Gotham Local", "Gantari", "Segoe UI", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
/* no drag, no selection, no iOS "save image" callout on the artwork */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
h1, h2, p, ul, dl, dd { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sr-fixed { position: fixed; left: 0; top: 0; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
[id] { scroll-margin-top: var(--hh); }
.skip { position: fixed; left: 8px; top: 8px; z-index: 40; padding: 10px 14px; background: var(--white); color: #000000; font-weight: 700; transform: translateY(-160%); }
.skip:focus { transform: none; }

/* ---------- header: where you are ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--hh); padding: env(safe-area-inset-top, 0px) var(--pr) 0 var(--pl);
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 900; font-size: 18px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.mark-sub { font-size: 13px; color: var(--dimmer); white-space: nowrap; padding-left: 14px; border-left: 1px solid var(--line); line-height: 18px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); margin-left: auto; }
.nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--dim); text-decoration: none; transition: color .15s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--white); transform: scaleX(0); transform-origin: 0 50%; transition: transform .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--white); }
.nav a[aria-current="true"]::after { transform: none; }
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; padding-left: clamp(14px, 2.6vw, 34px); border-left: 1px solid var(--line); line-height: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
@media (max-width: 1099px) { .mark-sub { display: none; } }
@media (max-width: 899px) { .status { display: none; } }
@media (max-width: 400px) { .nav { gap: 12px; } .nav a { font-size: 13px; } .mark { font-size: 16px; } }

/* ---------- intro: who, what, and if I'm free ---------- */
.intro {
  max-width: 1680px; margin: 0 auto;
  padding: clamp(40px, 8vw, 110px) var(--pr) clamp(30px, 4.5vw, 64px) var(--pl);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px clamp(24px, 5vw, 80px); align-items: end;
}
.intro h1 { font-weight: 700; font-size: clamp(30px, 4.3vw, 62px); line-height: 1.04; letter-spacing: -.012em; max-width: 17ch; }
.intro-side { font-size: 17px; line-height: 1.55; color: var(--dim); max-width: 44ch; }
.intro-status { margin-top: 14px; color: var(--text); }
.intro-status .dot { display: inline-block; margin-right: 9px; vertical-align: 1px; }
.intro a, .contact-alt { text-decoration: underline; text-decoration-color: var(--dimmer); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.intro a:hover, .contact-alt:hover { text-decoration-color: var(--white); }
@media (max-width: 799px) { .intro { grid-template-columns: minmax(0, 1fr); } .intro-side { font-size: 16px; } }

.copy { display: inline-grid; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.copy > span { grid-area: 1 / 1; border-bottom: 1px solid var(--dimmer); padding: 2px 0; transition: border-color .15s; }
.copy:hover > span { border-bottom-color: var(--white); }
.copy-b { visibility: hidden; }
.copy.is-copied .copy-a { visibility: hidden; }
.copy.is-copied .copy-b { visibility: visible; }

/* ---------- take-apart ---------- */
.apart { height: 340vh; position: relative; }
.pin {
  position: sticky; top: var(--hh);
  height: calc(100vh - var(--hh)); height: calc(100svh - var(--hh));
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 0 var(--pr) 0 var(--pl);
  overflow: hidden; overflow: clip;
}
.pin-head { position: relative; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 0 clamp(16px, 2.4vw, 30px); padding: 6px 0 4px; }
.pin-title { font-weight: 900; font-size: clamp(15px, 1.5vw, 19px); line-height: 1; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pieces { display: flex; align-items: center; gap: 0 22px; flex-wrap: wrap; min-height: 44px; }
.pin-skip { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--dim); text-decoration: underline; text-decoration-color: var(--dimmer); text-underline-offset: 4px; }
.pin-skip:hover { color: var(--white); }
/* how far through the sequence you are */
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); overflow: hidden; }
.progress-fill { position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: 0 50%; }
.apart.is-static .progress, .apart.is-static .pin-skip { display: none; }
.piece { min-height: 44px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dimmer); transition: color .15s; }
.piece:hover { color: var(--text); }
.piece[aria-pressed="true"] { color: var(--text); }
.piece[aria-pressed="true"]::before { content: ""; display: inline-block; width: 14px; height: 2px; background: var(--white); vertical-align: middle; margin-right: 8px; }
.apart-toggle { margin-left: auto; color: var(--text); border-bottom: 1px solid var(--dimmer); min-height: 0; padding: 6px 0; }

.stage {
  grid-area: 2 / 1; position: relative; min-height: 0; min-width: 0;
  container-type: size;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  perspective: 2400px; perspective-origin: 50% 50%;
}
.board {
  position: relative; flex: none;
  width: min(100cqw, calc((100cqh - 64px) * 16 / 9));
  aspect-ratio: 16 / 9;
  transform-style: preserve-3d;
}
.flat, .slab { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.slab { transition: opacity .2s; pointer-events: none; }
.slab::before {
  content: ""; position: absolute; inset: 0;
  border: 2px solid rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .035);
  opacity: 0; transition: opacity .2s;
}
.slab:first-child::before { background: none; }
.board.is-open .slab::before { opacity: 1; }
.slab img { position: absolute; max-width: none; }
.slab.dim { opacity: .15; }
.slab-diagram img { opacity: .8; }
/* once decoded the stack sits ready under the opaque flat image, so nothing has to raster mid-scroll */
.board:not(.is-ready) .slab { visibility: hidden; }
.apart.in-view .board, .apart.in-view .slab { will-change: transform; }

.bb { position: absolute; width: 6%; height: auto; top: 5.333%; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); pointer-events: none; }
.bb-tl { left: 3%; }
.bb-tr { right: 3%; }

.caps { position: relative; flex: none; width: 100%; height: 44px; margin-top: 14px; }
.cap { position: absolute; left: 0; right: 0; top: 0; font-size: 15px; color: var(--dim); text-align: center; }
.cap-b, .cap-load { opacity: 0; }
.cap-load { color: var(--dimmer); }

.labels { grid-area: 2 / 1; position: relative; z-index: 2; pointer-events: none; visibility: hidden; opacity: 0; }
.pin.labels-on .labels, .pin.labels-on .legend { visibility: visible; }
.lab {
  position: absolute; left: 0; top: 0; height: 44px; padding: 0 10px 0 0;
  display: flex; align-items: center; gap: 10px; text-align: left; pointer-events: auto; white-space: nowrap;
}
.lab-in { display: flex; align-items: center; gap: 10px; transition: opacity .2s; }
.lab.dim .lab-in { opacity: .35; }
.lab-name { display: block; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.25; }
.lab-count { display: block; font-size: 12px; color: var(--dim); line-height: 1.25; }
.lab[aria-pressed="true"] .badge { outline: 2px solid var(--white); outline-offset: 2px; }
.lab:hover .lab-name { color: var(--white); }
.lead { position: absolute; left: 0; top: 0; width: 100px; height: 1px; background: #666666; transform-origin: 0 0; transition: opacity .2s; }
.lead.dim { opacity: .25; }

.badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; flex: none; vertical-align: -5px; }
.badge img { width: 14px; height: 14px; }
.badge-s { background: #3d3d3d; }
.badge-p { background: var(--white); }
.badge-p img { filter: invert(1); }

.legend {
  grid-area: 2 / 1; align-self: start; justify-self: start; position: relative; z-index: 2;
  max-width: 250px; font-size: 13px; line-height: 1.6; color: var(--text);
  visibility: hidden; opacity: 0;
}
.legend p:not(.fine) { display: flex; align-items: flex-start; gap: 9px; line-height: 1.4; }
.legend p:not(.fine) + p { margin-top: 8px; }
.legend .badge { margin-top: -2px; }
.legend .fine { color: var(--dim); font-size: 12.5px; line-height: 1.5; margin-top: 10px; }

/* static variant (reduced motion): a diagram, no pinning */
.apart.is-static { height: auto; }
.apart.is-static .pin { position: relative; top: 0; height: min(calc(100svh - var(--hh)), 900px); }

/* list labels: phones and portrait tablets */
@media (max-width: 899px) {
  .apart { height: 300vh; }
  /* the picture runs edge to edge on phones and tablets in portrait */
  .stage { margin-left: calc(-1 * var(--pl)); margin-right: calc(-1 * var(--pr)); }
  .labels { grid-area: 3 / 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding-top: 4px; }
  .lab { position: static; white-space: normal; height: auto; min-height: 44px; padding: 4px 0; }
  .lab-count { display: none; }
  .lab-name { font-size: 10.5px; letter-spacing: .1em; }
  .lead { display: none; }
  .legend { grid-area: 4 / 1; align-self: auto; max-width: none; padding: 8px 0 max(14px, env(safe-area-inset-bottom, 0px)); font-size: 12px; line-height: 1.8; }
  .legend .fine { font-size: 11px; margin-top: 4px; }
  .cap { font-size: 14px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .labels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- shared blocks ---------- */
.block { padding: clamp(56px, 9vw, 120px) var(--pr) 0 var(--pl); max-width: 1680px; margin: 0 auto; }
.block-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 28px; margin-bottom: clamp(18px, 2.4vw, 30px); }
.block-head h2 { font-weight: 900; font-size: clamp(26px, 3.6vw, 44px); line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.block-head p { color: var(--dim); font-size: 15px; max-width: 46ch; }
.toggle {
  min-height: 44px; padding: 0 16px; border: 1px solid #555555; color: var(--text);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .15s, color .15s, border-color .15s; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.toggle:hover { border-color: var(--white); }
.toggle[aria-pressed="true"], .toggle.is-held { background: var(--white); color: #000000; border-color: var(--white); }

/* ---------- raw / final ---------- */
.rawfinal { padding-top: clamp(28px, 5vw, 64px); }
.rf { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100svh - var(--hh) - 150px) * 16 / 9)); min-width: min(100%, 320px); overflow: hidden; background: var(--panel); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.rf img { -webkit-user-drag: none; }
.rf-final, .rf-clip, .rf-raw { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.rf-clip { overflow: hidden; transform: translateX(-50%); }
.rf-raw { transform: translateX(50%); }
.rf-bar { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: translateX(-50%); pointer-events: none; }
.rf-line { position: absolute; right: -1px; top: 0; width: 2px; height: 100%; background: var(--white); }
.rf-knob { position: absolute; right: -22px; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: var(--white); }
.rf-knob::before, .rf-knob::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid #000000; border-width: 0 0 2px 2px; }
.rf-knob::before { left: 11px; transform: rotate(45deg); }
.rf-knob::after { right: 11px; transform: rotate(-135deg); }
.rf-tag { position: absolute; bottom: 12px; padding: 5px 9px; background: #000000; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.rf-tag-l { left: 12px; }
.rf-tag-r { right: 12px; }
.rf-range { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.rf-range:focus-visible ~ .rf-bar .rf-knob, .rf:has(.rf-range:focus-visible) .rf-knob { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---------- gallery: a contact sheet ---------- */
.grid { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(22px, 3vw, 44px) clamp(12px, 1.6vw, 24px); align-items: end; }
.tile { grid-column: span 4; min-width: 0; transform-origin: 0 0; }
.tile:nth-child(7n+1), .tile:nth-child(7n) { grid-column: span 7; }
.tile:nth-child(7n+2), .tile:nth-child(7n+6) { grid-column: span 5; }
.shot { width: 100%; padding: 0; text-align: left; }
/* a clear layer over the picture: a long press or right click lands on it, not on the image */
.shot::after, .v-frame::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.shot .bb { z-index: 2; }
.shot { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 320px auto 180px; cursor: zoom-in; }
.shot > img:first-child { width: 100%; height: 100%; }
.tcap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; padding-top: 9px; font-size: 13px; line-height: 1.4; color: var(--dim); }
.t-game { color: var(--text); font-weight: 700; }
.t-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text); border: 1px solid #4a4a4a; padding: 1px 6px; align-self: center; }
.grid.is-phone .t-tag { display: none; }
.t-num { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--dimmer); }
.tile:hover .t-num, .tile:hover .t-client { color: var(--text); }
.phone-toggle { margin-left: auto; align-self: center; }

/* icons: square, smaller, one row on wide screens */
.icons-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 22px; margin: clamp(48px, 7vw, 96px) 0 clamp(14px, 2vw, 22px); }
.icons-head h3 { margin: 0; font-weight: 900; font-size: clamp(20px, 2.2vw, 28px); line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.icons-head p { color: var(--dim); font-size: 15px; }
.icons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(22px, 3vw, 44px) clamp(12px, 1.6vw, 24px); max-width: 1100px; }
.icons > .tile.tile-icon { grid-column: auto; }
.icons .shot { aspect-ratio: 1; contain-intrinsic-size: auto 260px auto 260px; }
@media (max-width: 699px) { .icons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.phone-note { color: var(--dim); font-size: 14px; margin: -6px 0 22px; max-width: 52ch; }

@media (max-width: 899px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile, .tile:nth-child(n) { grid-column: span 3; }
  .tile:nth-child(5n+1) { grid-column: span 6; }
}
@media (max-width: 559px) {
  .tile, .tile:nth-child(n) { grid-column: span 6; }
}
.grid.is-phone { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 8px; }
.grid.is-phone .tile { width: min(170px, calc(50% - 4px)); }
.grid.is-phone .tcap { font-size: 11px; padding-top: 5px; }
.grid.is-phone .t-client, .grid.is-phone .t-num { display: none; }
.grid.is-phone .t-game { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.block-head h2.h-small { font-size: clamp(20px, 2.2vw, 28px); }

/* ---------- prices + contact ---------- */
.duo { max-width: 1680px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.duo .block { max-width: none; margin: 0; width: 100%; }
@media (max-width: 799px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.fine-print { margin-top: 16px; color: var(--dim); font-size: 15px; max-width: 44ch; }
.contact > p:not(.contact-line) { font-size: 18px; line-height: 1.5; max-width: 34ch; }
.price-list > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.price-list > div:last-child { border-bottom: 1px solid var(--line); }
.price-list dt { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.price-list dd { font-size: 18px; }
.contact-line { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; font-size: 15px; }
.contact-alt { color: var(--dim); }
.copy-main { background: var(--white); color: #000000; padding: 0 18px; font-size: 15px; transition: opacity .15s; }
.copy-main > span { border: 0; }
.copy-main:hover { opacity: .86; }
/* ---------- footer ---------- */
.foot { margin-top: clamp(64px, 10vw, 130px); padding: 6px var(--pr) max(10px, env(safe-area-inset-bottom, 0px)) var(--pl); border-top: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 0 clamp(18px, 3vw, 34px); font-size: 13px; color: var(--dim); }
.foot-mark { font-size: 15px; color: var(--text); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 clamp(14px, 2.6vw, 28px); }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot-nav a:hover { color: var(--white); }
.foot-v { margin-left: auto; color: var(--dimmer); font-size: 12px; }

/* ---------- viewer ---------- */
.viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #0a0a0a; color: var(--text); overflow: hidden; }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: #000000; }
.v-stage { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; margin: max(12px, env(safe-area-inset-top, 0px)) 12px 0; touch-action: pan-y; }
.v-frame { position: relative; width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; background: var(--panel); }
.v-frame.is-square { aspect-ratio: 1; width: min(100cqw, 100cqh); }
.v-img, .v-raw { position: absolute; left: 0; top: 0; width: 100%; height: 100%; -webkit-user-drag: none; }
.v-raw { opacity: 0; transition: opacity .15s; }
.v-frame.show-raw .v-raw { opacity: 1; }
.v-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; padding: 10px var(--pr) max(12px, env(safe-area-inset-bottom, 0px)) var(--pl); }
.v-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; font-size: 14px; color: var(--dim); }
.v-game { color: var(--text); font-weight: 700; }
.v-meta { display: flex; gap: 14px; }
.v-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.v-actions .toggle { padding: 0 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
