/* Spline showcase — all selectors scoped under #spline-showcase */
#spline-showcase {
  position: relative;
  isolation: isolate;
  z-index: 20;
  width: 100%;
  min-height: 780px;
  margin: 0;
  padding: clamp(1.75rem, 4.5vw, 3.25rem);
  background:
    radial-gradient(ellipse 70% 60% at 80% 40%, rgba(120, 120, 140, 0.12), transparent 60%),
    rgba(0, 0, 0, 0.97);
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-sizing: border-box;
  font-family: "Mona Sans Variable", "Mona Sans", Arial, sans-serif;
  color: #fff;
}

#spline-showcase *,
#spline-showcase *::before,
#spline-showcase *::after {
  box-sizing: border-box;
}

#spline-showcase .spline-spotlight {
  pointer-events: none;
  position: absolute;
  z-index: 5;
  width: 200px;
  height: 200px;
  border-radius: 9999px;
  filter: blur(24px);
  opacity: 0;
  transition: opacity 200ms ease;
  background: radial-gradient(
    circle at center,
    rgb(250, 250, 250),
    rgb(244, 244, 245),
    transparent 80%
  );
  left: 0;
  top: 0;
  will-change: left, top, opacity;
}

#spline-showcase.spline-is-hovered .spline-spotlight {
  opacity: 1;
}

#spline-showcase .spline-layout {
  display: flex;
  align-items: stretch;
  min-height: 780px;
  height: 100%;
  position: relative;
  z-index: 1;
}

#spline-showcase .spline-copy {
  flex: 1.1 1 0;
  padding: 1.25rem 1.5rem 1.25rem 0.5rem;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  min-width: 0;
  max-width: 44rem;
}

#spline-showcase .spline-eyebrow {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

#spline-showcase .spline-heading {
  margin: 0;
  font-family: Brier, Arial, sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  text-transform: uppercase;
  background-image: linear-gradient(to bottom, #ffffff, #d2ff00 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#spline-showcase .spline-subtext {
  margin: 0;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
}

/* Metric chips */
#spline-showcase .spline-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

#spline-showcase .spline-metric {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 0.95rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(210, 255, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 250ms ease, border-color 250ms ease, background 250ms ease;
}

#spline-showcase .spline-metric:hover {
  transform: translateY(-2px);
  border-color: rgba(210, 255, 0, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

#spline-showcase .spline-metric-value {
  font-family: Brier, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #f4ffe0;
  letter-spacing: 0.01em;
}

/* Risk block */
#spline-showcase .spline-risk {
  padding: 0.95rem 0 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

#spline-showcase .spline-risk-title {
  margin: 0 0 0.45rem;
  font-family: Brier, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

#spline-showcase .spline-risk-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

#spline-showcase .spline-risk-desc + .spline-risk-desc {
  margin-top: 0.65rem;
}

#spline-showcase .spline-risk-desc.is-secondary {
  color: rgba(244, 255, 224, 0.92);
  font-weight: 600;
}

/* Walk away / steps */
#spline-showcase .spline-walkaway {
  padding: 0.35rem 0 0;
}

#spline-showcase .spline-walkaway-title {
  margin: 0 0 0.85rem;
  font-family: Brier, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

#spline-showcase .spline-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

@media (min-width: 720px) {
  #spline-showcase .spline-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#spline-showcase .spline-step {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 0.95rem;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 280ms ease, border-color 280ms ease, background 200ms ease;
  animation: spline-step-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#spline-showcase .spline-step:nth-child(1) { animation-delay: 80ms; }
#spline-showcase .spline-step:nth-child(2) { animation-delay: 160ms; }
#spline-showcase .spline-step:nth-child(3) { animation-delay: 240ms; }

#spline-showcase .spline-step:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(210, 255, 0, 0.35);
}

@keyframes spline-step-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#spline-showcase .spline-step-head {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

#spline-showcase .spline-step-num {
  font-family: Brier, Arial, sans-serif;
  font-size: 0.85rem;
  color: rgba(210, 255, 0, 0.85);
}

#spline-showcase .spline-step-num::after {
  content: " |";
  color: rgba(255, 255, 255, 0.35);
}

#spline-showcase .spline-step-label {
  font-family: Brier, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
}

#spline-showcase .spline-step-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}

/* Robot / scene — larger presence */
#spline-showcase .spline-scene-wrap {
  flex: 1.35 1 0;
  position: relative;
  min-width: 0;
  min-height: 460px;
  /* Contain Spline pointer/scroll to this half only */
  overflow: hidden;
  touch-action: none;
}

#spline-showcase #spline-scene-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  transform: scale(1.28);
  transform-origin: 55% 55%;
}

#spline-showcase #spline-scene-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

#spline-showcase .spline-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
}

#spline-showcase .spline-loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spline-spin 0.8s linear infinite;
}

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

/* Mobile / tablet — larger, more readable section */
@media (max-width: 899px) {
  #spline-showcase {
    min-height: 0;
    padding: clamp(1.5rem, 5.5vw, 2.4rem);
  }

  #spline-showcase .spline-layout {
    flex-direction: column;
    min-height: 0;
    gap: 0.5rem;
  }

  #spline-showcase .spline-copy {
    padding: 0.35rem 0 1.15rem;
    max-width: none;
    flex: 0 0 auto;
    gap: 1.15rem;
  }

  #spline-showcase .spline-eyebrow {
    font-size: 0.8rem;
  }

  #spline-showcase .spline-heading {
    font-size: clamp(1.85rem, 7.2vw, 2.55rem);
    line-height: 1.06;
  }

  #spline-showcase .spline-subtext {
    font-size: 1rem;
    line-height: 1.62;
  }

  #spline-showcase .spline-metrics {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  #spline-showcase .spline-metric {
    padding: 1rem 1rem;
  }

  #spline-showcase .spline-metric-value {
    font-size: 1.05rem;
  }

  #spline-showcase .spline-risk-title,
  #spline-showcase .spline-walkaway-title {
    font-size: 1.2rem;
  }

  #spline-showcase .spline-risk-desc {
    font-size: 0.95rem;
  }

  #spline-showcase .spline-steps {
    grid-template-columns: 1fr;
  }

  #spline-showcase .spline-step {
    padding: 1.1rem 1.05rem 1.15rem;
  }

  #spline-showcase .spline-step-label {
    font-size: 1.05rem;
  }

  #spline-showcase .spline-step-desc {
    font-size: 0.95rem;
    line-height: 1.52;
  }

  #spline-showcase .spline-scene-wrap {
    flex: 0 0 auto;
    min-height: 420px;
    height: min(52vh, 460px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
  }

  #spline-showcase #spline-scene-container {
    transform: scale(1.35);
    transform-origin: center 45%;
  }

  @media (min-width: 560px) {
    #spline-showcase .spline-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  #spline-showcase .spline-step {
    animation: none;
  }

  #spline-showcase .spline-step:hover,
  #spline-showcase .spline-metric:hover {
    transform: none;
  }
}
