/* Sell Your Old Gold — cinematic AI coin hero (Coin Heritage style) */

.sell-hero--animated {
  position: relative;
  min-height: clamp(520px, 78vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff8e7;
  background: linear-gradient(145deg, #2a0a1a 0%, #5c1a3a 42%, #3d0f26 100%);
}

.sell-hero--animated .sell-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201, 168, 76, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, rgba(201, 168, 76, 0.35) 0 1.5px, transparent 2.5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 8c8 16 24 24 40 32-16 8-32 16-40 32-8-16-24-24-40-32 16-8 32-16 40-32z' fill='none' stroke='%23c9a84c' stroke-width='0.6' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 48px 48px, 36px 36px, 120px 120px;
}

.sell-hero--animated .sell-hero-glow {
  position: absolute;
  width: min(680px, 90vw);
  height: min(680px, 90vw);
  right: -10%;
  top: -16%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.32) 0%, transparent 68%);
}

.sell-hero-coins {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sell-sparkle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.sell-coin-stage {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 72% 42%;
  z-index: 2;
  transition: transform 0.4s ease-out;
}

.sell-coin-3d {
  position: absolute;
  transform-style: preserve-3d;
  animation: sellCoinFloat 9s ease-in-out infinite;
}

.sell-coin-3d--lg {
  width: clamp(118px, 16vw, 210px);
  height: clamp(118px, 16vw, 210px);
  right: 6%;
  top: 14%;
  animation-delay: 0s;
}

.sell-coin-3d--md {
  width: clamp(86px, 11vw, 138px);
  height: clamp(86px, 11vw, 138px);
  right: 19%;
  top: 42%;
  animation-delay: -2.5s;
}

.sell-coin-3d--sm {
  width: clamp(62px, 8vw, 98px);
  height: clamp(62px, 8vw, 98px);
  right: 9%;
  bottom: 18%;
  animation-delay: -5s;
}

.sell-coin-3d-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: sellCoinSpin 14s linear infinite;
}

.sell-coin-3d-inner--slow {
  animation-duration: 18s;
  animation-direction: reverse;
}

.sell-coin-3d-inner--fast {
  animation-duration: 11s;
}

.sell-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  border: 3px solid rgba(232, 213, 160, 0.55);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(201, 168, 76, 0.25);
}

.sell-coin-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sell-coin-face--back {
  transform: rotateY(180deg);
}

.sell-coin-shine {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.72;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 248, 231, 0.45) 40deg, transparent 80deg);
  animation: sellCoinShine 5s linear infinite;
}

@keyframes sellCoinSpin {
  0% { transform: rotateY(0deg) rotateX(14deg); }
  100% { transform: rotateY(360deg) rotateX(14deg); }
}

@keyframes sellCoinFloat {
  0%, 100% { transform: translateY(0) translateZ(0); }
  50% { transform: translateY(-18px) translateZ(20px); }
}

@keyframes sellCoinShine {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sell-hero--animated .sell-banner-content,
.sell-hero--animated .sell-hero-inner {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: clamp(48px, 8vw, 88px) 0 clamp(56px, 10vw, 96px);
  animation: sellBannerRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sell-hero--animated .sell-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 213, 160, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.sell-hero--animated .sell-banner-content h1 {
  font-family: var(--font-display, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2.35rem, 5.5vw, 3.85rem);
  line-height: 1.08;
  color: #fff8e7;
  margin: 0 0 16px;
  max-width: 14ch;
  text-shadow: none;
}

.sell-hero--animated .sell-banner-content h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.sell-hero--animated .sell-banner-content > p {
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.65;
  color: rgba(255, 248, 231, 0.88);
  margin: 0 0 28px;
  max-width: 42ch;
}

.sell-hero--animated .sell-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.sell-hero--animated .sell-banner-ghost {
  color: #fff8e7 !important;
  border-color: rgba(255, 248, 231, 0.45) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px);
}

.sell-hero--animated .sell-banner-ghost:hover {
  color: #fff !important;
  border-color: rgba(232, 213, 160, 0.75) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

.sell-hero--animated .sell-banner-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.sell-hero--animated .sell-banner-trust li {
  color: rgba(255, 248, 231, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(232, 213, 160, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Scroll reveals on sell page sections */
.sell-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.sell-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sell-highlights-grid article.sell-reveal:nth-child(2) { transition-delay: 0.06s; }
.sell-highlights-grid article.sell-reveal:nth-child(3) { transition-delay: 0.12s; }
.sell-highlights-grid article.sell-reveal:nth-child(4) { transition-delay: 0.18s; }

.step-card.sell-reveal:nth-child(2) { transition-delay: 0.06s; }
.step-card.sell-reveal:nth-child(3) { transition-delay: 0.12s; }
.step-card.sell-reveal:nth-child(4) { transition-delay: 0.18s; }

/* Override light-theme sell banner rules when animated hero is active */
.sell-gold-page .sell-hero--animated .sell-banner-content h1,
.sell-gold-page .sell-hero--animated .sell-banner-content h1 em {
  color: #fff8e7;
  text-shadow: none;
}

.sell-gold-page .sell-hero--animated .sell-banner-content > p {
  color: rgba(255, 248, 231, 0.88);
}

.sell-gold-page .sell-hero--animated .sell-banner-eyebrow {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 213, 160, 0.35);
  box-shadow: none;
}

.sell-gold-page .sell-hero--animated .sell-banner-trust li {
  color: rgba(255, 248, 231, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 213, 160, 0.28);
}

@media (max-width: 960px) {
  .sell-coin-stage {
    perspective-origin: 50% 35%;
  }

  .sell-coin-3d--lg {
    right: 4%;
    top: 10%;
  }

  .sell-coin-3d--md {
    right: auto;
    left: 6%;
    top: 36%;
  }

  .sell-coin-3d--sm {
    right: 12%;
    bottom: 14%;
  }
}

@media (max-width: 768px) {
  .sell-hero--animated {
    min-height: auto;
    align-items: stretch;
  }

  .sell-hero-coins {
    opacity: 0.38;
  }

  .sell-coin-3d--md,
  .sell-coin-3d--sm {
    display: none;
  }

  .sell-coin-3d--lg {
    right: 50%;
    top: 6%;
    transform: translateX(50%);
    width: clamp(96px, 28vw, 132px);
    height: clamp(96px, 28vw, 132px);
    opacity: 0.9;
  }

  .sell-hero--animated .sell-banner-content,
  .sell-hero--animated .sell-hero-inner {
    text-align: center;
    padding: 32px 0 44px;
    margin-inline: auto;
  }

  .sell-hero--animated .sell-banner-eyebrow {
    margin-inline: auto;
  }

  .sell-hero--animated .sell-banner-content h1 {
    max-width: none;
    font-size: clamp(1.9rem, 7vw, 2.45rem);
    margin-inline: auto;
  }

  .sell-hero--animated .sell-banner-content > p {
    margin-inline: auto;
    font-size: 0.95rem;
  }

  .sell-hero--animated .sell-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sell-hero--animated .sell-banner-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: var(--touch-min, 44px);
  }

  .sell-hero--animated .sell-banner-trust {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sell-coin-3d,
  .sell-coin-3d-inner,
  .sell-coin-shine {
    animation: none !important;
  }

  .sell-coin-stage {
    transition: none !important;
  }

  .sell-reveal {
    opacity: 1;
    transform: none;
  }
}
