/* ============================================================
   PanoWorld – Official Website Stylesheet
   Premium Apple-inspired design with liquid glass effects
   ============================================================ */

/* ---------- Reset & Custom Properties ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #eef4f9;
  --mid-gray: #6b7c8a;
  --dark-gray: #1a2836;
  --black: #000000;

  --pano-sky: #eef4f9;
  --pano-sky-mid: #dceaf4;
  --pano-horizon: #f5f3ef;
  --pano-dark: #1a2836;
  --pano-dark-deep: #152028;

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.42) 0%, rgba(236,244,250,0.22) 100%);
  --glass-border: rgba(255,255,255,0.55);
  --glass-shadow-inset: inset 1px 1px 1px rgba(255,255,255,0.6), inset -1px -1px 0px rgba(255,255,255,0.15);
  --glass-shadow-outer: 0 2px 12px rgba(26,40,54,0.06);

  --glass-bg-dark: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%);
  --glass-border-dark: rgba(255,255,255,0.18);

  --accent-sky: rgba(88, 150, 190, 0.18);
  --nav-height: 72px;
  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1280px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
  /* Reserve scrollbar width so layout doesn’t shift / look asymmetric when vertical scroll appears (classic scrollbars). */
  scrollbar-gutter: stable;
}

body {
  font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark-gray);
  background: var(--white);
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

/* A-Frame toggles a-html; keep horizontal overflow clipped (embedded canvases / injected styles). */
html.a-html {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a-scene {
  max-width: 100%;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Glass Button (Liquid Glass) ---------- */
.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--glass-border);
  color: var(--dark-gray);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.35s var(--transition-smooth);
  overflow: hidden;
  box-shadow: var(--glass-shadow-inset), var(--glass-shadow-outer);
  z-index: 1;
}

.glass-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  background: radial-gradient(
    120px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.55) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: -1;
}

.glass-btn:hover::before {
  opacity: 1;
}

.glass-btn:hover {
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.7),
    inset -1px -1px 1px rgba(255,255,255,0.2),
    0 4px 24px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.glass-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Nav Bar (floating pill) ---------- */
#navbar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none;
  transition: top 0.4s var(--transition-smooth);
}

#navbar.scrolled {
  top: 10px;
}

.nav-float {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.nav-logo-circle {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.5),
    inset -1px -1px 1px rgba(255,255,255,0.1),
    0 2px 12px rgba(0,0,0,0.07);
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}

.nav-logo-circle:hover {
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.6),
    inset -1px -1px 1px rgba(255,255,255,0.15),
    0 4px 20px rgba(0,0,0,0.1);
}

.nav-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 0;
}

.nav-pill {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 2px 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.45),
    inset -1px -1px 1px rgba(255,255,255,0.08),
    0 2px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled .nav-pill {
  background: rgba(255,255,255,0.48);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.5),
    inset -1px -1px 1px rgba(255,255,255,0.1),
    0 4px 24px rgba(0,0,0,0.08);
}

#navbar.scrolled .nav-logo-circle {
  background: rgba(255,255,255,0.48);
}

.nav-pill-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  background: radial-gradient(
    200px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(255,255,255,0.55) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.nav-pill:hover .nav-pill-glow {
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 1;
  align-items: center;
  height: 100%;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(30,30,30,0.55);
  transition: color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  letter-spacing: 0.15px;
  white-space: nowrap;
  padding: 0 14px;
  border-radius: 999px;
  height: calc(100% );
  display: flex;
  align-items: center;
}

.nav-links a:hover {
  color: var(--dark-gray);
}

.nav-links a.active {
  background: #ffffff;
  color: var(--dark-gray);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

#mobile-menu-toggle {
  display: none;
  padding: 6px 10px;
  font-size: 15px;
  color: var(--dark-gray);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 400px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  padding: 20px 24px;
  flex-direction: column;
  gap: 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
  pointer-events: auto;
  z-index: 1000;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-gray);
  padding: 6px 0;
}

.mobile-menu-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ---------- Hero / Banner ---------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pano-sky) 0%, var(--white) 46%, var(--pano-horizon) 100%);
}

#ripple-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  padding: 0 40px;
  padding-top: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 60px;
  min-height: 100vh;
  min-width: 0;
  box-sizing: border-box;
}

.hero-left {
  flex: 1;
  max-width: 600px;
  text-align: center;
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}

.hero-left.faded {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(40px);
}

.hero-title {
  margin-bottom: 28px;
  text-align: center;
}

.hero-venue {
  display: block;
  font-family: "Google Sans", sans-serif;
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 400;
  color: var(--mid-gray);
  letter-spacing: 0.3em;
  margin-bottom: 12px;
}

.hero-title-main {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--dark-gray);
  margin-bottom: 16px;
}

.hero-title-sub {
  display: block;
  font-family: "Google Sans", sans-serif;
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 400;
  color: var(--mid-gray);
  line-height: 1.5;
  letter-spacing: 0.2px;
  text-align: center;
}

.hero-authors {
  font-size: 14px;
  color: var(--dark-gray);
  margin-bottom: 6px;
  font-weight: 500;
}

.hero-authors-row {
  display: block;
  line-height: 1.65;
}

.hero-authors-row + .hero-authors-row {
  margin-top: 4px;
}

@media (min-width: 900px) {
  .hero-authors-row {
    white-space: nowrap;
  }
}

.hero-authors a {
  color: var(--dark-gray);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.hero-authors a:hover {
  border-bottom-color: var(--mid-gray);
}

.hero-authors sup {
  font-size: 10px;
  color: var(--mid-gray);
}

.hero-authors .hero-corr {
  font-size: 11px;
  margin-left: 2px;
  color: var(--mid-gray);
  vertical-align: super;
}

.hero-affiliations {
  font-size: 13px;
  color: var(--mid-gray);
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-btn {
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--dark-gray);
}

.glass-btn.is-coming-soon {
  cursor: default;
  opacity: 0.72;
  pointer-events: none;
}

.glass-btn.is-coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.glass-btn.is-coming-soon::before {
  display: none;
}

.hero-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-right.faded {
  opacity: 0;
  transform: translateX(80px) scale(0.85);
}

#sphere-container {
  width: 100%;
  height: 600px;
  position: relative;
}

#sphere-container canvas {
  cursor: default;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--mid-gray);
  font-size: 13px;
  animation: scrollBounce 2s ease infinite;
  z-index: 2;
  transition: opacity 0.4s ease;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Pano Modal ---------- */
.pano-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--transition-smooth);
  overflow: hidden;
}

.pano-modal.open {
  pointer-events: auto;
  opacity: 1;
}

.pano-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

.pano-modal-content {
  position: relative;
  width: 72vw;
  height: calc(72vw * 9 / 16);
  max-width: 1100px;
  max-height: calc(1100px * 9 / 16);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.3);
  transform: scale(0.82) translateY(20px);
  transition: transform 0.6s var(--transition-spring);
  mask-image: radial-gradient(ellipse 100% 100% at center, black 72%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at center, black 72%, transparent 100%);
}

.pano-modal.open .pano-modal-content {
  transform: scale(1) translateY(0);
}

.pano-modal-content a-scene,
.pano-modal-content a-scene canvas,
.pano-modal-content a-scene .a-canvas {
  width: 100% !important;
  height: 100% !important;
}

.pano-drag-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(16px);
  color: white;
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease;
}

.pano-drag-hint.hidden {
  opacity: 0;
}

.pano-drag-hint i {
  font-size: 20px;
  animation: dragWave 1.5s ease infinite;
}

@keyframes dragWave {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.pano-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2001;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 20px;
  color: white;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow:
    inset 1px 1px 1px rgba(255,255,255,0.25),
    0 4px 20px rgba(0,0,0,0.2);
}

.pano-close-btn:hover {
  background: rgba(255,255,255,0.22);
}

/* ---------- Section Commons ---------- */
.section {
  padding: 56px 0 88px;
  position: relative;
}

.section-dark {
  background: linear-gradient(180deg, var(--pano-dark) 0%, var(--pano-dark-deep) 100%);
}

.section-alt {
  background: var(--pano-sky);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -1px;
  color: var(--dark-gray);
}

.section-title.light {
  color: var(--white);
}

.section-subtitle {
  text-align: center;
  font-size: 17px;
  color: var(--mid-gray);
  max-width: 700px;
  margin: 0 auto 56px;
  line-height: 1.7;
}

.section-subtitle.light {
  color: rgba(255,255,255,0.55);
}

/* ---------- Studio ---------- */
.studio-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  min-width: 0;
}

.studio-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
}

.studio-tab {
  text-align: left;
  justify-content: flex-start;
  padding: 18px 24px;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(135deg, rgba(245,245,247,0.8) 0%, rgba(255,255,255,0.5) 100%);
  color: var(--mid-gray);
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
  box-shadow:
    inset 1px 1px 1px rgba(255,255,255,0.6),
    inset -1px -1px 0px rgba(255,255,255,0.15),
    0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-tab:hover {
  transform: none;
}

.studio-tab.active {
  color: var(--dark-gray);
  border-color: rgba(0,0,0,0.1);
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.65) 100%);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.8),
    inset -1px -1px 1px rgba(255,255,255,0.2),
    0 4px 20px rgba(0,0,0,0.07);
}

.studio-tab i {
  font-size: 16px;
  width: 20px;
  text-align: left;
  flex-shrink: 0;
}

.studio-cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px 24px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(145deg, #c5dce8, #b0cddc);
  border: none;
  color: #4a3d7a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.35s ease;
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    6px 6px 14px rgba(147, 130, 220, 0.3),
    -6px -6px 14px rgba(255, 255, 255, 0.8);
}

.studio-cta-btn i {
  font-size: 16px;
  width: 20px;
  text-align: left;
  flex-shrink: 0;
}

.studio-cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 999px;
  background: radial-gradient(
    120px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.45) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.studio-cta-btn:hover::before {
  opacity: 1;
}

.studio-cta-btn:hover {
  box-shadow:
    8px 8px 18px rgba(147, 130, 220, 0.35),
    -8px -8px 18px rgba(255, 255, 255, 0.9);
}

.studio-cta-btn:active {
  box-shadow:
    inset 4px 4px 10px rgba(147, 130, 220, 0.3),
    inset -4px -4px 10px rgba(255, 255, 255, 0.7);
}

.studio-video-wrapper {
  flex: 1;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--black);
  box-shadow: 0 16px 56px rgba(0,0,0,0.12);
}

.studio-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.studio-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.studio-video.active {
  opacity: 1;
}

/* ---------- Overview ---------- */
.overview-layout {
  display: flex;
  gap: 60px;
  align-items: center;
  min-width: 0;
}

.overview-layout--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 36px;
}

.overview-layout--stacked .overview-text {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
}

.overview-layout--stacked .overview-image {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.overview-text {
  flex: 1;
  min-width: 0;
}

.overview-text h3 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--dark-gray);
}

.overview-text p {
  margin-bottom: 16px;
  color: #444;
  font-size: 15px;
  line-height: 1.8;
}

.overview-image {
  flex: 1;
  min-width: 0;
}

.overview-image-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 4px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.08);
  overflow: hidden;
}

.overview-image-card img {
  border-radius: 14px;
  width: 100%;
  display: block;
}

/* ---------- Stage Results (Preview / Refine) – Flat ERP Video ---------- */
.stage-vr-hint {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 14px;
}

.stage-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.stage-video-container {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 16px;
}

.stage-video-wrap {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.stage-pano-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.stage-open-vr {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  pointer-events: none;
}

.stage-open-vr i {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  padding: 8px 10px;
}

.stage-trajectory-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  max-width: 100%;
}

.stage-pill {
  cursor: pointer;
  padding: 5px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  line-height: 0;
}

.stage-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.stage-pill.active {
  background: rgba(197, 226, 255, 0.25);
  border-color: rgba(197, 226, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(197, 226, 255, 0.35);
}

.stage-thumbnail-img {
  display: block;
  width: 64px;
  height: auto;
  border-radius: 3px;
}

.stage-gallery .trajectory-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: capitalize;
}

/* ---------- Method ---------- */
.method-stack {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.method-image {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 32px 36px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

.method-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.method-description {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.method-description p {
  font-size: 15px;
  color: var(--mid-gray);
  line-height: 1.8;
}

/* ---------- Loop Consistency ---------- */
.loop-section {
  margin-bottom: 64px;
}

.loop-section:last-child {
  margin-bottom: 0;
}

.loop-subtitle {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-gray);
}

/* Same content width as .loop-result-image below (full section-container width) */
.loop-section > p:not(.caption) {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.loop-result-image {
  width: 100%;
  max-width: none;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.06);
  box-sizing: border-box;
}

.loop-result-image img {
  display: block;
  width: 100%;
  height: auto;
}

.caption {
  font-size: 13px;
  color: var(--mid-gray);
  text-align: center;
  margin-top: 12px;
  font-style: italic;
}

.comparison-grid {
  display: flex;
  gap: 48px;
}

.comparison-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.comparison-row {
  width: 100%;
}

.section-dark .comparison-label {
  color: rgba(255, 255, 255, 0.78);
}

.section-dark .comparison-video-wrapper {
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.comparison-pano-video {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  display: block;
  background: #000;
}

.comparison-pair {
  flex: 1;
}

.comparison-pair h4 {
  font-family: "Google Sans", sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-gray);
  text-align: center;
}

.comparison-videos {
  display: flex;
  gap: 20px;
}

.comparison-video-item {
  flex: 1;
}

.comparison-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--mid-gray);
  margin-bottom: 10px;
  text-align: center;
}

.comparison-video-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.08);
  background: var(--black);
}

.comparison-video-wrapper video {
  width: 100%;
  display: block;
}

/* Perspective vs. Ours — Ours: inline A-Frame ERP view in fixed 16:9 */
.comparison-perspective-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  background: #000;
  overflow: hidden;
}

.comparison-perspective-embed .comparison-inline-pano-scene,
.comparison-perspective-embed a-scene {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.comparison-perspective-embed a-scene canvas,
.comparison-perspective-embed a-scene .a-canvas {
  width: 100% !important;
  height: 100% !important;
}

.perspective-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 13px;
  color: white;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  z-index: 3;
}

.comparison-method-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 14px;
  max-width: 100%;
}

.comparison-method-pill {
  cursor: pointer;
  padding: 8px 14px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.comparison-method-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.comparison-method-pill.active {
  background: rgba(197, 226, 255, 0.25);
  border-color: rgba(197, 226, 255, 0.65);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(197, 226, 255, 0.35);
}

/* ---------- Quantitative Results ---------- */
.tables-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.table-item {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.05);
  background: white;
  padding: 28px;
  box-sizing: border-box;
}

.table-item img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.memory-table-grid {
  margin-top: 48px;
}

/* ---------- Extensions ---------- */
.extension-item {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 80px;
}

.extension-item:last-child {
  margin-bottom: 0;
}

.extension-item.reverse {
  flex-direction: row-reverse;
}

.extension-text {
  flex: 1;
}

.extension-text h3 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-gray);
}

.extension-text p {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
}

.extension-image {
  flex: none;
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  padding: 4px 4px 0;
  box-sizing: border-box;
  overflow: hidden;
}

.extension-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.extension-image .caption {
  margin: 12px 4px 0;
  padding: 0 8px 16px;
  text-align: center;
}

/* ---------- Citation ---------- */
.citation-block {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  background: white;
  border-radius: 18px;
  padding: 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Full-width image after Citation — fixed horizontal inset; width fixed to (100% − 2×inset). If intrinsic height at that width exceeds one viewport, crop vertically (cover), do not shrink whole image. */
.post-citation-image {
  --post-citation-inline: 30px;
  /* Subtracted from window inner height → max visible frame height (top/bottom breathing room in viewport). */
  --post-citation-viewport-y: 112px;
  padding-top: 48px;
  padding-bottom: 120px;
}

.post-citation-image-inner {
  padding: 0 var(--post-citation-inline);
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.post-citation-visual {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.post-citation-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 50px 20px 24px;
  background: none;
  pointer-events: none;
  z-index: 2;
}

.post-citation-overlay-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 9vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
  /* No full-screen scrim; keep light shadow so title stays readable on varied imagery */
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45), 0 1px 6px rgba(0, 0, 0, 0.35);
}

.post-citation-cta {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: #2d2e37;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.post-citation-cta:hover {
  background: #3a3c47;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.26);
}

.post-citation-cta:active {
  transform: scale(0.98);
}

.post-citation-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.post-citation-cta-label {
  white-space: nowrap;
}

.post-citation-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1.25px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  font-size: 11px;
}

.post-citation-img-frame {
  width: 100%;
  overflow: hidden;
  background: transparent;
}

.post-citation-img-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* When JS sets frame height to cap viewport: center-crop tall image at fixed width */
.post-citation-img-frame.is-cropped img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.post-citation-img-frame:not(.is-cropped) img {
  max-width: 100%;
}

.citation-block pre {
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--dark-gray);
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--mid-gray);
}

.copy-btn.copied {
  color: #34c759;
}

/* ---------- Footer ---------- */
#footer {
  position: relative;
  background: linear-gradient(180deg, var(--pano-dark) 0%, var(--pano-dark-deep) 100%);
  color: rgba(255,255,255,0.7);
  padding: 100px 0 48px;
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: radial-gradient(ellipse, rgba(88,150,190,0.16) 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
  position: relative;
}

.footer-brand {
  margin-bottom: 40px;
}

.footer-logo {
  font-family: "Playfair Display", serif;
  font-size: 36px;
  font-weight: 700;
  color: white;
  display: block;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.35);
  max-width: 400px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: white;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin-bottom: 24px;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* ---------- Animations / Intersection Observer ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-subtitle.fade-in-up {
  transition-delay: 0.1s;
}

.overview-layout.fade-in-up,
.studio-layout.fade-in-up {
  transition-delay: 0.15s;
}

/* ---------- Hero entrance animation ---------- */
.hero-left {
  animation: heroFadeIn 1s ease 0.3s both;
}

.hero-left.faded {
  animation: none;
}

.hero-right {
  animation: heroFadeInRight 1s ease 0.6s both;
}

.hero-right.faded {
  animation: none;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-height) + 16px);
    gap: 40px;
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-right {
    min-height: 350px;
  }

  #sphere-container {
    height: 400px;
  }

  .studio-layout {
    flex-direction: column;
  }

  .studio-selector {
    flex-direction: row;
    min-width: unset;
    overflow-x: auto;
  }

  .studio-tab {
    white-space: nowrap;
    min-width: 200px;
  }

  .overview-layout {
    flex-direction: column;
  }

  .extension-item,
  .extension-item.reverse {
    flex-direction: column;
  }

  .comparison-grid {
    flex-direction: column;
  }

  .comparison-videos {
    flex-direction: row;
  }

  .nav-links {
    display: none;
  }

  #mobile-menu-toggle {
    display: flex;
  }

  .nav-pill {
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 40px 0 64px;
  }

  .section-container {
    padding: 0 20px;
  }

  .method-image {
    width: 92%;
    padding: 20px 18px 26px;
  }

  .hero-title-main {
    font-size: 42px;
    letter-spacing: -1px;
  }

  .pano-modal-content {
    width: 94vw;
    height: calc(94vw * 9 / 16);
    max-height: 80vh;
    border-radius: 18px;
  }

  .comparison-rows {
    gap: 20px;
  }

  .comparison-videos {
    flex-direction: column;
  }

  .post-citation-image {
    --post-citation-inline: 20px;
    --post-citation-viewport-y: 96px;
  }

  .post-citation-overlay {
    padding: 40px 16px 20px;
  }

  .post-citation-overlay-title {
    margin-bottom: 46px;
  }

  .post-citation-cta {
    font-size: 12px;
    padding: 9px 12px 9px 16px;
    gap: 8px;
  }

  .post-citation-cta-label {
    white-space: normal;
    max-width: min(260px, 100%);
    line-height: 1.35;
  }

  .post-citation-cta-icon {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-title-main {
    font-size: 36px;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-right {
    min-height: 280px;
  }

  #sphere-container {
    height: 300px;
  }
}

/* ---------- A-Frame overrides ---------- */
.a-enter-vr-button,
.a-orientation-modal,
.a-loader-title {
  display: none !important;
}

body.a-body {
  height: auto !important;
  width: auto !important;
  position: static !important;
}

html.a-html {
  position: static !important;
}

.a-canvas {
  position: absolute !important;
}

#pano-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#pano-scene canvas {
  border-radius: 28px;
}

/* ---------- Mobile Development Overlay ---------- */
.mobile-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
  }

  .mobile-overlay.mobile-overlay--dismissed {
    display: none !important;
  }

  .mobile-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    padding: min(11vh, 96px) 28px max(20px, env(safe-area-inset-bottom, 0px));
  }

  .mobile-overlay-top {
    text-align: center;
  }

  .mobile-overlay-top i {
    font-size: 48px;
    color: var(--mid-gray);
    margin-bottom: 20px;
    display: block;
  }

  .mobile-overlay-top p {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.7;
    font-weight: 500;
    margin: 0;
  }

  .mobile-overlay-github-btn {
    margin-top: 28px;
    text-decoration: none;
  }

  .mobile-overlay-continue {
    margin-top: auto;
    padding: 20px 12px 4px;
    align-self: center;
    background: none;
    border: none;
    font-size: 13px;
    color: var(--mid-gray);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
  }

  .mobile-overlay-continue:hover {
    color: var(--dark-gray);
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.22);
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(88,150,190,0.22);
  color: var(--dark-gray);
}
