/*
  Socio Command View — hero product artifact.
  Pure CSS 3D (perspective + preserve-3d), no WebGL/R3F, no JS.
  Depends on --socio-blue / --socio-green / --socio-orange custom
  properties declared in contractors.html's inline <style> :root block.
*/

.hero-section {
  isolation: isolate;
}

/* ---------- shared front-face content (desktop + mobile) ---------- */

.hero-artifact__front {
  position: relative;
  width: 100%;
  border-radius: 22px;
  background: linear-gradient(165deg, #202127 0%, #17181b 60%, #101113 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 20px 22px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-artifact__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-artifact__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hero-artifact__mark {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  color: #0b1220;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
}

.hero-artifact__mark span {
  color: var(--socio-orange);
}

.hero-artifact__brand-name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
}

.hero-artifact__demo-badge {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

.hero-artifact__tabs {
  display: flex;
  gap: 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.hero-artifact__tabs .is-active {
  color: #fff;
}

/* stepper: Opportunity -> Recovery -> Verification -> Revenue */

.hero-artifact__stepper {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
}

.hero-artifact__stepper li {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hero-artifact__stepper li:not(:last-child)::after {
  content: "";
  width: 20px;
  height: 1px;
  margin: 0 8px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.hero-artifact__step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.hero-artifact__stepper .is-done { color: rgba(255, 255, 255, 0.65); }
.hero-artifact__stepper .is-done .hero-artifact__step-dot { background: var(--socio-green); }
.hero-artifact__stepper .is-active { color: #fff; }
.hero-artifact__stepper .is-active .hero-artifact__step-dot {
  background: var(--socio-blue);
  box-shadow: 0 0 0 3px rgba(102, 155, 210, 0.25);
}

/* revenue chart + opportunities stat */

.hero-artifact__stats {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.hero-artifact__card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.hero-artifact__label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
}

.hero-artifact__figure {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.hero-artifact__chart {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 4px;
}

.hero-artifact__chart-line {
  fill: none;
  stroke: url(#heroRevStroke);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
}

.hero-artifact__pulse {
  margin-top: 8px;
  font-size: 10px;
  color: var(--socio-green);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-artifact__pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--socio-green);
}

/* opportunity queue */

.hero-artifact__queue {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-artifact__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-artifact__row-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.hero-artifact__row-body {
  min-width: 0;
  flex: 1;
}

.hero-artifact__row-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-artifact__row-sub {
  margin-top: 1px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-artifact__pill {
  flex-shrink: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-artifact__pill--signal {
  background: rgba(102, 155, 210, 0.14);
  color: #9cc6ec;
  border: 1px solid rgba(102, 155, 210, 0.3);
}

.hero-artifact__pill--recovery {
  background: rgba(255, 149, 61, 0.14);
  color: #ffb37a;
  border: 1px solid rgba(255, 149, 61, 0.3);
}

.hero-artifact__pill--verified {
  background: rgba(52, 211, 153, 0.14);
  color: #7fe6bc;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* expanded verification row */

.hero-artifact__row--expanded {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: rgba(102, 155, 210, 0.06);
  border-color: rgba(102, 155, 210, 0.2);
}

.hero-artifact__row--expanded .hero-artifact__row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-artifact__checklist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-left: 36px;
  font-size: 9.5px;
}

.hero-artifact__check {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.55);
}

.hero-artifact__check.is-done { color: #7fe6bc; }

.hero-artifact__verify-btn {
  margin-left: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #06231a;
  background: linear-gradient(120deg, var(--socio-blue), var(--socio-green));
  border-radius: 999px;
  padding: 5px 12px;
}

/* ================= desktop 3D staging ================= */

@media (min-width: 1280px) {
  .hero-artifact-stage {
    position: absolute;
    top: 50%;
    right: -3%;
    width: 58%;
    max-width: 900px;
    min-width: 560px;
    transform: translateY(-50%);
    perspective: 2400px;
    perspective-origin: 62% 50%;
    pointer-events: none;
  }

  .hero-artifact {
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-21deg) rotateX(5deg);
  }

  .hero-artifact__front {
    padding: 26px 26px 28px;
  }

  .hero-artifact__side,
  .hero-artifact__bottom {
    position: absolute;
    background: linear-gradient(180deg, #0c0d0f, #060708);
  }

  .hero-artifact__side {
    top: 0;
    right: 0;
    width: 28px;
    height: 100%;
    transform-origin: right center;
    transform: rotateY(90deg);
    border-top-right-radius: 22px;
    border-bottom-right-radius: 22px;
  }

  .hero-artifact__bottom {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 28px;
    transform-origin: bottom center;
    transform: rotateX(-90deg);
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
  }
}

/* ================= mobile / tablet flat variant =================
   Same markup as desktop; perspective/side/bottom faces are simply
   switched off and the stage drops into normal document flow below
   the hero copy, cropped to read as a product screenshot. */

@media (max-width: 1279.98px) {
  .hero-artifact-stage {
    position: relative;
    margin: 8px 20px 0;
    perspective: none;
    border-radius: 22px;
    overflow: hidden;
    max-height: 360px;
    box-shadow: 0 30px 60px -35px rgba(2, 8, 23, 0.55);
  }

  .hero-artifact-stage::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(180deg, rgba(16, 17, 19, 0) 0%, #101113 100%);
    pointer-events: none;
  }

  .hero-artifact {
    transform: none;
  }

  .hero-artifact__side,
  .hero-artifact__bottom {
    display: none;
  }

  .hero-artifact__tabs {
    display: none;
  }

  .hero-artifact__stepper {
    font-size: 7.5px;
  }

  .hero-artifact__stepper li:not(:last-child)::after {
    width: 10px;
    margin: 0 5px;
  }

  .hero-artifact-caption {
    margin: 10px 20px 48px;
  }
}

/* ================= caption ================= */

.hero-artifact-caption {
  margin-top: 10px;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  color: #94a3b8;
}

@media (min-width: 1280px) {
  .hero-artifact-caption {
    position: absolute;
    right: 3%;
    bottom: 6%;
    width: 58%;
    max-width: 900px;
  }
}

/* ================= motion ================= */

@media (prefers-reduced-motion: no-preference) {
  .hero-artifact__pulse-dot { animation: hero-pulse 1.8s ease-in-out infinite; }
  .hero-artifact__chart-line { animation: hero-draw 1.4s ease-out both; }
}

@keyframes hero-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

@keyframes hero-draw {
  from { stroke-dashoffset: 420; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-artifact__pulse-dot,
  .hero-artifact__chart-line {
    animation: none !important;
  }
}
