/* LumiVid camera-ready paper page — editorial minimal, justdubit-inspired, fresh CSS.
   Light paper sections + dark video wells so BT.2020 HLG panels pop.
   Inter self-hosted (fonts/*.woff2, offline-safe). No external assets. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-alt: #f7f7f8;
  --ink: #101014;
  --dim: #62666e;
  --line: #e6e6eb;
  --accent: #1d4ed8;
  --accent-soft: #eaf0fe;
  --card: #111114;
  --card-line: #26262b;
  --card-fg: #f2f2f4;
  --card-dim: #9a9aa3;
  --matte: #0b0b0d;
  --radius: 12px;
  --maxw: 1080px;
  --narrow: 800px;
  --gap: 18px;
  --ev-max-h: 560px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: #fff; }

a { color: var(--accent); }
a:hover { color: #123a9e; }

/* ---------- top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  margin-right: auto;
}
.brand span { color: var(--dim); font-weight: 400; font-size: 13px; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-alt); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section.block { padding: 96px 0; border-top: 1px solid #f3f4f6; }
section.block.alt { background: var(--paper); }
.band-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 0 56px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 22px;
  background: #fff;
}
h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 auto 14px;
  max-width: 20ch;
}
.authors {
  margin: 18px auto 8px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
}
.authors sup, .affiliations sup {
  font-size: 0.68em;
  line-height: 0;
}
.affiliations {
  margin: 0 auto 22px;
  font-size: 13px;
  color: var(--dim);
}
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: #2a2a32; color: #fff; transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-alt); transform: translateY(-1px); }
.btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
/* Quiet HDR line (Option C): replaces the old blue .hdr-note box. */
.hdr-quiet {
  max-width: var(--narrow);
  margin: 0 auto 44px;
  font-size: 14px;
  color: var(--dim);
  text-align: center;
}

/* hero curtains: one feature + two-up */
.hero-feature { margin-bottom: var(--gap); }
.hero-duo { display: flex; gap: var(--gap); }
.hero-duo figure { flex: 1 1 0; min-width: 0; }
@media (max-width: 760px) {
  .hero-duo { flex-direction: column; }
}

/* ---------- section headers ---------- */
.sec-head { max-width: var(--narrow); margin: 0 0 34px; }
.sec-head.follow { margin-top: 48px; }
.sec-title.sub { font-size: clamp(20px, 2.6vw, 26px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 8px;
}
.sec-title {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.2;
  margin: 0 0 10px;
}
.sec-lede { color: var(--dim); margin: 0; font-size: 16px; }
.sec-lede a { font-weight: 600; }

/* ---------- light media cards, dark media wells (Option C) ---------- */
.asset {
  background: #fff;
  color: var(--ink);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 16px 20px;
  margin: 0 0 26px;
}
.asset > header {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.asset h3 { font-size: 17px; margin: 0; text-transform: capitalize; letter-spacing: -0.01em; }
.spec { color: var(--dim); font-size: 13px; margin-right: auto; }
.controls { display: flex; gap: 8px; }
.controls button, .picks select, .picks button {
  background: #fff; color: var(--ink);
  border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.controls button, .picks button { cursor: pointer; }
.controls button:hover, .picks button:hover { background: #f9fafb; }
.picks select { cursor: pointer; }
.picks select:hover { border-color: #d1d5db; }

.grid { display: flex; flex-direction: column; align-items: center; gap: var(--gap); }
.stops { display: flex; justify-content: center; gap: var(--gap); width: 100%; }
.panel { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.panel.hero { width: 100%; }
.panel.stop { flex: 1 1 0; max-width: calc(var(--ev-max-h) * var(--ar)); }
.asset figcaption, .hero-panel figcaption {
  color: var(--dim); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.hero-panel { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-panel .box { border: 1px solid #e5e7eb; }
.asset .box { border: 1px solid #e5e7eb; }
/* Black ring = LumiVid side (justdubit 'ours' trick), toggled from JS. */
.compare-hero .box.ours-right {
  border: 2px solid #111;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

/* curtain box */
.box {
  position: relative; width: 100%;
  aspect-ratio: var(--ar);
  margin-inline: auto;
  background: var(--matte);
  border-radius: 10px;
  overflow: hidden;
}
.panel.hero .box { max-width: calc(min(var(--maxh, 660px), 82vh) * var(--ar)); }
.hero-feature .box { max-width: calc(min(620px, 82vh) * var(--ar)); }
.hero-duo .box { max-width: calc(min(420px, 60vh) * var(--ar)); }
.box video, .box img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
  -webkit-user-drag: none; user-select: none;
}
.curtain { cursor: ew-resize; touch-action: none; }
.curtain:focus-visible { outline: 2px solid #8ab4e8; outline-offset: 3px; }
.curtain .over { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: #fff; pointer-events: none; opacity: 0.85;
}
.handle span {
  position: absolute; top: 50%; left: 50%;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.handle span::before, .handle span::after {
  content: ""; position: absolute; top: 11px; border: 4px solid transparent;
}
.handle span::before { left: 4px; border-right-color: #111; }
.handle span::after { right: 4px; border-left-color: #111; }
.tag {
  position: absolute; bottom: 9px; padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 600;
  background: rgba(0, 0, 0, 0.62); color: #e8e8ea; pointer-events: none;
}
.tag.left { left: 9px; } .tag.right { right: 9px; }
.tag.bad { background: rgba(140, 26, 26, 0.92); }

@media (max-width: 760px) {
  .stops { flex-direction: column; align-items: center; }
  .panel.stop { max-width: calc(min(82vh, 660px) * var(--ar)); width: 100%; }
  .asset { padding: 14px 12px 16px; }
  section.block { padding: 64px 0; }
}

/* ---------- compact results grids (justdubit-style) ---------- */
.grid-vids {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.grid-stills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.thumb-card {
  background: #fff;
  color: var(--ink);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.thumb-card:hover, .thumb-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-color: #d1d5db;
}
.thumb-card:focus-visible { outline: 2px solid #8ab4e8; outline-offset: 3px; }
.thumb-media {
  position: relative;
  aspect-ratio: var(--ar, 1.78);
  max-height: 320px;
  margin-inline: auto;
  background: var(--matte);
  border-radius: 8px;
  overflow: hidden;
}
.thumb-media video, .thumb-media img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.thumb-tag {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 600;
  background: rgba(0, 0, 0, 0.62); color: #e8e8ea;
  pointer-events: none;
}
.expand-btn {
  position: absolute; right: 10px; bottom: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 16px; line-height: 1;
  color: #111; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
.expand-btn:hover { transform: scale(1.1); }
.thumb-meta { padding: 10px 8px 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.thumb-meta h3 { font-size: 14.5px; margin: 0; text-transform: capitalize; letter-spacing: -0.01em; flex: 1 1 100%; }
.thumb-meta .spec { font-size: 12px; }
.badge {
  font-size: 11px; font-weight: 700;
  color: #1d4ed8; background: #eaf0fe;
  border: 1px solid #cdd9f8;
  border-radius: 999px; padding: 1px 10px;
  white-space: nowrap;
}

/* ---------- curtain modal (white shell, dark media wells) ---------- */
dialog.modal {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  max-width: 960px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.72); }
.modal-inner { padding: 18px 18px 22px; }
.modal-bar {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.modal-bar h3 { margin: 0; font-size: 17px; letter-spacing: -0.01em; margin-right: auto; }
.modal-close {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  background: #fff; color: var(--ink);
  border: 1px solid #e5e7eb;
  font-size: 14px; cursor: pointer;
}
.modal-close:hover { background: #f9fafb; }
#modal-content .asset { margin: 0; border: none; padding: 0; }

@media (max-width: 900px) {
  .grid-vids { grid-template-columns: repeat(2, 1fr); }
  .grid-stills { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-vids, .grid-stills { grid-template-columns: 1fr; }
  .thumb-media { max-height: none; }
}

/* ---------- compare ---------- */
.compare-card { margin-bottom: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
button.thumb {
  padding: 0; width: 96px; line-height: 0; overflow: hidden;
  border-radius: 8px; border: 1px solid #e5e7eb;
  background: #fff; cursor: pointer;
}
button.thumb img { width: 96px; height: 54px; object-fit: cover; display: block; }
button.thumb.on { outline: 2px solid #111; outline-offset: 1px; }
button.thumb:hover { border-color: #9ca3af; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.picks label, .controls-label {
  color: var(--dim); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.method-note { color: var(--dim); font-size: 12.5px; line-height: 1.45; flex: 1 1 240px; max-width: 56ch; }
.compare-hero .box { max-width: calc(min(660px, 82vh) * var(--ar)); }
input[type="range"].seam {
  width: 100%; max-width: calc(min(660px, 82vh) * var(--ar, 1.78));
  margin: 10px auto 0; display: block; accent-color: #111;
}
/* Progressive disclosure (Option C): featured chips + collapsibles. */
.all-clips { margin: 0 0 16px; }
.all-clips summary, .pipeline-details summary, .vfx-details summary {
  cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  color: var(--dim);
  padding: 8px 0;
  width: fit-content;
}
.all-clips summary:hover, .pipeline-details summary:hover, .vfx-details summary:hover {
  color: var(--ink);
}
.all-clips .thumbs { margin: 12px 0 0; }
.pipeline-details {
  margin: 22px 0 0; padding: 4px 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff;
}
.pipeline-details[open] { padding-bottom: 16px; }
.pipeline-details .pipeline-note {
  margin: 8px 0 0; padding: 0;
  border: none; background: none;
  color: var(--dim); font-size: 13.5px;
}
.pipeline-note sup { font-size: 10px; }

/* ---------- abstract / method ---------- */
.prose { max-width: var(--narrow); margin: 0 auto; }
.prose p { margin: 0 0 14px; color: #2b2e34; font-size: 16.5px; line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }

.method-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-bottom: 26px; }
@media (max-width: 760px) { .method-cols { grid-template-columns: 1fr; } }
.method-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.method-card h3 { margin: 0 0 12px; font-size: 16px; letter-spacing: -0.01em; }
.method-card ul { margin: 0; padding-left: 20px; color: #2b2e34; font-size: 14.5px; }
.method-card li { margin-bottom: 8px; }
.method-card li:last-child { margin-bottom: 0; }
.method-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; background: var(--paper-alt);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
.figure-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  margin-bottom: 26px;
}
.figure-box img { width: 100%; height: auto; display: block; border-radius: 8px; }
.figure-box figcaption { color: var(--dim); font-size: 13px; margin-top: 10px; text-align: center; }
.vfx-callout {
  border: 1px solid #cdd9f8; border-left: 4px solid var(--accent);
  background: #f5f8ff; border-radius: 12px;
  padding: 20px 24px; font-size: 14.5px; color: #2b2e34;
}
.vfx-callout h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.vfx-callout p { margin: 0 0 10px; }
.vfx-callout p:last-child { margin-bottom: 0; }
.vfx-callout .vfx-lede { margin: 0 0 12px; }
.vfx-details summary { padding: 4px 0; }
.vfx-details p { margin: 10px 0 0; }
.vfx-callout code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ---------- overview video ---------- */
.video-figure img,
.video-figure .video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--matte);
  border-radius: 8px;
  display: block;
}

/* ---------- vfx link to overview video (single video location) ---------- */
.vfx-text { min-width: 0; }
.vfx-link {
  margin-top: 12px;
  color: var(--dim);
  font-size: 14px;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px 48px;
  text-align: center;
  color: var(--dim);
  font-size: 13.5px;
}
footer p { margin: 0 0 6px; }
footer p:last-child { margin-bottom: 0; }
footer strong { color: var(--ink); }

/* ---------- entrance motion (one quiet sequence + scroll reveals) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > * { animation: rise 0.6s ease both; }
.hero > *:nth-child(2) { animation-delay: 0.06s; }
.hero > *:nth-child(3) { animation-delay: 0.12s; }
.hero > *:nth-child(4) { animation-delay: 0.18s; }
.hero > *:nth-child(5) { animation-delay: 0.24s; }
.hero > *:nth-child(6) { animation-delay: 0.3s; }
.hero-curtains { animation-delay: 0.36s !important; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > * { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
