/* =========================
   GRUNDINSTÄLLNINGAR
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Cormorant Garamond", serif;
    background: #f8f1ed;
    color: #62463f;
}

button,
a {
    font-family: inherit;
}

a {
    color: inherit;
}

section {
    position: relative;
    width: 100%;
    padding: 90px 24px;
    text-align: center;
}

h1,
h2,
h3,
p {
    position: relative;
    z-index: 2;
}

h2 {
    margin-bottom: 28px;
    font-size: 48px;
    font-weight: 500;
    color: #815c53;
}

h3 {
    font-size: 28px;
    font-weight: 600;
    color: #815c53;
}

p {
    font-size: 22px;
    line-height: 1.7;
}


/* =========================
   BAKGRUND
========================= */

.background {
    position: fixed;
    inset: 0;
    z-index: -10;
    background:
        radial-gradient(
            circle at top left,
            rgba(232, 189, 179, 0.45),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(218, 174, 164, 0.35),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #fffaf7 0%,
            #f7e9e4 50%,
            #fdf8f4 100%
        );
}

.background::before,
.background::after {
    content: "";
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(75px);
    opacity: 0.3;
}

.background::before {
    top: -130px;
    left: -120px;
    background: #d8a79d;
}

.background::after {
    right: -130px;
    bottom: -130px;
    background: #ebc7bf;
}


/* =========================
   FALLANDE HJÄRTAN
========================= */

#hearts {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow: hidden;
    pointer-events: none;
}

.heart {
    position: absolute;
    top: -40px;
    color: rgba(180, 111, 97, 0.7);
    animation: fall linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-40px) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}


/* =========================
   INTRO
========================= */

#intro {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 40px 20px 95px;
}

.welcome {
    margin-bottom: 50px;
    font-size: 34px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #8d665d;
    animation: fadeDown 1.2s ease;
}

@keyframes fadeDown {
    from {
        transform: translateY(-25px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* =========================
   KUVERT
========================= */

.envelope {
    position: relative;
    width: 480px;
    max-width: 92vw;
    height: 300px;
    cursor: pointer;
    perspective: 1200px;
    outline: none;
    filter: drop-shadow(0 25px 30px rgba(96, 60, 50, 0.2));
    animation: floatEnvelope 3s ease-in-out infinite;
}

.envelope::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            transparent 50%,
            #d8a99e 50%
        ),
        linear-gradient(
            225deg,
            transparent 50%,
            #e3bbb2 50%
        ),
        linear-gradient(
            315deg,
            transparent 50%,
            #efcec7 50%
        ),
        linear-gradient(
            45deg,
            transparent 50%,
            #e6bdb4 50%
        );
}

.flap {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 100%;
    height: 52%;
    transform-origin: top;
    transition:
        transform 1.1s ease,
        z-index 0s linear 0.5s;
    clip-path: polygon(0 0, 50% 100%, 100% 0);
    background: linear-gradient(180deg, #dcaea4, #ca9185);
}

.envelope.open {
    animation: none;
}

.envelope.open .flap {
    z-index: 1;
    transform: rotateX(180deg);
}

@keyframes floatEnvelope {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}


/* =========================
   PAPPER I KUVERTET
========================= */

.blank-letter {
    position: absolute;
    left: 8%;
    bottom: 8%;
    z-index: 1;
    width: 84%;
    height: 78%;
    border: 1px solid rgba(160, 109, 97, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(
            145deg,
            #fffdfb,
            #fff7f3
        );
    box-shadow: 0 10px 25px rgba(104, 72, 64, 0.08);
    opacity: 0;
    transform: translateY(45px);
    transition:
        bottom 1.1s ease,
        transform 1.1s ease,
        opacity 0.45s ease;
}

.blank-letter::before,
.blank-letter::after {
    content: "♡";
    position: absolute;
    font-size: 25px;
    color: rgba(185, 126, 113, 0.38);
}

.blank-letter::before {
    top: 18px;
    left: 20px;
}

.blank-letter::after {
    right: 20px;
    bottom: 18px;
}

.envelope.open .blank-letter {
    bottom: 42%;
    z-index: 3;
    opacity: 1;
    transform: translateY(-22px);
    transition-delay: 0.3s;
}

.letter-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Great Vibes", cursive;
    font-size: 62px;
    color: #b67a6d;
    opacity: 0.85;
    user-select: none;
}


/* =========================
   HJÄRTAN FRÅN KUVERTET
========================= */

.heart-burst {
    position: absolute;
    left: 50%;
    top: 40%;
    z-index: 12;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.burst-heart {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 22px;
    color: #b9796d;
    opacity: 0;
    animation: burstHeart 1.4s ease-out forwards;
}

@keyframes burstHeart {
    0% {
        transform: translate(-50%, 0) scale(0.35) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform:
            translate(
                calc(-50% + var(--x)),
                var(--y)
            )
            scale(1.15)
            rotate(var(--rotation));
        opacity: 0;
    }
}


/* =========================
   TEXT UNDER KUVERTET
========================= */

.open-text {
    position: absolute;
    bottom: 28px;
    left: 50%;
    width: max-content;
    max-width: 90%;
    transform: translateX(-50%);
    font-size: 22px;
    color: #9b746a;
    letter-spacing: 1px;
    text-align: center;
    animation: pulse 2s infinite;
    transition: opacity 0.3s ease;
}

.envelope.open + .open-text {
    opacity: 0;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}


/* =========================
   VISA OCH DÖLJ HEMSIDAN
========================= */

.hidden {
    display: none;
}

#website.show {
    display: block;
    animation: fadeWebsite 1.2s ease;
}

@keyframes fadeWebsite {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================
   STARTSIDA
========================= */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero::before {
    content: "";
    position: absolute;
    width: 620px;
    max-width: 85vw;
    height: 620px;
    max-height: 85vw;
    border: 1px solid rgba(183, 125, 112, 0.28);
    border-radius: 50%;
}

.hero::after {
    content: "❀";
    position: absolute;
    top: 13%;
    right: 12%;
    font-size: 90px;
    color: rgba(183, 125, 112, 0.14);
    transform: rotate(20deg);
}

.eyebrow,
.section-label {
    margin-bottom: 14px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #b0776b;
}

.hero h1 {
    margin-bottom: 20px;
    font-family: "Great Vibes", cursive;
    font-size: clamp(70px, 11vw, 145px);
    font-weight: 400;
    line-height: 1;
    color: #825c53;
}

.hero h2 {
    margin-bottom: 28px;
    font-size: 33px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.date {
    margin-bottom: 5px;
    font-size: 30px;
    font-weight: 600;
    color: #8b6259;
}

.time {
    margin-bottom: 28px;
    font-size: 27px;
    color: #a26f63;
}


/* =========================
   NEDRÄKNING
========================= */

#countdown {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin: 18px 0 25px;
}

.countdown-box {
    min-width: 95px;
    padding: 15px 12px;
    border: 1px solid rgba(174, 119, 106, 0.3);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 35px rgba(109, 75, 66, 0.08);
    backdrop-filter: blur(8px);
}

.countdown-box span {
    display: block;
    font-size: 33px;
    font-weight: 600;
    color: #855e55;
}

.countdown-box small {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a2766d;
}

.days-only {
    min-width: 175px;
    padding: 18px 24px;
}

.days-only span {
    font-size: 46px;
}

.days-only small {
    font-size: 15px;
}

.scroll-text {
    margin-top: 20px;
    font-size: 18px;
    color: #a17a71;
    animation: scrollFloat 2s ease-in-out infinite;
}

@keyframes scrollFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* =========================
   BRUDPARETS BILD
========================= */

.couple-photo {
    width: 100%;
    padding: 20px 20px 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.couple-photo img {
    width: 100%;
    max-width: 720px;
    display: block;

    border-radius: 32px;
    border: 8px solid rgba(255, 255, 255, 0.85);

    box-shadow:
        0 25px 60px rgba(102, 68, 61, 0.15);

    transition:
        transform .35s ease,
        box-shadow .35s ease;
}

.couple-photo img:hover {
    transform: translateY(-8px);
    box-shadow:
        0 35px 70px rgba(102, 68, 61, 0.22);
}


/* =========================
   MOBIL
========================= */

@media (max-width: 800px) {

    .couple-photo {
        padding: 15px 18px 70px;
    }

    .couple-photo img {
        max-width: 100%;
        border-radius: 24px;
    }

}

@media (max-width: 520px) {

    .couple-photo {
        padding: 10px 14px 60px;
    }

    .couple-photo img {
        border-radius: 20px;
        border-width: 6px;
    }

}


/* =========================
   GEMENSAMT INNEHÅLL
========================= */

.section-content {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.story {
    background: rgba(255, 255, 255, 0.45);
}

.story p:last-child {
    max-width: 760px;
    margin: 0 auto;
    font-size: 26px;
}


/* =========================
   BRÖLLOPSINFORMATION
========================= */

.wedding {
    padding-top: 100px;
    padding-bottom: 100px;
}

.info {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin: 45px auto 0;
}

/* Centrerar tredje kortet: Klädsel */
.info .card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 15px);
    justify-self: center;
}

.card {
    position: relative;
    z-index: 2;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 30px;
    border: 1px solid rgba(180, 125, 112, 0.25);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 20px 50px rgba(110, 75, 67, 0.1);
    backdrop-filter: blur(10px);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 60px rgba(110, 75, 67, 0.15);
}

.card-icon {
    margin-bottom: 18px;
    font-size: 45px;
}

.card h3 {
    margin-bottom: 22px;
}

.card p,
.card address {
    margin-bottom: 17px;
    font-size: 21px;
    line-height: 1.7;
    font-style: normal;
}

.highlight {
    font-size: 30px;
    color: #a16458;
}

.map-button {
    display: inline-block;
    margin-top: 15px;
    padding: 13px 26px;
    border-radius: 40px;
    background: linear-gradient(135deg, #a86f63, #c99589);
    box-shadow: 0 10px 25px rgba(143, 89, 77, 0.2);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.map-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(143, 89, 77, 0.28);
}


/* =========================
   SCHEMA
========================= */

.schedule {
    background: rgba(255, 255, 255, 0.4);
}

.timeline {
    position: relative;
    width: 100%;
    max-width: 780px;
    margin: 45px auto 0;
    text-align: left;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 175px;
    width: 1px;
    background: rgba(167, 111, 98, 0.35);
}

.timeline-item {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 135px 1fr;
    gap: 45px;
    align-items: center;
    margin-bottom: 28px;
    padding: 26px 30px;
    border: 1px solid rgba(181, 126, 113, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 13px 34px rgba(100, 68, 60, 0.07);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 167px;
    width: 17px;
    height: 17px;
    border: 5px solid #f7ece8;
    border-radius: 50%;
    background: #b67a6d;
}

.timeline-time {
    text-align: right;
    font-size: 22px;
    font-weight: 700;
    color: #a2695e;
}

.timeline-item h3 {
    margin-bottom: 5px;
    font-size: 24px;
}

.timeline-item p {
    font-size: 19px;
}


/* =========================
   GALLERI
========================= */

.gallery {
    padding-bottom: 110px;
}

.gallery-text {
    margin-bottom: 40px;
    color: #87655d;
}

.photos {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.photo {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(102, 68, 61, 0.12);
    transition: transform 0.3s ease;
}

.photo:hover {
    transform: translateY(-6px);
}

.photo img {
    display: block;
    width: 100%;
    height: auto;
}


/* =========================
   OSA OCH KONTAKT
========================= */

.rsvp {
    background:
        linear-gradient(
            rgba(245, 229, 223, 0.78),
            rgba(245, 229, 223, 0.78)
        );
}

.rsvp-text {
    max-width: 680px;
    margin: 0 auto;
    font-size: 25px;
}

.rsvp-text strong {
    display: block;
    margin-top: 7px;
    color: #9d665b;
}

.contact-box {
    width: 100%;
    max-width: 780px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 42px auto 0;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(179, 123, 110, 0.25);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 32px rgba(103, 69, 61, 0.08);
    text-align: left;
    text-decoration: none;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 17px 38px rgba(103, 69, 61, 0.14);
}

.contact-icon {
    flex-shrink: 0;
    font-size: 34px;
}

.contact-link span:last-child {
    overflow-wrap: anywhere;
    font-size: 20px;
    font-weight: 600;
    color: #7e584f;
}

.contact-link small {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #aa7b70;
}

.contact-message {
    margin-top: 42px;
    font-size: 25px;
    font-style: italic;
    color: #805e56;
}


/* =========================
   SIDFOT
========================= */

footer {
    position: relative;
    padding: 65px 24px;
    text-align: center;
    background: #805d55;
    color: #fff8f5;
}

footer p {
    margin-bottom: 5px;
    font-size: 19px;
}

.footer-names {
    margin-bottom: 13px;
    font-family: "Great Vibes", cursive;
    font-size: 54px;
}


/* =========================
   SURFPLATTA
========================= */

@media (max-width: 800px) {
    section {
        padding: 75px 20px;
    }

    h2 {
        font-size: 39px;
    }

    #intro {
        padding: 35px 20px 90px;
    }

    .welcome {
        margin-bottom: 40px;
        font-size: 25px;
    }

    .envelope {
        height: 250px;
    }

    .hero h2 {
        font-size: 25px;
    }

    .date {
        font-size: 26px;
    }

    .time {
        font-size: 23px;
    }

    .info {
        grid-template-columns: 1fr;
    }

    .info .card:last-child {
        grid-column: auto;
        width: 100%;
    }

    .card {
        min-height: 330px;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-time {
        text-align: center;
    }

    .photos {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .photo {
        min-height: 360px;
    }

    .photo:nth-child(1),
    .photo:nth-child(2),
    .photo:nth-child(3) {
        transform: none;
    }

    .contact-box {
        grid-template-columns: 1fr;
    }
}


/* =========================
   MOBIL
========================= */

@media (max-width: 520px) {
    section {
        padding: 65px 16px;
    }

    h2 {
        font-size: 34px;
    }

    p {
        font-size: 19px;
    }

    #intro {
        min-height: 100svh;
        padding: 28px 12px 82px;
    }

    .welcome {
        margin-bottom: 34px;
        font-size: 20px;
        letter-spacing: 2px;
    }

    .envelope {
        width: 92vw;
        height: 215px;
    }

    .open-text {
        bottom: 22px;
        font-size: 18px;
        letter-spacing: 0.5px;
        white-space: normal;
    }

    .blank-letter {
        height: 76%;
    }

    .letter-title {
        font-size: 48px;
    }

    .hero {
        min-height: 100svh;
    }

    .hero h1 {
        font-size: 69px;
    }

    .hero h2 {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .date {
        font-size: 22px;
    }

    .time {
        font-size: 21px;
    }

    .days-only {
        min-width: 150px;
        padding: 15px 18px;
    }

    .days-only span {
        font-size: 39px;
    }

    .days-only small {
        font-size: 12px;
    }

    .story p:last-child {
        font-size: 21px;
    }

    .card {
        min-height: 300px;
        padding: 35px 20px;
    }

    .card p,
    .card address {
        font-size: 19px;
    }

    .timeline-item {
        padding: 23px 18px;
    }

    .photo {
        min-height: 290px;
    }

    .rsvp-text {
        font-size: 21px;
    }

    .contact-link {
        padding: 20px 16px;
    }

    .contact-link span:last-child {
        font-size: 17px;
    }

    .contact-message {
        font-size: 21px;
    }

    .footer-names {
        font-size: 47px;
    }

    .burst-heart {
        font-size: 19px;
    }
}