/* ---------- 3D viewer pages ---------- */
.subnav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.subnav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .2s ease, transform .2s ease;
}
.back-link:hover { color: var(--text); transform: translateX(-2px); }
.back-link::before {
  content: ""; width: 16px; height: 16px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397a4c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
}

/* Stage */
.stage { position: relative; width: 100%; height: 78vh; min-height: 460px; background: radial-gradient(ellipse 120% 90% at 50% 0%, #0c1426, #06090f 75%); }
.stage__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage__canvas:active { cursor: grabbing; }

.stage__overlay {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 92px 28px 22px;
}
.stage__head { max-width: 620px; }
.stage__eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; font-weight: 600; color: var(--orange); margin-bottom: 10px;
}
.stage__title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 4.4vw, 2.9rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.08;
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
}
.stage__sub { color: var(--muted); margin-top: 12px; font-size: 1rem; max-width: 540px; text-shadow: 0 2px 20px rgba(0,0,0,.7); }

.stage__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend__item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; color: var(--text);
  background: rgba(8, 13, 24, 0.66);
  border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.legend__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.hint {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; color: var(--muted-2);
  background: rgba(8, 13, 24, 0.6);
  border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px;
}
.hint::before {
  content: ""; width: 15px; height: 15px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7794' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a4 4 0 0 1 4 4c0 2-2 3-2 5h-4c0-2-2-3-2-5a4 4 0 0 1 4-4z'/%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3C/svg%3E");
}

/* WebGL fallback / loader */
.stage__loader {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: .9rem; letter-spacing: .04em;
  transition: opacity .4s ease;
}
.stage__loader.is-hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid rgba(90,150,255,.2);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Detail content under stage */
.detail { padding: 64px 0 24px; }
.detail__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.detail__list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.detail__list li { position: relative; padding-left: 22px; color: var(--muted); }
.detail__list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
}
.spec-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.spec {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: 14px; padding: 20px;
}
.spec__k { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--brand-2); }
.spec__v { color: var(--muted); font-size: .86rem; margin-top: 4px; }

.detail__cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

@media (max-width: 820px) {
  .stage { height: 66vh; min-height: 400px; }
  .stage__overlay { padding: 80px 18px 16px; }
  .detail__grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 520px) {
  .spec-cards { grid-template-columns: 1fr; }
  .stage__sub { display: none; }
  .hint { display: none; }
}
