/* ============================================================
   SOFTMAP — Project Page Stylesheet
   Clean academic research style
   ============================================================ */

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  font-family: 'Noto Sans', sans-serif;
}

/* ---------- Hero Background Video ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  width: 100%;
  background: #000;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

/* demo1 — top section, change vh to resize */
.hero-vid-top {
  flex: 0 0 20vh;   /* ← change 20vh to control demo1 height */
  width: 100%;
  object-fit: contain;
  background: #000;
}

/* bottom row wrapper */
.hero-vid-bottom-row {
  flex: 1;           /* fills remaining height */
  display: flex;
  gap: 3px;
}

/* demo2 & demo3 */
.hero-vid-bottom-row video {
  flex: 1;
  min-width: 0;
  object-fit: contain;
  background: #000;
}

/* Bottom-only gradient: video stays vivid at top, darkens toward text */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent        0%,
    transparent       40%,
    rgba(0,0,0,0.50)  75%,
    rgba(0,0,0,0.82) 100%
  );
  z-index: 1;
}

/* Content sits at the bottom of the full-height hero */
.hero .hero-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 2;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

/* Text colours inside the hero — white on dark gradient */
.hero .title,
.hero .subtitle {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 2px rgba(0,0,0,0.9);
}

.hero .conference-authors a { color: #ff7070 !important; }

.hero .publication-authors { color: rgba(255,255,255,0.90); }

.hero .author-block {
  color: rgba(255,255,255,0.90);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.hero .publication-authors a { color: #90c4ff !important; }

.hero .is-size-5 {
  color: rgba(255,255,255,0.88) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.hero .is-size-6 {
  color: rgba(255,255,255,0.78) !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Scroll-down indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,0.6);
  font-size: 1.6rem;
  animation: bounce 2s infinite;
  cursor: default;
  user-select: none;
}

@keyframes bounce {
  0%,  100% { transform: translateX(-50%) translateY(0);    opacity: 0.6; }
  50%        { transform: translateX(-50%) translateY(8px);  opacity: 1.0; }
}

.publication-title {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

/* ---------- Figure Placeholders ---------- */
.figure-placeholder {
  background: #f9f9f9;
  border: 2px dashed #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  color: #bbb;
}
.figure-placeholder.wide {
  padding: 50px 30px;
}
.figure-placeholder.small {
  padding: 40px 20px;
}

/* ---------- Video Placeholders ---------- */
.video-placeholder {
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  border: 2px dashed #444;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
}
.video-placeholder i {
  font-size: 2.5rem;
  margin-bottom: 8px;
  opacity: 0.7;
}
.video-placeholder p {
  font-size: 0.9rem;
  font-weight: 500;
}

.figure-placeholder i {
  font-size: 2rem;
  margin-bottom: 8px;
}
.figure-placeholder p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Demo Placeholder ---------- */
.demo-placeholder-box {
  background: #fafafa;
  border: 2px dashed #ddd;
  border-radius: 10px;
  padding: 60px 30px;
  text-align: center;
}

/* ---------- Interactive Demo Viewer ---------- */
.demo-viewer-container {
  border-radius: 12px;
  overflow: hidden;
}

/* Canvas wrapper — positions the HUD overlays */
.demo-canvas-wrap {
  position: relative;
  width: 100%;
  height: 520px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  cursor: grab;
}
.demo-canvas-wrap:active { cursor: grabbing; }
.demo-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Click-to-activate overlay ---------- */
.demo-activate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.5);
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.3s;
}
.demo-activate-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.demo-activate-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(0,0,0,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  color: #333;
  font-size: 0.95rem;
  font-weight: 500;
}
.demo-activate-prompt i { font-size: 1.2rem; }

/* ---------- HUD shared ---------- */
.demo-hud {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  color: rgba(0,0,0,0.6);
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

.demo-hud-top-left {
  top: 12px; left: 14px;
}
.demo-hud-top-right {
  top: 12px; right: 14px;
}
.demo-hud-bottom-left {
  bottom: 14px; left: 14px;
}
.demo-hud-bottom-right {
  bottom: 14px; right: 14px;
}
.demo-hud-bottom-center {
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

/* Status line */
.demo-hud-status {
  background: rgba(0,0,0,0.06);
  padding: 4px 10px;
  border-radius: 5px;
  white-space: nowrap;
  color: rgba(0,0,0,0.55);
}

/* Mouse hint */
.demo-hint-text {
  background: rgba(0,0,0,0.06);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  color: rgba(0,0,0,0.4);
}

/* ---------- HUD Key Indicators ---------- */
.demo-hud-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.4);
  margin-bottom: 3px;
}

.demo-key-grid {
  display: grid;
  grid-template-columns: 30px 30px;
  grid-template-rows: 26px 26px;
  gap: 3px;
}
/* Re-arrange into cross: top-center, left, right, bottom-center */
.demo-key-grid .demo-key:nth-child(1) { grid-column: 1 / 3; justify-self: center; }
.demo-key-grid .demo-key:nth-child(2) { grid-column: 1; }
.demo-key-grid .demo-key:nth-child(3) { grid-column: 2; }
.demo-key-grid .demo-key:nth-child(4) { grid-column: 1 / 3; justify-self: center; }

.demo-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 5px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(0,0,0,0.55);
  transition: background 0.1s, color 0.1s, transform 0.08s;
}
.demo-key.is-pressed {
  background: rgba(51,199,127,0.35);
  color: #1a7a45;
  border-color: rgba(51,199,127,0.6);
  transform: scale(0.92);
}

.demo-key-wide {
  min-width: 42px;
}

.demo-key-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.demo-key-desc {
  font-size: 0.65rem;
  color: rgba(0,0,0,0.4);
}

/* ---------- HUD Servo Sliders ---------- */
.demo-servo-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
}
.demo-servo-val {
  font-size: 0.68rem;
  color: #1a7a45;
  min-width: 40px;
  text-align: right;
}
.demo-servo-sep {
  width: 1px;
  height: 14px;
  background: rgba(0,0,0,0.12);
  margin: 0 4px;
}
.demo-servo-slider {
  width: 100px;
  height: 4px;
  cursor: pointer;
  accent-color: #2a9d5c;
}

@media (max-width: 600px) {
  .demo-canvas-wrap { height: 380px; }
  .demo-hud-bottom-left,
  .demo-hud-bottom-right { display: none; }
  .demo-servo-slider { width: 70px; }
}

/* ---------- Copy BibTeX Button ---------- */
.copy-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  color: hsl(204, 86%, 53%);
}
