/*
 * Custom Font Setup
 * - Abuget for names
 * - Oceanside Typewriter for body text
 * - Birds of Paradise for headings
 */
@font-face {
    font-family: 'Abuget';
    src: url('fonts/Abuget.woff2') format('woff2'),
         url('fonts/Abuget.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Oceanside Typewriter';
    src: url('fonts/Oceanside Typewriter.woff2') format('woff2'),
         url('fonts/Oceanside Typewriter.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Birds of Paradise';
    src: url('fonts/Birds of Paradise.woff2') format('woff2'),
         url('fonts/Birds of Paradise © PERSONAL USE ONLY.ttf') format('truetype');
    font-display: swap;
}

:root {
    --bg-cream: #F5F3EF;
    --bg-warm: #FAF9F7;
    --text-dark: #2C2C2C;
    --text-black: #1A1A1A;
    --accent-gold: #C9A962;

    /* Font stacks with fallbacks */
    --font-script: 'Abuget', 'Great Vibes', 'Dancing Script', cursive;
    --font-birds: 'Birds of Paradise', 'Great Vibes', cursive;
    --font-typewriter: 'Oceanside Typewriter', 'Special Elite', 'Courier New', monospace;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-typewriter);
    background: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1000;
}

/* ==================== */
/* COVER - Buka Undangan */
/* ==================== */
.cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-cream);
    z-index: 900;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

/* Hero container starts hidden, scales in after cover is gone */
.hero-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0);
}

.hero-reveal.reveal {
    animation: scaleReveal 1.2s cubic-bezier(0.83, 0, 0.17, 1) forwards;
}

@keyframes scaleReveal {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.cover-letter {
    width: 180px;
    max-width: 45%;
    height: auto;
    mix-blend-mode: multiply;
    animation: jitterBurst 2s ease infinite;
}

/* Buzz for ~0.4s, rest, buzz again */
@keyframes jitterBurst {
    0% { transform: translate(0, 0) rotate(0deg); }
    2% { transform: translate(-2px, 1px) rotate(-1deg); }
    4% { transform: translate(2px, -1px) rotate(1deg); }
    6% { transform: translate(-1px, -2px) rotate(-0.5deg); }
    8% { transform: translate(1px, 2px) rotate(0.5deg); }
    10% { transform: translate(-2px, -1px) rotate(-1deg); }
    12% { transform: translate(2px, 1px) rotate(1deg); }
    14% { transform: translate(-1px, 2px) rotate(-0.5deg); }
    16% { transform: translate(1px, -1px) rotate(0.5deg); }
    18% { transform: translate(-2px, 1px) rotate(-1deg); }
    20% { transform: translate(0, 0) rotate(0deg); }
    /* rest */
    35% { transform: translate(0, 0) rotate(0deg); }
    /* second buzz */
    37% { transform: translate(-2px, 1px) rotate(-1deg); }
    39% { transform: translate(2px, -1px) rotate(1deg); }
    41% { transform: translate(-1px, -2px) rotate(-0.5deg); }
    43% { transform: translate(1px, 2px) rotate(0.5deg); }
    45% { transform: translate(-2px, -1px) rotate(-1deg); }
    47% { transform: translate(2px, 1px) rotate(1deg); }
    49% { transform: translate(-1px, 2px) rotate(-0.5deg); }
    51% { transform: translate(1px, -1px) rotate(0.5deg); }
    53% { transform: translate(-2px, 1px) rotate(-1deg); }
    55% { transform: translate(0, 0) rotate(0deg); }
    /* long rest until loop */
    100% { transform: translate(0, 0) rotate(0deg); }
}

.cover-text {
    font-family: var(--font-typewriter);
    font-size: 16px;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.6);
    margin-top: 24px;
    text-transform: uppercase;
}

.invitation {
    max-width: 414px;
    height: 100%;
    margin: 0 auto;
    background: var(--bg-cream);
    position: relative;
    overflow-y: auto;
    overscroll-behavior: none;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.invitation::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Section base styles */
section {
    padding: 60px 40px;
    text-align: center;
    position: relative;
    min-height: 100%;
    /* snap handled by JS */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ==================== */
/* HERO - We Invite You */
/* ==================== */
.hero {
    padding: 80px 40px;
}

.hero-title {
    font-family: var(--font-typewriter);
    font-size: 24px;
    margin-bottom: 12px;
    color: rgba(0, 0, 0, 0.78);
}

.scroll-image {
    width: 295px;
    max-width: 71%;
    height: auto;
}

/* Gentle float plays after reveal is done */
.hero-reveal.float {
    animation: gentleFloat 5s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.scroll-hint {
    position: absolute;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    animation: bounce 2.5s ease-in-out infinite;
}

.scroll-hint span {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.scroll-hint svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-dark);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(8px); opacity: 0.7; }
}

/* ==================== */
/* MAIN - Wedding Info  */
/* ==================== */
.main-content {
    justify-content: flex-start;
    padding: 2dvh 40px;
}

.intro-text {
    font-family: var(--font-birds);
    font-size: 40px;
    margin-bottom: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.wedding-title {
    font-family: var(--font-birds);
    font-size: 82px;
    font-weight: 400;
    color: var(--text-black);
    margin-bottom: 0;
    line-height: 1;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.couple-image {
    width: 222px;
    max-width: 54%;
    height: auto;
    margin-bottom: 0;
    mix-blend-mode: multiply;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.couple-names {
    font-family: var(--font-script);
    font-size: 66px;
    font-weight: normal;
    letter-spacing: -1.5px;
    color: #000000;
    margin-bottom: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.wedding-date {
    font-family: var(--font-typewriter);
    font-size: 23px;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 7px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
}

.wedding-time {
    font-family: var(--font-typewriter);
    font-size: 20px;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

/* Venue */
.venue-name {
    font-family: var(--font-typewriter);
    font-size: 28px;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

.venue-address {
    font-family: var(--font-typewriter);
    font-size: 13px;
    letter-spacing: -1.5px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.78);
    max-width: 90vh;
    margin: 0 auto;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.3s;
}

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

/* ==================== */
/* SCHEDULE Section     */
/* ==================== */
.schedule {
    justify-content: flex-start;
    padding: 5dvh 40px;
}

.flower-image {
    /* width: 150px; */
    height: 248px;
    /* max-width: 36%; */
    object-fit: cover;
    /* margin-top: 56px; */
    margin-bottom: 32px;
    mix-blend-mode: multiply;
}

.event-item {
    margin-bottom: 23px;
}

.event-title {
    font-family: var(--font-typewriter);
    font-size: 32px;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 0;
}

.event-time {
    font-family: var(--font-typewriter);
    font-size: 20px;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
}

/* ==================== */
/* FOOTER - Tagline     */
/* ==================== */
.footer-content {
    margin-top: 40px;
}

.tagline {
    font-family: var(--font-typewriter);
    font-size: 21px;
    font-style: italic;
    letter-spacing: -1.5px;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.78);
    margin-bottom: 23px;
}

.hashtag {
    font-family: var(--font-typewriter);
    font-size: 21px;
    font-style: italic;
    letter-spacing: -1.5px;
    color: rgba(0, 0, 0, 0.78);
}



/* ==================== */
/* Foto Section     */
/* ==================== */
.camera {
    padding: 80px 40px;
}

.tagline-arch {
    position: relative;
    width: 100%;
    height: 80px;
    margin: 0 auto 16px;
}

.tagline-arch span {
    font-family: var(--font-typewriter);
    font-size: 1.5rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.78);
    position: absolute;
    left: 50%;
    top: 0;
    transform-origin: center 650px;
    display: inline-block;
}

.camera-image {
    /* width: 5px; */
    /* height: 24px; */
    max-width: 45%;
    object-fit: cover;
    /* margin-top: 56px; */
    margin-bottom: 32px;
    mix-blend-mode: multiply;
}


/* ==================== */
/* credit Section     */
/* ==================== */
.credit {
    padding: 80px 40px;
}

.mobius-image {
    width: 535px;
    /* height: 24px; */
    max-width: 55%;
    object-fit: cover;
    /* margin-top: 56px; */
    margin-bottom: 32px;
    mix-blend-mode: multiply;
}

.stone-image {
    /* width: 5px; */
    /* height: 24px; */
    max-width: 45%;
    object-fit: cover;
    /* margin-top: 56px; */
    margin-bottom: 32px;
    mix-blend-mode: multiply;
}

.uwu-image {
    /* width: 5px; */
    height: 164px;
    /* max-width: 45%; */
    object-fit: cover;
    /* margin-top: 56px; */
    margin-bottom: 32px;
    mix-blend-mode: multiply;
}



/* ==================== */
/* Decorative Elements  */
/* ==================== */
.divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-dark), transparent);
    margin: 0 auto 2rem;
    opacity: 0.3;
}

.spacer {
    height: 19px;
}

/* ==================== */
/* Music Toggle         */
/* ==================== */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    background: var(--bg-cream);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.music-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--text-dark);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.music-toggle .icon-muted {
    display: none;
}

.music-toggle.muted .icon-playing {
    display: none;
}

.music-toggle.muted .icon-muted {
    display: block;
}

/* ==================== */
/* Responsive           */
/* ==================== */
/* Desktop */
@media (min-width: 500px) {
    .invitation {
        max-width: 100%;
    }

    .music-toggle {
        bottom: 30px;
        right: 30px;
    }
}

@media (max-width: 375px) {
    section {
        padding: 50px 24px;
    }

    .hero {
        padding: 60px 24px;
    }

    .intro-text {
        font-size: 48px;
    }

    .wedding-title {
        font-size: 76px;
    }

    .couple-names {
        font-size: 54px;
    }

    .wedding-date {
        font-size: 20px;
    }

    .venue-name {
        font-size: 24px;
    }

    .event-title {
        font-size: 28px;
    }
}

/* ==================== */
/* Scroll Animations    */
/* ==================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
