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


html {
    scroll-behavior: smooth;
}


/* 🌸 POZADINA */
#flower-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(0.8px);
}

/* 🦋 IZNAD SVEGA */
#butterfly-canvas {
    /* ❗ umjesto fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ili bolje dolje */
    pointer-events: none;
}

body {
    font-family: 'Inter', sans-serif;
    text-align: center;
    color: #333;
    background: #e0999ce8;
}

section {
    padding: 60px 20px;
}

.hero {
    height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;

    overflow: hidden;
    position: relative;
    /* needed for overlay */
}

.hero::after {
    content: "";
    /* REQUIRED */
    position: absolute;
    /* REQUIRED */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;

    background: linear-gradient(to bottom,
            rgba(224, 153, 157, 0),
            rgba(224, 153, 157, 0.7),
            rgba(224, 153, 157, 1));

    pointer-events: none;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0.5;
    filter: blur(2px);
    transform: translate(-50%, -50%);
    z-index: -10;
}


@font-face {
    font-family: 'catchy-mager';
    src: url('assets/fonts/catchy-mager.woff') format('woff');
    font-display: swap;
}

@font-face {
    font-family: 'edwardianscriptitc';
    src: url('assets/fonts/edwardianscriptitc.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'AnastasiaScriptRegular';
    src: url('assets/fonts/AnastasiaScriptRegular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Dh';
    src: url('assets/fonts/UT\ Nikahan\ Script\ Trial.otf') format('truetype');
    font-display: swap;
}

.hero h1 {
    font-family: 'Dh', serif;
    font-size: 82px;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.281),
        0 0 20px rgba(255, 255, 255, 0.171),
        0 0 40px rgba(255, 255, 255, 0.082);

}

.date {
    font-family: 'catchy-mager', serif;
    color: white;
    font-size: xx-large;
}

.tekst {
    font-size: 20px;
}

.datum {
    background: linear-gradient(to right,
            rgba(162, 14, 43, 0.8),
            rgba(162, 14, 43, 0.6));

    backdrop-filter: blur(10px);

    padding: 10px 18px;
    border-radius: 10px;

    color: white;
    font-size: 32px;

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);

}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-weight: lighter;
    font-size: 22px;
    opacity: 0.9;
}

.details {
    background-color: white;
    margin: auto;
}

.details h1 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    color: #33191e;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.map {
    background-color: white;
    position: relative;
}

.map::after {
    content: "";
    position: absolute;
    bottom: -150px;
    left: 0;
    width: 100%;
    height: 150px;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 1),
            rgba(255, 255, 255, 0));

    pointer-events: none;
    z-index: 2;
}

.map iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: 12px;
}

.imeDarija {
    color: #a20e2b;
}

.imeVladimir {
    color: #33191e
}

.fade-in {
    opacity: 0;
    filter: blur(8px);
}

/* animacija se aktivira TEK kad dodamo ovu klasu */
.fade-in.show {
    animation: fadeElegant 1.8s ease forwards;
}

@keyframes fadeElegant {
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.fade-in.delay-1 {
    animation-delay: 0.3s;
}

.fade-in.delay-2 {
    animation-delay: 0.7s;
}

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

.reveal {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(6px);

    transition:
        opacity 1.2s ease,
        transform 1.2s ease,
        filter 1.2s ease;
}

.reveal.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}


/*KOVERTA SE OTVARA*/
/* FULL-SCREEN ENVELOPE OVERLAY */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #e0999d;
    /* fallback */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
    perspective: 1500px;
    /* needed for 3D flap */
    transition: opacity 1.5s ease, transform 1.5s ease;
}

/* ENVELOPE CONTAINER */
.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transform-style: preserve-3d;
}

/* BOTTOM PART OF ENVELOPE */
.envelope-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* makes the image fill container */
    z-index: 1;
    transition: transform 3s ease, opacity 3s ease;
}

/* TOP FLAP */
.envelope-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fill container */
    transform-origin: top center;
    z-index: 2;
    transition: transform 7s ease;
    /* remove opacity fade */
}

/* BOTTOM PART */
.envelope-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 3s ease;
    /* only zoom, no opacity */
}

/* OPEN STATE */
.envelope.open .envelope-top {
    transform: translateY(-120px) rotateX(160deg) scale(2);
    filter: blur(0.8px) brightness(0.92);
    ;
    /* Adjust the px value to change blur intensity */

    /* Optional: helps the blur look smoother during the animation */
    transition: transform 7s, filter 1.5s;
}

.envelope.open .envelope-bottom {
    transform: translateY(220px) scale(1.1);
}

/* OVERLAY ZOOM */
.envelope-overlay.open {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
    /* slight zoom-out of entire overlay */
    transition: opacity 1.8s ease, transform 1.8s ease;
}


/* ostatak */

.date-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;

    background: url('assets/images/weddingAdriatica.jpg') center/cover no-repeat;

    position: relative;
    /* IMPORTANT */
    z-index: 1;
}

.date-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;

    background: linear-gradient(to bottom,
            #e0999d 0%,
            rgba(224, 153, 157, 0.7) 40%,
            rgba(224, 153, 157, 0) 100%);

    pointer-events: none;
    z-index: 2;
}

.date-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.7) 50%,
            #ffffff 100%);

    pointer-events: none;
    z-index: 2;
}

@media (min-width: 900px) {
    .date-section {
        background: none;
        /* uklanjamo stretched sliku */
    }

    .date-images {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    .img {
        flex: 1;
        background-size: cover;
        background-position: center;
    }

    .img1 {
        background-image: url('assets/images/weddingAdriatica.jpg');
    }

    .img2 {
        background-image: url('assets/images/weddingAdriatica3.webp');
        /* druga slika */
    }
}



.letter {
    position: absolute;
    width: 90%;
    height: 60%;
    top: 20%;
    left: 5%;
    background: linear-gradient(to bottom, #fffdf9 0%, #f6f1eb 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #33191e;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(180%) rotateX(0deg);
    /* start hidden */
    transition: transform 2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}



.flap {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0e6d9, #e6d4c8);
    clip-path: polygon(0 0, 100% 0, 50% 55%);
    transform-origin: top center;
    transition: transform 2s ease-in-out;
    z-index: 10;
    /* always above letter */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}



/* TAJMER */

.countdown {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;

    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.countdown.show {
    opacity: 1;
    transform: translateY(0);
}

.time-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    min-width: 70px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.num {
    font-size: 34px;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.label {
    font-size: 18px;
    color: white;
    opacity: 0.8;
}

.pozdrav {
    font-family: 'catchy-mager', serif;
    margin: auto;
    font-size: larger;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(224, 153, 156, 0.585) 320px);

    margin-top: -50px;
    /* pulls it into the fade */
    padding-top: 160px;
}


.pozdrav h2 {
    font-family: 'Dh', serif;
    margin-bottom: 20px;
}

.infoBox {
    max-width: 520px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;

    background: #61616100;
    backdrop-filter: blur(10px);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infoBox.reveal {
    transform: translateY(50px);
    opacity: 0;
}

.infoBox.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* LABEL (Lokacija / Vrijeme) */
.label2 {
    display: block;
    font-size: 14px;
    font-weight: bolder;
    letter-spacing: 2px;
    text-transform: uppercase;

    color: #a20e2b;
    margin-bottom: 10px;
}

/* CONTENT */
.infoBox p {
    font-family: 'catchy-mager', serif;
    font-size: 20px;
    color: #33191e;
    line-height: 1.4;
}

.linija {

    padding-top: 10px;
    max-width: 80px;
    rotate: -30deg;
}

.linija2 {
    padding-top: 10px;
    max-width: 80px;
    rotate: 30deg;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
}






.scroll-indicator {

    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);

    width: 24px;
    height: 40px;

    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

/* linija */
.scroll-indicator span {
    display: block;
    width: 2px;
    height: 100%;
    background: none;
    margin: 0 auto;

    position: relative;
}

/* strelica */
.scroll-indicator span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;

    width: 20px;
    height: 20px;

    border-right: 3px solid white;
    border-bottom: 3px solid white;

    transform: translateX(-50%) rotate(45deg);
}

/* animacija (lagano “padanje”) */
.scroll-indicator.show {
    animation: fadeInIndicator 1.5s ease forwards;
}

@keyframes fadeInIndicator {
    to {
        opacity: 0.7;
    }
}

/* “disanje” */
.scroll-indicator span {
    animation: scrollMove 2s ease-in-out infinite;
}

@keyframes scrollMove {
    0% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(8px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
}

#hero-flowers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    pointer-events: none;
    z-index: 0; /* iza teksta, iznad backgrounda */
}