/**
 * Breathing Cards CSS
 * Organic, living testimonial cards
 */

/* ============================================================================
   BASE BREATHING CARD
   ============================================================================ */

.breathing-card {
  --breath-delay: 0ms;
  
  position: relative;
  transform-style: preserve-3d;
  transition: 
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  will-change: transform;
}

/* ============================================================================
   BREATHING ANIMATION
   ============================================================================ */

.breathing-card.is-breathing:not(.is-hovered) {
  animation: card-breathe 4000ms ease-in-out infinite;
  animation-delay: var(--breath-delay);
}

@keyframes card-breathe {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.01) translateY(-2px);
  }
}

/* ============================================================================
   GLOW LAYER
   ============================================================================ */

.breathing-card__glow {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(74, 103, 65, 0.15) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.breathing-card.is-hovered .breathing-card__glow {
  opacity: 1;
}

/* ============================================================================
   HOVER STATE
   ============================================================================ */

.breathing-card.is-hovered {
  z-index: 10;
}

/* Content rises on hover */
.breathing-card.is-hovered > * {
  position: relative;
  z-index: 1;
}

/* ============================================================================
   CARD CONTENT STYLING
   ============================================================================ */

.breathing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* Quote styling */
.breathing-card__quote {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary, var(--color-text-primary));
  margin-bottom: 16px;
  position: relative;
}

/* Quote marks */
.breathing-card__quote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: -8px;
  font-size: var(--text-5xl);
  font-family: Georgia, serif;
  color: rgba(74, 103, 65, 0.15);
  line-height: 1;
}

/* Author styling */
.breathing-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breathing-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-ferni, var(--color-ferni)) 0%,
    var(--color-ferni-secondary) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: var(--text-sm);
}

.breathing-card__name {
  font-weight: 600;
  color: var(--color-text-primary, var(--color-text-primary));
  font-size: var(--text-sm);
}

.breathing-card__role {
  font-size: var(--text-sm);
  color: var(--color-text-secondary, var(--color-text-secondary));
}

/* ============================================================================
   SHINE EFFECT ON HOVER
   ============================================================================ */

.breathing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  pointer-events: none;
}

.breathing-card.is-hovered::before {
  left: 100%;
}

/* ============================================================================
   STAGGERED REVEAL
   ============================================================================ */

.breathing-card[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: 
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.breathing-card[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.breathing-card[data-reveal]:nth-child(1) { transition-delay: 0ms; }
.breathing-card[data-reveal]:nth-child(2) { transition-delay: 100ms; }
.breathing-card[data-reveal]:nth-child(3) { transition-delay: 200ms; }
.breathing-card[data-reveal]:nth-child(4) { transition-delay: 300ms; }

/* ============================================================================
   GRID LAYOUT
   ============================================================================ */

.breathing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px 0;
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .breathing-card.is-breathing:not(.is-hovered) {
    animation: none;
  }
  
  .breathing-card::before {
    display: none;
  }
}

