:root {
    --primary-brown: #824a31;
    --secondary-green: #162d25;
    --gold-accent: #d4af37; /* Dourado metálico */
    --light-paper: #f5ebd9;
    --dark-text: #2c2c2c;
    
    --font-title: 'Great Vibes', cursive;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

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

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-serif);
    background-color: var(--primary-brown);
    color: var(--light-paper);
    -webkit-font-smoothing: antialiased;
}

.invitation-container {
    width: 100%;
    max-width: 500px; /* Mobile optimal width */
    margin: 0 auto;
    background-color: var(--primary-brown);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    will-change: opacity, transform;
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Common Section Styles */
.section {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.section-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    color: #f5ebd9;
    margin-bottom: 20px;
    font-weight: normal;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: var(--light-paper);
    opacity: 0.8;
}

.green-text {
    color: var(--secondary-green);
}

/* BUTTONS */
.btn-gold {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #d4af37, #aa8222);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-solid-green {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-green);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid var(--gold-accent);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

/* SECTION 00: ENVELOPE (INTRO) */
.intro-envelope-section {
    background-color: var(--primary-brown);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    cursor: pointer;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}
.envelope-video {
    width: 100%;
    max-width: 500px;
    max-height: 100vh;
    max-height: 100dvh;
    object-fit: contain;
    height: auto;
    display: block;
}

/* SECTION 01: COVER */
.cover-section {
    padding: 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cover-image-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    z-index: 0;
}
.bg-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, transparent 80%, rgba(130, 74, 49, 0.8) 92%, rgba(130, 74, 49, 1) 100%);
    pointer-events: none;
}
.cover-content {
    position: relative;
    z-index: 1;
    width: 90%;
    padding: 40px 20px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    background: rgba(22, 45, 37, 0.3);
    backdrop-filter: blur(5px);
}
.wedding-intro {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.couple-names {
    font-family: var(--font-title);
    font-size: 4.5rem;
    color: var(--light-paper);
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}
.arrow-down {
    width: 1px;
    height: 30px;
    background-color: var(--light-paper);
    margin-top: 5px;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* SECTION 02: SAVE THE DATE (SCRATCH) */
.save-the-date-section {
    background-color: var(--primary-brown);
    padding: 40px 20px 20px 20px;
    min-height: auto;
}
.title-the-date {
    font-size: 4.5rem;
    margin-bottom: 5px;
    color: #f5ebd9;
}
.section-subtitle-serif {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: #f5ebd9;
    margin-bottom: 50px;
    line-height: 1.4;
    text-align: center;
}
.scratch-cards-wrapper {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    max-width: 450px;
    justify-content: center;
    position: relative;
}
.scratch-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.scratch-card-box {
    background-color: #f8f0df;
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 10 / 14; /* Taller height (3cm taller) */
    position: relative;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.8), 0 8px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}
.revealed-text {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: #8b6b3d;
    text-align: center;
    z-index: 1;
}
.revealed-text.text-month {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    word-break: break-word;
}
.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    touch-action: none;
}
.date-label {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #f5ebd9;
    text-transform: uppercase;
}
.swipe-hint {
    position: absolute;
    top: 35%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    animation: swipeAnim 2.5s infinite ease-in-out;
}
@keyframes swipeAnim {
    0% { transform: translateX(0) scale(0.5); opacity: 0; }
    20% { transform: translateX(0) scale(1); opacity: 1; }
    80% { transform: translateX(250px) scale(1); opacity: 1; }
    100% { transform: translateX(250px) scale(0.5); opacity: 0; }
}
.final-reveal-msg {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-style: italic;
    letter-spacing: 1px;
    color: #f5ebd9;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
.final-reveal-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* SECTION 03: STORY */
.story-section {
    background-color: var(--primary-brown);
    padding: 0 0 40px 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* SECTION 04: COUNTDOWN */
.countdown-section {
    background-color: var(--primary-brown);
    color: var(--light-paper);
    min-height: auto;
    padding: 20px 20px 0 20px;
    margin-bottom: 0;
}
.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.time-number {
    font-size: 2.5rem;
    font-family: var(--font-serif);
    font-weight: 600;
}
.time-label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: var(--light-paper);
}
.time-divider {
    font-size: 2rem;
    margin-top: -15px;
}

/* SECTION 05: SCHEDULE */
.schedule-section {
    background-color: var(--primary-brown);
    padding: 0;
    position: relative;
    z-index: 5;
}
.schedule-section::before,
.schedule-section::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 10;
    pointer-events: none;
}
.schedule-section::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(130, 74, 49, 1) 0%, transparent 100%);
}
.schedule-section::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(130, 74, 49, 1) 0%, transparent 100%);
}
.schedule-sticky-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.schedule-image {
    width: 100%;
    height: auto;
    display: block;
}

/* SECTION 06: DRESS CODE */
.dresscode-section {
    background-color: var(--primary-brown);
    padding: 0;
    margin-top: -75px;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dresscode-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* SECTION 07: LOCATION */
.location-section {
    padding: 10px 20px 60px 20px;
    min-height: auto;
}
.elegant-address {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 1px;
    color: var(--light-paper);
    margin-bottom: 30px;
    text-align: center;
}
.location-images-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 450px;
}
.location-image-full {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* SECTION 08: RSVP */
.rsvp-section {
    background-color: var(--primary-brown);
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rsvp-image-container {
    position: relative;
    max-width: 100%;
    display: inline-block;
}
.rsvp-image {
    max-width: 100%;
    height: auto;
    display: block;
}
.rsvp-button-link {
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    max-width: 320px;
    z-index: 2;
    transition: transform 0.3s ease;
}
.rsvp-button-link:hover {
    transform: translateX(-50%) scale(1.05);
}
.rsvp-button-img {
    width: 100%;
    height: auto;
    display: block;
}

/* SECTION 09: GALLERY */
.gallery-section {
    background-color: var(--primary-brown);
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-image-full {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
