:root {
    /* Colors */
    --color-parchment: #F5F1E8;
    --color-cream: #FAF7F0;
    --color-charcoal: #2A2A2A;
    --color-charcoal-light: #4A4A4A;
    --color-oxblood: #8B2E2E;
    --color-oxblood-light: #A63D3D;
    --color-gold: #B8975A;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-charcoal);
    background: var(--color-parchment);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Audio Toggle */
.audio-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(245, 241, 232, 0.95);
    border: 1px solid rgba(42, 42, 42, 0.1);
    border-radius: 2rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.audio-toggle:hover {
    background: var(--color-cream);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.audio-icon {
    width: 20px;
    height: 20px;
    color: var(--color-charcoal);
}

.audio-toggle.active .audio-icon {
    color: var(--color-oxblood);
}

.audio-toggle.active .audio-waves {
    animation: soundWaves 1.5s ease-in-out infinite;
}

@keyframes soundWaves {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Scene Base Styles */
.scene {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.scene-content {
    max-width: 100%;
    width: 100%;
    text-align: center;
}

.scene-instruction {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-charcoal-light);
    margin-top: 2rem;
    opacity: 0;
}

.scene-instruction.fade-in {
    animation: fadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scene 1: Elevator Panel */
.scene-elevator {
    background: linear-gradient(180deg, #3A3A3A 0%, #2A2A2A 100%);
}

.elevator-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.panel-frame {
    background: linear-gradient(145deg, #4A4A4A, #2A2A2A);
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.5);
}

.elevator-button {
    position: relative;
    width: 180px;
    height: 180px;
    background: linear-gradient(145deg, #5A5A5A, #3A3A3A);
    border: 3px solid #2A2A2A;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-smooth);
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.elevator-button:hover {
    transform: scale(1.05);
}

.button-label {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #999;
    transition: color var(--transition-smooth);
}

.elevator-button.pressed .button-label {
    color: #FFF;
}

.button-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, var(--color-oxblood) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.elevator-button.pressed .button-glow {
    opacity: 0.9;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Scene 2: Elevator Doors */
.scene-doors {
    position: relative;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

.elevator-doors {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    top: 0;
    left: 0;
}

.door {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.door-left {
    left: 0;
}

.door-right {
    right: 0;
}

.scene-doors.open .door-left {
    transform: translateX(-100%);
}

.scene-doors.open .door-right {
    transform: translateX(100%);
}

/* Welcome Message */
.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 5;
    text-align: center;
}

.scene-doors.open .welcome-message {
    opacity: 1;
    transition-delay: 0.5s;
}

.welcome-message h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 6rem;
    font-weight: 300;
    color: #C9A961;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 4px 30px rgba(201, 169, 97, 0.4);
}

/* Scene 3: Invitation */
.scene-invitation {
    background: var(--color-cream);
    min-height: 100vh;
    padding: 4rem 2rem;
}

.envelope-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-parchment);
    border-radius: 4px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    padding: 4rem 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: envelopeReveal 1.5s ease-out 0.5s forwards;
}

@keyframes envelopeReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wax Seal */
.wax-seal {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    z-index: 10;
}

.seal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
/* Wax Seal Fallback */
.seal-fallback {
    width: 100px;
    height: 100px;
    display: none;
    align-items: center;
    justify-content: center;
}

.seal-circle {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #9c2f2f, #6f1d1d);
    border-radius: 50%;
    box-shadow:
        inset 0 4px 10px rgba(255, 255, 255, 0.15),
        inset 0 -6px 12px rgba(0, 0, 0, 0.4),
        0 6px 18px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-gold);
    letter-spacing: 0.05em;
    text-shadow:
        0 1px 1px rgba(255, 255, 255, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.6);
}


/* Invitation Content */
.invitation-content {
    padding-top: 3rem;
}

.invitation-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
}

.invitation-subtitle {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-charcoal-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.invitation-body {
    text-align: left;
    max-width: 650px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 3rem;
}

.content-block h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
}

.content-block p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
}

/* CTA */
.cta-container {
    margin: 4rem auto 3rem;
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-oxblood);
    background: transparent;
    border: 2px solid var(--color-oxblood);
    border-radius: 2px;
    text-decoration: none;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.cta-button:hover {
    background: var(--color-oxblood);
    color: var(--color-parchment);
}

/* Footer */
.invitation-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(42, 42, 42, 0.1);
    text-align: center;
}

.invitation-footer p {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--color-charcoal-light);
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-message h2 {
        font-size: 4.5rem;
    }
    
    .invitation-title {
        font-size: 2.5rem;
    }
    
    .envelope-container {
        padding: 3rem 2rem;
    }
}

@media (max-width: 480px) {
    .welcome-message h2 {
        font-size: 3rem;
    }
    
    .invitation-title {
        font-size: 2rem;
    }
    
    .elevator-button {
        width: 120px;
        height: 120px;
    }
}
