@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;900&family=Fraunces:wght@350;700&family=Pinyon+Script:wght@400;700&family=Monsieur+La+Doulaise&display=swap');
@font-face {
    font-family: 'Z';
    src: url('../fonts/Z-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
:root {
    --primary-color: #62786F;
    --text-color: #624A44;
    --gold-color: #B8860B;
    --bg-color: #FFFDF4;
    --alt-bg-color: #FFFFF7;
    --base-font-size: 14px;
    --heading-font-size: 18px;
    --subheading-font-size: 16px;
    --small-font-size: 12px;
    --font-color-primary: var(--text-color);
    --font-color-secondary: var(--primary-color);
    --font-color-accent: var(--gold-color);
    --particle-color: var(--gold-color);
    --font-family-main: 'Fraunces', sans-serif;
    --font-family-display: 'Playfair Display', serif;
    --font-family-tertiery: 'Z', sans-serif;
    --font-family-special: 'Monsieur La Doulaise', sans-serif;
    --m-spacing: 0.25em;
    --sm-spacing: 0.125em;
    --xs-spacing: 0.0625em;
}

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

body {
    font-family: var(--font-family-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #FFFFFF;
    min-width: 320px;
    max-width: 440px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

section {
    min-height: 90vh;
    padding: 3rem 0;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

h2 .and,
.couple-pair h3 i.and,
.parents h3 i.and {
    font-family: var(--font-family-special);
    color: var(--text-color)
}

p {
    text-transform: uppercase;
    font-size: var(--base-font-size) ;
    letter-spacing: var(--xs-spacing);
}

h2 {
    font-size: var(--heading-font-size);
    letter-spacing: var(--xs-spacing);
    color: var(--primary-color);
    white-space: nowrap;
    text-align: center;
    justify-content: center;
    align-items: center;
}

h3 {
    font-size: var(--subheading-font-size);
    letter-spacing: var(--sm-spacing);
}
/* Gate Animation Styles */
.gate-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 320px;
    max-width: 440px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

.gate {
    position: absolute;
    width: 50%;
    height: 100%;
    background-color: var(--primary-color);
    @supports (background-color: color-mix(in srgb, var(--primary-color), transparent)) {
        background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    }
    transition: transform 1.5s ease-in-out;
    z-index: 9999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gate-left {
    left: 0;
    transform-origin: left;
    border-right: 0.25px solid rgba(255, 255, 255, 0.3);
    background-image: url('../images/TL.webp'), url('../images/LL.webp'), url('../images/bggate-left.webp');
    background-size: 250% auto, 250% auto, 100% 100%;
    background-position: calc(-50px) calc(-150px), calc(-70px) calc(100% - -120px), center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
}

.gate-right {
    right: 0;
    transform-origin: right;
    border-left: 0.25px solid rgba(255, 255, 255, 0.3);
    background-image: url('../images/TR.webp'), url('../images/LR.webp'), url('../images/bggate-right.webp');
    background-size: 250% auto, 250% auto, 100% 100%;
    background-position: calc(100% + 50px) -150px, calc(100% + 30px) calc(100% - -190px), center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.gate.open-left {
    transform: perspective(1000px) rotateY(90deg);
}

.gate.open-right {
    transform: perspective(1000px) rotateY(-90deg);
}

.save-date-btn,
.contact-btn,
.modal-btn,
.nav-item,
.seal {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.seal {
    position: absolute;
    z-index: 10000;
    width: 180px;
    height: 180px;
    background-image: url('../images/seal.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: pulseSeal 2s ease-in-out infinite;
    image-rendering: auto;
}

.seal:hover {
    transform: scale(1.1);
}

.seal.clicked {
    animation: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.seal::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
}

.seal-text {
    color: var(--bg-color);
    font-family: var(--font-family-display);
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hide hero section initially */
.hero {
    opacity: 0;
    transition: opacity 1s ease;
    background-color: #FFFDF4;
}

.hero.visible {
    opacity: 1;
}

/* bg settings for Hero & Program Section */
.hero,
.venue,
.countdown {
    position: relative;
    z-index: 0;
    background-image: url('../images/main-blw.webp'), url('../images/main-top.webp');
    background-size: 100% auto, 100% auto;
    background-position: bottom, top;
    background-repeat: no-repeat, no-repeat;
    min-height: 90vh;
    padding-bottom: 30%;
    padding-top: 30%;
}

.invitation,
.program {
    position: relative;
    z-index: 0;
    background-image: url('../images/sec-left.webp'), url('../images/sec-right.webp');
    background-size: 100% auto, 100% auto;
    background-position: left, right;
    background-repeat: no-repeat, no-repeat;
    min-height: 90vh;
    padding-bottom: 30%;
    padding-top: 30%;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.program .container {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    max-width: 440px;
    min-width: 220px;
    margin: 0 auto;
    width: calc(100% - 20px);
    border-radius: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
}

.invitation {
    position: relative;
    z-index: 0;
    background-color: var(--alt-bg-color);
    padding: 3rem 0;
    text-align: center;
}

.invitation .container {
    position: relative;
    z-index: 2;
}

.animate-hero {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
}

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

.animate-hero {
    animation-play-state: paused;
}

.hero.visible .animate-hero {
    animation-play-state: running;
}
.hero h1 {
    font-family: var(--font-family-tertiery);
    color: var(--text-color);
    font-size: 1em;
    letter-spacing: 2px;
    font-style: italic;
    margin-bottom: 1rem;
}

.hero h2 {
    font-family: var(--font-family-display);
    color: var(--gold-color);
    font-size: 24px;
    margin: 0.5rem 0;
    letter-spacing: var(--m-spacing);
}

.couple-names {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0rem;
    margin: 0rem 0;
}

.couple {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.couple h2 {
    margin: 0;
}

.divider {
    height: 120px;
    position: relative;
    margin: 0 1rem;
}

.divider::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleX(0.5);
    width: 2px;
    height: 100%;
    background-color: var(--primary-color);
    transform-origin: 0 0;
}

.date-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-main);
    color: var(--primary-color);
    position: relative;
    margin: 1rem;
}

.date-line {
    width: 150px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 0.5rem 0;
    transform: scaleY(0.5);
    transform-origin: 0 0;
}

.date-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-item .date-line {
    width: 90px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 0;
    transform: scaleY(0.5);
    transform-origin: 0 0;
}

.date {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}

.date-number {
    font-size: 48px;
    margin: 0;
    font-weight: lighter;
}

.year {
    font-size: 18px;
    letter-spacing: 2px;
    margin-top: -1rem;
}

.invitation-text {
    font-style: italic;
    margin: 2rem 0;
}

.location {
    color: var(--text-color);
    letter-spacing: var(--m-spacing);
    font-family: var(--font-family-main);
    margin: 1rem 0;
    font-size: var(--base-font-size);
    text-transform: uppercase;
}

.hashtag {
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: var(--m-spacing);
    text-transform: none;
}

/* Invitation Section */
.invitation {
    background-color: var(--alt-bg-color);
    padding: 3rem 0;
    text-align: center;
}

.arabic-text {
    font-size: var(--heading-font-size);
    margin: 2rem 0;
    direction: rtl;
    font-family: 'Traditional Arabic', serif;
    color: var(--primary-color);
}

.parents h3 {
    margin: 0.5rem 0;
    line-height: 1.8;
    color: var(--primary-color);
}

.greeting {
    font-size: var(--base-font-size);
    line-height: 1.6;
    color: var(--text-color);
    text-transform: none;
    letter-spacing: var(--xs-spacing);
}

.honorific {
    font-size: var(--base-font-size);
    color: var(--text-color);
    text-transform: none;
    letter-spacing: var(--xs-spacing);
}

.event-text {
    font-size: var(--base-font-size);
    line-height: 1.6;
    color: var(--text-color);
    text-transform: none;
    letter-spacing: var(--xs-spacing);
}

.couple-pair {
    margin: 1rem 0;
}

.couple-pair h3 {
    font-family: var(--font-family-display);
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.with-text {
    font-size: var(--base-font-size);
    margin: 0.5rem 0;
    color: var(--gold-color);
}

.divider-line {
    width: 50%;
    height: 30px;
    margin: 1.5rem auto;
    background-image: url("../images/divider.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% auto;
    opacity: 0.5;
}

.invitation h3 {
    font-family: var(--font-family-display);
    color: var(--gold-color);
}

/* Venue Section */
.venue {
    background-color: var(--bg-color);
}

.venue h3 {
    color: var(--primary-color);
    margin: 1rem 0;
}

.venue h4 {
    color: var(--gold-color);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.heading-with-icon {
    margin-top: 2rem;
}

.section-icon {
    height: 40px;
    width: 100% ;
}

.save-date-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    margin-top: 2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: var(--font-family-display);
}

.save-date-btn:hover {
    background-color: var(--gold-color);
}

/* Program Section */
.program {
    background-color: var(--alt-bg-color);
}

.schedule {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

/* Pantun Section */
.pantun-text {
    font-style: italic;
    margin: 2rem 0;
    line-height: 2;
}

/* Countdown Section */
.countdown {
    background-color: var(--bg-color);
}
.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.countdown-item span {
    font-size: 4rem;
    font-weight: 700;
    color: var(--gold-color);
}

.countdown-item p {
    color: var(--primary-color);
    font-size: var(--small-font-size);
}

/* Modal Styles */
.modal p {
    text-transform: none;
}

.modal {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 90%;
    max-width: 400px;
    background-color: var(--primary-color);
    @supports (background-color: color-mix(in srgb, var(--primary-color), transparent)) {
        background-color: color-mix(in srgb, var(--primary-color) 80%, transparent);
    }
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 15px;
    color: white;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.modal.hide {
    opacity: 0;
    transform: translate(-50%, 100%);
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    margin: 0;
    font-size: var(--base-font-size);
    margin-bottom: 0.25rem;
}

.contact-info p {
    margin: 0;
    font-size: var(--small-font-size);
    color: var(--bg-color);
}

.contact-buttons {
    display: flex;
    gap: 0.5rem;
}

.contact-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--alt-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-btn:hover {
    background-color: var(--gold-color);
}

.contact-btn img {
    width: 20px;
    height: 20px;
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

.modal.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.modal-backdrop.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.modal.hide {
    opacity: 0;
    transform: translate(-50%, 100%);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
}

.modal h3 {
    font-family: var(--font-family-display);
    margin-bottom: 1.5rem;
    font-size: var(--heading-font-size);
}

.modal-content {
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: grid;
    gap: 1rem;
}

.modal-btn {
    background-color: var(--alt-bg-color);
    color: var(--primary-color);
    border: none;
    padding: 0.8rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-btn img {
    width: 20px;
    height: 20px;
}

.modal.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
    }
    to {
        transform: translate(-50%, 0);
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 320px;
    max-width: 440px;
    width: 100%;
    background-color: var(--primary-color);
    @supports (background-color: color-mix(in srgb, var(--primary-color), transparent)) {
        background-color: color-mix(in srgb, var(--primary-color) 80%, transparent);
    }
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding: 1rem;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: var(--small-font-size);
    opacity: 0;
    animation: fadeInNav 1.5s ease-in-out forwards;
}

@keyframes fadeInNav {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulseSeal {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.nav-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
}

/* Grid Layout */
.countdown-timer {
    grid-template-columns: repeat(2, 1fr);
}

/* Text Animation */
.animate-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-text.animate {
    opacity: 1;
    transform: translateY(0);
}

.delay { transition-delay: 0.4s; }