:root {
  --bg: #FBF8F2;
  --ink: #111111;
  --muted: #8C857B;
  --tile: #E8E2D8;
  --rule: #E6DFD4;
  --accent: #FF3D8B;
  --font: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-logo: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --nav-w: 120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.55;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; }
::selection { background: transparent; color: var(--accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: var(--bg);
}
.logo {
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 1.2px;
  line-height: 1;
}
.logo:hover { color: var(--ink); }
.header-right { display: flex; gap: 16px; }
.menu-toggle { display: none; }

/* ---------- left nav (desktop) ---------- */
.nav {
  position: fixed; z-index: 10;
  left: 16px; top: 50%; transform: translateY(-50%);
}
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav li > a, .nav li > button { display: block; line-height: 17px; white-space: nowrap; }
.nav .sub {
  display: none;
  position: absolute; left: var(--nav-w); top: 0;
}
.nav li.open > .sub { display: block; }
.nav.socials-open li.open:not(.socials) > .sub { display: none; }
/* selected: pink text + 1px pink line across both columns (o-files' highlight bar, thinned) */
.nav li.active > a, .nav li.active > button { color: var(--accent); }
.nav li.active > a::after, .nav li.active > button::after {
  content: ""; position: absolute; left: 0; top: 16px;
  width: calc(var(--nav-w) * 2 - 8px); height: 1px; background: var(--accent);
}
.nav .sub a.current { color: var(--accent); }

/* ---------- content column ---------- */
main {
  width: min(560px, calc(100vw - 2 * (var(--nav-w) * 2 + 40px)));
  min-width: 380px;
  margin: 0 auto;
  padding: 130px 0 120px;
}
@media (min-width: 761px) and (max-width: 1100px) {
  main { margin-left: calc(var(--nav-w) * 2 + 48px); width: auto; margin-right: 32px; max-width: 560px; }
}

/* home stack */
.stack { display: flex; flex-direction: column; gap: 72px; }
.stack a { display: block; }
.stack .img { background: var(--tile); }
.stack .img img { width: 100%; height: auto; }
.stack .cap { text-align: center; margin-top: 14px; }

/* 2-col grid (o-files collection) */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 8px; }
.tile { display: block; position: relative; }
.tile .img { aspect-ratio: 1; background: var(--tile); overflow: hidden; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; }
.tile:hover { color: var(--ink); }
.tile-wrap:hover .img, .stack a:hover .img { outline: 1px solid var(--accent); outline-offset: -1px; }
.project-img { aspect-ratio: 1; background: var(--tile); }
.cap { margin-top: 10px; }
.cap span { display: block; }
.muted { color: var(--muted); }
.price-old { text-decoration: line-through; color: var(--muted); margin-right: 8px; }
.price-sale { color: var(--accent); }

/* play button on sound tiles */
.imgbox { position: relative; }
.play {
  position: absolute; left: 8px; bottom: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; background: var(--bg);
}
.play:hover { color: var(--accent); }
.play.playing { border-width: 1px; }

/* page head (lookbook style) */
.page-head { margin-bottom: 48px; }
.page-head h1 { font-size: 11px; font-weight: 400; margin: 0 0 32px; }
.page-head .sub-line { margin: 0 0 32px; }
.page-head p { max-width: 300px; margin: 0 0 14px; text-transform: none; font-size: 11px; line-height: 1.9; }
.promo {
  border: 1px solid var(--accent); color: var(--accent);
  padding: 6px 10px; margin-bottom: 32px; text-align: center;
}
.empty { color: var(--muted); }

/* project page */
.embed { margin: 0 0 40px; }
.embed iframe { width: 100%; border: 0; display: block; }
.credits { margin: 0 0 48px; display: grid; grid-template-columns: 110px 1fr; row-gap: 2px; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
.back { display: inline-block; margin-top: 56px; }
.socials-list { margin: 20px 0 0; }
.socials-list a { text-transform: none; border-bottom: 1px solid var(--accent); }
.ulink { border-bottom: 1px solid var(--accent); }
.tracks { list-style: none; margin: 0 0 48px; padding: 0; border-top: 1px solid var(--rule); }
.tracks li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.tracks .n { color: var(--muted); }
.tracks .g { color: var(--accent); }
.tracks li.off { color: var(--muted); }
.tracks li.off .g { color: var(--muted); }

/* sound (product) page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.product .img { aspect-ratio: 1; background: var(--tile); }
.product .img img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { font-size: 11px; font-weight: 400; margin: 0; }
.product .price { margin: 0 0 24px; }
.product p.desc { text-transform: none; line-height: 1.9; margin: 0 0 20px; }
.product ul { list-style: none; margin: 0 0 24px; padding: 0; }
.product ul li::before { content: "— "; color: var(--muted); }
.preview-row { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.preview-row .play { position: static; }
.btn {
  display: block; text-align: center;
  border: 1px solid var(--accent); color: var(--accent);
  padding: 10px 12px;
}
.btn:hover { color: var(--bg); background: var(--accent); }
.code-note { margin-top: 10px; color: var(--muted); }

/* about */
.about-photo { margin-top: 24px; background: var(--tile); max-width: 300px; }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: fixed; inset: 0; transform: none; top: 0; left: 0;
    background: var(--bg); padding: 80px 16px 40px; overflow-y: auto;
  }
  body.menu-open .nav { display: block; }
  body.menu-open { overflow: hidden; }
  .nav li > a, .nav li > button { line-height: 26px; font-size: 13px; }
  .nav .sub, .nav li.open > .sub, .nav.socials-open li.open:not(.socials) > .sub {
    display: block; position: static; padding-left: 20px; margin-bottom: 6px;
  }
  .nav li.active > a::after, .nav li.active > button::after { display: none; }
  .nav li.active > a, .nav li.active > button { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  main { width: auto; min-width: 0; margin: 0 16px; padding: 90px 0 80px; }
  .stack { gap: 48px; }
  .product { grid-template-columns: 1fr; }
}
.embed-bottom { margin-top: 48px; }
.embed-bottom .embed { margin: 0; }

/* photo galleries (film rolls etc.) */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 28px 16px; align-items: start; }
.photo-grid figure { margin: 0; background: var(--tile); }
.photo-grid figure.wide { grid-column: 1 / -1; }
.photo-grid img { width: 100%; height: auto; }
@media (max-width: 760px) { .photo-grid { gap: 20px 10px; } }

/* home: staggered scrolling layout (pattern repeats every 6 images) */
body[data-page="home"] main { width: min(720px, calc(100vw - 600px)); min-width: 420px; }
.stagger { display: flex; flex-direction: column; gap: 96px; }
.stagger .st { display: block; position: relative; }
.stagger .st .img { background: var(--tile); }
.stagger .st img { width: 100%; height: auto; }
.stagger .st .cap { position: absolute; left: 0; right: 0; top: 100%; margin-top: 8px; opacity: 0; transition: opacity .2s; }
.stagger .st .cap span { display: block; }
.stagger .st .img.blank { aspect-ratio: 4 / 5; }
.stagger .st:hover .cap { opacity: 1; }
.stagger .st:hover { color: var(--ink); }
.stagger .st:nth-child(6n+1) { width: 52%; margin-left: 0; }
.stagger .st:nth-child(6n+2) { width: 40%; margin-left: 60%; margin-top: -180px; }
.stagger .st:nth-child(6n+3) { width: 34%; margin-left: 18%; }
.stagger .st:nth-child(6n+4) { width: 42%; margin-left: 58%; margin-top: -140px; }
.stagger .st:nth-child(6n+5) { width: 62%; margin-left: 6%; }
.stagger .st:nth-child(6n+6) { width: 28%; margin-left: 72%; margin-top: -60px; }
.stagger .st:first-child { margin-top: 0; }
@media (min-width: 761px) and (max-width: 1100px) {
  body[data-page="home"] main { width: auto; min-width: 0; max-width: 620px; }
}
@media (max-width: 760px) {
  body[data-page="home"] main { width: auto; min-width: 0; }
  .stagger { gap: 56px; }
  .stagger .st:nth-child(n) { margin-top: 0; }
  .stagger .st:nth-child(odd) { width: 78%; margin-left: 0; }
  .stagger .st:nth-child(even) { width: 62%; margin-left: 38%; }
  .stagger .st .cap { position: static; opacity: 1; color: var(--muted); }
}

/* labeled asset groups (branding projects etc.) */
.asset-group { margin: 0 0 88px; }
.group-head { padding-bottom: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--accent); }
.asset-group .photo-grid figure { background: transparent; }
.asset-group figcaption { margin-top: 8px; }
.page-head p.muted { color: var(--muted); }
.asset-group .photo-grid figure:only-child { grid-column: 1 / -1; max-width: 420px; }
.tile .img.contain img { object-fit: contain; }

/* hover-scrub: step through a project's images */
.scrub { position: relative; touch-action: pan-y; }
.scrub img.alt { object-fit: contain; }
.tile .img.scrub img.alt { object-fit: contain; }
.scrub.locked img { width: 100%; height: 100%; object-fit: cover; }
.scrub.locked img.alt { object-fit: contain; }
.scrub-count {
  position: absolute; top: 6px; right: 6px;
  font-size: 11px; line-height: 1; padding: 3px 4px;
  color: var(--accent); background: var(--bg);
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.scrub-bar {
  position: absolute; left: 0; bottom: 0; height: 1px;
  background: var(--accent);
  opacity: 0; transition: opacity .15s, width .08s; pointer-events: none;
}
.scrub.active .scrub-count, .scrub.active .scrub-bar { opacity: 1; }
