*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --red:   #e33e3e;
  --black: #080808;
  --white: #f0ede6;
  --dark:  #101010;
  --card:  #151515;
  --line:  #222222;
  --muted: rgba(240,237,230,0.45);
}
html { scroll-behavior: smooth; }
body {
  background: var(--black); color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  overflow-x: hidden; cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Cursor ─── */
#cur {
  position: fixed; z-index: 9999; width: 10px; height: 10px;
  background: var(--red); border-radius: 50%; pointer-events: none;
  transform: translate(-50%,-50%); transition: width .15s, height .15s;
}
#cur-ring {
  position: fixed; z-index: 9998; width: 38px; height: 38px;
  border: 1px solid rgba(227,62,62,.45); border-radius: 50%; pointer-events: none;
  transform: translate(-50%,-50%);
  transition: left .1s ease, top .1s ease, width .25s, height .25s;
}
body.hovering #cur      { width: 18px; height: 18px; }
body.hovering #cur-ring { width: 58px; height: 58px; }

/* ─── Nav ─── */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  padding: 28px 52px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 24px; display: block; }
.nav-links { display: flex; gap: 40px; }
.nav-links a {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--white); text-decoration: none; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--red); transition: width .3s ease;
}
.nav-links a:hover::after { width: 100%; }

/* ─── Project Topbar ─── */
.project-topbar {
  margin-top: 80px; padding: 22px 52px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line);
}
.detail-back {
  display: flex; align-items: center; gap: 14px;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--white); text-decoration: none; cursor: none; transition: color .2s ease;
}
.detail-back:hover { color: var(--red); }
.back-line {
  width: 32px; height: 1px; background: currentColor; position: relative;
  transition: width .3s ease;
}
.detail-back:hover .back-line { width: 50px; }
.back-line::before {
  content: ''; position: absolute; left: 0; top: -4px; width: 8px; height: 8px;
  border-left: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.detail-counter { font-size: .65rem; letter-spacing: .18em; color: #444; }

/* ─── Project Main ─── */
#project-main { position: relative; }
#chair-scatter { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
#chair-scatter img { position: absolute; pointer-events: none; display: block; }

/* ─── Detail Body ─── */
.detail-body { padding: 60px 52px; max-width: 1440px; margin: 0 auto; }
.detail-label {
  font-size: .82rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.detail-title {
  font-family: 'Anton', sans-serif; font-size: clamp(2.5rem, 5vw, 6rem);
  text-transform: uppercase; line-height: 1; letter-spacing: .01em; margin-bottom: 48px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.detail-video-wrap {
  position: relative; width: 100%; padding-bottom: 56.25%;
  background: var(--card); margin-bottom: 60px;
}
.detail-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ─── Stacked Video ─── */
.detail-stacked-video { margin-bottom: 60px; }
.video-stack { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 32px; }
.stack-card {
  position: absolute; inset: 0;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94), box-shadow .4s ease, opacity .4s ease;
  cursor: pointer; background: var(--card); border: 1px solid rgba(255,255,255,.04);
}
.stack-card[data-pos="0"] { z-index: 3; transform: translateY(0) scale(1); cursor: default; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.stack-card[data-pos="1"] { z-index: 2; transform: translateY(14px) scale(0.97); opacity: .82; }
.stack-card[data-pos="2"] { z-index: 1; transform: translateY(26px) scale(0.94); opacity: .64; }
.stack-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stack-card:not([data-pos="0"]) iframe { pointer-events: none; }
.stack-tabs { display: flex; gap: 8px; margin-top: 20px; }
.stack-tab {
  font-family: 'IBM Plex Mono', monospace; font-size: .7rem;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 8px 20px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer;
  transition: border-color .25s ease, color .25s ease;
}
.stack-tab.active { border-color: var(--red); color: var(--red); }
.stack-tab:hover:not(.active) { border-color: var(--white); color: var(--white); }

/* ─── Loop Videos ─── */
.detail-loop-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 60px; }
.detail-loop-videos video { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; pointer-events: none; }

/* ─── Hero Images ─── */
.detail-hero-images { display: none; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 60px; }
.detail-hero-images.show { display: grid; }
.detail-hero-images img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; cursor: none; transition: transform .3s ease; }
.detail-hero-images img:hover { transform: scale(1.04); }

/* ─── Transcripts ─── */
.transcripts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 52px; }
.transcript-label { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; letter-spacing: .18em; color: var(--red); margin-bottom: 10px; }
.transcript-body { font-family: 'Elms Sans', sans-serif; font-size: .92rem; line-height: 1.75; color: var(--muted); }

/* ─── Detail Info ─── */
.detail-info { display: grid; grid-template-columns: 2fr 1fr; gap: 60px; margin-bottom: 80px; }
.detail-desc {
  font-family: "Elms Sans", sans-serif; font-optical-sizing: auto;
  font-size: 1.25rem; line-height: 1.9; color: rgba(240,237,230,.75);
  white-space: pre-line;
}
.detail-desc a { color: var(--red); }
.detail-desc a:hover { color: var(--white); }
.detail-specs { border-top: 1px solid var(--line); padding-top: 22px; }
.spec-row { margin-bottom: 22px; }
.spec-label { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.spec-val { font-size: 1rem; color: var(--white); }

/* ─── Illustration / Deco ─── */
.detail-illustration { margin-bottom: 60px; display: flex; justify-content: center; }
.detail-illustration img { max-width: 120px; width: 10%; filter: drop-shadow(0 0 40px rgba(227,62,62,.15)); }
.detail-deco { margin: 40px 0 60px; display: flex; justify-content: center; }
.detail-deco img { max-width: 420px; width: 37.5%; }

/* ─── Process Sections ─── */
.process-section { margin-bottom: 52px; }
.process-section-label { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin-bottom: 20px; }
.process-section-grid { display: grid; gap: 3px; }
.process-credit { margin-top: 12px; font-family: "Elms Sans", sans-serif; font-size: .875rem; line-height: 1.6; color: rgba(240,237,230,.72); }
.process-section-grid img { width: 100%; height: auto; display: block; cursor: none; transition: transform .3s ease; }
.process-section-grid img:hover { transform: scale(1.02); }
.process-cap { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #444; margin-top: 10px; }
.process-video-label { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--red); margin-top: 20px; margin-bottom: 4px; }
.process-two-col { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; margin-bottom: 52px; }
.yt-lyrics-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.process-two-col-left .process-section,
.process-two-col-right .process-section { margin-bottom: 16px; }
.process-two-col-right { display: flex; flex-direction: column; padding-left: 48px; }
.process-body {
  font-family: "Elms Sans", sans-serif; font-optical-sizing: auto;
  font-size: 1.05rem; line-height: 1.85; color: rgba(240,237,230,.72); max-width: 680px;
}

/* ─── More Projects Nav ─── */
.detail-more-projects { padding: 40px 52px 60px; border-top: 1px solid var(--line); margin-top: 60px; }
.dmp-label { font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--red); margin-bottom: 28px; text-align: center; }
.dmp-nav { display: grid; grid-template-columns: 1fr 1fr; }
.dmp-item {
  padding: 20px 0; cursor: none; position: relative;
  border-top: 1px solid var(--line); text-decoration: none; display: block;
  color: inherit;
}
.dmp-item:first-child { padding-right: 52px; border-right: 1px solid var(--line); }
.dmp-item:last-child { padding-left: 52px; text-align: right; }
.dmp-dir { font-size: .6rem; letter-spacing: .25em; text-transform: uppercase; color: #444; margin-bottom: 16px; }
.dmp-title {
  font-family: 'Anton', sans-serif; font-size: clamp(1.5rem, 2.5vw, 2.6rem);
  text-transform: uppercase; letter-spacing: -.01em; line-height: 1;
  color: var(--white); transition: color .25s ease;
}
.dmp-title-wrap { display: flex; align-items: flex-start; gap: 12px; }
.dmp-title-wrap--right { justify-content: flex-end; }
.dmp-arrow { flex-shrink: 0; font-family: 'Anton', sans-serif; font-size: clamp(1.5rem, 2.5vw, 2.6rem); line-height: 1; color: var(--white); transition: color .25s ease; }
.dmp-item:hover .dmp-arrow { color: var(--red); }
.dmp-item:hover .dmp-title { color: var(--red); }
.dmp-type { font-size: .68rem; letter-spacing: .1em; color: var(--muted); margin-top: 10px; }
.dmp-thumb {
  position: absolute; bottom: calc(100% + 16px); left: 0;
  width: 280px; aspect-ratio: 16/9; overflow: hidden; background: var(--card);
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none; border: 1px solid rgba(255,255,255,.08); z-index: 10;
}
.dmp-item:last-child .dmp-thumb { left: auto; right: 0; }
.dmp-item:hover .dmp-thumb { opacity: 1; transform: translateY(0); }
.dmp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Chair Flipbook ─── */
#chair-strip {
  position: fixed; left: 20px; top: 160px; width: 240px;
  z-index: 350; pointer-events: none; opacity: 0; transition: opacity .5s ease;
}
#chair-strip.visible { opacity: 1; }
#chair-frame-img { width: 100%; display: block; }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--line); padding: 80px 52px 40px;
  background: var(--black);
}
.foot-main { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 80px; }
.foot-nav { display: flex; flex-direction: column; }
.foot-nav a {
  font-family: 'Anton', sans-serif; font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1; letter-spacing: -.02em; text-transform: uppercase;
  color: var(--white); text-decoration: none; transition: color .2s ease; padding-bottom: 6px;
}
.foot-nav a:hover { color: var(--red); }
.foot-info { display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.foot-contact-item { display: flex; flex-direction: column; gap: 3px; }
.foot-contact-label { font-size: .6rem; letter-spacing: .28em; text-transform: uppercase; color: var(--red); }
.foot-contact-row { font-family: "Elms Sans", sans-serif; font-size: 1.05rem; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .2s ease; }
.foot-contact-row:hover { color: var(--white); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; }
.foot-copy { font-size: .8rem; letter-spacing: .08em; color: #444; }
.foot-top { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s ease; }
.foot-top:hover { color: var(--red); }

/* ─── Lightbox ─── */
#lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,5,5,.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
#lightbox::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--red); }
#lightbox.lb-open { opacity: 1; pointer-events: all; }
#lb-stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding: 72px 80px 20px; min-height: 0; }
#lb-img { max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transform: scale(.97); transition: opacity .4s ease, transform .4s cubic-bezier(.16,1,.3,1); }
#lb-img.lb-vis { opacity: 1; transform: scale(1); }
#lb-video { max-width: 100%; max-height: 100%; object-fit: contain; display: none; outline: none; background: var(--black); }
#lb-close {
  position: absolute; top: 24px; right: 36px; width: 40px; height: 40px;
  background: transparent; border: 1px solid rgba(240,237,230,.2); border-radius: 50%;
  cursor: none; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
#lb-close::before, #lb-close::after { content: ''; position: absolute; width: 14px; height: 1px; background: var(--white); border-radius: 1px; }
#lb-close::before { transform: rotate(45deg); }
#lb-close::after  { transform: rotate(-45deg); }
#lb-close:hover   { border-color: var(--red); background: rgba(227,62,62,.12); }
#lb-footer { width: 100%; padding: 16px 80px 32px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; position: relative; }
#lb-info { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; text-align: center; }
#lb-group   { font-size: .58rem; letter-spacing: .32em; text-transform: uppercase; color: var(--red); }
#lb-counter { font-size: .72rem; letter-spacing: .16em; color: var(--muted); }
#lb-prev, #lb-next {
  background: transparent; border: 1px solid rgba(240,237,230,.2);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: none; transition: border-color .2s, background .2s; flex-shrink: 0;
}
#lb-prev:hover, #lb-next:hover { border-color: var(--red); background: rgba(227,62,62,.12); }
#lb-prev svg, #lb-next svg { width: 14px; height: 14px; stroke: var(--white); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

/* ─── Scroll Reveal ─── */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .8s ease; }
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  .project-topbar { padding: 18px 24px; margin-top: 68px; }
  .detail-body { padding: 40px 24px; }
  .detail-info { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { gap: 24px; }
  footer { padding: 60px 24px 32px; }
  .foot-main { grid-template-columns: 1fr; gap: 48px; }
  .detail-more-projects { padding: 40px 24px 60px; margin-top: 24px; }
  .detail-illustration img { max-width: 180px; width: 15%; }
  .dmp-item:first-child { padding-right: 24px; }
  .dmp-item:last-child { padding-left: 24px; }
  .dmp-title { overflow-wrap: break-word; }
  .process-two-col { grid-template-columns: 1fr !important; }
  .process-two-col-right { padding-left: 0; }
  .yt-lyrics-wrap { grid-template-columns: 1fr; }
  .process-section-grid:not([style*="repeat(1,"]) { grid-template-columns: repeat(2, 1fr) !important; }
  .process-section-grid[style*="repeat(2,1fr)"] { grid-template-columns: 1fr !important; }
  .process-section-grid { max-width: 100% !important; }
  #lb-stage { padding: 56px 12px 8px; }
  #lb-footer { padding: 8px 16px 20px; }
  .detail-loop-videos { grid-template-columns: 1fr; }
  .detail-loop-videos--many { grid-template-columns: repeat(2, 1fr); }
}
@media (pointer: coarse) {
  #cur, #cur-ring { display: none; }
  body { cursor: auto !important; }
  #chair-strip { display: none !important; }
}
