/* ========== STACK SCROLL INTERACTION ========== */
:root {
  --stack-card-height: 420px;
  --stack-top-offset: 60px;
}

.stack-scroll-area {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0 5vh;
}

.stack-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Card Wrapper - Sticky positioning */
.card-wrapper {
  position: sticky;
  top: var(--stack-top-offset);
  height: var(--stack-card-height);
  width: 100%;
  margin-bottom: 35vh;
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform, filter, opacity;
}

/* Z-index for stacking order */
.card-wrapper:nth-child(1) { z-index: 1; }
.card-wrapper:nth-child(2) { z-index: 2; }
.card-wrapper:nth-child(3) { z-index: 3; }
.card-wrapper:nth-child(4) { z-index: 4; }
.card-wrapper:nth-child(5) { z-index: 5; }

/* Card Inner */
.card-inner {
  height: 100%;
  width: 100%;
  background:
    linear-gradient(145deg, #16130d 0%, #0c0a07 62%, #050504 100%),
    radial-gradient(circle at 18% 18%, rgba(201, 169, 110, 0.06), transparent 34%);
  border: 1px solid rgba(201, 169, 110, 0.18);
  border-radius: 24px;
  padding: 48px 56px;
  box-shadow:
    0 42px 88px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 239, 204, 0.05),
    inset 0 -1px 0 rgba(201, 169, 110, 0.06);
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto minmax(0, auto);
  align-content: center;
  column-gap: 40px;
  overflow: hidden;
}

/* Card Glow Effect */
.card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 244, 214, 0.035), transparent 24%, transparent 78%, rgba(201, 169, 110, 0.035)),
    radial-gradient(circle at 0% 0%, rgba(201, 169, 110, 0.055) 0%, transparent 56%);
  pointer-events: none;
  z-index: 1;
}

/* Top Gold Line */
.card-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 184, 0.42), rgba(201, 169, 110, 0.18), transparent);
  pointer-events: none;
  z-index: 3;
}

.card-inner .glow-border {
  display: none;
}

/* Card Number */
.card-number {
  position: relative;
  top: auto;
  right: auto;
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: Arial, sans-serif;
  font-size: 5.6rem;
  font-weight: 200;
  color: rgba(201, 169, 110, 0.12);
  line-height: 1;
  letter-spacing: -0.04em;
  transition: all 0.5s ease;
  z-index: 2;
}

.card-number::after {
  content: '';
  position: absolute;
  top: 112px;
  bottom: 4px;
  left: 7px;
  width: 1px;
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.36), rgba(201, 169, 110, 0.04));
}

.card-wrapper:hover .card-number {
  color: rgba(201, 169, 110, 0.18);
  transform: translateY(-2px);
}

/* Card Title */
.card-title {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 500;
  color: #C9A96E;
  letter-spacing: 1px;
  margin: 0 0 16px;
  position: relative;
  grid-column: 2;
  max-width: 720px;
  z-index: 2;
  transition: all 0.5s ease;
}

.card-wrapper:hover .card-title {
  color: #d4b98a;
}

/* Card Divider */
.card-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #C9A96E, rgba(201, 169, 110, 0.3));
  margin: 0 0 26px;
  position: relative;
  grid-column: 2;
  z-index: 2;
  transition: width 0.5s ease;
}

.card-wrapper:hover .card-divider {
  width: 64px;
}

/* Card Tagline */
.card-tagline {
  font-size: 14px;
  color: rgba(201, 169, 110, 0.7);
  letter-spacing: 3px;
  margin: 0 0 18px;
  font-weight: 500;
  text-transform: uppercase;
  position: relative;
  grid-column: 2;
  z-index: 2;
}

/* Card Description */
.card-desc {
  font-size: 15px;
  color: rgba(235, 229, 216, 0.78);
  line-height: 1.9;
  letter-spacing: 0.3px;
  position: relative;
  grid-column: 2;
  z-index: 2;
  max-width: 760px;
  margin: 0;
}

/* Featured Card Styles */
.card-wrapper.featured .card-inner {
  background:
    linear-gradient(145deg, #1c160c 0%, #0c0905 100%),
    radial-gradient(circle at 20% 18%, rgba(214, 184, 122, 0.07), transparent 36%);
  border-color: rgba(201, 169, 110, 0.22);
}

.card-wrapper.featured .card-title {
  color: #C9A96E;
}

/* Card Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  position: relative;
  grid-column: 2;
  z-index: 2;
}

.card-tags span {
  font-size: 11px;
  color: rgba(201, 169, 110, 0.6);
  letter-spacing: 1px;
  padding: 8px 16px;
  background: rgba(201, 169, 110, 0.08);
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 110, 0.18);
  transition: all 0.3s ease;
}

.card-wrapper:hover .card-tags span {
  color: rgba(201, 169, 110, 0.9);
  background: rgba(201, 169, 110, 0.1);
  border-color: rgba(201, 169, 110, 0.2);
}

/* Bottom Space for scroll */
.stack-bottom-space {
  height: 100vh;
}

/* Hover Effects */
.card-wrapper:hover .card-inner {
  border-color: rgba(201, 169, 110, 0.15);
  box-shadow: 
    0 50px 100px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(201, 169, 110, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --stack-card-height: 350px;
    --stack-top-offset: 40px;
  }
  
  .card-inner {
    padding: 32px 28px;
  }
  
  .card-number {
    font-size: 4rem;
    right: 20px;
    top: 16px;
  }
  
  .card-title {
    font-size: 20px;
  }
  
  .card-tagline {
    font-size: 12px;
    letter-spacing: 2px;
  }
  
  .card-desc {
    font-size: 13px;
    line-height: 1.8;
  }
  
  .card-tags {
    gap: 8px;
  }
  
  .card-tags span {
    font-size: 10px;
    padding: 4px 10px;
  }
}
