/* ==========================================================================
   CEMİYETEDAVET — MINIMAL IVORY (SESSİZ LÜKS & EDITORIAL HAUTE COUTURE)
   Tasarım Konsepti: Quiet Luxury, Bodoni Moda & Cormorant Garamond tipografisi,
   fildişi pamuklu kağıt dokusu, sıcak şampanya yaldız ve gerçekçi balmumu mühür.
   ========================================================================== */

:root {
    /* Renk Paleti (Fildişi & Sıcak Şampanya) */
    --ivory-canvas: #FAF7F2;
    --ivory-card: #FFFEFB;
    --ivory-paper: #F5EFEB;
    --ivory-envelope: #F4EDE4;
    --ivory-envelope-dark: #E8DFC8;

    --text-primary: #23201E;       /* Fildişi Karası / Sıcak Kömür */
    --text-secondary: #5C554F;     /* Sıcak Arduvaz */
    --text-muted: #8E857C;         /* Kaşmir Gri */

    --gold-champagne: #C5A880;     /* Fırçalanmış Sıcak Şampanya Altını */
    --gold-light: #EFE6D8;         /* İnce Altın Yansıma */
    --gold-deep: #9E7E52;          /* Antik Varak Derinliği */
    --gold-wax: #B58D52;           /* Doğal Balmumu Mühür Tonu */

    --border-hairline: rgba(197, 168, 128, 0.32);
    --border-accent: rgba(197, 168, 128, 0.65);

    /* Gölgeler (Yumuşak Işık & Derinlik) */
    --shadow-card: 0 24px 60px rgba(35, 32, 30, 0.07), 0 2px 8px rgba(35, 32, 30, 0.03);
    --shadow-seal: 0 10px 28px rgba(158, 126, 82, 0.38), 0 2px 6px rgba(35, 32, 30, 0.15);
    --shadow-envelope: 0 30px 70px rgba(35, 32, 30, 0.14), 0 10px 25px rgba(197, 168, 128, 0.1);

    /* Tipografi Aileleri */
    --font-heading: 'Bodoni Moda', 'Cormorant Garamond', Georgia, serif;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Temel Sıfırlama ve Zemin */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--ivory-canvas);
}

body {
    background-color: var(--ivory-canvas);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* İnce lüks kağıt dokusu hissi veren mikro radyal ışıltı */
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 70%),
        radial-gradient(circle at 80% 20%, rgba(197, 168, 128, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(197, 168, 128, 0.04) 0%, transparent 40%);
}

/* ==========================================================================
   1. GERÇEKÇİ 3D FİLDİŞİ ZARF & BALMUMU MÜHÜR (QUIET LUXURY ENVELOPE)
   ========================================================================== */

.envelope-wrapper {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
    perspective: 1200px;
    cursor: pointer;
}

.envelope-wrapper.open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Zarf Gövdesi (Gerçek Katlama Yapısı) */
.ivory-envelope {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 520px;
    background: var(--ivory-envelope);
    border-radius: 16px;
    box-shadow: var(--shadow-envelope);
    border: 1px solid rgba(197, 168, 128, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 24px 32px;
    text-align: center;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.ivory-envelope:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 80px rgba(35, 32, 30, 0.18), 0 12px 30px rgba(197, 168, 128, 0.15);
}

/* Zarf Üçgen Üst Kapağı (Flap) */
.envelope-top-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: linear-gradient(180deg, #F0E8DC 0%, #E7DCB8 100%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    border-bottom: 1px solid rgba(197, 168, 128, 0.35);
    z-index: 2;
    transform-origin: top center;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    opacity: 0.88;
}

.envelope-wrapper.open .envelope-top-flap {
    transform: rotateX(170deg);
}

/* Zarf İçi İçerik Katmanı */
.envelope-content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.envelope-badge {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-deep);
    padding: 5px 14px;
    border: 1px solid rgba(197, 168, 128, 0.4);
    border-radius: 30px;
    background: rgba(255, 254, 251, 0.65);
    backdrop-filter: blur(4px);
}

.envelope-names-wrap {
    margin: 15px 0 10px;
}

.envelope-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    text-wrap: balance;
}

.envelope-title span {
    display: inline-block;
}

.envelope-title .ampersand {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--gold-champagne);
    margin: 0 4px;
    font-size: 1.8rem;
}

.envelope-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* LÜKS 3D BALMUMU MÜHÜR (WAX SEAL) */
.wax-seal-btn {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #E5CCA2 0%, #C5A880 45%, #9E7E52 90%, #765B34 100%);
    box-shadow: var(--shadow-seal), inset 0 2px 4px rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.35);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    animation: sealFloat 3s infinite ease-in-out;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.wax-seal-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 14px 34px rgba(158, 126, 82, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.wax-seal-inner {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #FFFDF9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.wax-seal-monogram {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
}

.wax-seal-ring {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 2px;
}

@keyframes sealFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Zarf Açılış Butonu */
.envelope-open-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.btn-open-envelope {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--text-primary);
    color: #FAF7F2;
    border: 1px solid var(--text-primary);
    border-radius: 40px;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(35, 32, 30, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-open-envelope:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(35, 32, 30, 0.25);
}

.envelope-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

/* ==========================================================================
   2. YÜZEN MÜZİK KONTROLÜ (DISCREET FLOATING AUDIO)
   ========================================================================== */

.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 254, 251, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-hairline);
    color: var(--text-primary);
    box-shadow: 0 4px 18px rgba(35, 32, 30, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-toggle:hover {
    background: #FFFFFF;
    color: var(--gold-deep);
    border-color: var(--gold-champagne);
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(197, 168, 128, 0.25);
}

.music-toggle.playing i {
    animation: rotateDisc 4s linear infinite;
    color: var(--gold-deep);
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. ANA DAVETİYE KART MİMARİSİ (EDITORIAL PAPER CANVAS)
   ========================================================================== */

.invitation-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 16px 80px;
}

.invitation-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 580px;
    background: var(--ivory-card);
    border: 1px solid var(--border-hairline);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 56px 40px 48px;
    overflow: hidden;
    /* İnce çift yaldız çerçeve çizgisi */
    outline: 1px solid rgba(197, 168, 128, 0.15);
    outline-offset: -12px;
}

/* Başlık ve Monogram Bölümü */
.header-section {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}

.monogram-crest {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-hairline);
    border-radius: 50%;
    color: var(--gold-champagne);
    font-size: 1rem;
    background: rgba(250, 247, 242, 0.6);
}

.subtitle-tag {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 18px;
}

.couple-names {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.5vw, 3.2rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.22;
    letter-spacing: -0.015em;
    margin-bottom: 18px;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: break-word;
}

.couple-names .name-part {
    display: inline-block;
}

.couple-names .ampersand {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--gold-champagne);
    font-size: 0.88em;
    margin: 0 6px;
}

/* İnce Geometrik Ayırıcı */
.divider-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 22px auto;
    max-width: 240px;
}

.divider-line::before,
.divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-champagne), transparent);
}

.divider-line .gem-ornament {
    color: var(--gold-champagne);
    font-size: 0.65rem;
    transform: rotate(45deg);
    opacity: 0.85;
}

/* Davet Mesajı */
.main-quote-wrap {
    margin: 18px 0 24px;
    padding: 0 12px;
}

.main-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-wrap: pretty;
}

/* ==========================================================================
   4. AİLELER BÖLÜMÜ (HAUTE COUTURE FAMILY RECOGNITION)
   ========================================================================== */

.family-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding: 18px 12px;
    margin: 24px 0 32px;
    border-top: 1px solid rgba(197, 168, 128, 0.2);
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
    text-align: center;
}

.family-block {
    flex: 1;
    min-width: 140px;
}

.family-role {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 4px;
}

.family-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.family-separator {
    color: var(--gold-champagne);
    opacity: 0.6;
    font-size: 0.8rem;
}

/* ==========================================================================
   5. TÖREN & MEKAN KARTI (EDITORIAL CEREMONY MODULE)
   ========================================================================== */

.events-section {
    margin-top: 16px;
}

.event-card {
    background: #FFFFFF;
    border: 1px solid rgba(197, 168, 128, 0.28);
    border-radius: 16px;
    padding: 32px 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(35, 32, 30, 0.03);
    position: relative;
    text-align: center;
}

.event-type-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--gold-deep);
    padding: 6px 18px;
    border-radius: 30px;
    background: var(--ivory-paper);
    margin-bottom: 22px;
}

/* Editoryal Tarih & Saat Bloğu */
.event-date-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 8px 0 20px;
}

.event-date-large {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.event-date-meta {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 0.05em;
}

.event-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gold-deep);
    background: rgba(197, 168, 128, 0.12);
    padding: 4px 14px;
    border-radius: 20px;
    margin-top: 8px;
}

/* Mekan ve Adres Detayı */
.venue-details-wrap {
    margin: 20px 0 24px;
    padding-top: 18px;
    border-top: 1px dashed rgba(197, 168, 128, 0.25);
}

.venue-name-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.venue-address-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto;
}

/* Mekan Fotoğrafı Çerçevesi (Passe-partout) */
.venue-image-wrapper {
    margin: 16px auto 22px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(35, 32, 30, 0.08);
    border: 3px solid #FFFFFF;
    outline: 1px solid rgba(197, 168, 128, 0.3);
    max-height: 220px;
}

.venue-image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.venue-image-wrapper:hover img {
    transform: scale(1.03);
}

/* LÜKS AKSİYON BUTONLARI (QUIET LUXURY CTA) */
.cta-actions-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-luxury-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--text-primary);
    color: #FAF7F2;
    border: 1px solid var(--text-primary);
    border-radius: 30px;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(35, 32, 30, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-luxury-primary:hover {
    background: #000000;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(35, 32, 30, 0.22);
}

.btn-luxury-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
    border-radius: 30px;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-luxury-secondary:hover {
    background: var(--ivory-paper);
    color: var(--gold-deep);
    border-color: var(--gold-champagne);
    transform: translateY(-2px);
}

/* ==========================================================================
   6. İKİNCİ TÖREN MODÜLÜ (SECONDARY EVENT MODULE)
   ========================================================================== */

.secondary-event-container {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(197, 168, 128, 0.25);
    text-align: center;
}

.secondary-event-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-deep);
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(197, 168, 128, 0.12);
    margin-bottom: 12px;
}

.secondary-event-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.secondary-event-meta {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

/* ==========================================================================
   7. ALT BİLGİ & MARKA MÜHRÜ (FOOTER & CURATION SEAL)
   ========================================================================== */

.footer-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(197, 168, 128, 0.2);
}

.footer-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.curation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.curation-badge:hover {
    color: var(--gold-deep);
}

.curation-badge strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   8. MOBİL UYUMLULUK VE ERİŞİLEBİLİRLİK (RESPONSIVE & ACCESSIBILITY)
   ========================================================================== */

@media (max-width: 600px) {
    .invitation-wrapper {
        padding: 24px 12px 60px;
    }

    .invitation-container {
        padding: 40px 20px 32px;
        border-radius: 16px;
        outline-offset: -8px;
    }

    .couple-names {
        font-size: 2.2rem;
        line-height: 1.25;
    }

    .ivory-envelope {
        max-width: 340px;
        height: 480px;
        padding: 32px 18px 24px;
    }

    .envelope-title {
        font-size: 1.75rem;
    }

    .wax-seal-btn {
        width: 86px;
        height: 86px;
        margin: 8px 0;
    }

    .wax-seal-inner {
        width: 68px;
        height: 68px;
    }

    .wax-seal-monogram {
        font-size: 1.4rem;
    }

    .event-card {
        padding: 24px 18px;
    }

    .event-date-large {
        font-size: 2.3rem;
    }

    .cta-actions-wrap {
        flex-direction: column;
        width: 100%;
    }

    .btn-luxury-primary,
    .btn-luxury-secondary {
        width: 100%;
    }
}

/* Hareket Azaltma Tercihi (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .envelope-top-flap,
    .envelope-wrapper,
    .wax-seal-btn {
        transition: none !important;
        animation: none !important;
    }
}
