@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@300;400;500;600&family=Cormorant+Garamond:wght@400;500;600&display=swap');


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
    --ivory: #f8f3e8;
    --ivory2: #fffdf7;
    --gold: #b18b4d;
    --gold2: #d8c39c;
    --ink: #24312b;
    --muted: #6f746f;
    --line: rgba(177, 139, 77, .35);
}


/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: 'Noto Sans Sinhala', sans-serif;
    overflow-x: hidden;
}

.serif {
    font-family: 'Cormorant Garamond', serif;
}


/* =========================================================
   COMMON SCREEN
========================================================= */

.screen {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 70px 22px;
    position: relative;
}


/* =========================================================
   ORNAMENT
========================================================= */

.ornament:before,
.ornament:after {
    content: '✦';
    color: var(--gold);
    display: inline-block;
    margin: 0 14px;
    font-size: .8rem;
}


/* =========================================================
   OPENING SCREEN
========================================================= */

.opening {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background:
        radial-gradient(
            circle at 50% 35%,
            #fffdf8,
            var(--ivory)
        );

    transition:
        opacity .9s ease,
        visibility .9s;
}

.opening.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.opening-card {
    text-align: center;
    max-width: 720px;
    animation: softIn 1.4s ease both;
}

.lotus {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 24px;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

.eyebrow {
    letter-spacing: .22em;
    text-transform: uppercase;
    font: 500 .78rem 'Cormorant Garamond', serif;
    color: var(--gold);
}

.names-si {
    font-size: clamp(2.8rem, 9vw, 5.6rem);
    font-weight: 400;
    margin: 18px 0 5px;
    line-height: 1.25;
}

.names-en {
    font:
        500 clamp(1.15rem, 3vw, 1.65rem)
        'Cormorant Garamond',
        serif;

    letter-spacing: .08em;
}

.date {
    font:
        500 1.3rem
        'Cormorant Garamond',
        serif;

    letter-spacing: .2em;
    color: var(--gold);
    margin-top: 15px;
}


/* =========================================================
   BUTTONS
========================================================= */

.open-btn,
.gold-btn {
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--ink);

    padding: 14px 28px;

    border-radius: 999px;

    cursor: pointer;

    letter-spacing: .12em;

    transition: .3s;

    margin-top: 30px;
}

.open-btn:hover,
.gold-btn:hover {
    background: var(--gold);
    color: white;
}


/* =========================================================
   HERO SECTION
========================================================= */

.hero {
    text-align: center;

    background:
        linear-gradient(
            180deg,
            var(--ivory2),
            var(--ivory)
        );
}


/* =========================================================
   HERO COUPLE - HEART SHAPED FRAME
========================================================= */

.hero-heart-frame {
    width: min(330px, 70vw);
    aspect-ratio: 1 / 1;

    margin: 0 auto 30px;

    position: relative;

    background: var(--gold);

    padding: 4px;

    clip-path: polygon(
        50% 94%,
        45% 89%,
        37% 82%,
        28% 74%,
        19% 65%,
        12% 56%,
        7% 47%,
        4% 37%,
        4% 28%,
        7% 20%,
        12% 13%,
        19% 8%,
        27% 5%,
        35% 5%,
        42% 8%,
        47% 12%,
        50% 17%,
        53% 12%,
        58% 8%,
        65% 5%,
        73% 5%,
        81% 8%,
        88% 13%,
        93% 20%,
        96% 28%,
        96% 37%,
        93% 47%,
        88% 56%,
        81% 65%,
        72% 74%,
        63% 82%,
        55% 89%
    );

    filter:
        drop-shadow(
            0 18px 25px
            rgba(65, 53, 35, .14)
        );
}

.hero-art {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    clip-path: polygon(
        50% 94%,
        45% 89%,
        37% 82%,
        28% 74%,
        19% 65%,
        12% 56%,
        7% 47%,
        4% 37%,
        4% 28%,
        7% 20%,
        12% 13%,
        19% 8%,
        27% 5%,
        35% 5%,
        42% 8%,
        47% 12%,
        50% 17%,
        53% 12%,
        58% 8%,
        65% 5%,
        73% 5%,
        81% 8%,
        88% 13%,
        93% 20%,
        96% 28%,
        96% 37%,
        93% 47%,
        88% 56%,
        81% 65%,
        72% 74%,
        63% 82%,
        55% 89%
    );
}


/* =========================================================
   GENERAL SECTIONS
========================================================= */

.section {
    padding: 100px 22px;
    text-align: center;
}

.section-inner {
    width: min(900px, 100%);
    margin: auto;
}

.section-title {
    font:
        600 clamp(2rem, 5vw, 3.2rem)
        'Cormorant Garamond',
        serif;

    margin: 0 0 28px;
}

.invitation-text {
    font-size: clamp(1.05rem, 2.6vw, 1.35rem);
    line-height: 2.1;

    max-width: 720px;

    margin: auto;
}


/* =========================================================
   WEDDING DAY TIMELINE
========================================================= */

.timeline {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    margin-top: 40px;
}

.event-card {
    background:
        rgba(255, 255, 255, .55);

    border:
        1px solid var(--line);

    padding:
        34px 20px;

    border-radius:
        22px;

    backdrop-filter:
        blur(8px);
}

.event-card strong {
    display: block;

    font:
        600 2rem
        'Cormorant Garamond',
        serif;

    color: var(--gold);

    margin:
        12px 0;
}


/* =========================================================
   COUNTDOWN
========================================================= */

.countdown {
    display: flex;

    justify-content:
        center;

    gap:
        clamp(12px, 4vw, 45px);

    flex-wrap:
        wrap;
}

.count-box {
    min-width:
        85px;
}

.count-box b {
    display: block;

    font:
        500 clamp(2.5rem, 7vw, 4.8rem)
        'Cormorant Garamond',
        serif;

    color:
        var(--gold);
}

.count-box span {
    font-size:
        .72rem;

    letter-spacing:
        .14em;

    text-transform:
        uppercase;
}


/* =========================================================
   VENUE
========================================================= */

.venue {
    background:
        var(--ink);

    color:
        #fff;
}

.venue .section-title,
.venue .eyebrow {
    color:
        var(--gold2);
}

.venue p {
    line-height:
        1.8;
}


/* =========================================================
   ACTION BUTTONS
========================================================= */

.actions {
    display:
        flex;

    justify-content:
        center;

    gap:
        12px;

    flex-wrap:
        wrap;

    margin-top:
        25px;
}

.venue .gold-btn {
    color:
        #fff;

    border-color:
        var(--gold2);
}


/* =========================================================
   RSVP FORM
========================================================= */

.rsvp-form {
    max-width:
        650px;

    margin:
        35px auto 0;

    text-align:
        left;
}

.field {
    margin-bottom:
        18px;
}

.field label {
    display:
        block;

    font-size:
        .88rem;

    margin-bottom:
        7px;
}

.field input,
.field select,
.field textarea {
    width:
        100%;

    border:
        1px solid var(--line);

    background:
        #fffdf8;

    border-radius:
        12px;

    padding:
        14px 15px;

    font:
        inherit;

    color:
        var(--ink);

    outline:
        none;
}

.field textarea {
    min-height:
        120px;

    resize:
        vertical;
}

.radio-row {
    display:
        flex;

    gap:
        18px;

    flex-wrap:
        wrap;
}

.form-status {
    text-align:
        center;

    min-height:
        24px;

    margin-top:
        14px;
}


/* =========================================================
   CLOSING SECTION
========================================================= */

.closing {
    min-height:
        80svh;
}

.heart {
    font-size:
        2rem;

    color:
        var(--gold);

    animation:
        heartbeat 2.3s infinite;
}


/* =========================================================
   MUSIC BUTTON
========================================================= */

.music-btn {
    position:
        fixed;

    right:
        18px;

    bottom:
        18px;

    z-index:
        90;

    width:
        46px;

    height:
        46px;

    border-radius:
        50%;

    border:
        1px solid var(--gold);

    background:
        rgba(248, 243, 232, .92);

    color:
        var(--ink);

    display:
        none;

    cursor:
        pointer;
}


/* =========================================================
   SCROLL REVEAL ANIMATION
========================================================= */

.reveal {
    opacity:
        0;

    transform:
        translateY(25px);

    transition:
        opacity .9s ease,
        transform .9s ease;
}

.reveal.visible {
    opacity:
        1;

    transform:
        none;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes softIn {

    from {
        opacity:
            0;

        transform:
            translateY(12px);
    }

    to {
        opacity:
            1;

        transform:
            none;
    }
}


@keyframes heartbeat {

    0%,
    100% {
        transform:
            scale(1);
    }

    50% {
        transform:
            scale(1.12);
    }
}


/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 720px) {

    .screen {
        padding:
            55px 18px;
    }

    .section {
        padding:
            75px 18px;
    }

    .timeline {
        grid-template-columns:
            1fr;
    }

    .event-card {
        padding:
            28px 18px;
    }

    .radio-row {
        display:
            grid;

        gap:
            10px;
    }

    .names-si {
        font-size:
            2.8rem;
    }


    /* Smaller heart frame for mobile */

    .hero-heart-frame {
        width:
            min(270px, 72vw);

        margin-bottom:
            24px;
    }
}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    * {
        scroll-behavior:
            auto !important;

        animation:
            none !important;

        transition:
            none !important;
    }

    .reveal {
        opacity:
            1;

        transform:
            none;
    }
}