/* ============================================================
   Extras: nav timecode, bottom scrub timeline, video lightbox,
   AI-native service badge.
   ============================================================ */

/* ---- hero backdrop variants ----
   html[data-hero] picks the backdrop: "wall" (poster wall + timeline ghost),
   "bokeh" (crossfading blurred stills), "off" (plain black). */
html[data-hero="bokeh"] .hero-wall,
html[data-hero="bokeh"] .hero-nle { display: none; }
html[data-hero="wall"] .hero-bg { display: none; }
html[data-hero="off"] .hero-bg,
html[data-hero="off"] .hero-wall,
html[data-hero="off"] .hero-nle { display: none; }

/* poster wall */
.hero-wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-wall .wall-track {
  position: absolute;
  inset: -22%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: clamp(10px, 1.6vw, 22px);
  align-content: start;
  transform: rotate(-7deg);
  opacity: 0.22;
}
@media (max-width: 720px) {
  .hero-wall .wall-track { grid-template-columns: repeat(4, 1fr); inset: -30%; }
}
.hero-wall img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-wall .wall-track { animation: wall-pan 70s ease-in-out infinite alternate; }
}
@keyframes wall-pan {
  from { transform: rotate(-7deg) translate3d(0, 0, 0); }
  to { transform: rotate(-7deg) translate3d(-3.5%, 5%, 0); }
}
.hero-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,6,0.7), rgba(6,6,6,0.28) 40%, rgba(6,6,6,0.94) 94%),
    radial-gradient(120% 95% at 30% 45%, transparent 30%, rgba(6,6,6,0.55) 100%);
}

/* desktop: bigger, colored wall — dark shield stays left under the name,
   center-right opens up so it doesn't read as empty. Mobile keeps the
   subtle grayscale look above. */
@media (min-width: 721px) {
  .hero-wall .wall-track {
    grid-template-columns: repeat(6, 1fr);
    opacity: 0.36;
  }
  .hero-wall img { filter: grayscale(0.2) saturate(1.08) contrast(1.03); }
  .hero-wall::after {
    background:
      linear-gradient(90deg, rgba(6,6,6,0.93) 0%, rgba(6,6,6,0.62) 36%, rgba(6,6,6,0.14) 66%, rgba(6,6,6,0.3) 100%),
      linear-gradient(180deg, rgba(6,6,6,0.6), rgba(6,6,6,0.1) 38%, rgba(6,6,6,0.9) 94%);
  }
}

/* editor's timeline ghost */
.hero-nle {
  position: absolute;
  left: 0; right: 0; bottom: 23%;
  height: 38%;
  z-index: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 85%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 85%, transparent);
}
/* ruler: fine frames + major ticks every 10% */
.hero-nle .nle-ruler {
  flex: 0 0 18px;
  position: relative;
  border-bottom: 1px solid rgba(242,240,236,0.1);
  background:
    repeating-linear-gradient(90deg, rgba(242,240,236,0.16) 0 1px, transparent 1px 10%) left bottom / 100% 40% no-repeat,
    repeating-linear-gradient(90deg, rgba(242,240,236,0.07) 0 1px, transparent 1px 2%) left bottom / 100% 20% no-repeat;
}
.hero-nle .tc-label {
  position: absolute;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(242,240,236,0.22);
}
.hero-nle .nle-track {
  position: relative;
  flex: 1 1 0;
  border-bottom: 1px solid rgba(242,240,236,0.055);
}
.hero-nle .nle-track.video { flex: 1.35 1 0; }
.hero-nle .tlabel {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 8px;
  color: rgba(242,240,236,0.2);
  z-index: 1;
}
.hero-nle .clip {
  position: absolute;
  top: 11%;
  bottom: 11%;
  border: 1px solid rgba(242,240,236,0.14);
  background: rgba(242,240,236,0.04);
  overflow: hidden;
}
/* butt-joined picture cuts share an edge, like a real sequence */
.hero-nle .clip.adj { border-left-width: 0; }
.hero-nle .clip .cname {
  display: block;
  padding: 1px 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: rgba(242,240,236,0.26);
}
.hero-nle .clip.audio {
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 72%;
}
.hero-nle .nle-head {
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 18%;
  width: 1px;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}
.hero-nle .nle-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  border: 4px solid transparent;
  border-top-color: color-mix(in srgb, var(--accent) 70%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-nle .nle-head { animation: nle-scrub 90s linear infinite; }
}
@keyframes nle-scrub {
  from { left: -2%; }
  to { left: 102%; }
}

/* ---- nav timecode ---- */
.nav-tc {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
}

/* ---- bottom timeline (fixed, scrubs the page) ---- */
.timeline {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 34px;
  z-index: 55;
  background: rgba(6, 6, 6, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.timeline .tl-ticks {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--ink-faint) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(242, 240, 236, 0.1) 0 1px, transparent 1px 12px);
  background-size: auto 60%, auto 28%;
  background-repeat: repeat-x;
  background-position: bottom left, bottom left;
  pointer-events: none;
}
.timeline .tl-head {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 65%, transparent);
  pointer-events: none;
}
.timeline .tl-head::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--accent);
}
body { padding-bottom: 34px; }

/* ---- video lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 56px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), visibility 0s 0.35s;
}
.lightbox.open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s var(--ease-out);
}
.lb-back {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.lb-panel {
  position: relative;
  width: min(980px, 100%);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.4s var(--ease-out);
}
.lightbox.open .lb-panel { transform: none; }
.lb-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
.lb-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.lb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(0.85);
}
.lb-soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.lb-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding-top: 16px;
}
.lb-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  text-transform: var(--display-transform);
  letter-spacing: var(--display-tracking);
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}
.lb-role {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-dim);
}
.lb-open a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s, color 0.3s;
}
.lb-open a:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.lb-open a::after { content: "↗"; }
.lb-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.lb-close:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
body.lb-open { overflow: hidden; }

/* ---- AI-native service badge ---- */
.service-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 5px 10px;
  vertical-align: middle;
  margin-left: 12px;
  white-space: nowrap;
  display: inline-block;
  transform: translateY(-0.35em);
}
