:root {
  /* Brand: White Chocolate #EBE5DC · Morning Blue #919C9D · Shadow #868365 · Raisin Black #24221E */
  --bg: #fdfcfa;
  --ink: #24221e;
  --ink-soft: #4a4740;
  --muted: #868365;
  --blue: #919c9d;
  --line: #ebe5dc;
  --choc: #ebe5dc;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Albert Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* ---------- Home ---------- */
.home { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden; }



.title-art { margin: auto; padding: clamp(24px, 5vh, 56px) 16px; width: min(620px, 80vw); }
.title-art img { display: block; width: 100%; height: auto; }

.hint {
  text-align: center; font-family: var(--serif); font-style: italic; color: var(--muted);
  font-size: 17px; padding-bottom: 10px;
}


/* marquee of objects */
.shelf { position: relative; padding: 8px 0 clamp(24px, 5vh, 48px); }
.track { display: flex; width: max-content; animation: drift 38s linear infinite; }
.shelf:hover .track, .shelf:focus-within .track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .track { animation: none; } }

.object { flex: none; width: clamp(170px, 18.7vw, 255px); margin: 0 clamp(12px, 2vw, 32px); display: flex; flex-direction: column; align-items: center; outline: none; }
.object img { width: 100%; height: clamp(170px, 22.1vh, 246px); object-fit: contain; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.object:hover img, .object:focus-visible img { transform: translateY(-10px) rotate(-2deg) scale(1.03); }
.object .caption {
  margin-top: 10px; font-family: var(--sans); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); transition: color .3s;
}
.object:hover .caption, .object:focus-visible .caption { color: var(--ink); }


/* ---------- Inner pages ---------- */
.page-hero {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px;
  padding: clamp(40px, 7vh, 80px) clamp(20px, 5vw, 64px) clamp(22px, 3.5vh, 36px);
}
.page-hero .eyebrow { font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(34px, 3.6vw, 50px); font-weight: 400; line-height: 1; letter-spacing: -0.005em; margin: 0 0 8px; }
.page-hero h1 em { font-weight: 400; }
/* social: line the heading up with the centred feed grid */
.page-hero.narrow { width: min(980px, calc(100% - 2 * clamp(20px, 5vw, 64px))); margin-inline: auto; padding-inline: 0; }
.page-hero p { font-size: 14px; max-width: 60ch; line-height: 1.5; color: var(--muted); }
.page-hero img { width: clamp(160px, 20vw, 280px); max-height: 300px; object-fit: contain; }

/* ---------- Work reels (video tiles that loop on open) ---------- */
.work-reel { padding: 0 clamp(20px, 5vw, 64px) 96px; }
.reel { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 3.4vw, 48px) clamp(18px, 2.2vw, 30px); }

.tile { --ar: 16 / 9; --src: 1.7778; position: relative; margin: 0; min-width: 0; }
.media {
  position: relative; aspect-ratio: var(--ar); overflow: hidden; background: var(--choc);
  container-type: size; border-radius: 2px;
}
.media .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.media .blank {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted);
}
.media iframe, .media video {
  position: absolute; left: 50%; top: 50%; border: 0; pointer-events: none;
  /* cover the tile with the picture area (--content, if the video is letterboxed inside its --src frame) */
  --cw: max(100cqw, 100cqh * var(--content, var(--src)));
  --ih: calc(var(--cw) / min(var(--content, var(--src)), var(--src)));
  width: calc(var(--ih) * var(--src)); height: var(--ih);
  translate: -50% -50%; opacity: 0; transition: opacity .9s ease;
}
.media video { object-fit: cover; }
.tile.is-playing .media iframe, .tile.is-playing .media video { opacity: 1; }
.tile[data-kind="tiktok"] { --src: .5625; }
.tile[data-loop-end] .media iframe { transition: opacity .38s ease; }   /* quick fade at each loop seam */

/* stills that can't loop (Drive, Instagram) drift slowly so the grid still feels alive */
.tile[data-kind="instagram"] .poster, .tile[data-still] .poster { animation: still-drift 16s ease-in-out infinite alternate; }
@keyframes still-drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.12) translate(-1.5%, -2%); } }

.cue {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2;
  padding: 10px 18px 9px; border-radius: 99px; background: rgba(253, 252, 250, .92); color: var(--ink);
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  opacity: 0; scale: .9; transition: opacity .3s, scale .3s; pointer-events: none;
}
.tile:hover .cue, .tile:focus-within .cue { opacity: 1; scale: 1; }
.tile:hover .media .poster { transform: scale(1.03); }

.tile figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 13px; }
.tile .t { font-family: var(--serif); font-size: 24px; line-height: 1.1; transition: color .3s; }
.tile .t small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--muted); }
.tile .n { flex: none; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.tile:hover .t small { color: var(--ink-soft); }
.tile .hit { position: absolute; inset: 0; z-index: 3; border-radius: 2px; }
.tile .hit:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

/* landscape grid: first tile is a wide feature; leftover tiles on the last row fill it */
@media (min-width: 640px) and (max-width: 999px) {
  .reel:not(.vertical) { grid-template-columns: repeat(2, 1fr); }
  .reel:not(.vertical) .tile:first-child,
  .reel:not(.vertical) .tile:last-child:nth-child(2n) { grid-column: 1 / -1; --ar: 2.1; }
}
@media (min-width: 1000px) {
  .reel:not(.vertical) { grid-template-columns: repeat(6, 1fr); }
  .reel:not(.vertical) .tile { grid-column: span 2; }
  .reel:not(.vertical) .tile:first-child,
  .reel:not(.vertical) .tile:last-child:nth-child(3n+2) { grid-column: 1 / -1; --ar: 2.35; }
  .reel:not(.vertical) .tile:nth-last-child(2):nth-child(3n+2),
  .reel:not(.vertical) .tile:last-child:nth-child(3n):not(:first-child) { grid-column: span 3; }
}
.reel:not(.vertical) .tile:first-child .t { font-size: clamp(26px, 2.6vw, 36px); }

/* social: 3-column feed grid, rounded tiles, brand + video name on hover */
.social-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1.1vw, 14px);
  max-width: 980px; margin: 0 auto;
}
.social-grid .tile { --ar: 3 / 4; --src: .5625; --round: clamp(10px, 1.5vw, 18px); }
.social-grid .media, .social-grid .hit { border-radius: var(--round); }
.social-grid .media { isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); }
.social-grid .ov {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(12px, 1.8vw, 22px); color: #fdfcfa; pointer-events: none;
  background: linear-gradient(to top, rgba(36, 34, 30, .72), rgba(36, 34, 30, .12) 55%, rgba(36, 34, 30, 0));
  opacity: 0; transition: opacity .35s ease;
}
.social-grid .ov b { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.3vw, 30px); line-height: 1.05; }
.social-grid .ov small { margin-top: 6px; font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.social-grid .tile:hover .ov, .social-grid .tile:focus-within .ov { opacity: 1; }
.social-grid .tile:hover .media .poster { transform: scale(1.04); }
@media (max-width: 640px) { .social-grid .ov b { font-size: 16px; } .social-grid .ov small { font-size: 9px; letter-spacing: .12em; } }
.lb-box.tall .lb-frame { border-radius: 18px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .media .poster { animation: none !important; transition: none; }
}

/* ---------- Lightbox player ---------- */
.lb {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden;
}
.lb[open] { display: grid; place-items: center; animation: lb-in .35s ease; }
.lb::backdrop { background: rgba(36, 34, 30, .94); }
@keyframes lb-in { from { opacity: 0; } }
.lb-box { --r: 1.7778; width: min(92vw, calc((100dvh - 150px) * var(--r)), 1500px); }
.lb-frame { position: relative; aspect-ratio: var(--r); background: #000; }
.lb-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.lb-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lb-box.ig { width: min(92vw, 420px); }
.lb-box.ig .lb-frame { aspect-ratio: auto; height: var(--h, 740px); max-height: calc(100dvh - 150px); background: #fff; }
.lb-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 16px; color: #ebe5dc; }
.lb-title { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; }
.lb-title small { font-family: var(--sans); font-size: 13px; color: #b9b39d; margin-left: 10px; }
.lb-out, .lb-close {
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #ebe5dc;
}
.lb-out { flex: none; opacity: .75; transition: opacity .2s; }
.lb-out:hover { opacity: 1; }
.lb-close { position: fixed; top: 20px; right: 24px; background: none; border: 0; cursor: pointer; padding: 8px; opacity: .8; }
.lb-close:hover, .lb-close:focus-visible { opacity: 1; }
body.lb-lock { overflow: hidden; }

.footer { align-items: center; padding: 28px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* footer social icons (replace the old "← Home" link) */
.footer-social { display: flex; align-items: center; gap: 18px; }
.footer-social a { display: block; color: var(--muted); transition: color .3s, translate .3s; }
.footer-social a:hover, .footer-social a:focus-visible { color: var(--ink); translate: 0 -1px; outline: none; }
.footer-social svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.footer-social svg .dot { fill: currentColor; stroke: none; }

@media (max-width: 640px) {
  .page-hero { grid-template-columns: 1fr; }
  .page-hero img { order: -1; }
}
