/**
 * Matchic — Visual Storytelling
 * Before/After, Timeline, Outfit Cards, Animated Stats
 */

/* ===== BEFORE/AFTER SECTION ===== */
.before-after-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-12);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.before-card,
.after-card {
  padding: var(--space-8);
  border-radius: var(--glass-radius);
  position: relative;
  overflow: hidden;
}

.before-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.after-card {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.08), rgba(3, 218, 198, 0.02));
  border: 1px solid rgba(33, 150, 243, 0.15);
}

.before-card::before,
.after-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.before-card::before {
  background: linear-gradient(90deg, #EF4444, #F87171);
}

.after-card::before {
  background: linear-gradient(90deg, #2196F3, #03DAC6);
}

.before-label,
.after-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.before-label {
  color: #EF4444;
}

.after-label {
  color: var(--primary);
}

.before-card h3,
.after-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.before-card p,
.after-card p {
  font-size: var(--text-sm);
  opacity: 0.75;
  line-height: 1.6;
}

.before-visual,
.after-visual {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border-radius: var(--glass-radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.before-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.before-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  opacity: 0.5;
}

.before-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  flex-shrink: 0;
}

.before-item.strike {
  text-decoration: line-through;
  opacity: 0.3;
}

.after-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.after-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.after-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ===== OUTFIT CARDS ===== */
.outfit-showcase {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-10);
}

.outfit-card {
  width: 200px;
  padding: var(--space-5);
  background: var(--surface);
  backdrop-filter: blur(calc(var(--glass-blur) / 2));
  border: 0.75px solid var(--border);
  border-radius: var(--glass-radius);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out-cubic);
}

.outfit-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--primary);
}

.outfit-card-emoji {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  line-height: 1;
}

.outfit-card h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.outfit-card p {
  font-size: var(--text-xs);
  opacity: 0.6;
  margin-bottom: var(--space-3);
}

.outfit-card-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.outfit-card-tag {
  padding: 2px 10px;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 100px;
  font-size: 10px;
  color: var(--primary);
}

/* ===== DAY TIMELINE ===== */
.day-timeline {
  max-width: 700px;
  margin: var(--space-10) auto 0;
  position: relative;
}

.day-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  position: relative;
}

.timeline-dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.timeline-content p {
  font-size: var(--text-sm);
  opacity: 0.75;
}

.timeline-time {
  font-size: var(--text-xs);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

/* ===== ANIMATED STATS ===== */
.animated-stat {
  text-align: center;
}

.stat-number-wrapper {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: var(--space-2);
}

.animated-stat .stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.animated-stat .stat-suffix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.stat-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: var(--space-3);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transform-origin: left;
  animation: stat-bar-grow 1.5s var(--ease-out-expo) both;
}

@keyframes stat-bar-grow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
}

/* ===== PARALLAX GLOW ===== */
.parallax-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(33, 150, 243, 0.08), transparent 60%);
  pointer-events: none;
  filter: blur(80px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .before-after-grid {
    grid-template-columns: 1fr;
  }

  .outfit-card {
    width: 160px;
  }

  .day-timeline::before {
    left: 20px;
  }

  .timeline-dot {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
