/* Interactive model explorer */
.model-explorer {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 22% 8%, #0c2a38 0, transparent 30%),
    linear-gradient(150deg, #071e2a, #041722 65%);
}

.model-explorer .section-label {
  color: #f1f7fb;
  opacity: 1;
}

.model-explorer .intro h2,
.model-explorer .intro-copy p {
  color: #ddeaf0;
}

.model-explorer .impact h2,
.model-explorer .impact-copy > p,
.model-explorer .impact-copy > a {
  color: #193c4d;
}

.model-explorer .closing > p,
.model-explorer .closing h2 { color: #f5f8fa; }
.model-explorer .closing h2 em { color: #ff3045; }
.model-explorer .closing a { color: #061b27; }

.model-explorer .intro .section-label {
  color: #f1f7fb;
}

.model-explorer .explorer {
  position: relative;
  overflow: hidden;
  padding: clamp(88px, 9vw, 136px) 5vw clamp(84px, 8vw, 120px);
  background:
    radial-gradient(circle at 78% 4%, rgba(31, 82, 103, 0.24), transparent 30%),
    linear-gradient(180deg, #03141f 0%, #061b27 100%);
  color: #fff;
}

.model-explorer .explorer::before {
  position: absolute;
  top: 0;
  left: 5vw;
  width: min(90vw, 1500px);
  height: 1px;
  background: linear-gradient(90deg, #ff3045 0 72px, rgba(255, 255, 255, 0.15) 72px);
  content: "";
}

.model-explorer .explorer-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 400px);
  align-items: end;
  gap: clamp(36px, 7vw, 110px);
  max-width: 1500px;
  margin: 0 auto clamp(46px, 6vw, 76px);
}

.model-explorer .explorer-heading h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(44px, 5.2vw, 78px);
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-wrap: balance;
}

.model-explorer .explorer .section-label {
  color: #ff5364;
}

.model-explorer .explorer-heading > p {
  justify-self: end;
  max-width: 400px;
  margin: 0;
  padding: 4px 0 4px 24px;
  border-left: 1px solid rgba(255, 48, 69, 0.65);
  color: #b8c8d0;
  font-size: clamp(0.9rem, 1.1vw, 1.02rem);
  line-height: 1.75;
}

.model-explorer .impact .section-label {
  color: #2e5c73;
}

.model-explorer .explorer-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.7fr);
  width: min(100%, 1500px);
  max-width: 1500px;
  min-height: min(72vh, 780px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #294351;
  background: #061b27;
  box-shadow: 0 34px 90px #0008;
}

.model-explorer .model-canvas {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(#29435170 1px, transparent 1px),
    linear-gradient(90deg, #29435170 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, #0d2a37, #061923 68%);
  background-size: 64px 64px, 64px 64px, auto;
}

.model-explorer #scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.model-explorer #scene:active { cursor: grabbing; }
.model-explorer .model-fallback { display: none; width: 100%; height: 100%; object-fit: cover; }
.model-explorer .no-webgl #scene,
.model-explorer .no-webgl .model-loading,
.model-explorer .no-webgl .hotspots-layer,
.model-explorer .no-webgl .model-controls { display: none; }
.model-explorer .no-webgl .model-fallback { display: block; }

.model-explorer .model-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: #061b27ed;
  color: #a6b7c1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.model-explorer .model-loading.is-complete { opacity: 0; visibility: hidden; }
.model-explorer .model-loading strong {
  color: #f7f9fa;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-explorer .loading-ring {
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  border: 2px solid #294351;
  border-top-color: #ff3045;
  border-radius: 50%;
  animation: obana-spin 0.8s linear infinite;
}

@keyframes obana-spin { to { transform: rotate(360deg); } }

.model-explorer .hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.model-explorer .hotspot {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f7f9fa;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.model-explorer .hotspot span {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(223, 232, 236, 0.45);
  border-radius: 50%;
  background: rgba(3, 17, 24, 0.9);
  box-shadow: 0 0 0 6px rgba(166, 183, 193, 0.08), 0 0 18px rgba(166, 183, 193, 0.12);
  color: #edf5fb;
  font-size: 0.72rem;
  font-weight: 800;
}

.model-explorer .hotspot em {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 16px;
  border: 1px solid rgba(140, 164, 176, 0.45);
  border-radius: 20px / 50%;
  background: rgba(5, 18, 26, 0.78);
  color: #ebf4fa;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-explorer .hotspot.is-active span {
  border-color: #ff3045;
  background: rgba(255, 48, 69, 0.12);
  color: #ff3045;
  box-shadow: 0 0 0 2px rgba(255, 48, 69, 0.9), 0 0 0 7px rgba(255, 48, 69, 0.14);
}

.model-explorer .hotspot.is-active em {
  border-color: rgba(255, 48, 69, 0.75);
  color: #f5f9fb;
}

.model-explorer .hotspot:focus-visible { outline: 2px solid white; outline-offset: 8px; }

.model-explorer .model-controls {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.model-explorer .model-controls button {
  padding: 9px 12px;
  border: 1px solid #3a5562;
  background: #061b27c9;
  color: #cfdae0;
  cursor: pointer;
}

.model-explorer .model-controls button:hover,
.model-explorer .model-controls button:focus-visible {
  border-color: #ff3045;
  color: white;
}

.model-explorer .view-label {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #edf5fb;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.model-explorer .view-label span { width: 22px; height: 1px; background: #ff3045; }

.model-explorer .system-panel {
  position: relative;
  z-index: 7;
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 4vw, 64px);
  border-left: 1px solid #294351;
  background: linear-gradient(160deg, #0a2230, #061b27 75%);
}

.model-explorer .panel-topline { display: flex; align-items: center; gap: 14px; }
.model-explorer .panel-topline span {
  color: #ff3045;
  font-size: 2.1rem;
  font-weight: 300;
}

.model-explorer .panel-topline p {
  margin: 0;
  color: #f5f9fb;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-explorer .system-panel h3 {
  margin: 42px 0 20px;
  color: #f5f9fb;
  font-size: clamp(1.85rem, 3vw, 3.3rem);
  font-weight: 530;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.model-explorer .system-panel > p {
  margin: 0;
  color: #b8cad3;
  line-height: 1.7;
}

.model-explorer .system-stat { display: flex; align-items: end; gap: 14px; margin: 42px 0 30px; }
.model-explorer .system-stat strong {
  color: #ff3045;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  font-weight: 370;
  letter-spacing: -0.06em;
  line-height: 0.8;
}

.model-explorer .system-stat span {
  max-width: 90px;
  color: #afc2cb;
  font-size: 0.75rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.model-explorer .system-panel ul {
  display: grid;
  gap: 14px;
  margin: auto 0 0;
  padding: 26px 0 0;
  border-top: 1px solid #294351;
  list-style: none;
}

.model-explorer .system-panel li {
  position: relative;
  padding-left: 19px;
  color: #f5f9fb;
  font-size: 0.85rem;
  line-height: 1.45;
}

.model-explorer .system-panel li::before {
  position: absolute;
  left: 0;
  content: "+";
  color: #ff3045;
}

@media (max-width: 1050px) {
  .model-explorer .explorer-heading { grid-template-columns: 1fr; }
  .model-explorer .explorer-heading > p { justify-self: start; }
  .model-explorer .explorer-stage { grid-template-columns: 1fr; }
  .model-explorer .model-canvas { min-height: 520px; }
  .model-explorer .system-panel { min-height: 520px; border-top: 1px solid #294351; border-left: 0; }
}

@media (max-width: 700px) {
  .model-explorer { padding: 0; }
  .model-explorer .explorer { padding: 72px 0 0; }
  .model-explorer .explorer::before { left: 24px; width: calc(100% - 48px); }
  .model-explorer .explorer-heading { padding: 0 24px; }
  .model-explorer .explorer-heading > p { padding-left: 18px; }
  .model-explorer .explorer-stage {
    width: 100%;
    max-width: none;
    border-left: 0;
    border-right: 0;
  }
  .model-explorer .model-canvas { min-height: 440px; }
  .model-explorer .hotspot { gap: 8px; }
  .model-explorer .hotspot span {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    font-size: 0.62rem;
  }
  .model-explorer .hotspot em {
    min-height: 24px;
    padding: 0 12px;
    font-size: 0.54rem;
    letter-spacing: 0.1em;
  }
  .model-explorer .view-label { display: none; }
  .model-explorer .model-controls { right: 12px; bottom: 12px; }
  .model-explorer .model-controls button { padding: 8px; font-size: 0.75rem; }
  .model-explorer .system-panel { min-height: 480px; padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .model-explorer *,
  .model-explorer *::before,
  .model-explorer *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
