/* ---------- Interactive 3D model ---------- */

.section-model {
  background:
    radial-gradient(ellipse at 18% 24%, rgba(103, 232, 216, 0.08), transparent 42%),
    radial-gradient(ellipse at 86% 76%, rgba(255, 112, 64, 0.07), transparent 38%),
    #071014;
  color: #f4f8f7;
}

.section-model::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 78%);
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  pointer-events: none;
}

.section-model > .container {
  position: relative;
  z-index: 1;
}

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  align-items: stretch;
  gap: 22px;
}

.model-stage {
  display: flex;
  min-height: 640px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #061014;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.model-stage-top {
  display: flex;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(8, 18, 22, 0.9);
}

.model-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffad90;
  font-family: var(--font-latin);
  font-size: 0.58rem;
  letter-spacing: 0.13em;
}

.model-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange-bright);
  box-shadow: 0 0 12px rgba(255, 112, 64, 0.7);
}

.model-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 590px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, #183238 0%, #0b1c21 48%, #061014 100%);
}

.model-canvas-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 74%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 74%);
  pointer-events: none;
}

.pump-viewer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
}

.model-state-label {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  padding: 6px 9px;
  border: 1px solid rgba(103, 232, 216, 0.25);
  background: rgba(4, 13, 16, 0.72);
  color: #b8e8e2;
  font-family: var(--font-latin);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  line-height: 1;
  pointer-events: none;
}

.model-hint {
  position: absolute;
  bottom: 18px;
  left: 16px;
  z-index: 3;
  color: #829797;
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.model-toolbar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.model-toolbar button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 13, 16, 0.74);
  color: #aebfbe;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.model-toolbar button:hover,
.model-toolbar button.is-active {
  border-color: rgba(103, 232, 216, 0.45);
  background: rgba(103, 232, 216, 0.12);
  color: #d9faf5;
}

.model-toolbar button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.model-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(5, 14, 17, 0.84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 1;
  transition: opacity 0.4s ease;
}

.model-loading[hidden],
.model-error[hidden] {
  display: none;
}

.model-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.model-loading p {
  color: #aabdbd;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.model-spinner {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(103, 232, 216, 0.22);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: model-spin 0.9s linear infinite;
}

@keyframes model-spin {
  to { transform: rotate(360deg); }
}

.model-progress {
  width: 150px;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.model-progress i {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--teal));
  transition: width 0.35s ease;
}

.model-error {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  background: rgba(5, 14, 17, 0.92);
  color: #aabdbd;
  text-align: center;
}

.model-error strong {
  color: #ffb79c;
  font-size: 0.9rem;
}

.model-error p {
  max-width: 340px;
  font-size: 0.75rem;
  line-height: 1.8;
}

.model-error a {
  color: var(--teal);
  border-bottom: 1px solid rgba(103, 232, 216, 0.35);
  font-size: 0.74rem;
}

.model-hotspot {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(103, 232, 216, 0.75);
  border-radius: 50%;
  background: rgba(5, 17, 20, 0.85);
  color: #d9faf5;
  font-family: var(--font-latin);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 25px;
  text-align: center;
  box-shadow: 0 0 0 4px rgba(103, 232, 216, 0.08), 0 0 20px rgba(103, 232, 216, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.model-hotspot:hover {
  border-color: var(--orange-bright);
  background: rgba(255, 112, 64, 0.16);
  transform: scale(1.08);
}

.model-side {
  position: relative;
  display: flex;
  min-height: 640px;
  flex-direction: column;
  padding: clamp(22px, 2.7vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}

.model-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
}

.model-tabs button {
  display: flex;
  min-height: 48px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: #849999;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.22s ease, color 0.22s ease;
}

.model-tabs button small {
  color: #647b7b;
  font-family: var(--font-latin);
  font-size: 0.48rem;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.model-tabs button.is-active {
  background: var(--orange);
  color: #ffffff;
}

.model-tabs button.is-active small {
  color: rgba(255, 255, 255, 0.65);
}

.model-side-head {
  padding: 24px 0 21px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.model-side-head .model-kicker {
  color: var(--orange-bright);
  font-family: var(--font-latin);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}

.model-side h3 {
  margin: 11px 0 11px;
  color: #f1f7f5;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.model-side-head > p:last-child {
  color: #98aaaa;
  font-size: 0.76rem;
  line-height: 1.8;
}

.model-points {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-points li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.model-points li > span {
  padding-top: 2px;
  color: var(--orange-bright);
  font-family: var(--font-latin);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
}

.model-points strong {
  display: block;
  color: #e7f0ee;
  font-size: 0.82rem;
  font-weight: 600;
}

.model-points p {
  margin-top: 3px;
  color: #8fa3a2;
  font-size: 0.7rem;
  line-height: 1.65;
}

.model-points li.is-active {
  background: linear-gradient(90deg, rgba(103, 232, 216, 0.09), transparent);
}

.model-points li.is-active strong {
  color: var(--teal);
}

.model-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.model-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7f9493;
  font-size: 0.6rem;
}

.model-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-silver { background: #b9c5c5; }
.legend-blue { background: #2a7e98; }
.legend-orange { background: #d76632; }
.legend-dark { background: #3b4a4c; }

.model-side .btn {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
}

.model-side .btn {
  margin-top: 20px;
}

.model-note {
  margin-top: 12px;
  color: #667d7d;
  font-size: 0.61rem;
  line-height: 1.6;
  text-align: center;
}

.model-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  background: #061014;
}

.model-stage:fullscreen .model-canvas-wrap {
  min-height: 0;
  flex: 1;
}

.model-stage:fullscreen .model-stage-top {
  height: 54px;
}

.model-stage:fullscreen .pump-viewer {
  inset: 0;
}

@media (max-width: 1020px) {
  .model-layout {
    grid-template-columns: 1fr;
  }

  .model-stage {
    min-height: 0;
  }

  .model-canvas-wrap {
    min-height: 520px;
  }

  .model-side {
    min-height: 0;
  }

  .model-side .btn {
    margin-top: 20px;
  }
}

@media (max-width: 680px) {
  .model-stage-top {
    height: 44px;
    padding-inline: 12px;
  }

  .model-canvas-wrap {
    min-height: 430px;
  }

  .model-state-label {
    top: 10px;
    left: 10px;
    font-size: 0.5rem;
  }

  .model-hint {
    bottom: 54px;
    left: 10px;
    font-size: 0.55rem;
  }

  .model-toolbar {
    right: 10px;
    bottom: 10px;
    left: 10px;
    justify-content: flex-start;
  }

  .model-toolbar button {
    min-height: 28px;
    padding-inline: 7px;
    font-size: 0.56rem;
  }

  .model-side {
    padding: 20px;
  }

  .model-side-head {
    padding-top: 20px;
  }

  .model-tabs button {
    min-height: 44px;
    font-size: 0.7rem;
  }

  .model-side h3 {
    font-size: 1.45rem;
  }

  .model-legend {
    gap: 6px 10px;
  }

  .model-hotspot {
    width: 24px;
    height: 24px;
    line-height: 22px;
    font-size: 0.5rem;
  }
}


.section-model .section-head h2 {
  color: #f4f8f7;
}

.section-model .section-head .lead {
  color: #9caeaf;
}

.model-inline-link {
  margin-top: 18px;
}

@media (max-width: 680px) {
  .model-inline-link {
    margin-top: 15px;
  }
}
