/* ============================================================
   Feyza & Ali — Nişan Davetiyesi
   Renk paleti: krem / pembe / rose gold / koyu kahve (orijinal)
   ============================================================ */

:root {
    --bg-1: #f5e6d3;
    --bg-2: #faf3e8;
    --bg-3: #f4c9b7;
    --paper: #fbf3ea;
    --paper-2: #f0dccb;
    --rose: #c98a8a;
    --rose-dark: #a86268;
    --gold: #c9a961;
    --gold-dark: #8a6a2c;
    --ink: #5d4037;
    --ink-soft: #846355;
    --accent: #b76e79;

    --font-script: 'Allura', 'Great Vibes', cursive;
    --font-script-2: 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-serif);
    color: var(--ink);
    background: var(--bg-1);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(255,255,255,0.7), transparent 60%),
        radial-gradient(800px 600px at 100% 100%, rgba(244,201,183,0.45), transparent 60%),
        radial-gradient(800px 600px at 0% 80%, rgba(201,169,97,0.18), transparent 60%),
        linear-gradient(180deg, #faf3e8 0%, #f5e6d3 40%, #f1d9c7 100%);
    background-attachment: fixed;
    position: relative;
}

/* Subtle floral overlay (CSS-only) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.5) 0 2px, transparent 3px),
        radial-gradient(circle at 80% 40%, rgba(255,255,255,0.4) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 80%, rgba(255,255,255,0.4) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 90%, rgba(255,255,255,0.4) 0 2px, transparent 3px);
    background-size: 200px 200px;
    opacity: 0.6;
}

/* ===== Üst avizeler ===== */
.top-chandeliers {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 64px 8px 0;
    max-width: 480px;
    margin: 0 auto;
    pointer-events: none;
}
.chandelier {
    opacity: 0.85;
    filter: drop-shadow(0 6px 10px rgba(150,110,50,0.25));
    animation: sway 6s ease-in-out infinite;
}
.chandelier.right { animation-delay: -3s; }
@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* ===== Sayfa kapsayıcı (dikey akış) ===== */
.pages {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 16px 40px;
}

.page {
    display: block;
    animation: fadeIn 0.6s ease;
}

/* Sayfa 1 — doğal yükseklik, alttan biraz boşluk */
.page-1 {
    padding-bottom: 40px;
}

/* Sayfa 2 — başta gizli, zarf açılınca belirir */
.page-2 {
    display: none;
    border-top: 1px dashed rgba(168, 98, 104, 0.25);
    padding-top: 18px;
    margin-top: 8px;
}
.page-2.revealed {
    display: block;
    animation: revealSlide 0.9s cubic-bezier(.22,1,.36,1);
}
@keyframes revealSlide {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Yumuşak scroll davranışı */
html { scroll-behavior: smooth; }

/* ===== Sayfa 1 ===== */
.page1-inner {
    text-align: center;
    padding-top: 14px;
}

.envelope-stage {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    margin: 18px 0 8px;
}

.envelope {
    --w: 280px;
    --h: 180px;
    position: relative;
    width: var(--w);
    height: var(--h);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

.envelope.opened { transform: translateY(-12px); }

/* Arka gövde */
.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #f7e5d3 0%, #ecd1ba 100%);
    border-radius: 6px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.5),
        0 18px 30px -12px rgba(120,80,30,0.35);
}

/* Yan kapaklar */
.envelope-front-left,
.envelope-front-right,
.envelope-front-bottom {
    position: absolute;
    background: linear-gradient(160deg, #fbf0e0, #efd7c0);
    z-index: 4;
}
.envelope-front-left {
    inset: 0 50% 0 0;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    border-radius: 6px 0 0 6px;
    box-shadow: inset -2px 0 6px rgba(0,0,0,0.06);
}
.envelope-front-right {
    inset: 0 0 0 50%;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    border-radius: 0 6px 6px 0;
    box-shadow: inset 2px 0 6px rgba(0,0,0,0.06);
}
.envelope-front-bottom {
    inset: 50% 0 0 0;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    border-radius: 0 0 6px 6px;
    box-shadow: inset 0 -2px 6px rgba(0,0,0,0.06);
}

/* Üst kapak (açılan) */
.envelope-flap {
    position: absolute;
    inset: 0 0 50% 0;
    background: linear-gradient(180deg, #f9ead8, #ecd2bb);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transform: rotateX(0deg);
    transition: transform 0.9s cubic-bezier(.22,1,.36,1);
    z-index: 6;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18px;
    box-shadow: inset 0 -1px 0 rgba(180,140,80,0.25);
}
.envelope.opened .envelope-flap {
    transform: rotateX(-180deg);
    z-index: 1;
}

.monogram {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-dark);
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.monogram .amp-small {
    font-size: 16px;
    letter-spacing: 0;
    opacity: 0.85;
    margin: 0 2px;
}

/* Mühür */
.wax-seal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #e0b65a 0%, #c9a961 40%, #8a6a2c 100%);
    box-shadow:
        inset 0 0 0 2px rgba(255,255,255,0.25),
        inset 0 -4px 8px rgba(0,0,0,0.25),
        0 6px 14px -4px rgba(0,0,0,0.35);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    color: #fff7d6;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 7;
    transition: transform 0.5s ease, opacity 0.5s ease;
    pointer-events: none;
}
.wax-seal small { font-size: 11px; opacity: 0.85; margin: 0 1px; }
.envelope.opened .wax-seal {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
}

/* İçerikteki mektup */
.letter {
    position: absolute;
    inset: 6px;
    background: linear-gradient(180deg, #fffaf2, #f6e7d4);
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(201,169,97,0.4), 0 1px 0 rgba(0,0,0,0.04);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.9s cubic-bezier(.22,1,.36,1) 0.2s;
}
.envelope.opened .letter {
    transform: translateY(-44px) scale(1.02);
    z-index: 5;
}
.letter-content { text-align: center; padding: 14px 18px; }
.letter-small {
    font-family: var(--font-serif);
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: lowercase;
    margin: 4px 0;
}
.letter-names {
    font-family: var(--font-script);
    color: var(--rose-dark);
    font-size: 30px;
    margin: 6px 0;
    line-height: 0.9;
}
.letter-names .amp { font-size: 22px; color: var(--gold-dark); }

/* Hint */
.hint {
    margin: 14px 0 6px;
    font-family: var(--font-serif);
    color: var(--rose-dark);
    letter-spacing: 1.5px;
    font-size: 14px;
    border-bottom: 1px dashed rgba(168,98,104,0.45);
    display: inline-block;
    padding-bottom: 4px;
    animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); opacity: 0.95; }
    50% { transform: translateY(-3px); opacity: 1; }
}

.hero-script {
    font-family: var(--font-script);
    color: var(--rose-dark);
    font-size: 54px;
    margin: 50px 0 0;
    line-height: 1.05;
    opacity: 0.95;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
    white-space: nowrap;
}

/* ===== Sayfa 2 ===== */
.page2-inner {
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.card {
    background: linear-gradient(180deg, var(--paper) 0%, #f4e4cf 100%);
    border-radius: 14px;
    padding: 28px 22px;
    text-align: center;
    box-shadow:
        0 10px 30px -16px rgba(120,80,30,0.4),
        inset 0 0 0 1px rgba(201,169,97,0.25);
    position: relative;
    overflow: hidden;
}

/* Çiçek/dal süslemeleri (CSS) */
.card::before,
.card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.55;
    pointer-events: none;
}
.card::before {
    top: 6px; left: 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='%23c9a961' opacity='0.85'><circle cx='20' cy='25' r='6'/><circle cx='30' cy='15' r='5'/><circle cx='35' cy='28' r='4'/><circle cx='15' cy='15' r='4'/></g><g stroke='%238a6a2c' stroke-width='1' fill='none' opacity='0.55'><path d='M5 60 Q 25 40 45 55 T 80 30'/><path d='M10 75 Q 30 55 55 70'/></g><g fill='%23a86268' opacity='0.6'><circle cx='50' cy='50' r='3'/><circle cx='60' cy='45' r='2.5'/><circle cx='44' cy='60' r='2.5'/></g></svg>");
    transform: rotate(-10deg);
}
.card::after {
    bottom: 6px; right: 6px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='%23c9a961' opacity='0.85'><circle cx='80' cy='75' r='6'/><circle cx='70' cy='85' r='5'/><circle cx='65' cy='72' r='4'/><circle cx='85' cy='85' r='4'/></g><g stroke='%238a6a2c' stroke-width='1' fill='none' opacity='0.55'><path d='M95 40 Q 75 60 55 45 T 20 70'/><path d='M90 25 Q 70 45 45 30'/></g><g fill='%23a86268' opacity='0.6'><circle cx='50' cy='50' r='3'/><circle cx='40' cy='55' r='2.5'/><circle cx='56' cy='40' r='2.5'/></g></svg>");
    transform: rotate(170deg);
}

.ornament {
    width: 60%;
    height: 14px;
    margin: 0 auto 10px;
    background:
        radial-gradient(circle at 50% 50%, var(--gold) 0 3px, transparent 4px),
        linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
    background-size: 100% 100%, 100% 1px;
    background-repeat: no-repeat;
    background-position: center, center;
    opacity: 0.7;
}
.ornament.bottom { margin: 14px auto 0; }

.couple-names {
    font-family: var(--font-script);
    color: var(--rose-dark);
    font-size: 46px;
    line-height: 1;
    margin: 4px 0 10px;
    font-weight: 400;
}
.couple-names .amp-script {
    color: var(--gold-dark);
    font-size: 38px;
}

.event-date {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    margin: 6px 0 0;
    letter-spacing: 1.5px;
}
.event-time {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink-soft);
    margin: 2px 0 8px;
    letter-spacing: 1.5px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px auto;
    color: var(--rose);
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168,98,104,0.45), transparent);
}

.invite-text {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ink);
    line-height: 1.65;
    margin: 12px auto;
    max-width: 38ch;
}
.invite-text.quote {
    font-style: italic;
    color: var(--rose-dark);
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.55;
}

.ayet-ref {
    font-family: var(--font-serif);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin: 2px 0 0;
    opacity: 0.85;
}

.mini-divider {
    width: 36px;
    height: 12px;
    margin: 18px auto 8px;
    background:
        radial-gradient(circle at 50% 50%, var(--gold) 0 2.5px, transparent 3px);
    background-size: 12px 12px;
    background-repeat: repeat-x;
    background-position: center;
    opacity: 0.75;
}

/* Geri sayım */
.section-title {
    font-family: var(--font-script);
    color: var(--rose-dark);
    font-weight: 400;
    font-size: 32px;
    margin: 0 0 12px;
    line-height: 1;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    margin: 6px 0 6px;
    color: var(--gold-dark);
}
.cd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
}
.cd-num {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 30px;
    line-height: 1;
    letter-spacing: 1px;
    color: var(--ink);
}
.cd-item small {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--ink-soft);
    text-transform: uppercase;
}
.cd-sep {
    font-family: var(--font-serif);
    font-size: 26px;
    color: var(--rose);
    padding-bottom: 16px;
}

/* RSVP */
.rsvp-title { margin-top: 22px; }
.rsvp-sub { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }

.rsvp-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 6px;
}
.rsvp-btn {
    border: 0;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(120,80,30,0.5);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.2s;
    min-width: 130px;
}
.rsvp-btn.yes {
    background: linear-gradient(180deg, #d4a574, #b88a55);
    color: #fff;
}
.rsvp-btn.no {
    background: linear-gradient(180deg, #f0d3c2, #d9b29c);
    color: #6b3a2b;
}
.rsvp-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.rsvp-btn:active { transform: translateY(0); }
.rsvp-btn.full { width: 100%; padding: 12px 16px; }

/* Venue */
.venue-logo {
    width: 170px;
    height: 170px;
    margin: 14px auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #fbf4e6;
    box-shadow:
        0 8px 22px -10px rgba(120, 80, 30, 0.45),
        inset 0 0 0 1px rgba(201, 169, 97, 0.35);
    position: relative;
}
.venue-logo::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px dashed rgba(201, 169, 97, 0.4);
    pointer-events: none;
}
.venue-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.venue-address {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 6px 0 14px;
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

@media (min-width: 600px) {
    .venue-logo { width: 200px; height: 200px; }
}

.map-wrap {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px -10px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(201,169,97,0.4);
    aspect-ratio: 16 / 10;
    background: #e7d6b8;
}
.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-link {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--font-serif);
    color: var(--rose-dark);
    text-decoration: none;
    border-bottom: 1px dashed rgba(168,98,104,0.5);
    padding-bottom: 2px;
    font-size: 15px;
}
.map-link:hover { color: var(--accent); }

.footer-credit {
    text-align: center;
    color: var(--ink-soft);
    font-family: var(--font-script);
    font-size: 22px;
    padding: 6px 0 22px;
    opacity: 0.85;
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(40, 25, 15, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}
.modal-backdrop.show { display: flex; animation: fadeIn 0.25s ease; }

.modal {
    width: 100%;
    max-width: 360px;
    background: linear-gradient(180deg, #fffaf2, #f6e7d4);
    border-radius: 16px;
    padding: 24px 22px 22px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
    position: relative;
    text-align: center;
}
.modal h3 {
    font-family: var(--font-script);
    color: var(--rose-dark);
    font-weight: 400;
    font-size: 32px;
    margin: 0 0 4px;
}
.modal-sub { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.modal-close {
    position: absolute;
    top: 8px; right: 12px;
    background: transparent;
    border: 0;
    font-size: 26px;
    color: var(--ink-soft);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}

.modal form label {
    display: block;
    text-align: left;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--ink-soft);
    letter-spacing: 0.4px;
}
.modal form label span {
    display: block;
    margin-bottom: 4px;
}
.modal form input,
.modal form textarea {
    width: 100%;
    border: 1px solid rgba(201,169,97,0.5);
    background: #fffdf8;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.modal form input:focus,
.modal form textarea:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 3px rgba(201,138,138,0.2);
}
.modal-info { font-size: 12px; color: var(--ink-soft); margin: 10px 0 0; opacity: 0.8; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(40,25,15,0.9);
    color: #fff7e8;
    font-family: var(--font-serif);
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 200;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Confetti (kalp yağmuru) ===== */
.heart-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 90;
}
.heart-rain .heart {
    position: absolute;
    top: -10vh;
    font-size: 18px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(93, 64, 55, 0.35), 0 0 10px rgba(255, 255, 255, 0.55);
    animation: fall linear forwards;
    opacity: 0.85;
}
@keyframes fall {
    0% { transform: translateY(0) rotate(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0.9; }
}

/* ===== Responsive ===== */
@media (min-width: 600px) {
    .envelope { --w: 320px; --h: 210px; }
    .hero-script { font-size: 70px; }
    .couple-names { font-size: 54px; }
    .cd-num { font-size: 34px; }
    .cd-item { min-width: 64px; }
}

@media (max-width: 360px) {
    .envelope { --w: 240px; --h: 160px; }
    .hero-script { font-size: 40px; }
    .couple-names { font-size: 40px; }
    .cd-num { font-size: 24px; }
    .cd-item { min-width: 44px; }
    .invite-text { font-size: 15px; }
    .card { padding: 22px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
