/* STAR TURN: demo 2. Carbon ground, bone ink, tally red. One theme, locked dark. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/BricolageGrotesque-var.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --carbon: #0B0B0C;
  --carbon-lift: #141416;
  --slate: #10141C;
  --bone: #F4F3F0;
  --bone-mid: #C6C5C0;
  --bone-dim: #A9A8A3;
  --bone-faint: #8F8E89;
  --red: #E8402F;
  --hairline: rgba(244, 243, 240, 0.14);
  --font-display: 'Bricolage Grotesque', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  --spine-h: 44px;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--carbon);
  color-scheme: dark;
  scrollbar-color: #333338 var(--carbon);
  overflow-x: clip;
}

body {
  font-family: var(--font-display);
  font-weight: 400;
  font-stretch: 100%;
  background: var(--carbon);
  color: var(--bone);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* clip, never hidden: hidden computes overflow-y auto, which makes body a
     non-scrolling scroll container and silently kills position: sticky */
  overflow-x: clip;
}

::selection { background: var(--red); color: var(--carbon); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

img, video, canvas { display: block; max-width: 100%; }

[hidden] { display: none !important; }

a { color: inherit; }

/* ---------- chrome ---------- */

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 300;
  background: var(--red);
  color: var(--carbon);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.55em 0.9em;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus-visible { transform: none; }

.slug {
  position: fixed; inset: 0;
  background: var(--carbon);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
}

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  pointer-events: none;
}
.chrome a { pointer-events: auto; }

.chrome-mark {
  font-weight: 800;
  font-stretch: 76%;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.chrome-cta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--bone);
  border: 1px solid var(--hairline);
  padding: 0.5em 1em;
  background: rgba(11, 11, 12, 0.55);
  transition: border-color 120ms steps(2, end), color 120ms steps(2, end);
}
.chrome-cta:hover { border-color: var(--red); color: var(--red); }
.chrome-cta:active { transform: translateY(1px); }

/* ---------- cold-open hints ---------- */

.open-hints {
  display: none;
  position: fixed;
  top: 1.1rem; left: var(--pad); right: var(--pad);
  z-index: 140;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--red);
}
body.cold-open .open-hints { display: flex; }

.open-rec { display: inline-flex; align-items: center; gap: 0.5em; }

.rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .rec-dot { animation: rec-blink 1.6s steps(2, end) infinite; }
  @keyframes rec-blink { 50% { opacity: 0.25; } }
}

/* ---------- cold open / hero ---------- */

body.cold-open .chrome,
body.cold-open .spine,
body.cold-open .hero-card,
body.cold-open .hero-scrim {
  opacity: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}

.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(11, 11, 12, 0.88) 0%, rgba(11, 11, 12, 0.30) 34%, rgba(11, 11, 12, 0) 60%),
    linear-gradient(100deg, rgba(11, 11, 12, 0.82) 0%, rgba(11, 11, 12, 0.48) 40%, rgba(11, 11, 12, 0.08) 66%, rgba(11, 11, 12, 0) 100%);
}

.hero-card {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) calc(var(--spine-h) + 4.5rem);
  max-width: 60rem;
}

.wordmark {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(4.25rem, 16.5vw, 14rem);
  line-height: 0.84;
  letter-spacing: -0.015em;
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}

.hero-line {
  margin-top: 1.6rem;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.15;
}

.hero-sub {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--bone-dim);
  max-width: 34ch;
  line-height: 1.4;
}

.btn {
  display: inline-block;
  margin-top: 1.8rem;
  background: var(--red);
  color: var(--carbon);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85em 1.7em;
  transition: background-color 120ms steps(2, end), color 120ms steps(2, end);
}
.btn:hover { background: var(--bone); }
.btn:active { transform: translateY(1px); }

/* ---------- pitch ---------- */

.pitch {
  min-height: 92dvh;
  display: flex;
  align-items: center;
}

.pitch-inner { padding: 14vh var(--pad); }

.statement {
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  font-weight: 700;
  font-stretch: 84%;
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 24ch;
}
.cut-line { display: block; }
.accent-line { color: var(--red); }

.watch-counter { margin-top: 3.5rem; }
.watch-line { display: block; font-weight: 500; font-stretch: 88%;
              font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--bone-dim); }
.watch-tc { font-family: var(--font-mono); font-weight: 500; color: var(--red); }

/* ---------- selects ---------- */

.select { position: relative; }

.select-title {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.select-story {
  margin-top: 1.1rem;
  max-width: 44ch;
  color: var(--bone);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.5;
}

.select-meta {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--bone-faint);
}

/* full-bleed variant */
.select-bleed {
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}
.select-bleed .select-media { position: absolute; inset: 0; overflow: hidden; }
.select-bleed .select-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.select-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 12, 0.94) 0%, rgba(11, 11, 12, 0.42) 42%, rgba(11, 11, 12, 0.10) 75%, rgba(11, 11, 12, 0) 100%);
}
.select-bleed .select-panel {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) calc(var(--spine-h) + 4rem);
}

/* split variant */
.select-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: 100dvh;
  background: var(--carbon);
}
.select-split .select-panel {
  align-self: center;
  padding: 6rem var(--pad);
}
.select-split .select-media { position: relative; overflow: hidden; }
.select-split .select-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* letterbox variant */
.select-letterbox {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 0 calc(var(--spine-h) + 5rem);
}
.select-letterbox .select-panel {
  padding: 0 var(--pad) 3.5rem;
}
.select-letterbox .select-media {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.select-letterbox .select-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* inset variant: the daylight frame floats against carbon, title laps its corner */
.select-inset {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 0 calc(var(--spine-h) + 4rem);
}
.select-inset .select-media {
  width: min(78%, 150dvh);
  aspect-ratio: 16 / 9;
  margin-left: auto;
  overflow: hidden;
}
.select-inset .select-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.select-inset .select-panel {
  position: relative;
  z-index: 2;
  margin-top: -3.4rem;
  padding: 0 var(--pad);
  max-width: 46rem;
}

/* ambilight: the film lights the room around the letterbox frame */
.amb-wrap { position: relative; }
.amb {
  position: absolute; left: 7%; width: 86%; height: 22vh;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.20;
}
.amb-top { bottom: 100%; -webkit-mask-image: linear-gradient(to top, black, transparent);
           mask-image: linear-gradient(to top, black, transparent); }
.amb-bottom { top: 100%; -webkit-mask-image: linear-gradient(to bottom, black, transparent);
              mask-image: linear-gradient(to bottom, black, transparent); }

/* ---------- the turn ---------- */

.turn {
  position: relative;
  height: 340vh;
  background: var(--carbon);
}

.turn-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.turn-canvas,
.turn-still {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* the copy's ground: a feathered corner scrim, same device as the hero and
   selects use over media; it fades out before the flock's play zone */
.turn-stage::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(165deg,
    rgba(11, 11, 12, 0.82) 0%,
    rgba(11, 11, 12, 0.45) 34%,
    rgba(11, 11, 12, 0) 62%);
}

.turn-skyline { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.skyline-mill { position: absolute; left: 0; bottom: 0; height: 54dvh; width: auto; }
.skyline-terrace { position: absolute; right: 0; bottom: 0; height: 20dvh; width: 100%; }

.turn-copy {
  position: absolute;
  left: var(--pad);
  /* seated on the upper sky: the zenith stops are the page's guaranteed dark
     ground, and the flock plays right of centre, so this corner is quietest */
  top: calc(4.2rem + var(--pad) * 0.5);
  z-index: 2;
  max-width: 44rem;
  padding-right: var(--pad);
}

.turn-title {
  font-weight: 800;
  font-stretch: 78%;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.95;
  max-width: 13ch;
  width: fit-content;
  text-wrap: balance;
}

.turn-body {
  margin-top: 1.1rem;
  max-width: 34ch;
  color: var(--bone);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
}

.turn-dare { color: var(--red); font-weight: 700; }

/* ---------- craft ---------- */

.craft { padding: 16vh 0; }

.craft-inner { padding: 0 var(--pad); }

.craft-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: baseline;
  padding: 2.6rem 0;
  border-top: 1px solid var(--hairline);
}
.craft-row:last-child { border-bottom: 1px solid var(--hairline); }

.craft-plate { align-self: center; }
.plate-pair, .plate-strip { display: grid; gap: 2px; background: transparent; }
.plate-pair { grid-template-columns: 1fr 1fr; }
.plate-strip { grid-template-columns: 1fr 1fr 1fr; }
.plate-pair img, .plate-strip img {
  width: 100%; max-height: 176px; height: 100%;
  object-fit: cover; display: block;
}
.plate-caption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--bone-faint);
  margin-top: 0.6rem;
}

/* the grade wipe: scout frame over delivery frame, split draggable */
.plate-wipe {
  position: relative;
  overflow: hidden;
  --wipe: 50%;
  touch-action: pan-y;
}
.plate-wipe img { width: 100%; height: auto; }
.plate-wipe .wipe-top {
  position: absolute; inset: 0;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 calc(100% - var(--wipe)) 0 0);
}
.wipe-handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--wipe);
  width: 2px;
  margin-left: -1px;
  padding: 0;
  border: 0;
  background: var(--red);
  box-shadow: 0 0 8px rgba(232, 64, 47, 0.65);
  cursor: ew-resize;
  touch-action: none;
}
.wipe-handle::before { content: ''; position: absolute; inset: -8px -14px; }
.wipe-handle::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, -50%);
}
.wipe-handle:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  /* the wipe collapses to the honest static pair */
  .plate-wipe { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
  .plate-wipe .wipe-top { position: static; clip-path: none; order: -1; }
  .wipe-handle { display: none; }
}

.craft-verb {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  line-height: 0.9;
}

.craft-note {
  color: var(--bone-dim);
  max-width: 40ch;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
}

/* ---------- studio ---------- */

.studio { padding: 18vh 0; background: var(--carbon-lift); }

.studio-inner { padding: 0 var(--pad); max-width: 62rem; }

.studio-def-display { display: block; }
.def-word { display: block; font-weight: 800; font-stretch: 75%;
            font-size: clamp(3rem, 7.5vw, 6.5rem); line-height: 0.9; }
.def-line { display: block; margin-top: 1rem; font-weight: 500; font-stretch: 88%;
            font-size: clamp(1.3rem, 2.6vw, 2.1rem); color: var(--bone-dim); }
.def-gram { font-family: var(--font-mono); font-weight: 500; color: var(--red);
            font-size: 0.55em; vertical-align: 0.25em; margin-right: 0.35em; }

.studio-prose {
  margin-top: 3rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  max-width: 58ch;
}

.studio-suite { margin-top: 3rem; }
.studio-suite img { width: 100%; height: auto; }
.studio-suite .plate-caption { margin-top: 0.8rem; }

@media (min-width: 1024px) {
  .studio-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 4rem;
    align-items: center;
    max-width: 76rem;
  }
  .studio-def-display { grid-column: 1 / -1; }
  .studio-suite { margin-top: 3rem; }
}

/* ---------- credits ---------- */

.credits {
  position: relative;
  height: 240vh;
}

.credits-stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.credits-roll {
  text-align: center;
  align-self: flex-start;
  padding: 42dvh 1.5rem 20dvh;
}

.roll-line { margin-top: 3.2rem; }
.roll-line:first-child { margin-top: 0; }

.roll-small {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--bone-dim);
}

.concept-link { color: inherit; text-decoration: none; }
.concept-link:hover { text-decoration: underline; }

.roll-mark {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.9;
  margin-top: 6rem;
}

.roll-close {
  font-weight: 700;
  font-stretch: 84%;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  margin-top: 2.2rem;
}

.roll-email { margin-top: 1.6rem; }

.quiet-link {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--bone-dim);
  text-decoration-color: var(--hairline);
  text-underline-offset: 0.3em;
}
.quiet-link:hover { color: var(--red); }

/* ---------- spine (timeline nav) ---------- */

.spine {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--spine-h);
  z-index: 150;
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding: 8px var(--pad) 10px;
  background: linear-gradient(to top, rgba(11, 11, 12, 0.96), rgba(11, 11, 12, 0.78));
  border-top: 1px solid rgba(244, 243, 240, 0.08);
}

.spine-tc {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--red);
  min-width: 7.5em;
}

.spine-track {
  position: relative;
  flex: 1;
  display: flex;
  gap: 2px;
}

.clip {
  flex-grow: var(--w, 1);
  flex-basis: 0;
  border: 0;
  background: #1B1B1F;
  cursor: pointer;
  position: relative;
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clip::after { content: ''; position: absolute; inset: -8px 0 -10px; }
.clip:hover { background: #2A2A30; }
.clip:hover .clip-label { color: var(--bone); }
.clip:focus-visible { outline: 2px solid var(--red); outline-offset: -3px; }
.clip.passed { background: #232328; }
.clip.active { background: #2C2C32; box-shadow: inset 0 -2px 0 var(--red); }

.clip-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-mid);
  white-space: nowrap;
  padding: 0 4px;
  pointer-events: none;
}
.clip.active .clip-label { color: var(--bone); font-weight: 500; }

@media (min-width: 1024px) {
  /* the label is static content, so min-width auto floors every clip at its own
     label width; tiny sections (Pitch) stay clickable at label width or wider */
  .clip { min-width: auto; }
}

.spine-playhead {
  position: absolute;
  top: -5px; bottom: -5px;
  left: 0;
  width: 2px;
  background: var(--red);
  box-shadow: 0 0 8px rgba(232, 64, 47, 0.65);
  will-change: transform;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}
.spine-playhead.dragging { cursor: grabbing; }
.spine-playhead::before { content: ''; position: absolute; inset: -6px -10px; }

.spine-sound {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--bone-mid);
  background: none; border: 0; cursor: pointer;
  padding: 0 2px;
  transition: color 120ms steps(2, end);
}
.spine-sound:hover { color: var(--bone); }
.sound-ind {
  width: 6px; height: 6px;
  border: 1px solid var(--bone-mid);
  display: inline-block;
}
.spine-sound[aria-pressed="true"] .sound-ind { background: var(--red); border-color: var(--red); }

.spine-chapter { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .clip-label { display: none; }
  .spine-tc { flex-direction: column; align-items: flex-start; justify-content: center;
              gap: 1px; min-width: 7.2em; }
  .spine-chapter { display: block; font-family: var(--font-mono); font-size: 0.625rem;
                   letter-spacing: 0.05em; text-transform: uppercase; color: var(--bone-dim);
                   white-space: nowrap; }
}

@media (max-width: 767px) {
  :root { --spine-h: 46px; }

  .hero-card { padding-bottom: calc(var(--spine-h) + 3rem); }

  .select-split { grid-template-columns: 1fr; }
  .select-split .select-media { min-height: 56dvh; order: -1; }
  .select-split .select-panel { padding: 3.2rem var(--pad) 4rem; }

  .select-letterbox { padding-top: 6.5rem; }
  .select-letterbox .select-media { aspect-ratio: 16 / 10; }

  .select-inset { padding-top: 6.5rem; }
  .select-inset .select-media { width: 100%; }
  .select-inset .select-panel { margin-top: 2rem; }

  .craft-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .craft-plate { margin-top: 1rem; }

  .turn-copy { right: var(--pad); padding-right: 0; }
  .skyline-mill { height: 58dvh; }
  .skyline-terrace { display: none; }

  .spine { gap: 0.65rem; padding-left: 1rem; padding-right: 1rem; }
  .spine-tc { min-width: 6.4em; font-size: 0.75rem; }
  .spine-sound { font-size: 0.625rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .turn { height: auto; }
  .turn-stage { position: relative; height: auto; min-height: 72dvh; }
  .credits { height: auto; }
  .credits-stage { position: relative; height: auto; }
  .credits-roll { padding: 16dvh 1.5rem; }
}
