
/* =================================
   WEDDING INVITATION
   Theme: Mauve + Pink Belacan
================================= */

:root {
    --mauve: #a67c8e;
    --mauve-dark: #8f6878;
    --pink-light: #f8f1f2;
    --pink-pale: #fbf5f5;
    --text: #6f6468;
    --cream: #fffdfd;
    --border: #ead6df;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
}

img {
    max-width: 100%;
}

h2,
h3 {
    font-weight: normal;
    font-size: 20px;
    color: black;
}


/* =================================
   INVITATION BACKGROUND — FIT SCREEN
================================= */

#invitation {
    display: none;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: transparent;
}

/* Background fills the screen */
#invitation::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background-image: url("images/bg_inv.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}


/* =================================
   OPENING COVER
================================= */

.cover {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    background: #6f6468;
    transition: opacity 0.8s ease;
}

.cover-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(
            rgba(248, 241, 242, 0),
            rgba(248, 241, 242, 0)
        ),
        url("images/finalbgwname.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        rgba(249, 221, 234, 0.03),
        rgba(166, 124, 142, 0.08)
    );
}

.cover-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    padding: 30px 20px;
    animation: fadeIn 1.5s ease;
}

.cover.opening {
    opacity: 0;
    pointer-events: none;
}

.wedding-names {
    position: relative;
    width: 260px;
    height: 310px;
    margin: 0 auto;
    color: #583a38;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.16);
}

.letter-f {
    position: absolute;
    top: 5px;
    bottom: 100px;
    left: 10px;
    font-family: "Sofia", cursive;
    font-size: 145px;
    line-height: 1;
}

.wedding-names .ampersand {
    position: absolute;
    top: 115px;
    left: 100px;
    font-family: "Bodoni Moda", serif;
    font-size: 55px;
    line-height: 1;
}

.letter-a {
    position: absolute;
    top: 120px;
    left: 130px;
    font-family: "Sofia", cursive;
    font-size: 135px;
    line-height: 1;
}

.nama-pengantin {
    font-family: Georgia, "Times New Roman", serif;
    color: #583a38;
    padding-top: 10px;
}

.nama-pengantin h3 {
    font-size: 25px;
}

.nama-pengantin p {
    font-size: 15px;
    letter-spacing: 3px;
    margin-top: 10px;
}

.tap-text {
    margin-top: 35px;
    color: #fff8f9;
    font-size: 11px;
    letter-spacing: 3px;
    animation: gentlePulse 2s ease-in-out infinite;
}


/* =================================
   GENERAL SECTIONS
================================= */

.section {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 75px 25px;
    text-align: center;
}
.section .text.reveal{
    max-width: 600px;
    margin: 14px auto;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
    color: black;
}

.section h2 {
    color: black;
    margin-bottom: 18px;
}

.section-label {
    font-family: "Satisfy", cursive;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: black;
    line-height: 1.4;
    margin: 0 auto 8px;
}

.text {
    max-width: 650px;
    margin: 14px auto;
    font-size: 16px;
    line-height: 1.9;
}

.button {
    display: inline-block;
    margin-top: 20px;
    padding: 13px 25px;
    border: none;
    border-radius: 30px;
    background: white;
    color: black;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(166, 124, 142, 0.729);
}

.button:hover {
    background: var(--mauve-dark);
    transform: translateY(-2px);
}
.break {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: -30px;
}

.break img {
    display: block;
    width: 350px;
    height: auto;
}

.break-1 {
    margin-top: 10px;
    padding-top: 0;
    opacity: 0;
    animation: flowerReveal 1s ease forwards;
    animation-delay: 1.9s;
}

/* =================================
   MAIN INVITATION ANIMATIONS
================================= */

.invitation {
    padding-top: 50px;
}

/* Animation timing:
   Label -> flower -> groom -> & -> bride -> flower
   -> day -> line -> month -> number -> line
   -> time -> location
*/


/* =================================
   MAIN WEDDING DISPLAY
================================= */

.main-invitation {
    padding-top: 50px;
    padding-bottom: 75px;
}

.main-invitation .section-label {
    opacity: 0;
    animation: handwritingReveal 1.5s ease forwards;
    animation-delay: 0.3s;
    padding-top: 0;
}

.main-invitation .text.reveal {
    max-width: 600px;
    margin: 14px auto;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.9;
    color: black;
}

.bunga {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bunga img {
    display: block;
    width: 250px;
    height: auto;
}

.bunga-1 {
    margin-top: 10px;
    padding-top: 0;
    opacity: 0;
    animation: flowerReveal 1s ease forwards;
    animation-delay: 1.9s;
}

.nama-lelaki,
.nama-perempuan {
    color: black;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(23px, 4vw, 32px);
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
}

.nama-lelaki {
    margin: 12px 0 4px;
    animation: handwritingReveal 2s ease forwards;
    animation-delay: 3s;
}

.nama-ampersand {
    display: block;
    color: black;
    font-family: "Italiana", serif;
    font-size: 38px;
    line-height: 1.3;
    opacity: 0;
    transform: scale(0.7);
    animation: ampersandReveal 0.8s ease forwards;
    animation-delay: 5.1s;
}

.nama-perempuan {
    margin: 4px 0 12px;
    animation: handwritingReveal 2s ease forwards;
    animation-delay: 6s;
}

.bunga-2 {
    margin-top: 10px;
    opacity: 0;
    animation: flowerReveal 1s ease forwards;
    animation-delay: 8.1s;
}



/* =================================
   EVENT DATE & TIME
   Animation controlled by JavaScript scroll reveal
================================= */

#event-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    max-width: 750px;
    margin: 45px auto 0;
    padding: 10px 0;
    color: black;
}

.day,
.date,
.time {
    min-width: 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: inherit;
    font-size: 14px;
}

.day,
.month,
.time,
.location {
    /* Animation handled by JavaScript */
    opacity: 1;
    clip-path: none;
}

.day::after,
.date::after {
    content: "";
    position: absolute;
    top: 15%;
    right: 0;
    width: 1px;
    height: 70%;
    background: black;
    transform: scaleY(1);
    transform-origin: top;
}

.date {
    flex-direction: column;
    padding: 5px;
}

.month {
    font-size: 14px;
}

.date-number {
    color: black;
    font-family: "Sofia", serif;
    font-size: clamp(55px, 9vw, 76px);
    line-height: 1.1;
}

.time {
    padding: 5px;
}

.location {
    grid-column: 1 / -1;
    margin-top: 22px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #event-info {
        max-width: 100%;
    }

    .day,
    .date,
    .time {
        font-size: 12px;
        min-height: 85px;
    }

    .month {
        font-size: 12px;
    }

    .location {
        font-size: 13px;
    }
}
/* =================================
   EVENT DATE & TIME - FONT SIZE
================================= */

#event-info .day,
#event-info .month,
#event-info .time,
#event-info .location {
    font-size: 14px !important;
}

#event-info .date-number {
    font-size: clamp(40px, 7vw, 60px);
}



/* =================================
   FAMILY INTRODUCTION
================================= */

.introduction {
    max-width: none;
    width: 100%;
    padding: 70px 25px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Teks biasa */
.introduction .text {
    max-width: 600px;
    margin: 14px auto;
    font-size: 14px;
    line-height: 1.9;
    color: black;
}

/* Tajuk */
.introduction h2 {
    color: black;
    margin-bottom: 25px;
}

/* Nama bapa dan ibu */
.introduction .nama-bapa,
.introduction .nama-ibu {
    color: black;
    font-family: "Cormorant Garamond", serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    margin: 12px auto 0;
}
/* Jarak simbol & dengan nama */
.introduction .ampersand-family {
    margin-top: 2px;
    margin-bottom: 2px;
    line-height: 1;
    font-size: 13px;
}

/* Keterangan di bawah nama */
.introduction .keterangan-nama {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 auto 12px;
}

/* =================================
   BISMILLAH IMAGE
================================= */

.introduction .bismillah.reveal {
    width: 80%;
    margin: -30% auto -30%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 1.5s ease,
        transform 1.5s ease;
}

.introduction .bismillah.reveal img {
    display: block;
    width: 350px;
    max-width: 95%;
    height: auto;
    margin: 0 auto;
}

/* Animation when visible */
.introduction .bismillah.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* =================================
   TEXT ON SCROLL
================================= */

.introduction .reveal {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.introduction .reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Keep the image animation smooth */
.introduction .bismillah.reveal {
    transition:
        opacity 1.5s ease,
        transform 1.5s ease;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .introduction .reveal,
    .introduction .bismillah {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* =================================
   BISMILLAH IMAGE - SCROLL ANIMATION
================================= */

.main-invitation .bismillah {
    width: 100%;
    margin: -50px auto -220px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 1.5s ease,
        transform 1.5s ease;
}

.main-invitation .bismillah img {
    display: block;
    width: 220px;
    max-width: 85%;
    height: auto;
    margin: 0 auto;
}

.main-invitation .bismillah.show {
    opacity: 1;
    transform: translateY(0);
}


.introduction h2 {
    margin-bottom: 25px;
}

.introduction .nama-bapa,
.introduction .nama-ibu {
    color: black;
    font-family: "Cormorant Garamond", serif;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* =================================
   INTRODUCTION - SCROLL ANIMATION
================================= */

.introduction .reveal {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.introduction .reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .introduction .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* =================================
   COUNTDOWN
================================= */

.countdown-section {
    max-width: none;
    background: rgba(243, 229, 232, 0);
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0px;
}

.countdown div {
    min-width: 85px;
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(166, 124, 142, 0.722);
}

.countdown span {
    display: block;
    color: black;
    font-size: 32px;
    font-weight: bold;
}

.countdown small {
    color: black;
    font-size: 11px;
    letter-spacing: 2px;
}
/* =================================
   TEMA
================================= */

#tema {
    text-align: center;
}

#tema .section-label {
    text-align: center;
}

#tema h2 {
    text-align: center;
}

/* =================================
   CONTACT SECTION
================================= */

.contact-section {
    padding: 65px 25px;
}

.contact-intro {
    margin-bottom: 30px !important;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 750px;
    margin: 0 auto;
}

.contact-card {
    padding: 25px 18px;
    background: rgba(255, 253, 253, 0.477);
    border: 1px solid #ead6df;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 5px 18px rgba(143, 104, 120, 0.08);
}
.contact-card h3 {
    color: #000000 !important;
}
.contact-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    margin-bottom: 12px;
}

.contact-heading p {
    margin: 0;
    color:black;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.contact-icon {
    color: #a67c8e;
    font-size: 22px;
}

.contact-card h3 {
    margin: 12px 0 20px;
    color: #6f505c;
    font-family: "Cormorant Garamond", serif;
    font-size: 23px;
    font-weight: 700;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    background: white;
    color: black;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.whatsapp-button:hover {
    background: white;
    transform: translateY(-2px);
}

.whatsapp-icon {
    font-size: 17px;

}
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: green;
}


/* MOBILE */
@media (max-width: 520px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 360px;
    }

    .contact-card {
        padding: 22px 15px;
    }
}

/* =================================
   WEDDING WISHES
================================= */

.wishes-section {
    max-width: none;
    padding: 0 20px;
    color: black;
}

.wishes-section .section-label,
.wishes-section h2,
.wishes-intro {
    color: black;
}

.wishes-section h2 {
    margin: 10px 0 12px;
}

.wishes-intro {
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* Wishes container */
.wishes-container {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 18px;
    max-width: 1000px;
    margin: -20px auto 0;
}

/* Individual wish card */
.wish-card {
    min-width: 0;
    padding: 25px 20px;
    color: black;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(120, 78, 98, 0.15);
    overflow-wrap: anywhere;
}

/* Guest name — smaller font */
.wish-card h3 {
    color: black;
    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 10px;
}

/* Guest message */
.wish-card p {
    color: black;
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
}

/* Heart decoration */
.wish-heart {
    color: black;
    font-size: 15px;
    margin-bottom: 10px;
}

/* Loading message */
.wishes-loading {
    grid-column: 1 / -1;
    color: black;
    padding: 20px;
    text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
    .wishes-container {
        grid-template-columns: 1fr;
    }

    .wish-card {
        padding: 20px 18px;
    }

    .wish-card h3 {
        font-size: 14px;
    }

    .wish-card p {
        font-size: 14px;
    }
}


/* =================================
   MUSIC BUTTON
   Keep music inside the original navbar
================================= */

/* Hide the old floating music button */
#floatingMusicButton {
    display: none;
}

/* =================================
   ORIGINAL BOTTOM NAVBAR
================================= */

#navbar {
    position: fixed;
    left: 50%;
    bottom: -200px;
    transform: translateX(-50%);
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    width: max-content;
    max-width: calc(100% - 24px);
    padding: 8px;

    background: rgba(248, 241, 242, 0.96);
    border: 1px solid rgba(166, 124, 142, 0.3);
    border-radius: 28px;
    box-shadow: 0 5px 20px rgba(80, 55, 65, 0.15);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition: bottom 0.4s ease;
}

/* =================================
   NAVBAR LINKS
================================= */

#navMenu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

#navbar a,
#navbar .music-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 9px 12px;
    border: none;
    border-radius: 24px;

    background: transparent;
    color: black;

    font-family: "Cormorant Garamond", serif;
    font-size:20px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}

/* Hover effect */
#navbar a:hover,

#navbar #musicToggle:hover {
    background: var(--mauve);
    color: white;
}

/* =================================
   MUSIC ON / OFF BUTTON
================================= */

#navbar #musicToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    flex: 0 0 auto;
    visibility: visible;
    opacity: 1;
}

#navbar .music-icon {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}

#navbar .music-label {
    display: inline-block;
    color: inherit;
}

/* No hamburger button for the original pill navbar */
#menuToggle {
    display: none;
}

/* =================================
   NAVBAR APPEARS ON SCROLL
================================= */

#navbar.navbar-visible {
    bottom: 20px;
}

/* =================================
   MOBILE RESPONSIVE
================================= */

@media (max-width: 600px) {
    #navbar {
        max-width: calc(100% - 16px);
        padding: 5px;
        border-radius: 22px;
    }

    #navMenu {
        gap: 2px;
    }

    #navbar a,
    #navbar .music-toggle {
        padding: 7px 8px;
        font-size: 12px;
    }

    #navbar .music-icon {
        font-size: 15px;
    }

    #navbar.navbar-visible {
        bottom: 12px;
    }
}


/* =================================
   ANIMATION KEYFRAMES
================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
}

/* Left-to-right text reveal */
@keyframes handwritingReveal {
    from {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes flowerReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ampersandReveal {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes numberReveal {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lineReveal {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}


/* =================================
   ACCESSIBILITY
================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .main-invitation .section-label,
    .bunga-1,
    .nama-lelaki,
    .nama-ampersand,
    .nama-perempuan,
    .bunga-2,
    .day,
    .month,
    .date-number,
    .time,
    .location {
        opacity: 1;
        clip-path: none;
        transform: none;
    }

    .day::after,
    .date::after {
        transform: scaleY(1);
    }
}


/* =================================
   TABLET
================================= */

@media (max-width: 768px) {
    .section {
        padding: 60px 22px;
    }

    .main-invitation {
        padding-top: 25px;
    }

    .wedding-names {
        transform: scale(0.9);
    }

    .bunga img {
        width: 220px;
    }

    #event-info {
        margin-top: 35px;
    }

    .day,
    .month,
    .time {
        font-size: 20px;
    }

    .location {
        font-size: 19px;
    }
}



@media (max-width: 480px) {
    .introduction {
        padding: 50px 18px;
    }

    .introduction .bismillah img {
        width: 190px;
    }

    .introduction .nama-bapa,
    .introduction .nama-ibu {
        font-size: 21px;
    }

    .main-invitation {
        padding-top: 25px;
    }
}

/* =================================
   COUPLE NAMES — TYPEWRITER
================================= */

#invitation .nama-lelaki.scroll-reveal,
#invitation .nama-perempuan.scroll-reveal {
    opacity: 0;
    clip-path: none;
    animation: none !important;
    transform: none;
    transition: opacity 0.2s ease;
}

#invitation .nama-lelaki.scroll-reveal.is-visible,
#invitation .nama-perempuan.scroll-reveal.is-visible {
    opacity: 1;
    clip-path: none;
    transform: none;
}

/* Elakkan nama tersembunyi jika reduced motion diaktifkan */
@media (prefers-reduced-motion: reduce) {
    #invitation .nama-lelaki.scroll-reveal,
    #invitation .nama-perempuan.scroll-reveal {
        opacity: 1;
        clip-path: none;
    }
}

