/* ════════════════════════════════════════════════════════════
   ZipDepth — ECCV 2026
   Design system
   ─────────────────────────────────────────────────────────────
   Subject-grounded direction: the page borrows the visual language
   of the method's own output — the inferno/magma depth colormap —
   used in exactly one signature place (the hero accent ramp), over
   a quiet near-white "instrument panel" surface. Type is engineered,
   not editorial: Space Grotesk display + Inter body + IBM Plex Mono
   for every measured number, because this is a paper about latency,
   joules and FPS — data deserves a monospaced grid.
   ════════════════════════════════════════════════════════════ */

:root {
  /* Surface — clean, barely-warm white. Deliberately NOT cream:
     committed neutral instead of boutique. */
  --paper:    #FBFBF9;
  --surface:  #FFFFFF;
  --soft:     #F3F2EE;
  --ink:      #15140F;
  --muted:    #6C6A63;
  --faint:    #A6A49C;
  --line:     rgba(21, 20, 15, 0.09);
  --line-2:   rgba(21, 20, 15, 0.16);

  /* Accent — hot end of the depth colormap. Deeper/redder than a
     highway amber so it reads as heat/energy, not signage. */
  --accent:        #C7491A;
  --accent-bright: #E86A1E;
  --accent-soft:   rgba(199, 73, 26, 0.10);

  /* Depth ramp — the signature gradient, used sparingly. */
  --ramp: linear-gradient(90deg,
            #1A0A2E 0%, #5C1A6B 22%, #A52D5C 44%,
            #DD4E33 66%, #F1851A 84%, #F4C13A 100%);

  /* Dark surfaces */
  --void:        #0B0A08;
  --void-card:   #141310;
  --void-line:   rgba(255, 255, 255, 0.09);
  --void-text:   #F4F3EF;
  --void-muted:  #8C8A82;

  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'cv05' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }

::selection { background: var(--accent-soft); color: var(--accent); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Shared display-type role */
.display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ── NAV ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 251, 249, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 2rem;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.03em;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.nav-mark::before {
  content: ""; width: 22px; height: 8px; border-radius: 4px;
  background: var(--ramp);
}
.nav-links { display: flex; gap: 1.9rem; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 0.85rem; font-weight: 600; color: var(--surface);
  padding: 0.45rem 0.95rem; border-radius: var(--r-sm);
  background: var(--ink); transition: background 0.2s var(--ease);
}
.nav-cta:hover { background: var(--accent); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ── HERO ────────────────────────────────────────────── */
.hero { padding: 7rem 1.5rem 3rem; }
.hero-inner { max-width: 820px; margin: 0 auto; text-align: center; }

.hero-brand {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  justify-content: center; gap: 0.85rem; margin-bottom: 1.75rem;
}
.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 3.7rem; letter-spacing: -0.035em; color: var(--ink);
}
.hero-venue {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem; font-weight: 600; letter-spacing: 0.04em; color: #FFF;
  background: var(--ink); padding: 0.42rem 1rem; border-radius: 100px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.04; letter-spacing: -0.035em;
  margin-bottom: 1.75rem;
}
/* Signature: the accent word carries the depth colormap beneath it */
.hero-title .accent { position: relative; white-space: nowrap; color: var(--ink); padding-bottom: 0.16em; }
.hero-title .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.13em; border-radius: 3px; background: var(--ramp);
}

.hero-sub {
  font-size: 1.2rem; font-weight: 400; color: var(--muted);
  max-width: 600px; margin: 0 auto 2.75rem; line-height: 1.5; letter-spacing: -0.005em;
}

.authors { font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.authors a { border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.authors a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.authors .sep { margin: 0 0.45rem; color: var(--faint); font-weight: 300; }
.affiliation { font-size: 1.3rem; color: var(--muted); margin-top: 0.55rem; }

.cta-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin: 3rem 0 1rem;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.88rem; font-weight: 500;
  padding: 0.6rem 1.15rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--muted); background: var(--surface);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn .i { width: 16px; height: 16px; opacity: 0.75; }
.btn:hover { border-color: var(--line-2); color: var(--ink); }

.btn-disabled { color: var(--faint); background: transparent; border-style: dashed; cursor: not-allowed; }
.btn-disabled:hover { color: var(--faint); border-color: var(--line); }

.btn-live { background: var(--ink); border-color: var(--ink); color: #FFF; font-weight: 600; }
.btn-live:hover { background: var(--accent); border-color: var(--accent); color: #FFF; }

.cta-note { font-size: 0.8rem; color: var(--faint); margin-top: 0.4rem; }

/* ── FIGURE BLOCKS / PLACEHOLDERS ───────────────────── */
.figure-block { max-width: 1060px; margin: 0 auto 4.5rem; padding: 0 1.5rem; }

.ph {
  width: 100%; border-radius: var(--r-lg);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(21,20,15,0.015) 11px 12px),
    var(--soft);
  border: 1px solid var(--line);
  position: relative; display: flex; align-items: flex-end; padding: 1.1rem;
  overflow: hidden;
}
.ph-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
  background: rgba(255,255,255,0.85); backdrop-filter: blur(6px);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: var(--r-sm); z-index: 2;
}

.ph[data-ratio="2.4"] { aspect-ratio: 2.4; }
.ph[data-ratio="1.8"] { aspect-ratio: 1.8; }
.ph[data-ratio="1.9"] { aspect-ratio: 1.9; }
.ph[data-ratio="2.6"] { aspect-ratio: 2.6; }
.ph[data-ratio="2.1"] { aspect-ratio: 2.1; }
.ph[data-ratio="3.2"] { aspect-ratio: 3.2; }
.ph[data-ratio="1.1"] { aspect-ratio: 1.1; }
@media (max-width: 760px) { .ph { aspect-ratio: 1.5 !important; } }

.figure-caption {
  font-size: 0.92rem; color: var(--muted);
  max-width: 680px; margin: 1.4rem auto 0; text-align: center; line-height: 1.55;
}
.figure-caption strong { color: var(--ink); font-weight: 600; }

/* ── SPEC SHEET (one strip, hairline-divided — datasheet, not widgets) ── */
.spec-strip {
  max-width: 1060px; margin: 4rem auto; padding: 0 1.5rem;
}
.spec-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.spec {
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column;
  justify-content: space-between; gap: 0.9rem;
  border-right: 1px solid var(--line);
}
.spec:last-child { border-right: none; }
.spec-key {
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.spec-val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500; font-size: 1.7rem; letter-spacing: -0.02em; color: var(--ink);
  display: flex; align-items: baseline; gap: 0.32rem;
}
.spec-val .unit { font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
@media (max-width: 920px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .spec:nth-child(3) { border-right: none; }
  .spec:nth-child(1), .spec:nth-child(2), .spec:nth-child(3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .spec { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .spec:nth-child(even) { border-right: none; }
  .spec:nth-last-child(-n+2):nth-child(odd) { border-bottom: none; }
  .spec:last-child { border-bottom: none; }
}

/* ── PROSE ───────────────────────────────────────────── */
.prose-section { padding: 6.5rem 1.5rem; }
.alt-bg { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.prose-inner { max-width: 660px; margin: 0 auto; }
.prose-inner--wide { max-width: 880px; }

.kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 1.1rem; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--accent); border-radius: 2px; }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.18; letter-spacing: -0.03em; margin-bottom: 1.8rem; color: var(--ink);
}
.sub-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em;
  margin: 3.25rem 0 1.4rem; color: var(--ink);
}
.lede {
  font-size: 1.28rem; font-weight: 400; color: var(--ink);
  line-height: 1.5; letter-spacing: -0.012em; margin-bottom: 1.8rem;
}
.prose-section p { color: var(--muted); margin-bottom: 1.4rem; font-size: 1.05rem; }
.prose-section p:last-child { margin-bottom: 0; }
.prose-section strong { color: var(--ink); font-weight: 600; }

/* ── METHOD CARDS (forward-pass order: encoder → decoder → upsampler) ── */
.method-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 3.25rem 0;
}
.method-card {
  background: var(--surface); padding: 1.9rem 1.6rem;
  border-radius: var(--r-md); border: 1px solid var(--line);
}
.method-stage {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; color: var(--accent);
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
}
.method-stage span { color: var(--faint); }
.method-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em;
  margin-bottom: 0.7rem; color: var(--ink);
}
.method-card p { font-size: 0.95rem; color: var(--muted); margin: 0; line-height: 1.55; }
@media (max-width: 760px) { .method-grid { grid-template-columns: 1fr; gap: 1rem; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.8rem; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ── DARK SECTIONS ───────────────────────────────────── */
.dark-section { background: var(--void); color: var(--void-text); padding: 7rem 1.5rem; }
.dark-inner { max-width: 880px; margin: 0 auto; }
.kicker--light { color: var(--accent-bright); }
.kicker--light::before { background: var(--accent-bright); }
.section-title--light { color: #FFF; }
.dark-lede { font-size: 1.08rem; color: var(--void-muted); max-width: 100%; margin-bottom: 3.25rem; }

.ph--dark {
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,0.012) 11px 12px),
    var(--void-card);
  border-color: var(--void-line);
}
.ph-tag--dark { background: rgba(11,10,8,0.75); border-color: var(--void-line); color: var(--void-muted); }
.dark-caption { font-size: 0.9rem; color: var(--void-muted); margin-top: 1.4rem; text-align: center; }
.dark-caption strong { color: var(--void-text); font-weight: 600; }

/* Stats */
.stat-strip {
  display: flex; flex-wrap: wrap; gap: 9.5rem;
  margin-top: 3.5rem; padding-top: 2.75rem; border-top: 1px solid var(--void-line);
}
.stat { display: flex; flex-direction: column; gap: 0.5rem; }
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 2.4rem; letter-spacing: -0.03em; color: var(--accent-bright); line-height: 1;
}
.stat-num small { font-size: 1.15rem; font-weight: 500; color: var(--void-muted); margin-left: 0.1rem; }
.stat-lbl { font-size: 0.88rem; color: var(--void-muted); max-width: 190px; line-height: 1.45; }

/* ── DATASHEET TABLE ─────────────────────────────────── */
.datasheet {
  width: 100%; margin-top: 3.25rem; border-radius: var(--r-md);
  border: 1px solid var(--void-line); background: var(--void-card);
  overflow: hidden; font-family: 'IBM Plex Mono', monospace; font-size: 0.84rem;
}
.ds-row {
  display: grid; grid-template-columns: 1.8fr 0.7fr 1.6fr 0.9fr 0.8fr 0.8fr;
  gap: 1rem; padding: 0.95rem 1.4rem; border-bottom: 1px solid var(--void-line); align-items: center;
}
.ds-row:last-child { border-bottom: none; }
.ds-row--head {
  background: rgba(255,255,255,0.02);
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--void-muted);
}
.ds-row:not(.ds-row--head):hover { background: rgba(255,255,255,0.025); }
.ds-row:not(.ds-row--head) span:first-child {
  font-family: 'Inter', sans-serif; font-weight: 600; color: var(--void-text);
}
.ds-fps { color: var(--accent-bright); font-weight: 600; }
.ds-footnote { font-size: 0.85rem; color: var(--void-muted); margin-top: 1.4rem; line-height: 1.55; }
@media (max-width: 820px) {
  .ds-row { grid-template-columns: 1.6fr 1fr; padding: 0.9rem 1.1rem; }
  .ds-row span:nth-child(2), .ds-row span:nth-child(3),
  .ds-row span:nth-child(4), .ds-row span:nth-child(6) { display: none; }
}

/* ── BIBTEX ──────────────────────────────────────────── */
.bibtex {
  background: var(--void-card); color: #E9E8E2;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.84rem; line-height: 1.6;
  padding: 1.6rem 1.75rem; border-radius: var(--r-md); border: 1px solid var(--void-line);
  overflow-x: auto;
}

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  text-align: center; padding: 4.5rem 1.5rem 5.5rem;
  font-size: 0.88rem; font-weight: 500; color: var(--faint);
  border-top: 1px solid var(--line);
}
.footer .ramp-rule {
  width: 60px; height: 4px; border-radius: 3px; background: var(--ramp);
  margin: 0 auto 1.75rem;
}

/* ── ON-DEVICE VIDEO FRAME ───────────────────────────── */
.video-figure { display: flex; justify-content: center; }
.media-frame {
  display: inline-block; max-width: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--void);
  box-shadow: 0 24px 64px rgba(21, 20, 15, 0.12);
}
.media-frame video {
  display: block; max-height: 600px; max-width: 100%;
  width: auto; height: auto; margin: 0 auto;
}

/* ── RGB ↔ DEPTH CURTAIN (draggable reveal) ──────────── */
.curtain {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  --pos: 50%;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: #000;
  cursor: ew-resize; user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.curtain img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; -webkit-user-drag: none;
}
.curtain .layer-depth { z-index: 1; }
.curtain .layer-rgb {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.curtain-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; transform: translateX(-1px); background: #fff;
  box-shadow: 0 0 0 1px rgba(21, 20, 15, 0.18), 0 0 14px rgba(0, 0, 0, 0.3);
  z-index: 5; pointer-events: none;
}
.curtain-handle {
  position: absolute; top: 50%; left: var(--pos);
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(21, 20, 15, 0.06);
  z-index: 6; pointer-events: none; display: grid; place-items: center;
}
.curtain-handle::before {
  content: "\25C0\2002\25B6"; font-size: 11px; color: var(--accent); letter-spacing: -1px;
}
.curtain-tag {
  position: absolute; top: 14px; z-index: 7; pointer-events: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: rgba(11, 10, 8, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px; border-radius: var(--r-sm);
}
.curtain-tag.is-left  { left: 14px; }
.curtain-tag.is-right { right: 14px; }
.curtain:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── QUALITATIVE GRID (several curtains visible at once) ── */
.curtain-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem;
}
@media (max-width: 640px) { .curtain-grid { grid-template-columns: 1fr; } }

/* ── CITATION COPY BUTTON ────────────────────────────── */
.cite-box { position: relative; }
.cite-copy {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600;
  color: var(--void-muted); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--void-line); border-radius: var(--r-sm);
  padding: 0.35rem 0.6rem; cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cite-copy:hover { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.cite-copy svg { width: 14px; height: 14px; }
.cite-copy.is-done { color: var(--accent-bright); border-color: var(--accent-bright); }
.cite-copy:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }


.ph--image {
  height: auto !important;
  aspect-ratio: auto !important;
  display: block !important;
  padding: 0 !important;
}
