/* CSS Custom Properties */
:root {
    --candy-pink: #FF6B9D;
    --candy-yellow: #FFD93D;
    --candy-mint: #6BCB77;
    --candy-blue: #4ECDC4;
    --candy-grape: #9B5DE5;

    --bg-cream: #FFF9F0;
    --bg-lavender: #F4EEFF;

    --text-primary: #3D2C2E;
    --text-secondary: #8B7E74;
    --border-plum: #C9A0DC;

    --radius-card: 24px;
    --radius-feature: 32px;

    --shadow-offset: 6px;
    --gap: 20px;
    --padding-section: clamp(24px, 5vw, 80px);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.65;
}

/* SVG Pattern Backgrounds */
.cream-pattern {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="20" cy="20" r="4" fill="%23FF6B9D" opacity="0.05"/><circle cx="60" cy="40" r="3" fill="%234ECDC4" opacity="0.05"/><polygon points="80,20 85,30 75,30" fill="%23FFD93D" opacity="0.05"/><circle cx="40" cy="70" r="3" fill="%236BCB77" opacity="0.05"/><circle cx="80" cy="80" r="4" fill="%239B5DE5" opacity="0.05"/></svg>');
    background-size: 100px 100px;
}

.lavender-pattern {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="20" cy="20" r="6" fill="%234ECDC4" opacity="0.04"/><circle cx="20" cy="20" r="4" fill="%234ECDC4" opacity="0.06"/><rect x="50" y="50" width="20" height="20" rx="6" fill="%239B5DE5" opacity="0.04"/><circle cx="70" cy="30" r="5" fill="%234ECDC4" opacity="0.05"/></svg>');
    background-size: 100px 100px;
}

/* Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--candy-pink) 0%, var(--candy-yellow) 20%, var(--candy-mint) 40%, var(--candy-blue) 60%, var(--candy-grape) 80%, var(--candy-pink) 100%);
    width: 0%;
    z-index: 1000;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-cream);
    position: relative;
    overflow: hidden;
}

.hero-container {
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.hero-syllable {
    display: inline-block;
    animation: hero-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-syllable:nth-child(1) {
    animation-delay: 0s;
}

.hero-syllable:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-syllable:nth-child(3) {
    animation-delay: 0.4s;
    animation: hero-bounce-final 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes hero-bounce {
    0% {
        transform: translateY(60px) scale(0.85);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes hero-bounce-final {
    0% {
        transform: translateY(60px) scale(0.85);
        opacity: 0;
    }
    100% {
        transform: translateY(-5px) scale(1);
        opacity: 1;
    }
}

/* Floating Motifs */
.floating-motifs {
    position: relative;
    height: 150px;
    margin-top: 2rem;
}

.float-element {
    position: absolute;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    animation: float 6s ease-in-out infinite;
}

.float-element:nth-child(1) {
    left: 10%;
    top: 20px;
    animation-duration: 6s;
    animation-delay: 0s;
}

.float-element:nth-child(2) {
    right: 15%;
    top: 0px;
    animation-duration: 7s;
    animation-delay: 0.5s;
}

.float-element:nth-child(3) {
    left: 20%;
    top: 80px;
    animation-duration: 8s;
    animation-delay: 1s;
}

.float-element:nth-child(4) {
    right: 25%;
    top: 60px;
    animation-duration: 6.5s;
    animation-delay: 0.3s;
}

.float-element:nth-child(5) {
    left: 35%;
    bottom: 10px;
    animation-duration: 7.5s;
    animation-delay: 0.8s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

/* Grid Section */
.grid-section {
    background-color: var(--bg-lavender);
    padding: var(--padding-section);
    min-height: auto;
}

.grid-section.cream {
    background-color: var(--bg-cream);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
    max-width: 1400px;
    margin: 0 auto;
}

/* Card Styles */
.card {
    border-radius: var(--radius-card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(60px) scale(0.85);
}

.standard-card {
    height: auto;
    min-height: 380px;
    border: 3px solid;
    grid-row: span 1;
}

.card[data-candy="pink"] {
    background-color: rgba(255, 107, 157, 0.15);
    border-color: rgba(255, 107, 157, 0.4);
    box-shadow: 6px 6px 0px rgba(255, 107, 157, 0.5);
}

.card[data-candy="yellow"] {
    background-color: rgba(255, 217, 61, 0.15);
    border-color: rgba(255, 217, 61, 0.4);
    box-shadow: 6px 6px 0px rgba(255, 217, 61, 0.5);
}

.card[data-candy="mint"] {
    background-color: rgba(107, 203, 119, 0.15);
    border-color: rgba(107, 203, 119, 0.4);
    box-shadow: 6px 6px 0px rgba(107, 203, 119, 0.5);
}

.card[data-candy="blue"] {
    background-color: rgba(78, 205, 196, 0.15);
    border-color: rgba(78, 205, 196, 0.4);
    box-shadow: 6px 6px 0px rgba(78, 205, 196, 0.5);
}

.card[data-candy="grape"] {
    background-color: rgba(155, 93, 229, 0.15);
    border-color: rgba(155, 93, 229, 0.4);
    box-shadow: 6px 6px 0px rgba(155, 93, 229, 0.5);
}

/* Card Entrance Animation */
.card.animate-in {
    animation: card-bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes card-bounce-in {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.85);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Card Hover */
.card:hover {
    transform: translateY(-8px) rotate(1.5deg);
    box-shadow: 10px 10px 0px;
}

.card[data-candy="pink"]:hover {
    box-shadow: 10px 10px 0px rgba(255, 107, 157, 0.5);
}

.card[data-candy="yellow"]:hover {
    box-shadow: 10px 10px 0px rgba(255, 217, 61, 0.5);
}

.card[data-candy="mint"]:hover {
    box-shadow: 10px 10px 0px rgba(107, 203, 119, 0.5);
}

.card[data-candy="blue"]:hover {
    box-shadow: 10px 10px 0px rgba(78, 205, 196, 0.5);
}

.card[data-candy="grape"]:hover {
    box-shadow: 10px 10px 0px rgba(155, 93, 229, 0.5);
}

/* Card Icon */
.card-icon {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    max-width: 120px;
    max-height: 120px;
}

/* Card Title */
.card-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Card Text */
.card-text {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Mini Card Pulse */
.mini-card {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Gallery Band Section */
.gallery-band-section {
    background-color: var(--bg-cream);
    padding: 3rem var(--padding-section);
    overflow: hidden;
}

.gallery-band {
    display: flex;
    gap: 2rem;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
    width: fit-content;
}

.gallery-band:hover {
    animation-play-state: paused;
}

.band-item {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    flex-shrink: 0;
    display: inline-block;
}

/* Duplicate band items for seamless loop */
.gallery-band::after {
    content: '';
    display: block;
    min-width: 100vw;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Closing Spread Section */
.closing-spread {
    background-color: var(--bg-lavender);
    padding: var(--padding-section);
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.closing-title {
    font-family: 'Baloo 2', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--candy-pink) 0%, var(--candy-grape) 50%, var(--candy-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.closing-illustration {
    width: 100%;
    max-width: 700px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: 300px;
    }

    .card:hover {
        transform: translateY(-4px) rotate(0deg);
        box-shadow: 4px 4px 0px;
    }

    .card[data-candy="pink"]:hover {
        box-shadow: 4px 4px 0px rgba(255, 107, 157, 0.5);
    }

    .card[data-candy="yellow"]:hover {
        box-shadow: 4px 4px 0px rgba(255, 217, 61, 0.5);
    }

    .card[data-candy="mint"]:hover {
        box-shadow: 4px 4px 0px rgba(107, 203, 119, 0.5);
    }

    .card[data-candy="blue"]:hover {
        box-shadow: 4px 4px 0px rgba(78, 205, 196, 0.5);
    }

    .card[data-candy="grape"]:hover {
        box-shadow: 4px 4px 0px rgba(155, 93, 229, 0.5);
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .closing-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }
}

@media (max-width: 480px) {
    :root {
        --padding-section: 1rem;
        --gap: 12px;
    }

    .card-grid {
        gap: 12px;
    }

    .card {
        border: 2px solid;
        padding: 1rem;
    }

    .card[data-candy="pink"] {
        box-shadow: 4px 4px 0px rgba(255, 107, 157, 0.5);
    }

    .card[data-candy="yellow"] {
        box-shadow: 4px 4px 0px rgba(255, 217, 61, 0.5);
    }

    .card[data-candy="mint"] {
        box-shadow: 4px 4px 0px rgba(107, 203, 119, 0.5);
    }

    .card[data-candy="blue"] {
        box-shadow: 4px 4px 0px rgba(78, 205, 196, 0.5);
    }

    .card[data-candy="grape"] {
        box-shadow: 4px 4px 0px rgba(155, 93, 229, 0.5);
    }

    .card-icon {
        height: 100px;
    }

    .gallery-band-section {
        padding: 1.5rem 1rem;
    }

    .closing-spread {
        padding: 1rem;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Focus Visible */
.card:focus-visible {
    outline: 3px dashed;
    outline-offset: 4px;
}

.card[data-candy="pink"]:focus-visible {
    outline-color: var(--candy-pink);
}

.card[data-candy="yellow"]:focus-visible {
    outline-color: var(--candy-yellow);
}

.card[data-candy="mint"]:focus-visible {
    outline-color: var(--candy-mint);
}

.card[data-candy="blue"]:focus-visible {
    outline-color: var(--candy-blue);
}

.card[data-candy="grape"]:focus-visible {
    outline-color: var(--candy-grape);
}
