/*
 * Rich-luxe — dark + gold treatment for individual trophy item pages.
 * Loaded after each page's inline <style> block so it wins on tied specificity.
 * Targets the existing class structure emitted by build-rich-pages.js:
 *   .problem-label, .headline, .product-estimate, .copy, .cta-btn, .cta-poor,
 *   .decision-grid, .decision-card, .more-things, .more-card, .breadcrumbs,
 *   plus the shared site-header / footer.
 */

:root {
  --rich-bg-deep: #0a0908;
  --rich-bg-mid: #12100e;
  --rich-surface: #181512;
  --rich-line: rgba(231, 192, 110, 0.45);
  --rich-line-soft: rgba(245, 220, 168, 0.18);
  --rich-gold: #f3c969;
  --rich-gold-bright: #ffe6a1;
  --rich-gold-deep: #b58a2a;
  --rich-gold-dim: #9a8052;
  --rich-champagne: #f6ecd8;
  --rich-cream: #ece3cf;
  --rich-muted: #a8a092;
  --rich-ink: #1a1510;
  --rich-gold-foil:
    linear-gradient(135deg,
      #fff3c4 0%, #ffd964 22%, #b58a2a 52%, #ffd964 78%, #fff3c4 100%);
}

@keyframes richGoldShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes richMarquee {
  0% { background-position: -200% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes richPulseGlow {
  0%, 100% {
    box-shadow:
      0 8px 26px rgba(0, 0, 0, 0.55),
      0 0 22px rgba(255, 217, 100, 0.32),
      0 0 0 1px rgba(255, 243, 196, 0.35) inset;
  }
  50% {
    box-shadow:
      0 14px 38px rgba(0, 0, 0, 0.6),
      0 0 42px rgba(255, 217, 100, 0.55),
      0 0 0 1px rgba(255, 243, 196, 0.55) inset;
  }
}

@keyframes richBadgeGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 217, 100, 0.35)); }
  50% { filter: drop-shadow(0 0 18px rgba(255, 217, 100, 0.7)); }
}

@keyframes richFloorPulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 0.95; transform: translateX(-50%) scaleY(1.08); }
}

/* ----- Body + global ----- */
body {
  background: var(--rich-bg-deep);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(255, 217, 100, 0.2), transparent 52%),
    radial-gradient(ellipse 55% 45% at 100% 20%, rgba(140, 100, 40, 0.42), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 60%, rgba(120, 90, 30, 0.28), transparent 60%),
    linear-gradient(180deg, #0e0c0a 0%, var(--rich-bg-deep) 42%, #070605 100%);
  color: var(--rich-cream);
  position: relative;
}

/* Subtle gold "leaf" texture overlay — adds depth without competing with content. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 23% 17%, rgba(255, 217, 100, 0.18) 0, transparent 60%),
    radial-gradient(1px 1px at 67% 41%, rgba(255, 217, 100, 0.12) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 11% 78%, rgba(255, 217, 100, 0.14) 0, transparent 70%),
    radial-gradient(1px 1px at 89% 86%, rgba(255, 217, 100, 0.1) 0, transparent 60%),
    radial-gradient(1px 1px at 42% 92%, rgba(255, 217, 100, 0.08) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 11%, rgba(255, 217, 100, 0.12) 0, transparent 70%);
  opacity: 0.7;
  mix-blend-mode: screen;
}
body > * { position: relative; z-index: 1; }

/* ----- Shared header (overrides the light-theme nav inline styles) ----- */
.site-header {
  border-bottom-color: var(--rich-line) !important;
  background: rgba(10, 9, 8, 0.88) !important;
  backdrop-filter: blur(16px);
}
.site-header .logo { color: var(--rich-champagne); }
.site-header .logo img {
  filter: brightness(0) invert(92%) sepia(12%) hue-rotate(312deg);
}
.header-nav a { color: var(--rich-muted); }
.header-nav a:hover { color: var(--rich-champagne); }
.header-category {
  border-color: var(--rich-line-soft) !important;
  background-color: var(--rich-surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a39a8f'/%3E%3C/svg%3E") !important;
  color: var(--rich-cream) !important;
}
.header-search {
  border-color: var(--rich-line-soft) !important;
  background: var(--rich-bg-mid) !important;
  color: var(--rich-champagne) !important;
}
.header-search:focus { border-color: var(--rich-gold-dim) !important; }
.header-search-clear:hover { color: var(--rich-champagne); }
.header-suggestions {
  background: var(--rich-surface) !important;
  border-color: var(--rich-line) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.site-search-option { color: var(--rich-cream); }
.site-search-option:hover,
.site-search-option:focus-visible { background: rgba(212, 184, 122, 0.12); }
.site-search-option-title { color: var(--rich-champagne); }
.site-search-option-meta { color: var(--rich-muted); }
.site-search-option-type { color: var(--rich-gold-dim); }

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  color: var(--rich-muted);
}
.breadcrumbs a {
  color: var(--rich-muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--rich-gold); }
.breadcrumbs span { color: var(--rich-gold-dim); }

/* ----- Hero ----- */
main {
  position: relative;
  isolation: isolate;
}

/* Atmospheric $ ornament — pushed bigger + brighter for "all-out" boujee. */
main::before {
  content: '$';
  position: absolute;
  top: -4rem;
  right: -2.5rem;
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-size: clamp(16rem, 34vw, 32rem);
  line-height: 0.85;
  font-weight: 600;
  font-style: italic;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  animation: richGoldShift 22s ease-in-out infinite;
  filter: drop-shadow(0 0 60px rgba(255, 217, 100, 0.22));
}

/* Second smaller $ on the bottom-left, mirrored, for a richer foreground/background. */
main::after {
  content: '$';
  position: absolute;
  bottom: 4rem;
  left: -3rem;
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-size: clamp(10rem, 18vw, 16rem);
  line-height: 0.85;
  font-weight: 600;
  font-style: italic;
  transform: scaleX(-1);
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
  animation: richGoldShift 28s ease-in-out infinite reverse;
}

@media (max-width: 720px) {
  main::before {
    font-size: 14rem;
    top: -2rem;
    right: -1.2rem;
    opacity: 0.18;
  }
  main::after { display: none; }
}

/* Trophy badge — wraps the problem-label in a foil-bordered chip with $ glyph. */
.problem-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem 0.5rem 0.8rem;
  margin-bottom: 1.1rem !important;
  border: 1px solid #f3c969;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(40, 32, 18, 0.95), rgba(22, 18, 12, 0.95));
  color: transparent !important;
  font-weight: 900;
  font-size: 0.7rem !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(255, 217, 100, 0.22),
    0 0 0 1px rgba(255, 243, 196, 0.2) inset;
  animation: richBadgeGlow 4.5s ease-in-out infinite;
}

.problem-label::before {
  content: '$';
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.3em;
  line-height: 0.7;
  letter-spacing: 0;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(255, 217, 100, 0.4);
}

/* The label text itself gets the moving foil treatment. */
.problem-label {
  background:
    linear-gradient(180deg, rgba(40, 32, 18, 0.95), rgba(22, 18, 12, 0.95)),
    var(--rich-gold-foil);
  background-size: auto, 220% 220%;
  background-clip: padding-box, text;
  -webkit-background-clip: padding-box, text;
  -webkit-text-fill-color: transparent;
  animation:
    richBadgeGlow 4.5s ease-in-out infinite,
    richGoldShift 14s ease-in-out infinite;
}

main h1 {
  color: transparent !important;
  background: var(--rich-gold-foil);
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: richGoldShift 14s ease-in-out infinite;
  text-shadow: 0 1px 0 rgba(255, 230, 161, 0.04);
}

/* ----- Product figure (image) with gold "floor glow" beneath ----- */
.product-figure,
figure {
  position: relative;
  background: linear-gradient(135deg, rgba(36, 30, 20, 0.92), rgba(14, 12, 10, 0.95)) !important;
  border: 1px solid var(--rich-line-soft) !important;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 243, 196, 0.08);
}

/* Foil rim that lights up subtly — feels like the image sits on a display plinth. */
.product-figure::before,
figure.product-figure::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
  animation: richGoldShift 18s ease-in-out infinite;
}

/* Warm "spotlight" pool beneath the image. */
.product-figure::after,
figure.product-figure::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 78%;
  height: 36px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(255, 217, 100, 0.55), rgba(255, 217, 100, 0) 70%);
  filter: blur(8px);
  pointer-events: none;
  opacity: 0.75;
  animation: richFloorPulse 5s ease-in-out infinite;
}

.product-image {
  filter:
    drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 28px rgba(255, 217, 100, 0.18)) !important;
}

/* ----- Headline + body copy ----- */
.headline {
  color: var(--rich-champagne) !important;
  border-left: 3px solid transparent;
  border-image: var(--rich-gold-foil) 1;
  padding-left: 1rem;
  font-style: italic;
}

/* Price tag with continuous moving foil sheen — marquee shimmer. */
.product-estimate {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rich-gold);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(40, 32, 18, 0.95), rgba(22, 18, 12, 0.95));
  color: var(--rich-gold-bright) !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 0.82rem !important;
  text-shadow: 0 0 10px rgba(255, 217, 100, 0.4);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(255, 217, 100, 0.28),
    0 0 0 1px rgba(255, 243, 196, 0.25) inset;
}

.product-estimate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.18) 45%,
    rgba(255, 243, 196, 0.32) 50%,
    rgba(255, 255, 255, 0.18) 55%,
    transparent 75%);
  background-size: 220% 100%;
  animation: richMarquee 6s linear infinite;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.product-estimate > * {
  position: relative;
  z-index: 1;
}

.copy {
  color: var(--rich-muted) !important;
  font-weight: 400 !important;
  line-height: 1.78 !important;
}

/* ----- CTA row, shimmer, share button ----- */
.rich-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.4rem;
}

.cta-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(165deg, #fff3c4 0%, #ffd964 22%, #d8a843 55%, #8a6b2a 100%) !important;
  color: var(--rich-ink) !important;
  border: 1px solid #f3c969 !important;
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(255, 217, 100, 0.32),
    0 0 0 1px rgba(255, 243, 196, 0.35) inset !important;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  animation: richPulseGlow 3.5s ease-in-out infinite;
}
.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.65s ease;
}
.cta-btn:hover {
  background:
    linear-gradient(165deg, #fff3c4 0%, #ffd964 22%, #d8a843 55%, #8a6b2a 100%) !important;
  color: var(--rich-ink) !important;
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.6),
    0 0 34px rgba(255, 217, 100, 0.4),
    0 0 0 1px rgba(255, 243, 196, 0.45) inset !important;
}
.cta-btn:hover::before { transform: translateX(110%); }

.rich-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 19, 16, 0.92);
  color: var(--rich-gold) !important;
  border: 1px solid var(--rich-gold-dim);
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.92rem 1.25rem;
  min-height: 48px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.rich-share-btn:hover {
  border-color: var(--rich-gold);
  color: var(--rich-gold-bright) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 217, 100, 0.18);
}
.rich-share-btn:focus-visible {
  outline: 2px solid var(--rich-gold-bright);
  outline-offset: 3px;
}

.cta-poor {
  color: var(--rich-muted) !important;
  border-bottom-color: var(--rich-gold-dim) !important;
}
.cta-poor:hover {
  color: var(--rich-gold-bright) !important;
  border-bottom-color: var(--rich-gold-bright) !important;
}

.sub-note { color: var(--rich-gold-dim) !important; }

/* ----- Decision grid cards ----- */
.decision-grid {
  border-top: 1px solid var(--rich-line) !important;
  border-bottom: 1px solid var(--rich-line) !important;
}
.decision-card {
  background: rgba(22, 19, 16, 0.92) !important;
  border: 1px solid var(--rich-line-soft) !important;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 243, 196, 0.05);
}
.decision-card h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: transparent !important;
  background: var(--rich-gold-foil);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: richGoldShift 16s ease-in-out infinite;
}
.decision-card h2::before {
  content: '$';
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.25em;
  line-height: 0.8;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(255, 217, 100, 0.25);
}
.decision-card p { color: var(--rich-muted) !important; }

/* ----- Divider ----- */
.divider {
  border: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--rich-gold) 50%,
    transparent 100%) !important;
  opacity: 0.55;
  margin: 2.5rem auto !important;
}

/* ----- "Other expensive picks" related grid ----- */
.more-things {
  position: relative;
}
.more-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: transparent !important;
  background: var(--rich-gold-foil);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  animation: richGoldShift 14s ease-in-out infinite;
}
.more-label::before {
  content: '$';
  font-family: 'Newsreader', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 0.8;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(255, 217, 100, 0.35);
}

.more-grid { gap: 1.1rem; }

.more-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(165deg, rgba(30, 25, 18, 0.98), rgba(14, 12, 10, 0.99)) !important;
  border: 1px solid rgba(245, 220, 168, 0.28) !important;
  border-radius: 12px;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 243, 196, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.more-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--rich-gold-foil);
  background-size: 200% 200%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.35;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
.more-card:hover {
  background:
    linear-gradient(165deg, rgba(30, 25, 18, 0.98), rgba(14, 12, 10, 0.99)) !important;
  transform: translateY(-4px);
  border-color: transparent !important;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 217, 100, 0.35),
    0 0 32px rgba(255, 217, 100, 0.15);
}
.more-card:hover::before { opacity: 1; }

.more-card-problem {
  color: var(--rich-gold-dim) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
}
.more-card-name { color: var(--rich-champagne) !important; }

/* ----- Footer ----- */
footer {
  border-top: 1px solid var(--rich-line-soft);
  color: var(--rich-muted) !important;
}
footer a { color: var(--rich-muted) !important; }
footer a:hover { color: var(--rich-gold) !important; }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .problem-label,
  main h1,
  main::before,
  main::after,
  .decision-card h2,
  .more-label,
  .cta-btn,
  .product-estimate::before,
  .product-figure::before,
  .product-figure::after,
  figure.product-figure::before,
  figure.product-figure::after { animation: none; }
}
