/* ==========================================================================
   MAIN STYLES - Save the Date: Sarah & Ramzi
   Interactive Scratch Reveal Wedding Invitation
   ========================================================================== */

/* ===== CSS RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--blush-light);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== BACKGROUND DECORATION ===== */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--blush) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(20px, -20px) scale(1.05);
    }

    50% {
        transform: translate(-10px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-20px, -10px) scale(1.02);
    }
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl);
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    animation: fadeInDown 1s ease-out;
}

.header-subtitle {
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.header-title {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    color: var(--gold-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCRATCH CARD ===== */
.scratch-card-wrapper {
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scratch-card {
    position: relative;
    width: 350px;
    height: 350px;
    /* No clip-path - the heart image itself provides the shape */
    overflow: visible;
    cursor: pointer;
    background: transparent;
    filter: drop-shadow(0 8px 30px rgba(212, 175, 55, 0.3));
}

/* Hidden content layer (revealed by scratching) */
.scratch-card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    background: linear-gradient(180deg, var(--blush-cream) 0%, var(--white) 100%);
}

.couple-names {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    color: var(--gold-dark);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

.couple-names.revealed {
    opacity: 1;
    transform: translateY(0);
}

.invitation-text {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
    transition-delay: 0.1s;
}

.invitation-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.wedding-date {
    font-family: var(--font-accent);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: var(--space-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
    transition-delay: 0.2s;
}

.wedding-date.revealed {
    opacity: 1;
    transform: translateY(0);
}

.save-the-date-label {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    color: var(--rose);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-smooth);
    transition-delay: 0.3s;
}

.save-the-date-label.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Heart decoration */
.heart-decoration {
    position: absolute;
    bottom: 30px;
    font-size: 24px;
    opacity: 0;
    transition: all var(--transition-smooth);
    transition-delay: 0.4s;
}

.heart-decoration.revealed {
    opacity: 1;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Scratch canvas overlay */
.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="10" fill="%23D4AF37" opacity="0.8"/></svg>') 16 16, pointer;
}

/* Scratch instruction */
.scratch-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    transition: opacity var(--transition-base);
    background: rgba(255, 255, 255, 0.9);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.scratch-instruction.hidden {
    opacity: 0;
}

.scratch-icon {
    font-size: 48px;
    margin-bottom: var(--space-sm);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.scratch-text {
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Progress indicator */
.progress-container {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--blush);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.progress-fill {
    height: 100%;
    background: var(--gold-shimmer);
    width: 0%;
    transition: width var(--transition-fast);
    border-radius: var(--radius-full);
}

.progress-text {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ===== CALENDAR BUTTON ===== */
.calendar-button-wrapper {
    margin-top: var(--space-3xl);
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: all var(--transition-smooth);
}

.calendar-button-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.calendar-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-accent);
    font-size: var(--text-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    background: var(--gold-shimmer);
    background-size: 200% 100%;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-base);
    text-decoration: none;
}

.calendar-button:hover {
    background-position: 100% 0;
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.calendar-button:active {
    transform: translateY(-1px);
}

.calendar-icon {
    font-size: var(--text-xl);
}

/* ===== FOOTER ===== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: var(--space-md);
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: linear-gradient(transparent, var(--blush-light));
}

.footer-heart {
    color: var(--rose);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .header-title {
        font-size: var(--text-4xl);
    }

    .scratch-card {
        width: 280px;
        height: 280px;
        clip-path: path('M140 24 C140 24 140 0 112 0 C56 0 0 56 0 112 C0 184 140 280 140 280 C140 280 280 184 280 112 C280 56 224 0 168 0 C140 0 140 24 140 24 Z');
    }

    .couple-names {
        font-size: var(--text-2xl);
    }

    .invitation-text {
        font-size: var(--text-base);
    }

    .wedding-date {
        font-size: var(--text-lg);
    }

    .save-the-date-label {
        font-size: var(--text-xl);
    }

    .calendar-button {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--text-sm);
    }

    .scratch-instruction {
        padding: var(--space-md) var(--space-lg);
    }

    .scratch-icon {
        font-size: 36px;
    }
}

@media (min-width: 768px) {
    .scratch-card {
        width: 400px;
        height: 400px;
        clip-path: path('M200 34 C200 34 200 0 160 0 C80 0 0 80 0 160 C0 263 200 400 200 400 C200 400 400 263 400 160 C400 80 320 0 240 0 C200 0 200 34 200 34 Z');
    }

    .couple-names {
        font-size: var(--text-4xl);
    }
}

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}