/* ============================================================
   Happy Birthday Aiman — main stylesheet
   Palette: velvet crimson, blush rose, warm gold, midnight plum
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,600&family=Cormorant+Garamond:wght@400;500;600&display=swap');

:root {
    --crimson: #7a1636;
    --crimson-deep: #4a0d21;
    --rose: #e8a5b8;
    --rose-light: #f7dde4;
    --gold: #d8a960;
    --gold-soft: #f0d9a8;
    --cream: #fbf3ee;
    --ink: #2b0f18;
    --shadow: rgba(74, 13, 33, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Cormorant Garamond', serif;
    background: radial-gradient(ellipse at top, var(--crimson) 0%, var(--crimson-deep) 55%, #2c0713 100%);
    color: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 19px;
}

h1, h2, h3, .display {
    font-family: 'Playfair Display', serif;
}

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

a { color: inherit; }

/* ---------- Floating gold petals / sparkles background ---------- */
.petal-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.petal {
    position: absolute;
    top: -40px;
    font-size: 20px;
    opacity: 0.55;
    animation: petalFall linear infinite;
    filter: drop-shadow(0 2px 6px var(--shadow));
}
@keyframes petalFall {
    0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.6; }
    100% { transform: translateY(105vh) translateX(40px) rotate(300deg); opacity: 0; }
}

/* ---------- Music toggle ---------- */
.music-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 50;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.35s ease;
    color: var(--crimson-deep);
}
.music-toggle:hover { transform: scale(1.1) rotate(8deg); }
.music-toggle.playing { animation: pulseNote 1.6s ease-in-out infinite; }
@keyframes pulseNote {
    0%, 100% { box-shadow: 0 0 0 0 rgba(216,169,96,0.55); }
    50% { box-shadow: 0 0 0 14px rgba(216,169,96,0); }
}

/* ---------- Nav dots between pages ---------- */
.site-nav {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    gap: 14px;
    background: rgba(0,0,0,0.25);
    padding: 10px 18px;
    border-radius: 40px;
    backdrop-filter: blur(6px);
}
.site-nav a {
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.4px;
    color: var(--rose-light);
    opacity: 0.7;
    transition: opacity 0.25s ease, color 0.25s ease;
}
.site-nav a.active, .site-nav a:hover { opacity: 1; color: var(--gold-soft); }

/* ---------- Hero / landing ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}
.hero .eyebrow-name {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--gold-soft);
    font-size: 22px;
    margin-bottom: 6px;
}
.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 4px 24px var(--shadow);
    max-width: 14ch;
}
.hero p.sub {
    margin-top: 18px;
    max-width: 46ch;
    font-size: 21px;
    color: var(--rose-light);
}

/* ---------- The cake ---------- */
.cake-wrap {
    margin: 46px 0 30px;
    cursor: pointer;
    user-select: none;
}
.cake {
    width: 220px;
    height: 190px;
    position: relative;
    transition: transform 0.4s ease;
}
.cake-wrap:hover .cake { transform: translateY(-4px); }
.cake .plate {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 16px;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
    border-radius: 50%;
    box-shadow: 0 10px 20px var(--shadow);
}
.cake .tier {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, var(--rose-light) 100%);
    box-shadow: inset 0 -8px 0 rgba(0,0,0,0.06), 0 8px 16px var(--shadow);
}
.cake .tier-1 { width: 190px; height: 70px; bottom: 14px; }
.cake .tier-2 { width: 130px; height: 60px; bottom: 78px; background: linear-gradient(180deg, #fff 0%, var(--gold-soft) 100%); }
.cake .drip { position: absolute; left: 50%; transform: translateX(-50%); width: 190px; height: 20px; bottom: 78px; background: var(--crimson); border-radius: 0 0 40px 40px; clip-path: polygon(0 0,8% 60%,16% 10%,24% 70%,32% 5%,40% 55%,48% 15%,56% 65%,64% 10%,72% 60%,80% 15%,88% 65%,96% 10%,100% 0,100% 100%,0 100%); opacity: .85;}
.cake .candle {
    position: absolute;
    bottom: 138px;
    width: 7px;
    height: 34px;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
    border-radius: 3px;
}
.cake .candle.c1 { left: 44%; }
.cake .candle.c2 { left: 50%; transform: translateX(-50%); height: 40px; bottom: 138px; }
.cake .candle.c3 { left: 58%; }
.flame {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 16px;
    background: radial-gradient(ellipse at bottom, #fff2b0, #ffb347 55%, transparent 80%);
    border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
    animation: flicker 0.9s ease-in-out infinite alternate;
    opacity: 1;
    transition: opacity 0.4s ease;
}
@keyframes flicker {
    0% { transform: translateX(-50%) scale(1) rotate(-3deg); }
    100% { transform: translateX(-50%) scale(1.15) rotate(3deg); }
}
.cake-wrap.blown .flame { opacity: 0; }
.cake-hint {
    margin-top: 14px;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: var(--gold-soft);
    opacity: 0.85;
}

/* Confetti burst */
.confetti-piece {
    position: fixed;
    top: -10px;
    width: 8px;
    height: 14px;
    z-index: 40;
    pointer-events: none;
    animation: confettiDrop 2.6s ease-in forwards;
}
@keyframes confettiDrop {
    to { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

.hero .cta {
    margin-top: 30px;
    display: inline-block;
    padding: 15px 38px;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    color: var(--crimson-deep);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    border-radius: 40px;
    box-shadow: 0 10px 24px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero .cta:hover { transform: translateY(-3px); box-shadow: 0 16px 30px var(--shadow); }
.hero .cta.hidden { display: none; }

/* ---------- Section shell (used by letter / question / gallery) ---------- */
.section-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 20px 120px;
    position: relative;
    z-index: 2;
}
.card {
    max-width: 680px;
    width: 100%;
    background: rgba(251, 243, 238, 0.06);
    border: 1px solid rgba(216,169,96,0.35);
    border-radius: 18px;
    padding: 46px 40px;
    text-align: center;
    box-shadow: 0 20px 50px var(--shadow);
    backdrop-filter: blur(3px);
}
.card h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 20px; }
.card .letter-body {
    text-align: left;
    font-size: 21px;
    color: var(--rose-light);
    white-space: pre-wrap;
}
.card .signoff {
    margin-top: 22px;
    font-style: italic;
    color: var(--gold-soft);
    text-align: right;
}

/* ---------- Love question page (yes / runaway no) ---------- */
.question-buttons {
    display: flex;
    gap: 22px;
    justify-content: center;
    margin-top: 34px;
    flex-wrap: wrap;
    position: relative;
    min-height: 70px;
}
.btn-yes, .btn-no {
    padding: 14px 34px;
    border-radius: 40px;
    border: none;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}
.btn-yes {
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    color: var(--crimson-deep);
    box-shadow: 0 10px 24px var(--shadow);
    transition: transform 0.25s ease;
}
.btn-yes:hover { transform: scale(1.06); }
.btn-yes.grown { transform: scale(1.5); }
.btn-no {
    background: transparent;
    border: 2px solid var(--rose);
    color: var(--rose-light);
    position: relative;
    transition: transform 0.18s ease;
}
.btn-no.fixed-pos { position: fixed; z-index: 45; }
.answer-reveal {
    margin-top: 26px;
    font-size: 22px;
    color: var(--gold-soft);
    display: none;
}
.answer-reveal.show { display: block; animation: fadeUp 0.6s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px);} to { opacity: 1; transform: translateY(0);} }

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 10px;
}
.gallery-grid figure {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    box-shadow: 0 10px 22px var(--shadow);
}
.gallery-grid img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    cursor: pointer;
}
.gallery-grid img:hover { transform: scale(1.06); }
.gallery-grid figcaption {
    padding: 8px 10px;
    font-size: 14px;
    color: var(--rose-light);
}
.gallery-empty {
    color: var(--rose-light);
    opacity: 0.8;
    font-size: 17px;
    margin-top: 20px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 4, 10, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox .close-lightbox {
    position: absolute;
    top: 22px;
    right: 28px;
    font-size: 30px;
    color: var(--gold-soft);
    cursor: pointer;
    background: none;
    border: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .card { padding: 32px 22px; }
    .cake { width: 170px; height: 150px; }
    .cake .tier-1 { width: 150px; }
    .cake .tier-2 { width: 100px; }
    .site-nav { gap: 8px; padding: 8px 12px; }
    .site-nav a { font-size: 13px; }
}
