/* ═══════════════════════════════════════════════════════════
   Zeynep & Emir — Dijital Nikah Davetiyesi
   Mobile-first · Saf CSS · Porselen / Terracotta modern palet
   ═══════════════════════════════════════════════════════════ */

:root {
    --paper: #FAF8F5;          /* ana zemin: porselen beyazı */
    --paper-soft: #F4EFE9;
    --rose: #C0745E;           /* terracotta */
    --rose-deep: #9E5540;
    --rose-soft: #E8B49C;
    --rose-pale: #F5E7DE;
    --sage: #A89F8D;           /* kum-zeytin nötrü */
    --sage-soft: #E9E2D6;
    --ink: #322C27;            /* koyu sıcak füme metin */
    --ink-dim: #3A332D99;
    --grad-rose: linear-gradient(135deg, #9E5540 0%, #C0745E 30%, #E9B295 50%, #C0745E 70%, #9E5540 100%);
    --font-serif: "Cormorant Garamond", Georgia, serif;
    --font-script: "Great Vibes", cursive;
    --font-body: "Poppins", -apple-system, "Segoe UI", sans-serif;
    --shadow-soft: 0 12px 40px rgba(122, 90, 74, .14);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--ink);
    background:
        radial-gradient(ellipse 90% 50% at 12% -6%, rgba(236, 189, 160, .4), transparent 60%),
        radial-gradient(ellipse 80% 50% at 95% 8%, rgba(233, 226, 214, .5), transparent 55%),
        radial-gradient(ellipse 100% 60% at 50% 108%, rgba(245, 231, 222, .55), transparent 60%),
        var(--paper);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; height: 100dvh; }

/* Bokeh canvas — düşen yaprak/petal ışıltıları */
#bokeh {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ═══════════════ MÜZİK BUTONU ═══════════════ */

.music-btn {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    right: calc(14px + env(safe-area-inset-right));
    z-index: 60;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(192, 116, 94, .5);
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 6px 20px rgba(122, 90, 74, .22);
    transition: transform .25s ease, box-shadow .25s ease;
}
.music-btn:active { transform: scale(.92); }

.disc {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .3) 0 1px, transparent 1px 4px),
        radial-gradient(circle at 35% 35%, #E8B49C, #C0745E 45%, #86432E 100%);
    display: grid;
    place-items: center;
    position: relative;
}
.disc-center {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--rose-deep);
}
.music-btn.playing .disc { animation: spin 2.4s linear infinite; }
.music-btn.muted { opacity: .55; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════ ZARF SAHNESİ ═══════════════ */

.envelope-scene {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 6vh, 52px);
    padding: 24px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.envelope-wrap {
    perspective: 1200px;
    animation: breathe 4.2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-9px) scale(1.015); }
}

.envelope {
    position: relative;
    width: min(330px, 82vw);
    aspect-ratio: 10 / 7;
    transform-style: preserve-3d;
    filter: drop-shadow(0 22px 40px rgba(122, 90, 74, .3));
}

/* Zarf gövdesi (arka) — krem kağıt */
.env-back {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 8px;
    background: linear-gradient(160deg, #FFFDFA 0%, #F6EFE6 55%, #EFE5D9 100%);
    border: 1px solid rgba(192, 116, 94, .35);
}

/* İçindeki kart (kapalıyken ucu görünür) — beyaz, gül çerçeveli */
.env-card {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 5%;
    height: 86%;
    z-index: 2;
    border-radius: 6px;
    background: linear-gradient(170deg, #FFFFFF 0%, #FEFBF7 60%, #F7EEE7 100%);
    box-shadow: 0 4px 16px rgba(122, 90, 74, .2);
    display: grid;
    place-items: center;
    padding: 8px;
}
.env-card-frame {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(192, 116, 94, .5);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--rose-deep);
}
.env-card-orn { font-size: 18px; color: var(--sage); }
.env-card-names {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: .12em;
    color: var(--rose-deep);
}
.env-card-date {
    font-size: 10px;
    letter-spacing: .3em;
    color: #C09577;
}

/* Zarf ön cebi */
.env-front {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 8px;
    clip-path: polygon(0 2%, 50% 54%, 100% 2%, 100% 100%, 0 100%);
    background: linear-gradient(190deg, #FBF5EC 0%, #F4EADF 45%, #ECDFD2 100%);
    border: 1px solid rgba(192, 116, 94, .3);
}
.env-front::after {
    /* cebin V kenarına ince gül çizgisi */
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(0 2%, 50% 54%, 100% 2%, 100% 5%, 50% 57%, 0 5%);
    background: linear-gradient(90deg, transparent, rgba(192, 116, 94, .5), transparent);
}

/* Kapak */
.env-flap {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: 8px 8px 0 0;
    clip-path: polygon(0 0, 100% 0, 50% 58%);
    background: linear-gradient(180deg, #FFFDFA 0%, #F6EDE3 55%, #F0E4D7 100%);
    transform-origin: top center;
    border-top: 1px solid rgba(192, 116, 94, .45);
}
.env-flap::after {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 3% 0, 50% 58%, 100% 3%, 100% 0, 50% 55%);
    background: rgba(192, 116, 94, .3);
}

/* Mum mühür — gül kurusu */
.seal {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 5;
    width: clamp(58px, 17vw, 70px);
    height: clamp(58px, 17vw, 70px);
    transform: translate(-50%, -42%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 34% 30%, #E9B295 0%, #D89778 25%, #C0745E 50%, #8E4C38 82%, #71392A 100%);
    box-shadow:
        inset 0 2px 5px rgba(255, 238, 225, .6),
        inset 0 -4px 8px rgba(84, 44, 30, .5),
        0 6px 16px rgba(122, 90, 74, .4);
}
.seal-ring {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1px dashed rgba(84, 44, 30, .45);
}
.seal-inner {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(17px, 5vw, 21px);
    color: #57301F;
    text-shadow: 0 1px 0 rgba(255, 238, 225, .55);
    letter-spacing: .04em;
}

/* İpucu yazısı */
.hint {
    font-size: clamp(13px, 3.6vw, 15px);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--rose-deep);
    text-align: center;
    animation: hintPulse 2.2s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { opacity: .4; }
    50%      { opacity: 1; }
}

/* Işıltı parçacıkları (JS üretir) — pembe petaller */
.spark {
    position: fixed;
    z-index: 55;
    width: 8px;
    height: 8px;
    border-radius: 50% 50% 50% 0;
    background: radial-gradient(circle, #F8D9C4 0%, var(--rose-soft) 45%, transparent 78%);
    pointer-events: none;
    will-change: transform, opacity;
}

/* ═══════════════ DAVETİYE İÇERİĞİ ═══════════════ */

.invitation {
    position: relative;
    z-index: 10;
    max-width: 680px;
    margin: 0 auto;
    padding: calc(64px + env(safe-area-inset-top)) clamp(20px, 6vw, 40px) calc(48px + env(safe-area-inset-bottom));
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(34px, 8vw, 60px) 0;
}

.eyebrow {
    font-size: clamp(11px, 3vw, 13px);
    letter-spacing: .42em;
    text-transform: uppercase;
    color: var(--rose);
}

/* Ornament ayraç — çiçekli */
.orn-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(280px, 70vw);
    margin: 18px 0;
}
.orn-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 116, 94, .6));
}
.orn-divider span:last-child {
    background: linear-gradient(90deg, rgba(192, 116, 94, .6), transparent);
}
.orn-divider i {
    font-style: normal;
    color: var(--rose);
    font-size: 16px;
}

/* İsimler — gül altını degrade */
.names {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(52px, 15vw, 96px);
    line-height: 1.25;
    background: var(--grad-rose);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 3px 14px rgba(192, 116, 94, .3));
    padding: 0 .15em .1em;
}
.names .ch {
    display: inline-block;
    white-space: pre;
    background: var(--grad-rose);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.families {
    margin-top: 12px;
    font-family: var(--font-serif);
    font-size: clamp(15px, 4vw, 18px);
    letter-spacing: .14em;
    color: var(--rose-deep);
    display: flex;
    align-items: center;
    gap: 12px;
}
.families i { font-style: normal; color: var(--sage); font-size: .95em; }

.lead {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(17px, 4.6vw, 22px);
    line-height: 1.7;
    color: var(--ink-dim);
    margin-top: 14px;
}

/* Detay kartları — beyaz, çiçek dokunuşlu */
.detail-sec { gap: 18px; }

.glass {
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(192, 116, 94, .3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.detail-card {
    width: 100%;
    max-width: 420px;
    padding: clamp(24px, 6vw, 34px) 22px;
    position: relative;
    overflow: hidden;
}
.detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
/* köşe çiçeği */
.detail-card::after {
    content: "❀";
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 15px;
    color: rgba(168, 159, 141, .55);
}
.detail-icon { font-size: 26px; color: var(--rose); display: block; margin-bottom: 8px; }
.detail-title {
    font-size: clamp(11px, 3vw, 12px);
    font-weight: 400;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 12px;
}
.detail-big {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(24px, 6.4vw, 32px);
    color: var(--ink);
}
.detail-sub {
    margin-top: 4px;
    font-size: clamp(14px, 3.8vw, 16px);
    color: var(--ink-dim);
    letter-spacing: .08em;
}

/* Bölüm başlığı */
.sec-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: .06em;
    color: var(--rose-deep);
    margin-bottom: clamp(20px, 5vw, 30px);
}

/* Tören programı — zaman çizelgesi */
.timeline {
    list-style: none;
    width: 100%;
    max-width: 420px;
    position: relative;
    text-align: left;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 74px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(168, 159, 141, .7) 12%, rgba(168, 159, 141, .7) 88%, transparent);
}
.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 13px 0;
    position: relative;
}
.tl-time {
    width: 56px;
    flex-shrink: 0;
    text-align: right;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(16px, 4.4vw, 19px);
    color: var(--rose-deep);
    line-height: 1.5;
}
.tl-dot {
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    margin-top: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #F5E7DE, var(--rose) 60%, var(--rose-deep));
    box-shadow: 0 0 0 4px rgba(192, 116, 94, .16), 0 0 12px rgba(192, 116, 94, .35);
}
.tl-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: clamp(12.5px, 3.4vw, 14px);
    color: var(--ink-dim);
    padding-bottom: 2px;
}
.tl-text strong {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(16px, 4.4vw, 19px);
    letter-spacing: .04em;
    color: var(--ink);
}

/* Geri sayım */
.count-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(8px, 2.4vw, 16px);
    width: 100%;
    max-width: 460px;
}
.count-card {
    border: 1px solid rgba(192, 116, 94, .38);
    border-radius: 14px;
    background: rgba(255, 255, 255, .8);
    padding: clamp(12px, 3.4vw, 20px) 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 22px rgba(122, 90, 74, .12);
}
.count-num {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(26px, 7.6vw, 40px);
    line-height: 1;
    color: var(--rose-deep);
    will-change: transform, opacity;
}
.count-label {
    font-size: clamp(9px, 2.6vw, 11px);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

/* Harita */
.map-card {
    width: 100%;
    max-width: 560px;
    padding: 8px;
    border-radius: 20px;
    overflow: hidden;
}
.map-card iframe {
    display: block;
    width: 100%;
    height: clamp(230px, 52vw, 320px);
    border: 0;
    border-radius: 14px;
    filter: saturate(.9);
}
.action-row {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

/* Butonlar */
.btn-gold,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    width: 100%;
    max-width: 340px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(14px, 3.8vw, 15px);
    letter-spacing: .06em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn-gold svg, .btn-outline svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn-gold {
    background: var(--grad-rose);
    background-size: 200% 100%;
    color: #FFF8F6;
    box-shadow: 0 8px 26px rgba(192, 116, 94, .4);
}
.btn-gold:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(192, 116, 94, .5); }
.btn-gold:active { transform: translateY(0) scale(.97); }

.btn-outline {
    background: rgba(255, 255, 255, .6);
    color: var(--rose-deep);
    border: 1px solid rgba(192, 116, 94, .55);
}
.btn-outline:hover { background: rgba(245, 231, 222, .8); transform: translateY(-2px); }
.btn-outline:active { transform: translateY(0) scale(.97); }

/* Galeri */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 3vw, 18px);
    width: 100%;
    max-width: 460px;
}
.ph {
    aspect-ratio: 1;
    border-radius: 16px;
    border: 1px solid rgba(192, 116, 94, .35);
    background: var(--rose-pale);
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 8px 22px rgba(122, 90, 74, .14);
}
.ph:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 32px rgba(122, 90, 74, .24); }
.ph:active { transform: scale(.97); }
.ph img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.ph span { display: none; }
.ph::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 10px;
    pointer-events: none;
}

.gallery-note {
    margin-top: 14px;
    font-size: clamp(11px, 3vw, 12.5px);
    letter-spacing: .1em;
    color: var(--ink-dim);
}

/* Kapanış */
.closing-sec { padding-bottom: clamp(50px, 10vw, 80px); }
.closing-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(17px, 4.6vw, 22px);
    color: var(--ink-dim);
    margin: 10px 0 16px;
}
.closing-names {
    font-family: var(--font-script);
    font-size: clamp(30px, 8vw, 42px);
    background: var(--grad-rose);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 .15em;
}

.btn-share { margin-top: 26px; }

/* Demo notu */
.demo-note {
    margin-top: 40px;
    max-width: 480px;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    border-radius: 16px;
}
.demo-badge-inline {
    flex-shrink: 0;
    margin-top: 2px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--grad-rose);
    color: #FFF8F6;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .22em;
}
.demo-note p {
    font-size: clamp(12px, 3.2vw, 13.5px);
    line-height: 1.75;
    color: var(--ink-dim);
}
.demo-note strong { color: var(--rose-deep); font-weight: 500; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(56, 44, 38, .82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    padding: 24px;
}
.lightbox-frame {
    padding: 6px;
    border-radius: 20px;
    border: 1px solid rgba(236, 189, 160, .6);
    background: rgba(255, 251, 247, .35);
    box-shadow: 0 30px 80px rgba(38, 26, 20, .5);
}
.lightbox-frame img {
    display: block;
    max-width: min(88vw, 640px);
    max-height: 74vh;
    border-radius: 14px;
}
.lightbox-close {
    position: absolute;
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(236, 189, 160, .6);
    background: rgba(56, 44, 38, .55);
    color: #FFF3F0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(236, 189, 160, .6);
    background: rgba(56, 44, 38, .55);
    color: #FFE9E5;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-prev { left: calc(10px + env(safe-area-inset-left)); }
.lightbox-next { right: calc(10px + env(safe-area-inset-right)); }
.lightbox-nav:active { transform: translateY(-50%) scale(.92); }

/* Toast bildirimi */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 95;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(255, 251, 247, .96);
    border: 1px solid rgba(192, 116, 94, .55);
    color: var(--rose-deep);
    font-size: 13.5px;
    letter-spacing: .04em;
    box-shadow: 0 10px 30px rgba(122, 90, 74, .3);
    white-space: nowrap;
}

/* hidden özniteliği display kurallarınca ezilmesin */
.lightbox[hidden],
.toast[hidden],
.invitation[hidden] { display: none; }

/* Reveal başlangıç durumu (JS yüklenmezse görünür kalsın) */
.reveal { opacity: 1; }
body.gsap-ready .reveal { opacity: 0; }

/* ═══════════════ TABLET / DESKTOP ═══════════════ */

@media (min-width: 640px) {
    .detail-sec {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
    }
    .detail-card { max-width: 300px; }
    .action-row { flex-direction: row; justify-content: center; }
    .btn-gold, .btn-outline { width: auto; min-width: 230px; }
    .gallery { grid-template-columns: repeat(3, 1fr); max-width: 640px; }
    .invitation { max-width: 820px; }
    .timeline { max-width: 460px; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .envelope-wrap, .hint, .music-btn.playing .disc { animation: none; }
}
