/* Feature Cards - Organic Color Swatches */
.book-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card-wrapper {
    position: relative;
    width: clamp(300px, 80vw, 380px);
}

.feature-card {
    position: relative;
    padding: 4rem 2.5rem 3rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 8px 15px rgba(118, 75, 162, 0.08));
    transition: transform 0.4s ease, filter 0.4s ease, background 0.4s ease, clip-path 0.5s cubic-bezier(0.45, 0, 0.55, 1);
    overflow: hidden; /* For glare effect */
    animation: gentleFloat 6s ease-in-out infinite;
}

.feature-card--shape1 { animation-delay: 0s; }
.feature-card--shape2 { animation-delay: -1.5s; }
.feature-card--shape3 { animation-delay: -3s; }
.feature-card--shape4 { animation-delay: -4.5s; }

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.feature-card::before { /* Inner glow */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(1.1); }
}

.feature-card::after { /* Glare effect */
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 70%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    animation: gentleGlare 8s ease-in-out infinite;
}

@keyframes gentleGlare {
    0%, 100% { left: -150%; }
    50% { left: 150%; }
}

.feature-card:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 15px 30px rgba(118, 75, 162, 0.12));
    background: rgba(255, 255, 255, 0.98);
    animation-play-state: paused;
}

.feature-card:hover::before {
    opacity: 1;
    animation-play-state: paused;
}

.feature-card:hover::after {
    left: 150%;
    animation-play-state: paused;
}

/* Graceful, elongated shapes */
.feature-card--shape1 { clip-path: polygon(50% 0, 98% 22%, 88% 88%, 50% 100%, 12% 88%, 2% 22%); }
.feature-card--shape2 { clip-path: polygon(50% 0, 100% 25%, 90% 90%, 50% 100%, 10% 90%, 0 25%); }
.feature-card--shape3 { clip-path: polygon(50% 0, 95% 18%, 95% 85%, 50% 100%, 5% 85%, 5% 18%); }
.feature-card--shape4 { clip-path: polygon(50% 0, 90% 20%, 100% 80%, 50% 100%, 0 80%, 10% 20%); }

/* Shape morphing on hover */
.feature-card--shape1:hover { clip-path: polygon(50% 0, 100% 20%, 90% 90%, 50% 100%, 10% 90%, 0 20%); }
.feature-card--shape2:hover { clip-path: polygon(50% 0, 95% 25%, 85% 85%, 50% 100%, 15% 85%, 5% 25%); }
.feature-card--shape3:hover { clip-path: polygon(50% 0, 100% 15%, 90% 90%, 50% 100%, 10% 90%, 0 15%); }
.feature-card--shape4:hover { clip-path: polygon(50% 0, 98% 22%, 88% 88%, 50% 100%, 12% 88%, 2% 22%); }

.feature-icon {
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); }
    50% { filter: drop-shadow(0 2px 8px rgba(118, 75, 162, 0.2)); }
}

.feature-card--shape1 .feature-icon { animation-delay: 0s; }
.feature-card--shape2 .feature-icon { animation-delay: -0.75s; }
.feature-card--shape3 .feature-icon { animation-delay: -1.5s; }
.feature-card--shape4 .feature-icon { animation-delay: -2.25s; }

.feature-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #383838;
    animation: textBreath 4s ease-in-out infinite;
}

@keyframes textBreath {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.feature-card--shape1 h4 { animation-delay: 0s; }
.feature-card--shape2 h4 { animation-delay: -1s; }
.feature-card--shape3 h4 { animation-delay: -2s; }
.feature-card--shape4 h4 { animation-delay: -3s; }

.feature-card p {
    font-family: 'Crimson Text', serif;
    line-height: 1.65;
    font-size: 1.05rem;
    color: #625f5f;
    max-width: 30ch;
    margin: 0 auto;
}

/* Staggered Grid Layout for Desktop */
@media (min-width: 768px) {
    .book-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 2rem;
        align-items: center;
    }
    .feature-card-wrapper {
         width: auto;
    }
    .feature-card-wrapper:nth-child(odd) { justify-self: end; }
    .feature-card-wrapper:nth-child(even) { justify-self: start; }
    .feature-card-wrapper:nth-child(2) { transform: translateY(5rem); }
    .feature-card-wrapper:nth-child(3) { transform: translateY(-3rem); }
    .feature-card-wrapper:nth-child(4) { transform: translateY(2rem); }
}

/* Decorative Particles */
.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    filter: blur(1px);
    z-index: -1;
    animation: floatParticle 10s ease-in-out infinite;
}

.particle--1 { top: 5%; right: 10%; animation-delay: 0s; }
.particle--2 { bottom: 8%; left: 15%; animation-delay: -5s; }

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1.1); opacity: 0.9; }
    25% { transform: translate(15px, -20px) scale(1); opacity: 0.7; }
    50% { transform: translate(5px, 10px) scale(1.2); opacity: 1; }
    75% { transform: translate(-10px, -5px) scale(0.9); opacity: 0.8; }
}

/* Responsive design for feature cards */
@media (max-width: 768px) {
    .book-features {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 10px;
    }
    
    .feature-card {
        min-height: 180px;
        padding: 2rem 1.5rem;
    }
    
    .feature-icon {
        font-size: 3rem;
    }
    
    .feature-card h4 {
        font-size: 1.2rem;
    }
} 