/* Rebecca Davenport: site styles */
@font-face {
  font-family: "Permanent Marker";
  src: url("/assets/fonts/permanent-marker.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-400.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-500.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

:root {
  --ink: #111111;
  --muted: #555555;
  --paper: #ffffff;
  --logo: #55ff00;
  --hl: #9bf55b;
  --line: #eeeeee;
  --serif: "Times New Roman", Times, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
img { max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------------------------------------------------ header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 28px; pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo {
  font-family: "Permanent Marker", var(--serif);
  color: var(--logo);
  text-transform: uppercase; letter-spacing: 2px;
  font-size: 26px; line-height: 1;
  background: var(--paper); padding: 4px 8px; margin-left: -8px;
}
.logo:hover { text-decoration: none; }
.nav, .menu-btn {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.6px;
}
.nav { display: flex; gap: 2px; }
.nav a {
  color: #1f1f1f; background: rgba(255,255,255,.88); padding: 6px 10px;
  border-bottom: 1px solid transparent; transition: color .15s;
}
.nav a:hover, .nav a:focus-visible { text-decoration: none; color: #888; }
.nav a[aria-current="page"] { text-decoration: none; color: #9a9a9a; }
.menu-btn {
  display: none; color: var(--ink); background: var(--paper);
  border: 0; padding: 10px 6px; margin: -10px -6px; cursor: pointer;
}

@media (max-width: 699px) {
  .top { padding: 16px 16px; }
  .logo { font-size: 19px; letter-spacing: 1.5px; padding: 4px 6px; margin-left: -6px; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 56px; right: 10px;
    flex-direction: column; gap: 0; background: var(--paper);
    border: 1px solid var(--line); padding: 6px 0; min-width: 160px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 16px; }
}

/* ------------------------------------------------ scatter (homepage) */
.scatter {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; padding: 90px 16px 40px;
}
.js .scatter { display: block; position: relative; padding: 0; min-height: 100vh; }
.sc { position: relative; display: block; color: var(--ink); text-decoration: none !important; }
.sc img, .sc video { display: block; width: 100%; height: auto; }
.js .sc {
  position: absolute; opacity: 0; background: #f2f2f2;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, opacity .4s;
}
.js .scatter.ready .sc { opacity: 1; }
.sc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.sc.playing-video video { opacity: 1; }
.sc .cap {
  position: absolute; left: 0; top: 100%; margin-top: 6px; white-space: nowrap;
  font-size: 13px; opacity: 0; transition: opacity .2s;
  background: var(--paper); padding: 1px 5px; margin-left: -5px;
}
.scatter:not(.ready) .cap { position: static; opacity: 1; display: block; white-space: normal; }
.sc .badge {
  position: absolute; left: 8px; top: 8px; background: var(--paper);
  font-size: 11px; padding: 3px 7px; border-radius: 20px; letter-spacing: .04em;
}
.sc .playing { display: none; }
.sc .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--paper); }
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #e2266f; margin-right: 5px; animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: .2; } }
@keyframes play { from { width: 0; } to { width: 100%; } }

.sc.focus { transform: scale(1.08); z-index: 900 !important; box-shadow: 0 18px 40px rgba(0,0,0,.16); }
.sc:hover, .sc:focus-visible { transform: scale(1.14); z-index: 999 !important; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.sc.focus .cap, .sc:hover .cap, .sc:focus-visible .cap { opacity: 1; }
.sc.focus .idle, .sc:hover .idle { display: none; }
.sc.focus .playing, .sc:hover .playing { display: inline; }
.sc.focus .bar, .sc:hover .bar { animation: play 8s linear infinite; }

@media (max-width: 699px) {
  .sc:hover { transform: none; box-shadow: none; }
  .sc.focus, .sc.focus:hover { transform: scale(1.1); box-shadow: 0 14px 30px rgba(0,0,0,.2); }
}
@media (prefers-reduced-motion: reduce) {
  .js .sc, .sc video { transition: none; }
  .sc .bar, .dot { animation: none !important; }
}

/* ------------------------------------------------ project page */
.project {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px;
  padding: 96px 28px 60px;
}
.p-info { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.back { text-decoration: underline; }
.num { margin: 0; font-size: 13px; color: var(--muted); }
.project h1 { margin: -12px 0 0; font-weight: 400; font-size: 44px; line-height: 1.02; letter-spacing: -.01em; }
.credits { list-style: none; margin: 0; padding: 0; line-height: 1.55; }
.p-info p { margin: 0; }
.p-info a[target] { text-decoration: underline; }
.pn { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.pn a { padding: 8px 0; }
.film { position: relative; aspect-ratio: 16 / 9; background: #111; margin-bottom: 14px; }
.film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pics { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.pics img { height: min(80vh, 640px); width: auto; max-width: 100%; object-fit: contain; background: #f2f2f2; }

@media (max-width: 899px) {
  .project { grid-template-columns: 1fr; gap: 24px; padding: 80px 16px 48px; }
  .p-info { position: static; }
  .project h1 { font-size: 34px; }
  .pics img { height: auto; width: 100%; }
}

/* ------------------------------------------------ clients */
.clients {
  display: grid; grid-template-columns: minmax(0, 1fr) min(36vw, 520px); gap: 56px;
  min-height: 100vh; padding: 110px 28px 40px; align-items: center;
}
.wall { margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.15; letter-spacing: -.01em; }
.wall .sl { color: #9a968e; }
.nm.on { background: var(--hl); }
.cl-fig { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cl-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: #f2f2f2; display: block; }
.cl-fig figcaption { display: flex; justify-content: space-between; font-size: 13px; }
@media (max-width: 799px) {
  .clients { grid-template-columns: 1fr; padding: 80px 16px 40px; }
  .cl-fig { display: none; }
}

/* ------------------------------------------------ mood board */
.mood {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
  padding: 90px 16px 40px;
}
.js .mood { display: block; position: relative; height: 100vh; min-height: 640px; overflow: hidden; padding: 0; }
.hint { margin: 0; }
.js .hint { position: absolute; top: 70px; left: 28px; z-index: 5000; background: var(--paper); padding: 2px 6px; margin-left: -6px; }
.mb img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-select: none; }
.js .mb { position: absolute; cursor: grab; touch-action: none; opacity: 0; transition: box-shadow .2s, opacity .4s; }
.js .mood.ready .mb { opacity: 1; }
.js .mb:hover { box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.js .mb.dragging { cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.shuffle { display: none; }
.js .shuffle {
  display: block; position: absolute; right: 28px; bottom: 24px; z-index: 5000;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 30px;
  font: inherit; color: var(--ink); padding: 10px 18px; cursor: pointer;
}

/* ------------------------------------------------ text pages */
.text-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 100px 20px 60px; max-width: 600px; margin: 0 auto;
}
.text-page p { margin: 0 0 20px; }
.text-page h1, .text-page h2 {
  margin: 0 0 6px; font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.contact .big { font-size: 22px; margin-bottom: 8px; }
.contact a { text-decoration: underline; }

/* small labels in the nav typeface */
.sc .badge, .hint, .shuffle, .num, .back, .pn, .cl-fig figcaption, .text-page h1, .text-page h2 {
  font-family: var(--sans); letter-spacing: .06em;
}
.back, .pn, .num, .shuffle { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; }
.sc .cap { display: none; }
