/* Connected Archive visual v3.
   Keeps the full interface visible inside the collection card at every size. */

.softmoon-digital-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  padding: clamp(22px, 3.8vw, 42px);
  background:
    radial-gradient(circle at 78% 16%, rgba(213, 166, 92, 0.24), transparent 12rem),
    radial-gradient(circle at 18% 84%, rgba(217, 111, 97, 0.22), transparent 15rem),
    linear-gradient(145deg, #102631 0%, #1d4652 58%, #263c45 100%);
}

.softmoon-digital-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(145deg, transparent 4%, #000 44%, transparent 96%);
}

.softmoon-digital-visual::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -104px;
  bottom: -116px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.softmoon-archive-preview {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(88%, 360px);
  height: auto;
  max-height: calc(100% - 4px);
  min-height: 0;
  grid-template-rows: auto 128px auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 46, 57, 0.96), rgba(8, 28, 37, 0.98));
  color: #fff;
  padding: clamp(19px, 2.7vw, 25px);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.softmoon-archive-header,
.softmoon-archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.softmoon-archive-wordmark {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.softmoon-archive-index {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.softmoon-archive-art {
  position: relative;
  display: grid;
  width: 100%;
  height: 128px;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  margin: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 21px;
  background:
    radial-gradient(circle at 50% 42%, rgba(71, 142, 151, 0.2), transparent 8rem),
    rgba(255, 255, 255, 0.025);
}

.softmoon-archive-moon {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff8d8 0 10%, transparent 11%),
    radial-gradient(circle at 36% 34%, #ead6a9 0 25%, #d3ae69 58%, #9f7441 100%);
  box-shadow:
    0 0 0 11px rgba(213, 166, 92, 0.06),
    0 0 42px rgba(213, 166, 92, 0.28);
}

.softmoon-archive-moon::after {
  content: "";
  position: absolute;
  inset: 4px -10px 4px 16px;
  border-radius: 50%;
  background: #102b35;
}

.softmoon-archive-orbit {
  position: absolute;
  width: 158px;
  height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.softmoon-archive-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  top: 25%;
  right: calc(50% - 70px);
  border-radius: 50%;
  background: var(--sm-gold);
  box-shadow: 0 0 18px rgba(213, 166, 92, 0.8);
}

.softmoon-archive-copy {
  min-width: 0;
  overflow: visible;
}

.softmoon-archive-copy > span {
  display: block;
  color: #83cdd2;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.softmoon-archive-copy strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(1.08rem, 2.1vw, 1.3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  overflow-wrap: normal;
  word-break: keep-all;
}

.softmoon-archive-copy p {
  display: block;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.66rem;
  line-height: 1.48;
  word-break: keep-all;
  overflow: visible;
}

.softmoon-archive-footer {
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.59rem;
  font-weight: 760;
  line-height: 1.3;
}

.softmoon-archive-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.softmoon-archive-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #76cbd0;
  box-shadow: 0 0 0 4px rgba(118, 203, 208, 0.11);
}

.softmoon-archive-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  white-space: nowrap;
}

.softmoon-archive-action b {
  color: var(--sm-gold);
  font-size: 0.84rem;
  font-weight: 700;
}

/* Retire the legacy CSS-drawn phone and QR if stale markup is cached. */
.softmoon-digital-visual .softmoon-phone {
  width: min(88%, 330px);
  max-width: none;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  border-width: 1px;
  border-radius: 28px;
  padding: 28px;
  transform: none;
}

.softmoon-digital-visual .softmoon-phone::before,
.softmoon-digital-visual .softmoon-qr {
  display: none;
}

@media (max-width: 640px) {
  .softmoon-digital-visual {
    padding: 20px;
  }

  .softmoon-archive-preview {
    width: min(94%, 350px);
    grid-template-rows: auto 112px auto auto;
    border-radius: 24px;
    padding: 19px;
  }

  .softmoon-archive-art {
    height: 112px;
    margin-block: 13px;
  }

  .softmoon-archive-moon {
    width: 60px;
    height: 60px;
  }

  .softmoon-archive-orbit {
    width: 142px;
    height: 78px;
  }

  .softmoon-archive-copy strong {
    font-size: 1.08rem;
  }

  .softmoon-archive-copy p {
    font-size: 0.64rem;
  }

  .softmoon-archive-footer {
    gap: 8px 14px;
    font-size: 0.57rem;
  }
}

@media (max-width: 390px) {
  .softmoon-archive-preview {
    width: 100%;
    grid-template-rows: auto 98px auto auto;
    padding: 17px;
  }

  .softmoon-archive-art {
    height: 98px;
  }

  .softmoon-archive-copy p {
    font-size: 0.61rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .softmoon-archive-marker {
    box-shadow: none;
  }
}
