/* ==========================================================================
   EXIFIO DESIGN SYSTEM: SCROLLYTELLING PIPELINE & 3D STACKED DECK
   Frosted Obsidian Glass Output Card & 3D Card Deck with Fast Snappy Scroll
   ========================================================================== */

.scrolly-pipeline-section {
  position: relative;
  background: rgba(5, 7, 10, 0.35);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.scrolly-track {
  height: 140vh;
  position: relative;
}

.scrolly-sticky-frame {
  position: sticky;
  top: var(--header-h-desktop, 72px);
  height: calc(100vh - var(--header-h-desktop, 72px));
  height: calc(100dvh - var(--header-h-desktop, 72px));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pipeline-stage-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

/* Left Column: Metadata Showcase */
.pipeline-left-col {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 16px;
  justify-content: center;
}

.pipeline-subtitle {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 2px;
}

.brand-glow-highlight {
  font-weight: 700;
  color: #ffffff;
}

/* Premium Frosted Obsidian Glass Inspection Card with Specular Sheen */
.pipeline-glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(20, 26, 40, 0.32) 40%, rgba(10, 14, 22, 0.24) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 
    0 24px 50px -10px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 25px rgba(245, 158, 11, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 500px;
  width: 100%;
  height: 520px;
  position: relative;
  overflow: hidden;
}

.pipeline-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  pointer-events: none;
}

.pipeline-glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), transparent, rgba(245, 158, 11, 0.25));
  pointer-events: none;
}

/* Card Header */
.card-glass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.glass-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #10b981;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 1.8s infinite;
}

.glass-time-badge {
  font-size: 0.74rem;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  font-weight: 600;
}

/* Metadata Fields (Airy & Typographic) */
.glass-field-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.glass-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.glass-label {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glass-badge-gold {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--gold-bright);
  background: var(--gold-glass);
  border: 1px solid var(--gold-glass-border);
  padding: 1px 7px;
  border-radius: 4px;
}

.glass-title-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.42;
  margin: 0;
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.glass-desc-text {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
  min-height: 60px;
  display: flex;
  align-items: flex-start;
}

/* Keywords Cloud (Clean floating pills) */
.glass-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  min-height: 180px;
  align-content: flex-start;
}

.glass-tag-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.glass-tag-pill:hover {
  background: var(--gold-glass);
  border-color: var(--gold-glass-border);
  color: var(--gold-bright);
}

/* Card Footer */
.card-glass-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 2px;
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
}

.footer-check-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 600;
}

.footer-agency-badge {
  color: var(--gold-bright);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Right Column: 3D Stacked Card Deck */
.pipeline-right-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.deck-stage-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 4.8;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.deck-stage-wrapper:active {
  cursor: grabbing;
}

.deck-card-item {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.95);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-card-item.front {
  z-index: 5;
  transform: rotate(0deg) scale(1) translateY(0);
  opacity: 1;
  border-color: var(--gold-glass-border);
}

.deck-card-item.behind-1 {
  z-index: 4;
  transform: rotate(4deg) scale(0.96) translateX(18px) translateY(8px);
  opacity: 0.65;
  filter: brightness(0.5);
  pointer-events: none;
}

.deck-card-item.behind-2 {
  z-index: 3;
  transform: rotate(-3.5deg) scale(0.92) translateX(-16px) translateY(16px);
  opacity: 0.35;
  filter: brightness(0.3);
  pointer-events: none;
}

.deck-card-item.hidden {
  z-index: 1;
  transform: scale(0.85) translateY(40px);
  opacity: 0;
  pointer-events: none;
}

.deck-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deck-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 30%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.deck-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.deck-step-num {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.deck-corner-badge {
  font-size: 0.74rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-bright);
  background: var(--gold-glass);
  border: 1px solid var(--gold-glass-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Prev / Next Circular Arrows inside card */
.deck-arrows-row {
  position: absolute;
  top: 48%;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.deck-circ-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(5, 7, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.deck-circ-btn:hover {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 18px var(--gold-glow);
}

/* Giant Title & Details at Card Bottom */
.deck-card-bottom-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.deck-big-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.deck-micro-desc {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
  margin: 0;
  max-width: 360px;
}

.deck-target-stocks-row {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--gold-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.deck-scroll-hint {
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

@media (max-width: 992px) {
  .pipeline-stage-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 28px; 
  }
  .pipeline-right-col { 
    order: 1; 
    width: 100%; 
  }
  .pipeline-left-col { 
    order: 2; 
    width: 100%; 
  }
  .scrolly-track { 
    height: auto; 
  }
  .scrolly-sticky-frame { 
    position: static; 
    height: auto; 
    padding: 40px 0; 
  }
  .deck-stage-wrapper { 
    max-width: 340px; 
    margin: 0 auto; 
  }
  .pipeline-glass-card {
    height: auto;
    min-height: auto;
    max-width: 100%;
    padding: 20px 18px;
  }
  .glass-tags-cloud {
    min-height: auto;
    max-height: 160px;
    overflow-y: auto;
  }
}
