/* ═══════════════════════════════════════════
   VALENTINE'S DAY - For Rosa
   Dark & Luxurious · Tap-to-Advance
   ═══════════════════════════════════════════ */

:root {
    --bg: #0a0a0a;
    --burgundy: #8B0000;
    --burgundy-light: #a83232;
    --gold: #C9A96E;
    --gold-dim: rgba(201, 169, 110, 0.3);
    --cream: #F5F0E8;
    --cream-dim: rgba(245, 240, 232, 0.6);
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-cursive: 'Great Vibes', cursive;
    --font-sans: 'Montserrat', sans-serif;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--cream);
    font-family: var(--font-sans);
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════
   STEP SYSTEM
   ═══════════════════════════════════════════ */
.step {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
    background: var(--bg);
}

.step.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.step-inner {
    text-align: center;
    padding: 0 32px;
    z-index: 2;
}

/* Text elements animate in when step becomes active */
.step.active .hero-name {
    animation: fadeInScale 1.8s ease-out 0.3s both;
}

.step.active .hero-subtitle {
    animation: fadeInUp 1.2s ease-out 2s both;
}

.step.active .quote-line {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.step.active .quote-line.line-delay-1 {
    animation-delay: 0.9s;
}

.step.active .ask-name {
    animation: fadeInScale 1.2s ease-out 0.3s both;
}

.step.active .ask-question {
    animation: fadeInUp 1.2s ease-out 1s both;
}

.step.active .ask-buttons {
    animation: fadeInUp 1s ease-out 1.8s both;
}

.step.active .celebration-content {
    animation: fadeInScale 1.5s ease-out 0.5s both;
}

/* ═══════════════════════════════════════════
   NEXT BUTTON
   ═══════════════════════════════════════════ */
.next-btn {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid var(--gold-dim);
    border-radius: 40px;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    animation: fadeInUp 1s ease-out 3s both;
    transition: background 0.3s ease, transform 0.15s ease;
}

.step.active .next-btn {
    animation: fadeInUp 1s ease-out 3s both;
}



.next-btn:active {
    transform: scale(0.95);
}


.next-btn svg {
    width: 16px;
    height: 16px;
}

/* Music button removed — music auto-plays, no toggle */

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0); }
    20% { opacity: 0.6; }
    80% { opacity: 0.2; }
    100% { opacity: 0; transform: translateY(-120px) scale(1); }
}

.hero-name {
    font-family: var(--font-cursive);
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 400;
    color: var(--gold);
    line-height: 1.2;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--cream-dim);
    margin-top: 16px;
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════
   QUOTE TEXT
   ═══════════════════════════════════════════ */
.quote-line {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--cream);
    letter-spacing: 1px;
}

.quote-line em {
    font-style: italic;
    color: var(--gold);
}

/* ═══════════════════════════════════════════
   SLIDESHOW
   ═══════════════════════════════════════════ */
.step[data-step="2"] {
    background: #000;
    padding: 0;
}

.slideshow-container {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img,
.slide video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6), 0 0 80px rgba(201, 169, 110, 0.08);
}

/* Text slides within slideshow */
.slide-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg);
}

.slide-text p {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 5vw, 2rem);
    font-weight: 300;
    font-style: italic;
    text-align: center;
    color: var(--cream);
    line-height: 1.6;
    letter-spacing: 1px;
    max-width: 500px;
}

.slide-text p em {
    color: var(--gold);
    font-style: italic;
}

/* Progress bar */
.slideshow-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.slideshow-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--burgundy), var(--gold));
    width: 0%;
    transition: width 0.3s linear;
}

/* Counter */
.slideshow-counter {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    font-family: var(--font-sans);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* Nav touch areas */
.slideshow-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 5;
    cursor: pointer;
}

.slideshow-prev { left: 0; }
.slideshow-next { right: 0; }

/* ═══════════════════════════════════════════
   THE ASK
   ═══════════════════════════════════════════ */
.ask-content { z-index: 1; }

.ask-name {
    font-family: var(--font-cursive);
    font-size: clamp(2.5rem, 10vw, 4rem);
    color: var(--gold);
    font-weight: 400;
    margin-bottom: 24px;
}

.ask-question {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 6.5vw, 2.8rem);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: 48px;
    letter-spacing: 1px;
}

.ask-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.btn-yes {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 48px;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--cream);
    background: linear-gradient(135deg, var(--burgundy), var(--burgundy-light));
    border: 2px solid var(--gold);
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 2px;
    animation: gentlePulse 2s ease-in-out infinite;
    transition: transform 0.15s ease;
}

.btn-yes:active { transform: scale(0.95); }

.btn-yes .heart-icon { width: 22px; height: 22px; color: var(--gold); }

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 0, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(139, 0, 0, 0.6), 0 0 60px rgba(201, 169, 110, 0.2); }
}

.btn-no {
    padding: 8px 24px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.15s ease;
    letter-spacing: 1px;
}

/* ═══════════════════════════════════════════
   CELEBRATION
   ═══════════════════════════════════════════ */
.step[data-step="5"] { z-index: 50; }

#confetti-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.celebration-content { z-index: 1; }

.celebration-title {
    font-family: var(--font-cursive);
    font-size: clamp(2.5rem, 12vw, 5rem);
    color: var(--gold);
    font-weight: 400;
    margin-bottom: 32px;
    line-height: 1.2;
}

.celebration-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 4vw, 1.4rem);
    font-weight: 300;
    font-style: italic;
    color: var(--cream-dim);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.celebration-signature {
    font-family: var(--font-cursive);
    font-size: clamp(2rem, 8vw, 3rem);
    color: var(--cream);
    margin-bottom: 40px;
}

.celebration-heart {
    animation: heartbeat 1.2s ease-in-out infinite;
}

.celebration-heart svg {
    width: 48px;
    height: 48px;
    color: var(--burgundy-light);
    filter: drop-shadow(0 0 20px rgba(139, 0, 0, 0.5));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

/* ═══════════════════════════════════════════
   SHARED KEYFRAMES
   ═══════════════════════════════════════════ */
@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ═══════════════════════════════════════════
   SAFE AREA (notch phones)
   ═══════════════════════════════════════════ */
@supports (padding-top: env(safe-area-inset-top)) {
    .next-btn {
        bottom: calc(48px + env(safe-area-inset-bottom));
    }
    .slideshow-counter {
        top: calc(16px + env(safe-area-inset-top));
    }
}

/* Desktop: slightly more padding */
@media (min-width: 768px) {
    .slide {
        padding: 48px;
    }
}
