/* 
    STYLE CSS - LANDING PAGE MARIAGE PREMIUM
    Design: Élégant, Fluide, Romantique, Minimaliste
*/

:root {
    --primary-color: #d4af37;
    --bg-color: #fdfbf7;
    --text-color: #2c2c2c;
    --accent-color: #f4ede3;
    --white: #ffffff;
    --transition-slow: 1.2s cubic-bezier(0.2, 1, 0.3, 1);
    --transition-medium: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, .nav-logo, .loader-initials, .section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

p, .section-subtitle, .btn, .nav-links a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-content {
    text-align: center;
}

.loader-initials {
    font-size: 3rem;
    display: block;
    margin-bottom: 20px;
    letter-spacing: 5px;
    color: var(--primary-color);
}

.loader-line {
    width: 100px;
    height: 1px;
    background: #ddd;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Navigation --- */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s ease;
}

#main-nav.scrolled {
    padding: 15px 50px;
    background: rgba(253, 251, 247, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.nav-logo {
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--text-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 30px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 1px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 10s ease-out;
}

.hero.active .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 10px;
    letter-spacing: 4px;
    font-weight: 300;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    letter-spacing: 10px;
}

.hero-date {
    font-size: 1.5rem;
    letter-spacing: 5px;
    margin-bottom: 40px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-indicator span {
    display: block;
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* --- Sections --- */
.section {
    padding: 120px 0;
    text-align: center;
}

.section-subtitle {
    display: block;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

/* --- Story --- */
.story-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.5rem;
    line-height: 2;
    font-style: italic;
}

/* --- Countdown --- */
.countdown-section {
    background: var(--accent-color);
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
}

.count-num {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--text-color);
}

.count-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
}

/* --- Program (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background-color: #ddd;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -0.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    right: -6px;
    background-color: var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left { left: 0; text-align: right; }
.right { left: 50%; text-align: left; }

.right::after { left: -6px; }

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.timeline-time {
    display: block;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

/* --- Location --- */
.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    text-align: left;
}

.location-info h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.location-info p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.location-map {
    border: 1px solid #eee;
    padding: 10px;
    background: white;
}

/* --- Gallery --- */
.masonry-gallery {
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    margin-bottom: 20px;
    break-inside: avoid;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.8s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* --- RSVP --- */
.rsvp-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.05);
}

.rsvp-header {
    margin-bottom: 40px;
}

.rsvp-form .form-group {
    margin-bottom: 20px;
}

.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    background: #fafafa;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s;
}

.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus {
    border-color: var(--primary-color);
}

.rsvp-form textarea {
    height: 120px;
    resize: none;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #b8962d;
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-block {
    width: 100%;
}

.hidden { display: none; }

.rsvp-message {
    text-align: center;
    padding: 20px;
}

.rsvp-message i {
    font-size: 3rem;
    color: #4CAF50;
    margin-bottom: 15px;
}

/* --- Music --- */
#music-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#music-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.music-wave {
    position: absolute;
    bottom: 10px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 15px;
}

.music-wave span {
    width: 2px;
    background: var(--primary-color);
    animation: wave 1s ease-in-out infinite;
    display: none;
}

#music-toggle.playing .music-wave span {
    display: block;
}

.music-wave span:nth-child(2) { animation-delay: 0.2s; height: 100%; }
.music-wave span:nth-child(3) { animation-delay: 0.4s; height: 60%; }

@keyframes wave {
    0%, 100% { height: 30%; }
    50% { height: 100%; }
}

/* --- Footer --- */
.footer {
    padding: 80px 0;
    background: var(--accent-color);
    text-align: center;
}

.footer-initials {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-quote {
    max-width: 600px;
    margin: 0 auto 30px;
    font-style: italic;
}

.footer-date {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 40px;
}

.footer-credit {
    font-size: 0.9rem;
    opacity: 0.6;
}

.footer-credit i {
    color: #e74c3c;
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s forwards;
}

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

.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: var(--transition-slow);
}

.reveal-up { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.revealed {
    opacity: 1 !important;
    transform: translate(0) !important;
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .location-grid { grid-template-columns: 1fr; }
    .masonry-gallery { column-count: 2; }
}

@media (max-width: 768px) {
    #main-nav { padding: 20px; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s;
    }
    
    .nav-links.active { right: 0; }
    .nav-links a { margin: 20px 0; font-size: 1.5rem; }
    
    .mobile-menu-btn { display: flex; z-index: 1001; }
    
    .hero h1 { font-size: 2.8rem; letter-spacing: 5px; }
    .hero h2 { font-size: 1.2rem; }
    
    .countdown-container { gap: 15px; }
    .count-num { font-size: 2rem; }
    
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; text-align: left; }
    .timeline-item::after { left: 25px; }
    .right { left: 0; }
    
    .rsvp-card { padding: 30px 20px; }
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    .masonry-gallery { column-count: 1; }
    .hero h1 { font-size: 2.2rem; }
}

/* --- Invitation Envelope Styles --- */
#envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: transform 1.5s cubic-bezier(0.8, 0, 0.2, 1), opacity 1s ease;
}

#envelope-overlay.exit {
    transform: translateY(-100%);
    opacity: 0;
}

.envelope-wrapper {
    perspective: 1000px;
    text-align: center;
}

.envelope {
    position: relative;
    width: 350px;
    height: 230px;
    background: #f0e6d6;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.5s ease;
}

.envelope:hover {
    transform: translateY(-5px);
}

.envelope-front {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: #f0e6d6;
    clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
    border: 1px solid rgba(0,0,0,0.05);
}

.envelope-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e6dbca;
    clip-path: polygon(0 0, 50% 50%, 100% 0);
    z-index: 4;
    transform-origin: top;
    transition: transform 0.8s ease 0.3s;
}

.envelope.open .envelope-top {
    transform: rotateX(180deg);
    z-index: 1;
}

.letter {
    position: absolute;
    bottom: 5px;
    left: 10px;
    width: 330px;
    height: 210px;
    background: white;
    z-index: 2;
    transition: transform 1s ease 0.8s;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.envelope.open .letter {
    transform: translateY(-120px);
}

.letter-content {
    text-align: center;
    border: 1px solid var(--primary-color);
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.letter-initials {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.letter p {
    font-size: 0.9rem;
    font-style: italic;
}

.wax-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: #8b0000; /* Dark Red Wax */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 0 10px rgba(0,0,0,0.2);
    transition: transform 0.5s ease, opacity 0.5s ease 0.2s;
}

.wax-seal::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
}

.seal-inner {
    color: #f1c40f;
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    font-size: 1.2rem;
}

.envelope.open .wax-seal {
    transform: translate(-50%, -150px) scale(0.5);
    opacity: 0;
}

.click-to-open {
    margin-top: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    letter-spacing: 2px;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@media (max-width: 480px) {
    .envelope { width: 280px; height: 180px; }
    .letter { width: 260px; height: 160px; }
}
