/* ============================================================
   Undangan Pernikahan — Responsive Template
   Theme: Elegant Javanese (Sage Green + Gold)
   ============================================================ */

:root {
    --green: #636b2f;
    --green-dark: #91896a;
    --gold: #b88f6b;
    --gold-light: #f7e6e4;
    --cream: #f7f3ec;
    --cream-dark: #efe7d8;
    --text: #4a463f;
    --text-light: #7a756c;
    --white: #fffdf9;
    --shadow: 0 12px 40px rgba(43, 54, 45, 0.12);
    --maxw: 480px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Jost", sans-serif;
    color: var(--text);
    background: #1c211d;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.script {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
}
.person__name.script {
    font-family: "Dancing Script", cursive;
    font-weight: 600;
}

img {
    max-width: 100%;
    display: block;
}

/* ------------------------------------------------------------
   COVER
   ------------------------------------------------------------ */
.cover {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    transition:
        transform 0.9s cubic-bezier(0.7, 0, 0.3, 1),
        opacity 0.9s ease;
}
.cover.is-open {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.cover__bg {
    position: absolute;
    inset: 0;
    background: url("../assets/images/_BON2617.webp") center/cover no-repeat;
    transform: scale(1.05);
    animation: slowZoom 18s ease-in-out infinite alternate;
}
.cover__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(28, 33, 29, 0.55) 0%,
        rgba(28, 33, 29, 0.75) 100%
    );
}
@keyframes slowZoom {
    to {
        transform: scale(1.18);
    }
}

.cover__content {
    position: relative;
    z-index: 2;
    padding: 40px 28px;
    max-width: var(--maxw);
    width: 100%;
    animation: fadeUp 1s ease both;
}
.cover__pre {
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 8px;
}
.cover__names {
    font-size: 4rem;
    line-height: 1.1;
    margin: 6px 0;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.cover__date {
    font-size: 1.05rem;
    letter-spacing: 6px;
    margin-bottom: 36px;
    color: var(--cream);
}
.cover__guest {
    margin-bottom: 28px;
}
.cover__guest-label {
    font-size: 0.78rem;
    color: var(--cream);
    opacity: 0.85;
}
.cover__guest-name {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(216, 195, 154, 0.5);
    display: inline-block;
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
.btn-open {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 13px 30px;
    border-radius: 40px;
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(176, 141, 87, 0.45);
    transition:
        transform 0.25s ease,
        background 0.25s ease;
}
.btn-open:hover {
    transform: translateY(-3px);
    background: #9c7a47;
}
.btn-open i {
    margin-right: 7px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 26px;
    border: 1.5px solid var(--gold);
    border-radius: 40px;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}
.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
}

/* ------------------------------------------------------------
   MUSIC
   ------------------------------------------------------------ */
.music-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--green);
    color: var(--gold-light);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: none;
    align-items: center;
    justify-content: center;
}
.music-toggle.show {
    display: flex;
}
.spin {
    animation: spin 4s linear infinite;
}
.spin.paused {
    animation-play-state: paused;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ------------------------------------------------------------
   INVITE WRAPPER
   ------------------------------------------------------------ */
.invite {
    max-width: var(--maxw);
    margin: 0 auto;
    background: var(--cream);
    position: relative;
    overflow: clip; /* clip blocks scrollbar but lets positioned children overflow visually */
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
}

.section {
    padding: 80px 28px;
    text-align: center;
    position: relative;
    overflow: visible;
}

.section__pre {
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}
.section__title {
    font-size: 2.8rem;
    color: var(--green);
    margin-bottom: 12px;
    line-height: 1.2;
}

.ornament {
    display: inline-block;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 18px;
}

/* ------------------------------------------------------------
   QUOTE
   ------------------------------------------------------------ */
.quote {
    background: var(--green);
    color: var(--cream);
}
.quote__text {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.8;
    max-width: 360px;
    margin: 0 auto 16px;
}
.quote__ref {
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--gold-light);
}

/* ------------------------------------------------------------
   COUPLE
   ------------------------------------------------------------ */
.couple {
    background: var(--cream);
    overflow: visible;
    position: relative;
}

/* Pattern overlay coloured to #636b2f via mask */
.couple::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #636b2f;
    mask-image: url("../assets/hiasan/background-section/Layer_1.png");
    -webkit-mask-image: url("../assets/hiasan/background-section/Layer_1.png");
    mask-size: 100%; /* one tile = full section width, repeats vertically */
    -webkit-mask-size: 100%;
    mask-repeat: repeat-y;
    -webkit-mask-repeat: repeat-y;
    opacity: 0.35; /* subtle enough to read text over it */
    pointer-events: none;
}

/* Frosted-glass content wrap */
.couple__glass {
    position: relative;
    z-index: 2;
    border-radius: 20px;
    padding: 36px 24px; /* Reverted to 36px so text isn't pushed down */
}

.couple__glass::before {
    content: "";
    position: absolute;
    inset: -64px 0; /* Expands the glass blur 64px up and down WITHOUT pushing text */
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(
        to bottom,
        rgba(247, 243, 236, 0) 0%,
        rgba(247, 243, 236, 0.92) 12%,
        rgba(247, 243, 236, 0.92) 88%,
        rgba(247, 243, 236, 0) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Two linear masks intersected: vertical fade (top/bottom) × horizontal fade (left/right) */
    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            black 4%,
            black 96%,
            transparent 100%
        ),
        linear-gradient(
            to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
        );
    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            black 4%,
            black 96%,
            transparent 100%
        ),
        linear-gradient(
            to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
        );
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    box-shadow:
        0 0 60px 30px rgba(247, 243, 236, 0.6),
        inset 0 0 40px 10px rgba(247, 243, 236, 0.4);
}

.couple__intro {
    max-width: 340px;
    margin: 0 auto 36px;
    color: var(--text-light);
    font-size: 0.92rem;
}
.person {
    margin-bottom: 8px;
}
.person__photo {
    width: 190px;
    height: 190px;
    margin: 0 auto 18px;
    border-radius: 50%;
    padding: 6px;
    border: 1.5px solid var(--gold);
    overflow: hidden;
}
.person__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.person__name {
    font-size: 2.2rem;
    color: var(--green);
    line-height: 1.1;
}
.person__role {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}
.person__parents {
    font-size: 0.95rem;
    margin: 6px 0 10px;
}
.person__ig {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
}
.amp {
    font-size: 3.5rem;
    color: var(--gold);
    margin: 18px 0;
}

/* ------------------------------------------------------------
   COUNTDOWN
   ------------------------------------------------------------ */
.countdown {
    background: var(--cream-dark);
}
.countdown__sub {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 0.9rem;
}
.countdown__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
}
.cd-box {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 6px;
    box-shadow: 0 6px 18px rgba(43, 54, 45, 0.08);
}
.cd-box span {
    display: block;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--green);
    font-family: "Cormorant Garamond", serif;
}
.cd-box small {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-light);
    text-transform: uppercase;
}

/* ------------------------------------------------------------
   EVENT
   ------------------------------------------------------------ */
.event {
    background: var(--cream);
}
.event__card {
    background: var(--white);
    border: 1px solid var(--gold-light);
    border-radius: 16px;
    padding: 26px 20px;
    margin: 0 auto 18px;
    max-width: 340px;
    box-shadow: var(--shadow);
}
.event__name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    color: var(--gold);
    margin-bottom: 12px;
}
.event__date,
.event__time {
    font-size: 0.92rem;
    margin: 4px 0;
}
.event__date i,
.event__time i {
    color: var(--gold);
    margin-right: 6px;
}
.event__place {
    margin-top: 26px;
}
.event__venue {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--green);
}
.event__venue i {
    color: var(--gold);
}
.event__addr {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ------------------------------------------------------------
   GALLERY
   ------------------------------------------------------------ */
.gallery {
    background: var(--cream-dark);
}
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 24px;
}
.gallery__grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}
.gallery__grid img[src*="52714500-75FA-4417-9197-4392E950142B"],
.gallery__grid img[src*="0761F6F0-FF24-4157-8C1C-D512703D8B54"] {
    object-position: 0 25%;
}
.gallery__grid img:hover {
    transform: scale(1.04);
    filter: brightness(1.05);
}

/* ------------------------------------------------------------
   STORY / TIMELINE
   ------------------------------------------------------------ */
.story {
    background: var(--cream);
}
.timeline {
    position: relative;
    max-width: 360px;
    margin: 30px auto 0;
    text-align: left;
    padding-left: 28px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--gold-light);
}
.tl-item {
    position: relative;
    margin-bottom: 30px;
}
.tl-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px var(--cream);
}
.tl-item h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.3rem;
    color: var(--green);
}
.tl-item p {
    font-size: 0.92rem;
    color: var(--text-light);
}

/* ------------------------------------------------------------
   GIFT
   ------------------------------------------------------------ */
.gift {
    background: var(--green);
    color: var(--cream);
}
.gift .section__title {
    color: var(--gold-light);
}
.gift__intro {
    max-width: 340px;
    margin: 0 auto 30px;
    font-size: 0.92rem;
    opacity: 0.9;
}
.gift__card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(216, 195, 154, 0.3);
    border-radius: 16px;
    padding: 22px;
    max-width: 340px;
    margin: 0 auto 16px;
    backdrop-filter: blur(4px);
}
.gift__bank {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gold-light);
}
.gift__num {
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 8px 0 2px;
    font-family: "Cormorant Garamond", serif;
}
.gift__name {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 14px;
}
.btn-copy {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-family: "Jost", sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-copy:hover {
    background: #9c7a47;
}
.btn-copy.copied {
    background: #5a7a5a;
}
.gift__image {
    margin-top: 28px;
    text-align: center;
}
.gift__img {
    width: 100%;
    max-width: 330px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    display: block;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   RSVP
   ------------------------------------------------------------ */
.rsvp {
    background: var(--cream);
}
.rsvp__form {
    max-width: 360px;
    margin: 24px auto 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rsvp__form input,
.rsvp__form select,
.rsvp__form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--gold-light);
    border-radius: 10px;
    font-family: "Jost", sans-serif;
    font-size: 0.92rem;
    background: var(--white);
    color: var(--text);
    resize: none;
}
.rsvp__form input:focus,
.rsvp__form select:focus,
.rsvp__form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.wishes {
    max-width: 360px;
    margin: 0 auto;
    text-align: left;
}
.wish {
    background: var(--white);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(43, 54, 45, 0.06);
    animation: fadeUp 0.4s ease both;
}
.wish__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.wish__name {
    font-weight: 600;
    color: var(--green);
    font-size: 0.95rem;
}
.wish__badge {
    font-size: 0.68rem;
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--cream-dark);
    color: var(--gold);
}
.wish__msg {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ------------------------------------------------------------
   CLOSING
   ------------------------------------------------------------ */
.closing {
    background: url("../assets/images/IMG_6815.webp") center/cover no-repeat
        fixed;
    color: var(--white);
    padding: 90px 28px 0;
}
.closing__overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 33, 29, 0.72);
}
.closing__content {
    position: relative;
    z-index: 2;
}
.closing__text {
    max-width: 340px;
    margin: 0 auto 24px;
    font-size: 0.95rem;
}
.closing__thanks {
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--gold-light);
}
.closing__names {
    font-size: 3.4rem;
    margin: 6px 0;
}
.closing__hashtag {
    letter-spacing: 2px;
    color: var(--gold-light);
    font-size: 0.9rem;
}

.footer {
    position: relative;
    z-index: 2;
    margin-top: 60px;
    padding: 22px;
    font-size: 0.8rem;
    color: var(--cream);
    background: rgba(28, 33, 29, 0.6);
}
.footer i {
    color: var(--gold);
}

/* ------------------------------------------------------------
   LIGHTBOX
   ------------------------------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.show {
    display: flex;
}
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}
.lightbox__close {
    position: absolute;
    top: 18px;
    right: 26px;
    font-size: 2.4rem;
    color: var(--white);
    cursor: pointer;
    line-height: 1;
}

/* ------------------------------------------------------------
   REVEAL ANIMATION
   ------------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* ------------------------------------------------------------
   RESPONSIVE — larger screens keep the phone-width frame centered
   ------------------------------------------------------------ */
@media (min-width: 600px) {
    body {
        background:
            linear-gradient(rgba(28, 33, 29, 0.85), rgba(28, 33, 29, 0.85)),
            url("../assets/images/_BON2617.webp") center/cover fixed;
    }
    .closing {
        background-attachment: scroll;
    }
}

@media (max-width: 360px) {
    .cover__names {
        font-size: 3.2rem;
    }
    .section__title {
        font-size: 2.3rem;
    }
    .countdown__grid {
        gap: 6px;
    }
    .cd-box span {
        font-size: 1.5rem;
    }
}
