/* ---------- Foundation ---------- */
:root {
  --paper: #f4f4f1;
  --ink: #171714;
  --orange: #ff4b35;
  --yellow: #ffe234;
  --blue: #3157ff;
  --page-pad: clamp(16px, 2.5vw, 40px);
  --font-display: "Rethink Sans", Arial, Helvetica, system-ui, sans-serif;
  --font-body: "Nunito Sans", Arial, Helvetica, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--yellow); color: var(--ink); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* A nearly invisible tactile texture, kept behind every content layer. */
.film-grain {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.scanline-texture {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .01;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 .5H4' stroke='%23000' stroke-width='.5'/%3E%3C/svg%3E");
  background-size: 4px 4px;
}
main,
footer { position: relative; z-index: 1; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--yellow);
  font-family: var(--font-display);
  font-weight: 600;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px var(--page-pad);
  pointer-events: none;
}

.logo-link { position: relative; z-index: 1; width: clamp(155px, 15.5vw, 235px); pointer-events: auto; }
.logo { width: 100%; }

/* A single playful spin for mouse/trackpad users only. */
@media (hover: hover) and (pointer: fine) and (min-width: 801px) {
  .logo-link:hover .logo {
    animation: logo-spin 720ms cubic-bezier(.2, .8, .25, 1);
  }
}

@keyframes logo-spin {
  0%   { transform: rotate(0deg) scale(1); }
  72%  { transform: rotate(382deg) scale(1.035); }
  88%  { transform: rotate(355deg) scale(.995); }
  100% { transform: rotate(360deg) scale(1); }
}

nav { display: flex; gap: clamp(15px, 2.2vw, 34px); pointer-events: auto; }
nav a, footer a {
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.site-header nav { font-family: var(--font-display); font-weight: 600; }
nav a { border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus-visible { border-color: currentColor; }

/* ---------- Work grid ---------- */
.work-section { padding: clamp(66px, 5vw, 82px) var(--page-pad) clamp(75px, 8vw, 120px); }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  margin-bottom: clamp(18px, 2vw, 28px);
}
.project-count { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  align-items: start;
  row-gap: clamp(18px, 2.5vw, 38px);
  column-gap: clamp(10px, 1.5vw, 22px);
}

/* Deliberately irregular placement: composed like a loose contact sheet. */
.project { grid-column: span 6; animation: float-a 9s ease-in-out infinite; }
.project:nth-child(1)  { grid-column: 1 / span 7; }
.project:nth-child(2)  { grid-column: 8 / span 5; margin-top: clamp(35px, 5vw, 75px); animation-name: float-b; animation-duration: 11s; }
.project:nth-child(3)  { grid-column: 2 / span 4; margin-top: clamp(-18px, -1.5vw, -8px); animation-name: float-c; animation-duration: 10s; }
.project:nth-child(4)  { grid-column: 6 / span 7; margin-top: clamp(-40px, -3vw, -18px); animation-name: float-b; animation-duration: 12s; }
.project:nth-child(5)  { grid-column: 1 / span 5; margin-top: clamp(18px, 3vw, 45px); animation-duration: 10.5s; }
.project:nth-child(6)  { grid-column: 7 / span 6; margin-top: clamp(-18px, -1.5vw, -8px); animation-name: float-c; animation-duration: 9.5s; }
.project:nth-child(7)  { grid-column: 1 / span 5; margin-top: clamp(-24px, -2vw, -12px); animation-name: float-b; animation-duration: 11.5s; }
.project:nth-child(8)  { grid-column: 9 / span 4; margin-top: clamp(48px, 6vw, 90px); animation-duration: 9.5s; }
.project:nth-child(9)  { grid-column: 2 / span 6; animation-name: float-c; animation-duration: 12.5s; }
.project:nth-child(10) { grid-column: 7 / span 4; margin-top: clamp(28px, 3vw, 48px); animation-duration: 10.5s; }
.project:nth-child(11) { grid-column: 6 / span 7; margin-top: clamp(15px, 2vw, 32px); animation-name: float-b; animation-duration: 10s; }
.project:nth-child(12) { grid-column: 9 / span 3; margin-top: clamp(22px, 2.5vw, 38px); animation-duration: 10.5s; }
.project:nth-child(13) { grid-column: 2 / span 4; margin-top: clamp(35px, 4vw, 65px); animation-duration: 11s; }
.project:nth-child(14) { grid-column: 2 / span 4; margin-top: clamp(-22px, -1.6vw, -10px); animation-name: float-c; animation-duration: 9s; }

/* Desktop-only flow correction: ELK above GAMMA, with both current sizes intact. */
.project:nth-child(9) { order: 0; }
.project:nth-child(8) { order: 1; }
.project:nth-child(7) { order: 2; }
.project:nth-child(n + 10) { order: 3; }

@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(4px); }
}
@keyframes float-c {
  0%, 100% { transform: translateY(3px); }
  50% { transform: translateY(-3px); }
}

.project-link { position: relative; display: block; cursor: pointer; }
.project-stage {
  position: relative;
  overflow: clip;
}
.project-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 739 / 415;
  background: #ddd9d1;
  will-change: transform;
}
.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms cubic-bezier(.25, .7, .25, 1);
}

.director-banner-position {
  position: absolute;
  z-index: 2;
  left: calc(var(--page-pad) + clamp(192px, 16vw, 228px));
  top: clamp(47px, 4.65vw, 70px);
  transform: rotate(-2deg);
  pointer-events: auto;
}
.director-banner {
  margin: 0;
  padding: 7px 10px 6px;
  background: var(--yellow);
  font-family: "Unbounded", var(--font-display);
  font-weight: 800;
  font-size: clamp(9px, .78vw, 12px);
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
  transform-origin: center;
  will-change: transform;
}

@media (min-width: 801px) {
  .director-banner-position:hover .director-banner {
    animation: banner-spin 720ms cubic-bezier(.2, .8, .25, 1) 1;
  }
}

@keyframes banner-spin {
  0%   { transform: rotate(0deg) scale(1); }
  72%  { transform: rotate(382deg) scale(1.035); }
  88%  { transform: rotate(355deg) scale(.995); }
  100% { transform: rotate(360deg) scale(1); }
}

.project-link:hover .project-image,
.project-link:focus-visible .project-image { transform: scale(1.018); }

.project-title {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(13px, 1.15vw, 17px);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.project-title > span:last-child { font-size: 10px; letter-spacing: .08em; }
.project-title > span:first-child { font-family: "Unbounded", var(--font-display); font-weight: 800; }
.project-title > span:last-child { font-weight: 600; }
.project-meta { display: inline-flex; align-items: baseline; gap: .6em; white-space: nowrap; font-family: "DM Mono", ui-monospace, monospace; font-weight: 500; }
.project-type { font-size: .82em; opacity: .58; letter-spacing: .06em; }

@media (hover: hover) and (pointer: fine) and (min-width: 801px) {
  .project:nth-child(1)  { --project-hover: #1455ff; }
  .project:nth-child(2)  { --project-hover: #008f4c; }
  .project:nth-child(3)  { --project-hover: #f05a18; }
  .project:nth-child(4)  { --project-hover: #7935e8; }
  .project:nth-child(5)  { --project-hover: #d92d8a; }
  .project:nth-child(6)  { --project-hover: #007f86; }
  .project:nth-child(7)  { --project-hover: #ef3b2d; }
  .project:nth-child(8)  { --project-hover: #5f8500; }
  .project:nth-child(9)  { --project-hover: #b97800; }
  .project:nth-child(10) { --project-hover: #c52cff; }
  .project:nth-child(11) { --project-hover: #0082d6; }
  .project:nth-child(12) { --project-hover: #f0445e; }
  .project:nth-child(13) { --project-hover: #5d45e8; }
  .project:nth-child(14) { --project-hover: #008c70; }
  .project-title span { transition: color 150ms linear; }
  .project-link:hover .project-title span { color: var(--project-hover); }
  .project-stage { transition: transform 175ms cubic-bezier(.25, .65, .25, 1); }
  .project:nth-child(3n + 1) { --project-tilt: .55deg; }
  .project:nth-child(3n + 2) { --project-tilt: -.7deg; }
  .project:nth-child(3n) { --project-tilt: 0deg; }
  .project-stage:hover { transform: translateY(-4px) rotate(var(--project-tilt)); }

  .project-stage,
  .project-stage * { cursor: none; }
  .contact-visual,
  .contact-visual * { cursor: none; }
  html.modal-open body,
  html.modal-open body * { cursor: auto; }
  html.modal-open .site-cursor { opacity: 0; }
}

@media (min-width: 801px) {
  .project:nth-child(11) .project-stage { width: calc(100% + clamp(55px, 5vw, 78px)); }
}

.site-cursor {
  position: fixed;
  z-index: 160;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0;
  color: var(--ink);
  font-family: "Unbounded", var(--font-display);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: opacity 90ms linear;
}
.site-cursor span {
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
  transition: opacity 90ms linear, transform 120ms ease-out;
}
.site-cursor.is-visible { opacity: 1; }
.site-cursor.is-play,
.site-cursor.is-bts { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .75); }
.site-cursor.is-play span,
.site-cursor.is-bts span { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.site-cursor.is-bts span {
  white-space: nowrap;
}

/* ---------- About ---------- */
.about-section {
  position: relative;
  min-height: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(14px, 2vw, 30px);
  align-items: start;
  padding: clamp(95px, 9vw, 135px) var(--page-pad) clamp(55px, 6vw, 85px);
  font-family: var(--font-body);
  overflow: hidden;
}
.eyebrow {
  position: static;
  grid-column: 1 / span 2;
  margin: .45em 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.about-details {
  grid-column: 5 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(30px, 5vw, 80px);
  margin-top: 0;
  font-family: "DM Mono", ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: .035em;
}
.about-metadata p,
.about-dry-note { margin: 0; }
.about-metadata {
  display: grid;
  gap: clamp(8px, 1vw, 14px);
  font-size: clamp(18px, 2.15vw, 32px);
  line-height: 1.3;
}
.about-dry-note {
  margin-right: clamp(6px, 3vw, 48px);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .06em;
  opacity: .62;
}
/* ---------- Contact + footer ---------- */
.contact-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(14px, 2vw, 30px);
  row-gap: 22px;
  padding: clamp(32px, 3.5vw, 52px) var(--page-pad) clamp(72px, 8vw, 115px);
}
.contact-visual {
  position: relative;
  grid-column: 1 / span 7;
  align-self: start;
  aspect-ratio: 9528 / 6328;
  margin: 0;
  overflow: hidden;
  background: #000;
}
.contact-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 200ms linear;
}
.bts-photo-current { z-index: 1; opacity: 1; }
.bts-photo-next { z-index: 2; opacity: 0; }
.contact-visual.is-crossfading .bts-photo-current { opacity: 0; }
.contact-visual.is-crossfading .bts-photo-next { opacity: 1; }
.contact-visual.is-resetting img { transition: none; }
.contact-details {
  grid-column: 8 / -1;
  align-self: start;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  font-style: normal;
}
.contact-details p { margin: 0; }
.contact-label {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}
.representation-name {
  margin: 6px 0 10px !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}
.contact-row {
  padding: 2px 0;
}
.contact-row a {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
}
.contact-row a:hover,
.contact-row a:focus-visible { color: var(--orange); }
.direct-intro {
  margin: 32px 0 9px !important;
  max-width: none;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .06em;
  opacity: .72;
}
/* Keep contact links plain and typographic: no UI icons or controls. */
.contact-details a {
  display: inline;
  width: fit-content;
}
.social-links {
  grid-column: 8 / -1;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 0;
  font-family: var(--font-body);
  font-weight: 400;
}
.social-links a {
  padding-bottom: 2px;
  font-size: 11px;
  opacity: .72;
}
.social-links a:hover,
.social-links a:focus-visible { opacity: 1; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 20px var(--page-pad);
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}
footer p { margin: 0; }
.computer-colophon {
  flex-basis: 100%;
  margin-top: 12px !important;
  text-align: center;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .12em;
}

/* ---------- Reusable project video modal ---------- */
html.modal-open,
html.modal-open body { overflow: hidden; }

.site-header,
main,
footer,
.skip-link {
  transition: filter 180ms ease-out;
}
html.modal-open .site-header,
html.modal-open main,
html.modal-open footer,
html.modal-open .skip-link {
  filter: grayscale(100%) brightness(.72);
}

.video-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  padding: clamp(24px, 4vw, 64px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 150ms ease-out, visibility 150ms ease-out;
}
.video-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 9, .72);
}
.video-modal-panel {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(1180px, 100%, calc((100vh - 235px) * var(--video-ratio, 1.7778)));
  max-height: calc(100vh - clamp(48px, 8vw, 128px));
  margin: auto;
  overflow-y: hidden;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  transform: translateY(4px) scale(.995);
  transition: transform 160ms ease-out;
}
.video-modal.is-open .video-modal-panel { transform: translateY(0) scale(1); }
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--video-ratio, 1.7778);
  background: #000;
  overflow: hidden;
  border-radius: 3px;
}
.video-modal-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  padding: 0 0 4px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  opacity: .5;
  font: 400 32px/1 var(--font-body);
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}
.video-modal-close:hover,
.video-modal-close:focus-visible {
  color: var(--orange);
  opacity: 1;
}
.video-modal-copy { padding: clamp(10px, 1vw, 14px) 0 0; color: var(--paper); font-family: var(--font-body); }
.video-modal-copy h2 {
  margin: 0 0 3px;
  font-family: "Unbounded", var(--font-display);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}
.video-modal-type {
  margin: 0 0 9px;
  font-size: 10px;
  font-weight: 400;
  text-transform: lowercase;
}
.video-modal-note {
  margin: -4px 0 9px;
  font-size: 10px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
}
.video-modal-note strong { font-weight: 700; }
.video-modal-credits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 3vw, 42px);
  font-size: clamp(10px, .82vw, 12px);
  font-weight: 400;
  line-height: 1.3;
}
.video-modal-credits p { margin: 0; }
.video-modal-credits strong { font-weight: 700; }

/* ---------- Responsive behavior ---------- */
@media (max-width: 800px) {
  .site-cursor { display: none; }
  .project:nth-child(11) .project-stage { width: 100%; }
  .work-grid { row-gap: 40px; column-gap: 0; }
  .project,
  .project:nth-child(n) {
    grid-column: 1 / -1;
    margin-top: 0;
    order: initial;
    animation: none;
  }
  .project-image-wrap { transform: none !important; }
  .contact-section {
    grid-template-columns: 1fr;
    row-gap: 20px;
    padding-top: 32px;
    padding-bottom: 68px;
  }
  .contact-visual,
  .contact-details,
  .social-links { grid-column: 1; }
  .contact-details { width: 100%; margin-left: 0; }
  .social-links { justify-content: flex-start; }

  .video-modal { padding: 12px; }
  .video-modal-panel {
    width: 100%;
    max-height: calc(100svh - 24px);
    overflow-y: auto;
  }
  .video-modal-close { top: 7px; right: 7px; width: 38px; height: 38px; font-size: 29px; }
  .video-modal-copy { padding: 12px 2px 18px; }
  .video-modal-credits { grid-template-columns: 1fr; font-size: 12px; line-height: 1.4; }

  .about-section {
    min-height: auto;
    grid-template-columns: 1fr;
    row-gap: 28px;
    padding-bottom: 48px;
  }
  .eyebrow,
  .about-details { grid-column: 1; }
  .eyebrow { margin: 0; }
  .about-details {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    margin-top: 0;
  }
  .about-dry-note { margin-right: 0; }
}

@media (max-width: 540px) {
  .about-details {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }
  .about-dry-note { justify-self: end; }
  .site-header { align-items: center; }
  .logo-link { width: 115px; }
  nav { gap: 13px; }
  nav a { font-size: 10px; }
  .work-section { padding-top: 105px; }
  .section-heading { margin-bottom: 30px; }
  .director-banner-position {
    left: calc(var(--page-pad) + 108px);
    top: 49px;
    transform: rotate(-2deg);
  }
  .work-grid { row-gap: 38px; }
  .social-links { justify-content: flex-start; gap: 14px; }
  footer { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-image { transition: none; }
  .project { animation: none; }
  .logo-link:hover .logo { animation: none; }
  .director-banner-position:hover .director-banner { animation: none; }
  .video-modal,
  .video-modal-panel { transition: none; }
}
