:root {
    --bg: #fff8f3;
    --bg-soft: #fdeee4;
    --rose: #c98b7e;
    --rose-deep: #a85f54;
    --gold: #c9a24b;
    --ink: #4a3b39;
    --ink-soft: #7a6b66;
    --white: #fffdfb;
    --shadow: 0 18px 50px rgba(120, 80, 70, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 10%, var(--bg-soft), transparent 55%),
        radial-gradient(circle at 85% 90%, #f7e3d6, transparent 50%),
        var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- Welcome overlay ---------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.4), transparent 60%),
        linear-gradient(160deg, #f3d9c9, #e9bfaa 60%, #d9a08d);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.overlay-inner {
    max-width: 520px;
    animation: fadeUp 1s ease both;
}

.guest-greeting {
    font-family: "Great Vibes", cursive;
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    color: var(--white);
    margin-bottom: 10px;
    text-shadow: 0 4px 16px rgba(140, 80, 70, 0.35);
}

.guest-greeting[hidden] {
    display: none;
}

.overlay-eyebrow {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rose-deep);
    margin-bottom: 12px;
}

.overlay-names {
    font-family: "Great Vibes", cursive;
    font-size: clamp(3rem, 12vw, 5.5rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.05;
    text-shadow: 0 6px 24px rgba(140, 80, 70, 0.35);
    margin-bottom: 30px;
}

.overlay-names span {
    display: block;
    font-size: 0.5em;
    color: var(--gold);
}

.open-btn {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    color: var(--rose-deep);
    background: var(--white);
    border: none;
    border-radius: 999px;
    padding: 16px 40px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: pulse 2.4s ease-in-out infinite;
}

.open-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 22px 55px rgba(120, 80, 70, 0.28);
}

/* ---------- Invitation ---------- */
.invite {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 22px 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

.invite.show {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    text-align: center;
    margin-bottom: 48px;
}

.eyebrow {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.names {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(3.2rem, 13vw, 6rem);
    line-height: 1;
    color: var(--rose-deep);
}

.names .amp {
    display: block;
    font-size: 0.42em;
    color: var(--gold);
    margin: 4px 0;
}

.date {
    margin-top: 22px;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
    letter-spacing: 0.22em;
    color: var(--ink);
    text-transform: uppercase;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 22px;
    color: var(--gold);
    font-size: 1.2rem;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, var(--rose));
}

.divider::after {
    background: linear-gradient(90deg, var(--rose), transparent);
}

.message-section {
    text-align: center;
    margin-bottom: 52px;
}

.message {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    line-height: 1.7;
    color: var(--ink);
    max-width: 560px;
    margin: 0 auto;
    font-style: italic;
}

/* ---------- Carousel ---------- */
.carousel {
    margin-bottom: 56px;
}

.slides {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 70vh;
    overflow: hidden;
    background: transparent;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 90%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 90%,
        transparent 100%
    );
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
}

.dots {
    display: flex;
    gap: 9px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(168, 95, 84, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease;
}

.dot.active {
    background: var(--rose-deep);
    transform: scale(1.3);
}

/* ---------- Location ---------- */
.location-section {
    text-align: center;
    margin-bottom: 56px;
}

.loc-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    font-size: 1.9rem;
    color: var(--rose-deep);
    margin-bottom: 8px;
}

.loc-address {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 22px;
    line-height: 1.6;
}

.maps-btn {
    display: inline-block;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--white);
    background: linear-gradient(135deg, var(--rose), var(--rose-deep));
    padding: 13px 34px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(168, 95, 84, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.maps-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(168, 95, 84, 0.45);
}

/* ---------- Footer ---------- */
.foot {
    text-align: center;
}

.foot-text {
    font-family: "Great Vibes", cursive;
    font-size: 2rem;
    color: var(--rose-deep);
}

/* ---------- Music toggle ---------- */
.music-toggle {
    position: fixed;
    bottom: 8px;
    right: 8px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border-radius: 0;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(80, 50, 45, 0.45);
    transition: transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.music-toggle:hover {
    transform: scale(1.12);
}

.music-toggle.muted {
    opacity: 0.6;
}

/* ---------- Flower rain ---------- */
.flower-layer {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    overflow: hidden;
}

.flower {
    position: absolute;
    top: -8%;
    font-size: 1.4rem;
    will-change: transform;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.9;
}

/* ---------- Animations ---------- */
@keyframes fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.95;
    }
    100% {
        transform: translateY(110vh) translateX(var(--drift, 40px)) rotate(360deg);
        opacity: 0.9;
    }
}

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

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow);
    }
    50% {
        box-shadow: 0 22px 60px rgba(120, 80, 70, 0.35);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .invite {
        padding: 48px 16px 70px;
    }

    .message {
        font-size: 1.2rem;
    }

    .date {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flower {
        animation: none;
        display: none;
    }
    .open-btn {
        animation: none;
    }
}
