/* ========================================
   Grundlegendes
======================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    background: #f8f5ed;
    color: #30251f;
    overflow-x: hidden;
}

body:not(.has-entered) {
    height: 100svh;
    overflow: hidden;
}


/* ========================================
   Welcome Screen
======================================== */

.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #f1dfc8;
    cursor: pointer;

    background:
        radial-gradient(
            circle at center,
            #a98260 0%,
            #8d694c 48%,
            #72523d 100%
        );

    transition:
        transform 1.2s cubic-bezier(0.77, 0, 0.175, 1),
        opacity 1.2s ease;

    overflow: hidden;
}


/* kleiner Licht-Effekt */

.welcome-screen::before {
    content: "";
    position: absolute;

    width: 60vw;
    height: 60vw;

    border-radius: 50%;

    background: rgba(255, 239, 218, 0.1);

    filter: blur(80px);

    animation: welcomeGlow 8s ease-in-out infinite alternate;
}


@keyframes welcomeGlow {
    from {
        transform: scale(0.9);
        opacity: 0.5;
    }

    to {
        transform: scale(1.15);
        opacity: 1;
    }
}


/* ========================================
   Welcome Inhalt
======================================== */

.welcome-content {
    position: relative;
    z-index: 2;

    text-align: center;

    padding: 30px;
}


.welcome-small {
    margin: 0 0 12px;

    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;

    opacity: 0;

    animation: fadeUp 1.2s ease forwards;
    animation-delay: 0.4s;
}


.welcome-title {
    margin: 0;

    font-size: clamp(42px, 7vw, 100px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.04em;

    opacity: 0;

    animation: titleReveal 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.7s;
}


@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}


@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 0.65;
        transform: translateY(0);
    }
}


/* ========================================
   Enter Button
======================================== */

.enter-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    margin: 70px auto 0;

    padding: 0;

    border: 0;
    background: none;

    color: inherit;

    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;

    cursor: pointer;

    opacity: 0;

    animation: fadeUp 1s ease forwards;
    animation-delay: 2s;

    transition: opacity 0.3s ease;
}


.enter-button:hover {
    opacity: 0.6;
}


.arrow {
    font-size: 18px;
    line-height: 1;

    animation: arrowBounce 2s ease-in-out infinite;
}


@keyframes arrowBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}


/* ========================================
   Welcome verlassen
======================================== */

.welcome-screen.exit {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}


/* ========================================
   Titelbild wird zum ersten Polaroid
======================================== */

.story-transition {
    position: relative;
    height: 450svh;
    background: #f8f5ed;
}

.story-stage {
    --progress: 0;
    --frame-progress: 0;
    --frame-inset-x: calc(50% - clamp(140px, 19.5vw, 255px));
    --frame-inset-top: calc(68% - clamp(165px, 31vh, 285px));
    --frame-inset-bottom: calc(32% - clamp(165px, 31vh, 285px));
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 540px;
    overflow: hidden;
    isolation: isolate;
    background: #f8f5ed;
    color: #30251f;
}

.hero-photo {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    clip-path: inset(
        calc(var(--frame-progress) * var(--frame-inset-top))
        calc(var(--frame-progress) * var(--frame-inset-x))
        calc(var(--frame-progress) * var(--frame-inset-bottom))
        round calc(var(--frame-progress) * 5px)
    );
    background: #fffdf7;
    will-change: clip-path;
}

.hero-photo::before {
    position: absolute;
    inset: 0;
    content: "";
    clip-path: inset(
        calc(var(--frame-progress) * (var(--frame-inset-top) + 1.5%))
        calc(var(--frame-progress) * (var(--frame-inset-x) + 2%))
        calc(var(--frame-progress) * (var(--frame-inset-bottom) + 11%))
        round calc(var(--frame-progress) * 3px)
    );
    background: url("assets/IMG_5961.JPEG") center 48% / cover no-repeat;
    will-change: clip-path;
}

.hero-overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    clip-path: inset(
        calc(var(--frame-progress) * var(--frame-inset-top))
        calc(var(--frame-progress) * var(--frame-inset-x))
        calc(var(--frame-progress) * var(--frame-inset-bottom))
        round calc(var(--frame-progress) * 5px)
    );
    background: linear-gradient(to bottom, rgba(13, 20, 19, .08), rgba(13, 20, 19, .46));
    opacity: calc(1 - var(--frame-progress));
    pointer-events: none;
}

.story-header-backdrop {
    position: absolute;
    z-index: 2;
    inset: 0 0 auto;
    height: 39%;
    background: linear-gradient(to bottom, #f8f5ed 0%, #f8f5ed 88%, rgba(248, 245, 237, 0) 100%);
    opacity: var(--header-opacity, 0);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: white;
    text-align: center;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
    opacity: calc(1 - var(--frame-progress));
    transform: translateY(calc(var(--frame-progress) * -28px));
    pointer-events: none;
}

.hero-small {
    margin: 0 0 20px;
    font-family: Arial, sans-serif;
    font-size: 11px;
    letter-spacing: .35em;
    text-transform: uppercase;
    opacity: .85;
}

.hero-content h2 {
    margin: 0;
    font-size: clamp(55px, 10vw, 150px);
    font-weight: 400;
    line-height: .9;
    letter-spacing: -.05em;
}

.hero-content .hero-date {
    margin: 28px 0 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .9;
}

.invitation-line {
    position: absolute;
    z-index: 4;
    top: 6%;
    left: 50%;
    width: min(90%, 1100px);
    margin: 0;
    transform: translateX(-50%);
    text-align: center;
    font-size: clamp(19px, 2.8vw, 39px);
    font-weight: 600;
    line-height: 1.25;
}

.invitation-line span {
    opacity: 0;
    transition: opacity .15s linear;
}

.chapters-title {
    position: absolute;
    z-index: 4;
    top: 17%;
    left: 0;
    width: 100%;
    margin: 0;
    text-align: center;
    font-size: clamp(76px, 12vw, 170px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.055em;
    opacity: var(--title-opacity, 0);
    transform: translateY(var(--title-offset, 26px));
}

.hero-photo-label {
    position: absolute;
    z-index: 3;
    top: calc(68% + clamp(165px, 31vh, 285px) - 6%);
    left: 50%;
    width: min(35%, 430px);
    margin: 0;
    transform: translateX(-50%);
    color: #51463c;
    text-align: center;
    font: 13px/1.3 Arial, sans-serif;
    opacity: var(--hero-label-opacity, 0);
}

.polaroid-stack {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 68%;
    width: min(100%, 700px);
    height: 75%;
    transform: translate(-50%, -50%);
}

.polaroid {
    --card-offset: 90svh;
    --card-opacity: 0;
    --stack-x: 0px;
    --stack-y: 0px;
    position: absolute;
    z-index: var(--card-order);
    top: 50%;
    left: 50%;
    width: clamp(280px, 39vw, 510px);
    height: clamp(330px, 62vh, 570px);
    margin: 0;
    padding: 16px 16px 0;
    background: #fffdf7;
    box-shadow: 0 18px 50px rgba(45, 35, 25, .2);
    opacity: var(--card-opacity);
    transform: translate3d(calc(-50% + var(--stack-x)), calc(-50% + var(--stack-y) + var(--card-offset)), 0) rotate(var(--tilt));
    will-change: transform;
}

.polaroid img {
    display: block;
    width: 100%;
    height: calc(100% - 62px);
    object-fit: cover;
}

.polaroid figcaption {
    display: flex;
    height: 62px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    color: #51463c;
    text-align: center;
    font: 13px/1.3 Arial, sans-serif;
}

.polaroid:nth-child(1) { --card-order: 1; --tilt: -2deg; --stack-x: -22px; --stack-y: -10px; }
.polaroid:nth-child(2) { --card-order: 2; --tilt: 1.5deg; --stack-x: 16px; --stack-y: -5px; }
.polaroid:nth-child(3) { --card-order: 3; --tilt: -1deg; --stack-x: -10px; --stack-y: 4px; }
.polaroid:nth-child(4) { --card-order: 4; --tilt: 2.2deg; --stack-x: 18px; --stack-y: 8px; }

.scroll-cue {
    position: absolute;
    z-index: 5;
    right: 4%;
    bottom: 4%;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font: 600 9px/1 Arial, sans-serif;
    letter-spacing: .24em;
    text-transform: uppercase;
    opacity: calc(1 - var(--frame-progress));
}

/* ========================================
   Countdown und Hochzeitslocation
======================================== */

.countdown-section,
.venue-section {
    background: #f8f5ed;
    color: #49392e;
    text-align: center;
}

.countdown-section {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 90px 20px;
}

.countdown-intro {
    margin: 0 0 36px;
    font-size: clamp(25px, 3vw, 44px);
    font-weight: 400;
}

.countdown-date {
    margin: 0 0 62px;
    font-size: clamp(64px, 9vw, 145px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.045em;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: clamp(22px, 5vw, 76px);
}

.countdown-unit {
    min-width: clamp(48px, 7vw, 100px);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.countdown-unit span {
    font: 400 clamp(34px, 4vw, 62px)/1 Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}

.countdown-unit small {
    color: #ad9580;
    font: 400 10px/1.4 Arial, sans-serif;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.calendar-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 38px;
}

.calendar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 25px;
    border: 1px solid #d8c9b7;
    border-radius: 999px;
    color: #49392e;
    background: rgba(232, 222, 207, .42);
    font: 500 13px/1 Arial, sans-serif;
    letter-spacing: .04em;
    text-decoration: none;
    transition: background-color .3s ease, border-color .3s ease, transform .3s ease;
}

.calendar-button:hover {
    background: rgba(232, 222, 207, .8);
    border-color: #bda58c;
    transform: translateY(-2px);
}

.calendar-button:focus-visible,
.calendar-download:focus-visible,
.venue-address a:focus-visible {
    outline: 2px solid #9b795a;
    outline-offset: 4px;
}

.calendar-download {
    color: #9b846e;
    font: 400 11px/1.5 Arial, sans-serif;
    text-decoration: underline;
    text-decoration-color: rgba(155, 132, 110, .45);
    text-underline-offset: 3px;
}

.venue-section {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(70px, 10vh, 120px) 7vw;
}

.venue-image {
    display: block;
    width: min(100%, 1160px);
    height: clamp(260px, 48vw, 570px);
    object-fit: cover;
    object-position: center 55%;
}

.venue-name {
    margin: 42px 0 12px;
    font-size: clamp(36px, 5vw, 66px);
    font-weight: 400;
}

.venue-address {
    margin: 0;
    color: #ad9580;
    font: 400 11px/1.6 Arial, sans-serif;
    letter-spacing: .25em;
    text-transform: uppercase;
}

.venue-address a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(173, 149, 128, .55);
    text-underline-offset: 4px;
    transition: color .25s ease, text-decoration-color .25s ease;
}

.venue-address a:hover {
    color: #715943;
    text-decoration-color: currentColor;
}

.vision-section {
    position: relative;
    height: 190svh;
    background: #f8f5ed;
    color: #49392e;
}

.vision-stage {
    position: sticky;
    top: 0;
    display: grid;
    height: 100svh;
    min-height: 480px;
    place-items: center;
    padding: 8vw;
}

.vision-copy {
    max-width: 1500px;
    margin: 0;
    text-align: center;
    font-size: clamp(30px, 5.2vw, 76px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.035em;
}

.vision-copy span {
    opacity: 0;
}

.faq-section {
    display: grid;
    grid-template-columns: minmax(230px, .75fr) minmax(0, 1.65fr);
    gap: clamp(55px, 9vw, 150px);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(90px, 12vw, 180px) 8vw;
    background: #f8f5ed;
    color: #30251f;
}

.faq-intro {
    position: sticky;
    top: 12vh;
    align-self: start;
}

.faq-intro h2 {
    margin: 0 0 28px;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.faq-intro p {
    margin: 10px 0;
    color: #806d5c;
    font: 16px/1.6 Arial, sans-serif;
}

.faq-contact-placeholder {
    color: #49392e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faq-list {
    border-top: 0;
}

.faq-item {
    border-bottom: 1px solid #e4ddd1;
}

.faq-item summary {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
    font: 500 17px/1.4 Arial, sans-serif;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #eee9df;
    text-align: center;
    font: 18px/24px Arial, sans-serif;
    transition: transform .25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    max-width: 720px;
    margin: 0;
    padding: 0 42px 24px 0;
    color: #806d5c;
    font: 15px/1.7 Arial, sans-serif;
}

.faq-answer {
    overflow: hidden;
}

.faq-item summary:focus-visible {
    outline: 2px solid #806d5c;
    outline-offset: 4px;
}

.closing-section {
    position: relative;
    display: grid;
    min-height: min(94svh, 1100px);
    margin: 12px;
    overflow: hidden;
    place-items: center;
    border-radius: 18px;
    isolation: isolate;
    background: #4c4037;
    color: #fffdf7;
}

.closing-photo,
.closing-overlay {
    position: absolute;
    inset: 0;
}

.closing-photo {
    z-index: -2;
    background: url("assets/IMG_1430.JPEG") center 42% / cover no-repeat;
    filter: blur(12px) brightness(.58);
    transform: scale(1.04);
}

.closing-main-photo {
    position: absolute;
    z-index: -1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.closing-overlay {
    z-index: 0;
    background: rgba(35, 28, 23, .48);
}

.closing-section p {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0;
    padding: 30px;
    text-align: center;
    font-size: clamp(34px, 5vw, 68px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.035em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .22);
}


/* ========================================
   Mobile
======================================== */

@media (max-width: 600px) {

    .welcome-title {
        font-size: clamp(42px, 13vw, 70px);
    }

    .welcome-small {
        font-size: 9px;
    }

    .enter-button {
        margin-top: 55px;
    }

    .story-transition {
        height: 390svh;
    }

    .story-stage {
        --frame-inset-x: calc(50% - min(37vw, 195px));
        --frame-inset-top: calc(64% - min(26.5vh, 235px));
        --frame-inset-bottom: calc(36% - min(26.5vh, 235px));
        min-height: 520px;
    }

    .hero-photo::before {
        clip-path: inset(
            calc(var(--frame-progress) * (var(--frame-inset-top) + 1.5%))
            calc(var(--frame-progress) * (var(--frame-inset-x) + 2%))
            calc(var(--frame-progress) * (var(--frame-inset-bottom) + 14%))
            round calc(var(--frame-progress) * 3px)
        );
        background-position: 54% center;
    }

    .hero-content h2 {
        font-size: clamp(50px, 15vw, 80px);
    }

    .hero-small {
        font-size: 9px;
    }

    .hero-date {
        font-size: 9px;
    }

    .invitation-line {
        top: 6%;
        font-size: clamp(17px, 4.7vw, 24px);
    }

    .chapters-title {
        top: 18%;
        font-size: clamp(66px, 17vw, 110px);
    }

    .hero-photo-label {
        top: calc(64% + min(26.5vh, 235px) - 6%);
        width: 70%;
        font-size: 11px;
    }

    .scroll-cue {
        left: 50%;
        right: auto;
        bottom: 3%;
        transform: translateX(-50%);
        font-size: 8px;
    }

    .polaroid-stack {
        top: 64%;
        height: 70%;
    }

    .polaroid {
        width: min(74vw, 390px);
        height: min(53vh, 470px);
        min-height: 310px;
        padding: 12px 12px 0;
    }

    .polaroid figcaption {
        height: 54px;
        font-size: 11px;
    }

    .polaroid img {
        height: calc(100% - 54px);
    }

    .countdown-section {
        min-height: 80svh;
        padding: 70px 14px;
    }

    .countdown-intro {
        margin-bottom: 26px;
    }

    .countdown-date {
        margin-bottom: 44px;
        font-size: clamp(54px, 13vw, 82px);
    }

    .countdown {
        gap: clamp(14px, 4vw, 26px);
    }

    .countdown-unit {
        min-width: 52px;
    }

    .countdown-unit small {
        font-size: 8px;
        letter-spacing: .15em;
    }

    .venue-section {
        min-height: 90svh;
        padding: 70px 5vw;
    }

    .venue-image {
        height: 48vh;
        min-height: 250px;
    }

    .venue-name {
        margin-top: 30px;
    }

    .venue-address {
        max-width: 90%;
        font-size: 9px;
        line-height: 1.8;
    }

    .vision-section {
        height: 160svh;
    }

    .vision-stage {
        min-height: 400px;
        padding: 8vw 6vw;
    }

    .vision-copy {
        font-size: clamp(31px, 8.2vw, 49px);
    }

    .faq-section {
        grid-template-columns: 1fr;
        gap: 42px;
        padding: 80px 7vw;
    }

    .faq-intro {
        position: static;
    }

    .faq-intro h2 br {
        display: none;
    }

    .faq-item summary {
        min-height: 68px;
        font-size: 15px;
    }

    .faq-item p {
        font-size: 14px;
    }

    .closing-section {
        min-height: 78svh;
        margin: 8px;
        border-radius: 14px;
    }

    .closing-section p {
        max-width: 540px;
        font-size: clamp(34px, 9vw, 50px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
