/* =========================================================
   THE CUT — career as an NLE timeline (fx/thecut.css)
   Pairs with fx/thecut.js. Uses the site design system:
   --bg --text --accent --mono --display --pad-x, borders
   rgba(255,255,255,0.08), radii 8–12px.
   ========================================================= */

.thecut {
  --cut-ruler-h: 34px;
  --cut-ruler-gap: 16px;
  --cut-row-h: clamp(76px, 12vh, 104px);
  --cut-row-gap: 14px;
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.thecut__inner {
  height: 100vh;
  min-height: 660px;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.thecut__header {
  display: flex;
  align-items: flex-end;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 4vw, 48px) var(--pad-x) 12px;
  flex-shrink: 0;
}

.thecut__label { margin-bottom: 14px; }

.thecut__title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.thecut__timecode {
  margin-left: auto;
  padding-bottom: 8px;
  font-family: var(--mono);
  font-size: clamp(16px, 2.6vw, 32px);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}

.thecut__tc-ff { color: var(--accent); }

/* ---------- Stage (pinned desktop layout) ---------- */
.thecut__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.thecut__timeline {
  position: relative;
  will-change: transform;
}

/* Ruler — barely-there ticks every 70px (1/8 year) */
.thecut__ruler {
  position: relative;
  height: var(--cut-ruler-h);
  margin-bottom: var(--cut-ruler-gap);
  border-bottom: 1px solid var(--border);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0 1px,
    transparent 1px 70px
  );
}

.thecut__year {
  position: absolute;
  top: 0;
  height: 100%;
  padding: 4px 0 0 8px;
  border-left: 1px solid var(--border-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

/* Track lanes */
.thecut__track {
  position: relative;
  height: var(--cut-row-h);
  margin-bottom: var(--cut-row-gap);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Sticky track labels (overlay, left edge) */
.thecut__rail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: var(--pad-x);
  pointer-events: none;
  z-index: 4;
}

.thecut__rail-spacer {
  height: calc(var(--cut-ruler-h) + var(--cut-ruler-gap));
}

.thecut__rail-label {
  display: flex;
  align-items: center;
  height: var(--cut-row-h);
  margin-bottom: var(--cut-row-gap);
  width: max-content;
  padding-right: 48px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: linear-gradient(90deg, var(--bg) 65%, transparent);
  text-shadow: 0 0 6px var(--bg);
}

/* Playhead — centered, timeline moves underneath it */
.thecut__playhead {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 28px var(--accent-glow);
  z-index: 6;
  pointer-events: none;
}

.thecut__playhead::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top: 9px solid var(--accent);
}

/* ---------- Clips (Premiere-style) ---------- */
.thecut-clip {
  position: absolute;
  top: 8px;
  bottom: 8px;
  display: block;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.thecut-clip:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(255, 26, 26, 0.25);
}

.thecut-clip__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.4) brightness(0.75) contrast(1.05);
  transition: filter 0.3s ease;
}

.thecut-clip:hover .thecut-clip__media {
  filter: grayscale(0) brightness(0.95) contrast(1.1);
}

/* img:'' → dark-red / black gradient placeholder */
.thecut-clip__media--ph {
  background: linear-gradient(135deg, #4a0808 0%, #1a0404 55%, #0a0a0a 100%);
}

.thecut-clip__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim so mono text stays readable over media */
.thecut-clip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    transparent 38%,
    transparent 55%,
    rgba(0, 0, 0, 0.75) 100%
  );
  pointer-events: none;
}

.thecut-clip__name {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thecut-clip__len {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 2px 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.thecut-clip__year {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ---------- Stacked variant (mobile / reduced-motion / no GSAP) ---------- */
.thecut--stack .thecut__inner {
  height: auto;
  min-height: 0;
  padding-bottom: clamp(48px, 8vw, 80px);
}

.thecut--stack .thecut__timecode { color: var(--text-dim); }

.thecut__list {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 8px var(--pad-x) 0;
}

.thecut__group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thecut__group .thecut__rail-label {
  height: auto;
  margin: 0;
  padding: 0 0 8px;
  background: none;
  border-bottom: 1px solid var(--border);
}

.thecut-clip--card {
  position: relative;
  height: clamp(150px, 42vw, 220px);
  border-radius: 12px;
}

.thecut-clip--card .thecut-clip__name {
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .thecut__header {
    flex-wrap: wrap;
    align-items: baseline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thecut *,
  .thecut *::after {
    transition: none !important;
  }
}
