:root {
  --void: oklch(0.13 0.025 270);
  --deep: oklch(0.2 0.035 270);
  --line: oklch(0.36 0.03 270);
  --star: oklch(0.95 0.018 85);
  --dust: oklch(0.78 0.03 270);
  --ember: oklch(0.66 0.22 32);
  --solar: oklch(0.83 0.13 72);
  --bar: 58px;
  --gutter: clamp(20px, 6vw, 96px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0; background: #000; color: var(--star);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 2px solid var(--solar); outline-offset: 4px; border-radius: 2px; }
h1, h2, h3 {
  margin: 0; font-weight: 700; font-stretch: 125%; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1; text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

#space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
main { position: relative; z-index: 1; }

/* ---------- opening ident */
.ident {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; place-content: center; justify-items: center; gap: 1.6rem;
  transition: opacity .6s ease-out, visibility 0s .6s;
}
.ident img { width: min(42vw, 220px); height: auto; mix-blend-mode: screen; opacity: 0; }
.ident span { font-stretch: 125%; text-transform: uppercase; letter-spacing: .5em; font-size: .8rem; color: var(--dust); opacity: 0; margin-right: -.5em; }
.ident.play img { animation: ident-in 1.1s var(--out) .15s forwards; }
.ident.play span { animation: ident-in 1s var(--out) .9s forwards; }
.ident.done { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes ident-in { from { opacity: 0; filter: blur(12px); transform: scale(1.08); } to { opacity: 1; filter: blur(0); transform: none; } }

/* ---------- letterbox bars */
.bar {
  position: fixed; left: 0; right: 0; z-index: 10; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 0 var(--gutter); background: #000; font-size: .9375rem;
}
.bar--top { top: 0; justify-content: center; }
.bar--bottom { bottom: 0; color: var(--dust); }
.brand img { width: 46px; height: 46px; object-fit: contain; mix-blend-mode: screen; transition: transform .5s var(--out); }
.brand:hover img { transform: scale(1.12); }
.bar__left { display: flex; align-items: center; gap: 1.5rem; min-width: 0; flex: 1; }
.progress {
  position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, oklch(0.72 0.13 275), var(--ember) 70%, var(--solar));
  transform: scaleX(0); transform-origin: left;
}
.here { font-stretch: 125%; text-transform: uppercase; font-size: .8rem; letter-spacing: .12em; color: var(--star); white-space: nowrap; flex: 1; text-align: center; }
.bar--bottom .orbit { margin-left: auto; }
.bar__left + .here + .orbit { flex: none; }

.eq { display: flex; align-items: center; gap: .7rem; color: var(--star); white-space: nowrap; }
.eq i { display: flex; align-items: flex-end; gap: 3px; height: 1rem; }
.eq b { width: 3px; height: 30%; background: var(--dust); border-radius: 1px; }
.eq[aria-pressed="true"] b { background: var(--solar); animation: eq .9s ease-in-out infinite alternate; }
.eq b:nth-child(2) { animation-delay: -.3s; } .eq b:nth-child(3) { animation-delay: -.6s; } .eq b:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { to { height: 100%; } }

.player { display: flex; align-items: center; gap: 1rem; min-width: 0; flex: 1; }
.player[hidden] { display: none; }
.player button { color: var(--star); border-bottom: 1px solid var(--ember); }
.player__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player input { flex: 1; max-width: 14rem; accent-color: var(--ember); }

/* ---------- flight path navigation */
.path {
  position: fixed; z-index: 9; right: calc(var(--gutter) / 2 - 7px); top: 50%; transform: translateY(-50%);
  display: grid; gap: 1.35rem;
}
.path::before { content: ""; position: absolute; left: 50%; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.path a { position: relative; width: 14px; height: 14px; display: grid; place-items: center; text-decoration: none; }
.path a::before { content: ""; position: absolute; inset: -8px; }
.path a::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: transform .3s var(--out), background .2s, box-shadow .3s; }
.path a:hover::after, .path a[aria-current]::after { background: var(--solar); transform: scale(1.5); box-shadow: 0 0 14px var(--solar); }
.path span {
  position: absolute; right: 26px; font-stretch: 125%; text-transform: uppercase; font-size: .72rem; letter-spacing: .14em;
  white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .3s var(--out); pointer-events: none;
}
.path a:hover span, .path a:focus-visible span, .path a[aria-current] span { opacity: 1; transform: none; }

/* ---------- controls */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.orbit {
  position: relative; display: inline-block; padding: .95rem 1.9rem; border-radius: 99px;
  font-weight: 600; font-stretch: 112%; text-decoration: none; color: var(--star); text-align: center;
  background: oklch(0.2 0.03 270 / .85); transition: background .2s, scale .15s var(--out);
}
.orbit::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a), var(--line) 0 78%, var(--solar) 94%, var(--star) 98%, var(--line) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 5s linear infinite; pointer-events: none;
}
.orbit:hover { background: oklch(0.27 0.045 270); }
.orbit:hover::before { animation-duration: 1.4s; }
.orbit:active { scale: .97; }
.orbit--sm { padding: .42rem 1.15rem; font-size: .9rem; }
@keyframes spin { to { --a: 360deg; } }

.traj { position: relative; display: inline-block; text-decoration: none; padding-bottom: .3rem; font-weight: 500; color: var(--star); }
.traj::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.traj::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, transparent calc(100% - 3.5rem), var(--ember) calc(100% - 6px), var(--star) 100%);
  clip-path: inset(0 100% 0 0); transition: clip-path .5s var(--out);
}
.traj:hover::after, .traj:focus-visible::after { clip-path: inset(0); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 1.75rem; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 50; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--star); color: #000; font-weight: 700; font-stretch: 112%;
  pointer-events: none; scale: 0; transition: scale .3s var(--out);
}
.cursor.on { scale: 1; }
.has-cursor main [data-play] { cursor: none; }

/* section titles pull in from wide to tight, once */
.js .card { opacity: 0; }
.js .card.in { animation: card .8s var(--out) forwards; }
@keyframes card { from { opacity: 0; letter-spacing: .2em; filter: blur(10px); } to { opacity: 1; letter-spacing: -0.01em; filter: blur(0); } }

/* ---------- hero */
.hero {
  min-height: 100svh; display: grid; align-content: start; justify-items: center; text-align: center; gap: 1.4rem;
  padding: calc(var(--bar) + 11vh) var(--gutter) calc(var(--bar) + 6vh);
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 5.2rem); max-width: 16ch; }
.hero__sub { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--dust); max-width: 34ch; margin: 0; }
.hero__go { align-self: end; margin-top: auto; }
.js .hero > * { opacity: 0; }
.js.launched .hero > * { animation: card 1.6s var(--out) 1s forwards; }
.js.launched .hero > :nth-child(2) { animation-delay: 1.3s; }
.js.launched .hero > :nth-child(3) { animation-delay: 1.6s; }

/* ---------- stops */
.stop {
  min-height: 100svh; display: grid; align-content: center; gap: clamp(2rem, 5vh, 3.5rem);
  padding: calc(var(--bar) + 12vh) calc(var(--gutter) + 1.5rem) calc(var(--bar) + 12vh) var(--gutter);
}
.stop__text { max-width: 38rem; }
.stop__text h2 { font-size: clamp(1.9rem, 4.6vw, 4rem); margin-bottom: 1.4rem; }
.stop__text h2.card--long { font-size: clamp(1.4rem, 2.9vw, 2.5rem); line-height: 1.08; }
.stop__text p { color: var(--dust); max-width: 48ch; }
.stop--right .stop__text { justify-self: end; }
.stop--end { padding-bottom: calc(var(--bar) + 14vh); }

.frame { display: block; position: relative; overflow: hidden; background: #000; border-radius: 3px; width: 100%; }
.frame img, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--out); }
.frame:hover img, .frame:hover video { transform: scale(1.035); }

/* ---------- the Contractor's Playbook */
.episodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; max-width: 44rem; perspective: 900px; }
.episode { display: grid; gap: .6rem; align-content: start; }
.episode .frame { aspect-ratio: 16 / 9; }
.episode--lead { grid-column: 1 / -1; transition: rotate .4s var(--out); transform-style: preserve-3d; }
.episode__title { font-size: .92rem; line-height: 1.35; color: var(--dust); }
.episode--lead .episode__title { font-size: 1.15rem; font-weight: 600; color: var(--star); max-width: 44ch; }
.episode:hover .episode__title { color: var(--star); }

/* ---------- selected work: one film per frame */
.work { padding: calc(var(--bar) + 12vh) calc(var(--gutter) + 1.5rem) 8vh var(--gutter); }
.work__intro { justify-self: end; margin-left: auto; margin-bottom: 10vh; }
.film { min-height: 96svh; display: grid; grid-template-columns: 100%; align-content: center; justify-items: center; }
.film .frame {
  width: min(100%, calc((100svh - var(--bar) * 2 - 14vh) * 2.39)); aspect-ratio: 2.39 / 1;
  box-shadow: 0 30px 120px oklch(0 0 0 / .7);
}
.film .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, oklch(0 0 0 / .78), transparent 52%); pointer-events: none; }
.film__card { position: absolute; z-index: 1; left: clamp(1rem, 4%, 3.5rem); bottom: clamp(1rem, 9%, 3rem); right: 1rem; display: grid; gap: .5rem; }
.film__card h3 { font-size: clamp(1.25rem, 3.4vw, 3rem); }
.film__card p { margin: 0; color: var(--star); font-size: clamp(.85rem, 1.1vw, 1rem); }

/* ---------- music */
#music { grid-template-columns: minmax(0, 36rem) minmax(0, 25rem); column-gap: clamp(2rem, 5vw, 5rem); align-items: center; justify-content: start; }
.credits { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .85rem; }
.credits li { display: grid; gap: .1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.credits strong { font-stretch: 125%; text-transform: uppercase; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.credits span { color: var(--dust); font-size: .95rem; }
.spotify { width: 100%; height: 480px; border: 0; border-radius: 12px; background: #121212; }

/* ---------- about, contact */
.services { font-weight: 600; font-stretch: 112%; color: var(--star) !important; margin-top: 1.5rem; }
.socials { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; gap: .9rem 1.8rem; }
.socials .traj { color: var(--dust); font-weight: 400; }
.socials .traj:hover { color: var(--star); }

/* ---------- theater */
.theater {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0;
  padding: clamp(1rem, 4vh, 3rem) var(--gutter); border: 0; background: #000; color: var(--star);
}
.theater[open] { display: grid; grid-template-rows: auto 1fr; gap: 1rem; }
.theater::backdrop { background: transparent; }
.theater__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; }
.theater__head h2 { font-size: clamp(1.1rem, 2.4vw, 2rem); }
.theater__stage { display: grid; place-items: center; min-height: 0; }
.theater__stage iframe { width: min(100%, calc((100dvh - 12rem) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; }

/* ---------- small screens */
@media (max-width: 760px) {
  :root { --bar: 52px; }
  .brand img { width: 40px; height: 40px; }
  .path { right: 5px; gap: 1.1rem; }
  .path span { display: none; }
  .stop, .work { padding-right: calc(var(--gutter) + 1.25rem); }
  .stop { padding-top: calc(var(--bar) + 30vh); }
  .episodes { grid-template-columns: 1fr; }
  .film { min-height: 70svh; }
  .film .frame { width: 100%; aspect-ratio: 16 / 10; }
  #music { grid-template-columns: 1fr; }
  .stop--right .stop__text, .work__intro { justify-self: start; margin-left: 0; }
  .here { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit::before, .eq b { animation: none !important; }
  .js .card, .js .hero > * { opacity: 1; animation: none !important; }
  .frame img, .frame video, .episode--lead { transition: none; }
}
