/*
    Seasonal theming for the landing page hero.
    js/seasonal.js sets [data-season] on #home; each theme overrides the site
    palette (and a few --season-* hooks) for everything inside it.
*/

.hero.season-loading .carousel-container {
    visibility: hidden;
}

.hero[data-season] {
    --season-heading: var(--coral-pink);
    --season-caption-price: #FFE27A;
    position: relative;
    overflow: hidden;
    background: var(--season-bg);
}

.hero[data-season] .hero-container {
    position: relative;
    z-index: 1;
}

.hero[data-season] .hero-title {
    color: var(--season-heading);
}

/* Decorative garlands along the top and bottom edges */
.hero[data-season]::before,
.hero[data-season]::after {
    content: attr(data-decor);
    position: absolute;
    left: -12rem;
    right: -12rem;
    height: 2rem;
    overflow: hidden;
    white-space: nowrap;
    font-size: 1.4rem;
    line-height: 2rem;
    letter-spacing: 1.2rem;
    opacity: 0.85;
    pointer-events: none;
    animation: season-sway 12s ease-in-out infinite alternate;
}

.hero[data-season]::before { top: 0.75rem; }
.hero[data-season]::after  { bottom: 0.75rem; animation-direction: alternate-reverse; }

@keyframes season-sway {
    from { transform: translateX(0); }
    to   { transform: translateX(8rem); }
}

.hero[data-season] .hero-details > * {
    animation: season-rise 0.6s ease-out both;
}

.hero[data-season] .hero-subtitle    { animation-delay: 0.1s; }
.hero[data-season] .hero-description { animation-delay: 0.2s; }
.hero[data-season] .hero-buttons     { animation-delay: 0.3s; }

.hero[data-season] .carousel-container {
    animation: season-rise 0.6s 0.15s ease-out both;
}

@keyframes season-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

.hero[data-season] .carousel {
    box-shadow: 0 20px 40px color-mix(in srgb, var(--coral-pink) 35%, transparent);
}

.hero[data-season] .carousel-indicator {
    background: color-mix(in srgb, var(--coral-pink) 35%, transparent);
}

.hero[data-season] .carousel-indicator.active {
    background: var(--coral-pink);
}

/* Product caption laid over the bottom of the slide image */
.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4rem 1rem 1.25rem;
    text-align: center;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.slide-caption h3 {
    font-family: var(--fancy-font), cursive;
    font-size: 2rem;
    font-weight: var(--fancy-font-weight);
    line-height: 1.1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.slide-price {
    margin-top: 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--season-caption-price);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.slide-order {
    margin-top: 0.75rem;
    padding: 8px 24px;
    font-size: 0.95rem;
    background: var(--coral-pink);
    color: white;
    border-color: var(--coral-pink);
    pointer-events: auto;
}

.slide-order:hover {
    background: white;
    color: var(--coral-pink);
    transform: translateY(-2px);
}

/* Themes */

.hero[data-season="valentines"] {
    --coral-pink: #D81B60;
    --primary-yellow: #FF6F91;
    --medium-text: #7A1F3D;
    --season-bg: linear-gradient(135deg, #FFE3EA 0%, #FFC2D1 100%);
}

.hero[data-season="mothers-day"] {
    --coral-pink: #A94F9B;
    --primary-yellow: #E58FB0;
    --medium-text: #6B2D63;
    --season-bg: linear-gradient(135deg, #FBEAF5 0%, #F1D3EC 100%);
}

.hero[data-season="communion"] {
    --coral-pink: #5B84B8;
    --primary-yellow: #D4A93C;
    --medium-text: #3C5578;
    --season-bg: linear-gradient(135deg, #F7FAFF 0%, #DCE8F7 100%);
}

.hero[data-season="teachers"] {
    --coral-pink: #D9472B;
    --primary-yellow: #E5A800;
    --medium-text: #7A4B00;
    --season-bg: linear-gradient(135deg, #FFF6D6 0%, #FFE59A 100%);
}

.hero[data-season="halloween"] {
    --coral-pink: #FF7A1A;
    --primary-yellow: #B98AF0;
    --medium-text: #E7D9F5;
    --season-heading: #FF9B4A;
    --season-bg: radial-gradient(circle at 70% 0%, #3B1F58 0%, #1A0F26 75%);
}

.hero[data-season="halloween"] .hero-title {
    text-shadow: 0 0 18px rgba(255, 122, 26, 0.55);
}

.hero[data-season="halloween"] .carousel {
    box-shadow: 0 0 40px rgba(255, 122, 26, 0.4);
}

.hero[data-season="christmas"] {
    --coral-pink: #C62828;
    --primary-yellow: #D4AF37;
    --medium-text: #F2E8C9;
    --season-heading: #F6D365;
    --season-bg: linear-gradient(135deg, #134E36 0%, #0B2F21 100%);
}

.hero[data-season="christmas"] .carousel-indicator {
    background: rgba(255, 255, 255, 0.35);
}

.hero[data-season="christmas"] .carousel-indicator.active {
    background: #F6D365;
}

@media (max-width: 768px) {
    .hero[data-season]::before,
    .hero[data-season]::after {
        font-size: 1.1rem;
        letter-spacing: 0.8rem;
    }

    .hero[data-season] .hero-container {
        padding: 1.5rem 0;
    }

    .slide-caption {
        padding-top: 3rem;
    }

    .slide-caption h3 {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero[data-season]::before,
    .hero[data-season]::after,
    .hero[data-season] .hero-details > *,
    .hero[data-season] .carousel-container {
        animation: none;
    }
}
