/* VideoWeave project page
 *
 * Visual-first, tech-feel, monochrome with one teal accent.
 * Avoids "AI dashboard" tropes: no cards, no shadows, no rounded panels,
 * no glassmorphism, no gradient bg.
 */

:root {
  color-scheme: dark;

  --bg: #0a0b0d;
  --bg-strong: #050608;
  --col: #ededee;
  --col-soft: #b4b6bc;
  --col-fade: #6b6d75;
  --rule: #ededee;
  --rule-faint: #1f2126;
  --accent: #5dc5cb;
  --accent-strong: #95dee2;
  --gt: #5fce82;
  --highlight: rgba(93, 197, 203, 0.14);
  --inset: 22px;
  --measure: 1180px;
  --measure-text: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--col);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11", "tnum" off;
}

/* ----------------------------------------------------------------- layout */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--inset);
}

section {
  margin-top: 5rem;
}

section.flush { margin-top: 2.4rem; }

.text {
  max-width: var(--measure-text);
}

.bleed { width: 100%; }

@media (max-width: 720px) {
  :root { --inset: 16px; }
  body { font-size: 15px; }
  section { margin-top: 3.4rem; }
}

/* ----------------------------------------------------------------- type */

h1, h2, h3 {
  font-family: "Inter Tight", "Inter", -apple-system, sans-serif;
  letter-spacing: -0.02em;
  color: var(--col);
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
}

h1 .accent { color: var(--accent); }

h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--col-fade);
  margin: 0 0 0.5rem 0;
}

p { margin: 0 0 0.85em 0; }
p + p { margin-top: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

a:hover { color: var(--accent-strong); }

code, pre, kbd, samp, .mono {
  font-family: "JetBrains Mono", "SF Mono", "Geist Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  font-feature-settings: "tnum";
}

kbd {
  display: inline-block;
  padding: 0 0.35em;
  border: 1px solid var(--rule-faint);
  border-radius: 3px;
  font-size: 0.78em;
  color: var(--col-soft);
  background: var(--bg-strong);
}

::selection {
  background: var(--highlight);
  color: var(--col);
}

/* ------------------------------------------------ title with bg video */

.title-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* CineScene-style hero: full-viewport, the video fills the whole screen
     (object-fit: cover, cropping is intentional), content centered on top. */
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 100svh;
  padding: clamp(2rem, 6vh, 5rem) var(--inset);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.title-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.8) brightness(0.85) contrast(1.02);
  pointer-events: none;
}

.title-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(10,11,13,0.42) 0%, rgba(10,11,13,0.30) 45%, rgba(10,11,13,0.46) 100%),
    linear-gradient(180deg, rgba(10,11,13,0.55) 0%, rgba(10,11,13,0.10) 30%, rgba(10,11,13,0.10) 65%, rgba(10,11,13,0.65) 100%);
  pointer-events: none;
}

.title-inner {
  position: relative;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-strong);
  border: 1px solid var(--accent);
  padding: 0.28em 0.75em;
  margin-bottom: 1.6rem;
  animation: title-fade 0.8s 0.05s ease-out backwards;
}
.title-eyebrow .dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.35); opacity: 1; }
}

/* ----- VideoWeave wordmark ----- */

.wordmark {
  font-family: "Inter Tight", "Inter", sans-serif;
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  line-height: 0.9;
  letter-spacing: -0.055em;
  user-select: none;
}

.wm-video,
.wm-weave {
  display: inline-block;
  font-size: clamp(4.4rem, 12vw, 11.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
  will-change: transform, opacity, filter;
}

.wm-video {
  color: #ededee;
}

.wm-weave {
  color: var(--accent-strong);
  font-weight: 800;
  font-style: italic;
  margin-left: 0.07em;
  text-shadow: 0 0 36px rgba(93, 197, 203, 0.35);
}

@keyframes wm-rise {
  0%   { opacity: 0; transform: translateY(0.55em); filter: blur(10px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.wm-video, .wm-weave {
  animation: wm-rise 1.0s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.wm-video { animation-delay: 0.05s; }
.wm-weave { animation-delay: 0.28s; }

@keyframes wm-weave-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%      { text-shadow: 0 0 36px rgba(93, 197, 203, 0.55), 0 0 4px rgba(93, 197, 203, 0.35); }
}
.wm-weave {
  animation:
    wm-rise 1.0s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.28s,
    wm-weave-glow 4.5s ease-in-out infinite 1.4s;
}

.title-sub {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.9rem);
  font-weight: 500;
  color: var(--col);
  margin: 0.85rem 0 0 0;
  max-width: 960px;
  letter-spacing: 0;
  animation: title-fade 0.9s 0.7s ease-out backwards;
}
.title-sub .hi {
  color: var(--accent);
  font-weight: 700;
  font-style: normal;
  font-size: 1.05em;
}
.title-sub .hi-g { color: #3f8fd6; }
.title-sub .hi-i { color: #5dc5cb; }
.title-sub .hi-m { color: #93e6e0; }
.title-sub .sep {
  color: var(--col-fade);
  margin: 0 0.55em;
  font-weight: 400;
}

.title-lede {
  margin-top: 1.4rem;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--col-soft);
  max-width: 600px;
  line-height: 1.6;
  animation: title-fade 0.9s 0.85s ease-out backwards;
}

.paper-authors {
  max-width: 900px;
  margin: 1.25rem 0 0 0;
  color: var(--col-soft);
  font-size: clamp(0.9rem, 1.4vw, 1.02rem);
  line-height: 1.65;
  animation: title-fade 0.9s 0.82s ease-out backwards;
}

.paper-affiliations {
  max-width: 860px;
  margin: 0.4rem 0 0 0;
  color: var(--col-fade);
  font-size: clamp(0.78rem, 1.1vw, 0.9rem);
  line-height: 1.6;
  animation: title-fade 0.9s 0.94s ease-out backwards;
}

@keyframes title-fade {
  from { opacity: 0; transform: translateY(0.4em); }
  to   { opacity: 1; transform: translateY(0); }
}

/* bouncing scroll-down arrow, CineScene-style */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  transform: translateX(-50%);
  width: 2.4em;
  height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--col);
  text-decoration: none;
  border: 1px solid rgba(237, 237, 238, 0.35);
  border-radius: 50%;
  opacity: 0.75;
  transition: opacity 0.25s ease, background 0.25s ease;
  animation: scroll-bounce 2s ease-in-out infinite;
}
.scroll-hint:hover {
  opacity: 1;
  background: rgba(237, 237, 238, 0.12);
}
@keyframes scroll-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .wm-video, .wm-weave, .title-eyebrow, .title-sub, .title-lede,
  .paper-authors, .paper-affiliations,
  .title-eyebrow .dot {
    animation: none !important;
  }
}

/* ----- teaser banner sits flush below the title hero ----- */

.teaser {
  margin: 0;
  padding: 0;
}
.teaser img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-strong);
}
.teaser figcaption {
  margin-top: 0.9rem;
  color: var(--col-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}
.teaser figcaption strong {
  color: var(--col);
  font-weight: 600;
}

/* --------------------------------------------------------- section heads */

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.55rem;
  margin-bottom: 1.1rem;
}

.sec-head .number {
  font-family: "JetBrains Mono", "Geist Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--col-fade);
}

.sec-head h2 { margin: 0; }

.section-text {
  max-width: var(--measure-text);
  color: var(--col-soft);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.abstract-text {
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ----------------------------------------------------------- results flow */

.results-stack {
  display: flex;
  flex-direction: column;
  gap: 3.3rem;
  margin-top: 2rem;
}

.result-block {
  padding-top: 1.15rem;
  border-top: 1px solid var(--rule-faint);
}

.result-heading {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.result-heading h3 {
  color: var(--col);
  letter-spacing: 0.04em;
  margin: 0;
}

.result-tag {
  flex: 0 0 auto;
  min-width: 4.5rem;
  font-family: "JetBrains Mono", "Geist Mono", monospace;
  font-size: 0.74rem;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.result-note {
  max-width: var(--measure-text);
  margin: 0 0 1rem 5.35rem;
  color: var(--col-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

.result-grid {
  margin-top: 1rem;
}

@media (max-width: 720px) {
  .results-stack {
    gap: 2.4rem;
    margin-top: 1.4rem;
  }

  .result-heading {
    display: block;
  }

  .result-tag {
    display: block;
    min-width: 0;
    margin-bottom: 0.45rem;
  }

  .result-note {
    margin-left: 0;
  }
}

/* ------------------------------------------------------------- video grid */

.long-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .long-grid,
  .feature-grid { grid-template-columns: 1fr; }
}

.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.tile video,
.tile img {
  width: 100%;
  min-width: 0;
  display: block;
  background: #000;
}

.tile .feature-geometry {
  margin-top: 6px;
}

.tile .meta {
  margin-top: 0.55rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--col-soft);
}

.tile .meta .id {
  font-family: "JetBrains Mono", "Geist Mono", monospace;
  color: var(--col-fade);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.tile .label {
  font-weight: 500;
  color: var(--col);
}

/* ------------------------------------------------------- comparison grid */

.compare-stack {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.cmp-group {
  min-width: 0;
}

.cmp-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule-faint);
}

.cmp-subhead span {
  font-family: "JetBrains Mono", "Geist Mono", monospace;
  font-size: 0.76rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cmp-subhead strong {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--col-fade);
}

.cmp {
  --cmp-cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cmp-cols), minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 28px;
}

/* each comparison video carries its own method caption */
.cmp-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  position: relative;
}

.cmp-cell .lbl {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--col-soft);
}
.cmp-cell.is-ours .lbl { color: var(--accent); }
.cmp-cell.is-gt   .lbl { color: var(--gt); }

.cmp-cell video {
  width: 100%;
  min-width: 0;
  display: block;
  background: #000;
  border-radius: 8px;
}
.cmp-cell.is-ours video { border: 2px solid var(--accent); }
.cmp-cell.is-gt   video { border: 2px solid var(--gt); }

/* ----- video wrapper: anchors the play button + spinner to the clip ----- */

.vwrap {
  position: relative;
  width: 100%;
  min-width: 0;
  line-height: 0;
}

/* play button overlay, shown until the clip is started */
.playbtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 11, 13, 0.55);
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.12s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.playbtn::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.playbtn:hover {
  background: rgba(10, 11, 13, 0.8);
  transform: translate(-50%, -50%) scale(1.08);
}
.vwrap.is-playing .playbtn { display: none; }

@media (max-width: 720px) {
  .playbtn { width: 40px; height: 40px; }
  .playbtn::before { border-width: 7px 0 7px 11px; }
}

/* loading spinner shown while a started clip is still buffering */
.vwrap.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(237, 237, 238, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .cmp { row-gap: 22px; column-gap: 3px; }
  .cmp-subhead {
    display: block;
  }
  .cmp-subhead strong {
    display: block;
    margin-top: 0.25rem;
  }
  .cmp-cell .lbl { font-size: 0.6rem; letter-spacing: 0.06em; }
}

/* --------------------------------------------------------------- figure */

.figure {
  margin: 0;
}

.figure img {
  width: 100%;
  display: block;
  background: var(--bg-strong);
}

.figure .figcap {
  font-size: 0.85rem;
  color: var(--col-soft);
  margin-top: 0.7rem;
  max-width: var(--measure-text);
}

.figure.frame img {
  border: 1px solid var(--rule-faint);
}

/* ---------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-feature-settings: "tnum";
}

table.results caption {
  caption-side: top;
  text-align: left;
  font-size: 0.84rem;
  color: var(--col-fade);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

table.results th, table.results td {
  text-align: right;
  padding: 0.42rem 0.55rem;
  white-space: nowrap;
  border: 0;
}

table.results th:first-child,
table.results td:first-child {
  text-align: left;
  font-family: inherit;
  font-feature-settings: normal;
}

table.results thead tr.toprule th { border-top: 2px solid var(--rule); }
table.results thead tr:last-child th { border-bottom: 1px solid var(--rule); }
table.results thead th { font-weight: 600; color: var(--col); }
table.results thead th[colspan] { font-weight: 500; color: var(--col-soft); }

table.results tbody tr.section-head td {
  font-style: normal;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--col-fade);
  padding: 0.85rem 0.55rem 0.25rem 0.55rem;
}

table.results tbody td { color: var(--col-soft); font-family: "JetBrains Mono", "Geist Mono", monospace; }
table.results tbody td:first-child { color: var(--col); font-family: "Inter", sans-serif; }

table.results tbody tr.our td { color: var(--col); font-weight: 600; }
table.results tbody tr.our td:first-child { color: var(--accent); }
table.results tbody tr.our td:first-child::before {
  content: "▍ ";
  color: var(--accent);
}

table.results tbody tr:last-child td { border-bottom: 2px solid var(--rule); }

.metric-best { font-weight: 700; color: var(--col); }
.metric-second { font-style: italic; }

/* --------------------------------------------------------------- divider */

hr.spacer {
  border: 0;
  border-top: 1px solid var(--rule-faint);
  margin: 4rem 0 0 0;
}

/* ---------------------------------------------------------------- footer */

.foot {
  margin: 5rem 0 2.6rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--col-fade);
  border-top: 1px solid var(--rule-faint);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.foot .mono { letter-spacing: 0; text-transform: none; font-size: 0.78rem; }

img, video { -webkit-user-drag: none; user-select: none; }
