/* Comportamiento de scroll suave */
html {
    scroll-behavior: smooth;
}

/* Animación de los blobs del hero */
.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Estrellas del formulario de reseñas */
.star-btn {
    cursor: pointer;
    transition: transform 0.1s;
}

.star-btn:hover {
    transform: scale(1.2);
}

/* ============================================
   SECCIÓN 3D SCROLL - PASTEL ANIMADO
   ============================================ */

#pastel-3d {
    position: relative;
    height: 400vh;
    background: linear-gradient(180deg, #fdf2f8 0%, #0f0a1a 8%, #0f0a1a 92%, #ffffff 100%);
}

.cake-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1200px;
}

/* --- Fondo de partículas --- */
.cake-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.cake-particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.cake-particle.visible {
    opacity: 1;
}

.cake-particle:nth-child(1) {
    width: 6px;
    height: 6px;
    background: #f472b6;
    top: 15%;
    left: 10%;
    animation: particleFloat 6s ease-in-out infinite;
}

.cake-particle:nth-child(2) {
    width: 8px;
    height: 8px;
    background: #c084fc;
    top: 25%;
    right: 15%;
    animation: particleFloat 8s ease-in-out infinite 1s;
}

.cake-particle:nth-child(3) {
    width: 5px;
    height: 5px;
    background: #fb7185;
    top: 60%;
    left: 8%;
    animation: particleFloat 7s ease-in-out infinite 2s;
}

.cake-particle:nth-child(4) {
    width: 10px;
    height: 10px;
    background: #e879f9;
    top: 70%;
    right: 12%;
    animation: particleFloat 9s ease-in-out infinite 0.5s;
}

.cake-particle:nth-child(5) {
    width: 4px;
    height: 4px;
    background: #fda4af;
    top: 40%;
    left: 20%;
    animation: particleFloat 5s ease-in-out infinite 3s;
}

.cake-particle:nth-child(6) {
    width: 7px;
    height: 7px;
    background: #a78bfa;
    top: 80%;
    left: 60%;
    animation: particleFloat 7s ease-in-out infinite 1.5s;
}

.cake-particle:nth-child(7) {
    width: 12px;
    height: 12px;
    background: rgba(244, 114, 182, 0.3);
    top: 20%;
    left: 45%;
    animation: particleFloat 10s ease-in-out infinite 2s;
    filter: blur(2px);
}

.cake-particle:nth-child(8) {
    width: 14px;
    height: 14px;
    background: rgba(192, 132, 252, 0.25);
    top: 55%;
    right: 30%;
    animation: particleFloat 11s ease-in-out infinite 4s;
    filter: blur(3px);
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }

    25% {
        transform: translateY(-20px) translateX(10px);
    }

    50% {
        transform: translateY(-10px) translateX(-15px);
    }

    75% {
        transform: translateY(-30px) translateX(5px);
    }
}

/* --- Pastel 3D --- */
.cake-3d-wrapper {
    position: relative;
    z-index: 10;
    transform-style: preserve-3d;
    transition: transform 0.05s linear;
    will-change: transform;
}

.cake-scene {
    width: 280px;
    height: 320px;
    position: relative;
    transform-style: preserve-3d;
}

/* Sombra del pastel */
.cake-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) rotateX(90deg);
    width: 240px;
    height: 240px;
    background: radial-gradient(ellipse, rgba(236, 72, 153, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
}

/* Base / Plato */
.cake-plate {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotateX(65deg);
    width: 270px;
    height: 270px;
    background: radial-gradient(ellipse at 30% 30%, #f5f5f5, #d4d4d8);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Capas del pastel */
.cake-tier {
    position: absolute;
    left: 50%;
    border-radius: 50%;
    transform-style: preserve-3d;
}

/* Capa 1 - Base */
.cake-tier-1 {
    width: 220px;
    height: 220px;
    bottom: 20px;
    transform: translateX(-50%) rotateX(65deg);
}

.cake-tier-1 .cake-tier-top {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 50%, #f472b6 100%);
    box-shadow: inset 0 -5px 15px rgba(219, 39, 119, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cake-tier-1 .cake-tier-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translateZ(-80px);
    background: linear-gradient(180deg, #ec4899, #db2777);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
}

.cake-tier-1 .cake-tier-body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, #f472b6, #ec4899, #db2777);
    transform: translateZ(-40px) rotateX(-90deg);
    transform-origin: top;
    border-radius: 0 0 20px 20px;
}

/* Capa 2 - Medio */
.cake-tier-2 {
    width: 170px;
    height: 170px;
    bottom: 95px;
    transform: translateX(-50%) rotateX(65deg);
}

.cake-tier-2 .cake-tier-top {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 50%, #a855f7 100%);
    box-shadow: inset 0 -5px 15px rgba(147, 51, 234, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cake-tier-2 .cake-tier-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translateZ(-70px);
    background: linear-gradient(180deg, #a855f7, #9333ea);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.3);
}

/* Capa 3 - Tope */
.cake-tier-3 {
    width: 120px;
    height: 120px;
    bottom: 160px;
    transform: translateX(-50%) rotateX(65deg);
}

.cake-tier-3 .cake-tier-top {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 50%, #f9a8d4 100%);
    box-shadow: inset 0 -5px 15px rgba(236, 72, 153, 0.2), 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cake-tier-3 .cake-tier-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translateZ(-60px);
    background: linear-gradient(180deg, #f9a8d4, #f472b6);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Decoraciones del pastel */
.cake-cherry {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.cake-cherry-ball {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 35% 35%, #ff6b8a, #e11d48);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.2);
}

.cake-cherry-stem {
    width: 3px;
    height: 18px;
    background: linear-gradient(to bottom, #4ade80, #16a34a);
    border-radius: 2px;
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(8deg);
}

/* Frosting drips */
.frosting-drip {
    position: absolute;
    background: linear-gradient(180deg, #fce7f3, #fbcfe8);
    border-radius: 0 0 50% 50%;
    opacity: 0.9;
}

.cake-tier-1 .frosting-drip:nth-child(3) {
    width: 18px;
    height: 30px;
    top: 5px;
    left: 20%;
}

.cake-tier-1 .frosting-drip:nth-child(4) {
    width: 14px;
    height: 22px;
    top: 8px;
    left: 55%;
}

.cake-tier-1 .frosting-drip:nth-child(5) {
    width: 16px;
    height: 35px;
    top: 3px;
    left: 80%;
}

/* Sprinkles */
.cake-sprinkle {
    position: absolute;
    width: 4px;
    height: 12px;
    border-radius: 3px;
}

/* --- Textos del scroll --- */
.scroll-text-panel {
    position: absolute;
    z-index: 20;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.scroll-text-panel.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-text-panel h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.scroll-text-panel p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.text-gradient-pink {
    background: linear-gradient(135deg, #f472b6, #e879f9, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(135deg, #c084fc, #a855f7, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-rose {
    background: linear-gradient(135deg, #fb7185, #f43f5e, #e11d48);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-text-panel.panel-top {
    top: 18%;
}

.scroll-text-panel.panel-bottom {
    bottom: 8%;
}

/* Glow ring around cake */
.cake-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.cake-glow.visible {
    opacity: 1;
}

/* Scroll indicator */
.scroll-indicator-3d {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.scroll-indicator-3d.visible {
    opacity: 1;
}

.scroll-indicator-3d span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }

    50% {
        transform: rotate(45deg) translateY(8px);
        opacity: 0.5;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #pastel-3d {
        height: 350vh;
    }

    .cake-scene {
        width: 200px;
        height: 240px;
        transform: scale(0.85);
    }

    .cake-plate {
        width: 200px;
        height: 200px;
    }

    .cake-tier-1 {
        width: 170px;
        height: 170px;
    }

    .cake-tier-2 {
        width: 130px;
        height: 130px;
        bottom: 85px;
    }

    .cake-tier-3 {
        width: 90px;
        height: 90px;
        bottom: 145px;
    }

    .cake-glow {
        width: 260px;
        height: 260px;
    }
}

@media (max-width: 480px) {
    .cake-scene {
        transform: scale(0.7);
    }
}