:root {
    --cream: #fffbf5;
    --paper: #f6f2ea;
    --honey: #e8c76a;
    --honey-dark: #b38f43;
    --sage: #c9d6c8;
    --forest: #6d7a67;
    --sky: #ddeaf4;
    --pink: #efc7c7;
    --text: #514b42;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--paper);
    color: var(--text);
    font-family: "Cormorant Garamond", serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .9), transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, .55), transparent 35%),
        repeating-radial-gradient(circle, rgba(0, 0, 0, .018) 0 1px, transparent 2px 7px);
    pointer-events: none;
    z-index: 1;
}

.storybook {
    width: 100%;
    max-width: 500px;
    margin: auto;
    background: var(--cream);
    position: relative;
    z-index: 2;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .09);
}

.page {
    min-height: 100vh;
    padding: 72px 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    background:
        radial-gradient(circle at top, rgba(255, 255, 255, .95), transparent 38%),
        linear-gradient(180deg, rgba(255, 251, 245, .97), rgba(255, 251, 245, .99));

    opacity: 0;
    transform: perspective(1200px) rotateY(10deg) translateY(55px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.page.visible {
    opacity: 1;
    transform: perspective(1200px) rotateY(0deg) translateY(0);
}

.page::before,
.page::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.page::before {
    inset: 18px;
    border: 1px solid rgba(179, 143, 67, .28);
    border-radius: 24px;
}

.page::after {
    inset: 32px;
    border: 1px solid rgba(201, 214, 200, .45);
    border-radius: 18px;
    background-image:
        radial-gradient(circle, rgba(179, 143, 67, .11) 1.5px, transparent 2px);
    background-size: 24px 24px;
    opacity: .35;
}

.script {
    font-family: "Great Vibes", cursive;
    color: var(--honey-dark);
}

.cover-title {
    font-size: 4.1rem;
    line-height: .95;
    margin: 6px 0 12px;
}

.heading,
.section-title {
    font-family: "Cinzel", serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.heading {
    font-size: 1.45rem;
}

.section-title {
    font-size: 1.45rem;
    margin-bottom: 28px;
    color: #4e493f;
}

.eyebrow,
.label,
.chapter {
    font-family: "Cinzel", serif;
    text-transform: uppercase;
    letter-spacing: 2.5px;
}

.eyebrow {
    font-size: .78rem;
    color: var(--forest);
    margin-bottom: 4px;
}

.small-text {
    font-size: 1rem;
    margin: 8px 0;
}

.quote {
    max-width: 335px;
    margin-bottom: 28px;
    font-style: italic;
    color: #6f6a61;
    font-size: 1.15rem;
    line-height: 1.4;
}

.chapter {
    margin-top: 32px;
    color: var(--honey-dark);
    font-size: .72rem;
}

#countdown {
    margin: 8px 0 20px;
    color: var(--honey-dark);
    font-weight: 600;
    font-size: 1rem;
}

.art-frame {
    width: 285px;
    height: 285px;
    margin: 28px 0;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 251, 245, .9));
    border: 1px solid rgba(179, 143, 67, .22);
    box-shadow: 0 12px 30px rgba(179, 143, 67, .13);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.small-art {
    width: 285px;
    height: 285px;
    border-radius: 50%;
}

.event-art-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.thank-you-art-img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.woodland-art {
    position: relative;
    width: 245px;
    height: 245px;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 25%, var(--sky), transparent 45%),
        linear-gradient(180deg, #f7f3e9 0%, #f7f3e9 52%, #d7e4d0 53%, #d7e4d0 100%);
}

.sun {
    position: absolute;
    top: 25px;
    right: 48px;
    width: 42px;
    height: 42px;
    background: rgba(232, 199, 106, .45);
    border-radius: 50%;
    filter: blur(1px);
}

.path {
    position: absolute;
    left: 92px;
    bottom: -15px;
    width: 65px;
    height: 120px;
    background: rgba(224, 196, 145, .6);
    border-radius: 50% 50% 0 0;
    transform: perspective(90px) rotateX(40deg);
}

.bear,
.piglet,
.donkey,
.tiger {
    position: absolute;
    filter: blur(.2px);
}

.bear {
    width: 65px;
    height: 65px;
    left: 42px;
    top: 82px;
    background: var(--honey);
    border-radius: 50%;
}

.bear::before,
.bear::after {
    content: "";
    position: absolute;
    top: -16px;
    width: 25px;
    height: 25px;
    background: var(--honey);
    border-radius: 50%;
}

.bear::before {
    left: 4px;
}

.bear::after {
    right: 4px;
}

.piglet {
    width: 48px;
    height: 48px;
    right: 48px;
    top: 112px;
    background: var(--pink);
    border-radius: 50%;
}

.piglet::before,
.piglet::after {
    content: "";
    position: absolute;
    top: -10px;
    width: 15px;
    height: 20px;
    background: var(--pink);
    border-radius: 50% 50% 20% 20%;
}

.piglet::before {
    left: 7px;
    transform: rotate(-25deg);
}

.piglet::after {
    right: 7px;
    transform: rotate(25deg);
}

.donkey {
    width: 62px;
    height: 45px;
    left: 32px;
    bottom: 55px;
    background: #bfc7cc;
    border-radius: 50%;
}

.donkey::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 8px;
    width: 14px;
    height: 38px;
    background: #aeb7bd;
    border-radius: 50%;
    transform: rotate(-12deg);
}

.tiger {
    width: 52px;
    height: 52px;
    right: 35px;
    bottom: 58px;
    background: #f2b35e;
    border-radius: 50%;
}

.tiger::before,
.tiger::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 22px;
    background: rgba(81, 75, 66, .35);
    top: 13px;
    border-radius: 4px;
}

.tiger::before {
    left: 17px;
    transform: rotate(20deg);
}

.tiger::after {
    right: 17px;
    transform: rotate(-20deg);
}

.honey-pot {
    position: absolute;
    left: 90px;
    bottom: 55px;
    width: 65px;
    height: 52px;
    background: var(--honey-dark);
    border-radius: 12px 12px 18px 18px;
    color: white;
    font-family: "Cinzel", serif;
    font-size: .62rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flower {
    position: absolute;
    width: 13px;
    height: 13px;
    background: #f8c8d0;
    border-radius: 50%;
}

.flower1 {
    left: 65px;
    bottom: 38px;
}

.flower2 {
    right: 68px;
    bottom: 34px;
    background: #fff0b3;
}

.flower3 {
    left: 120px;
    bottom: 28px;
    background: #f8c8d0;
}

.details-panel {
    width: 100%;
    max-width: 350px;
}

.detail {
    margin: 19px 0;
}

.label {
    color: var(--honey-dark);
    font-size: .76rem;
    margin-bottom: 5px;
}

.value {
    font-size: 1.25rem;
    line-height: 1.35;
}

.intro-text,
.thank-you-text {
    max-width: 340px;
    margin-bottom: 22px;
    font-size: 1.12rem;
    line-height: 1.45;
}

.timeline {
    width: 100%;
    max-width: 345px;
}

.timeline-item {
    display: flex;
    text-align: left;
    margin-bottom: 24px;
    font-size: 1.12rem;
}

.dot {
    width: 14px;
    height: 14px;
    background: var(--honey-dark);
    border-radius: 50%;
    margin: 8px 16px 0 0;
    flex-shrink: 0;
    box-shadow: 0 0 0 5px rgba(179, 143, 67, .13);
}

.time {
    color: var(--honey-dark);
    font-weight: 600;
    margin-bottom: 2px;
}

.card {
    width: 100%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 251, 245, .96));
    padding: 20px;
    border-radius: 20px;
    margin: 12px 0;
    box-shadow: 0 7px 24px rgba(0, 0, 0, .055);
    text-align: left;
    border: 1px solid rgba(179, 143, 67, .13);
}

.card h4 {
    color: var(--honey-dark);
    margin-bottom: 8px;
    font-family: "Cinzel", serif;
    letter-spacing: 1px;
    font-size: .9rem;
    text-transform: uppercase;
}

.card p {
    font-size: 1.08rem;
    line-height: 1.35;
}

.card a {
    color: var(--honey-dark);
    overflow-wrap: anywhere;
}

.map-frame {
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(179, 143, 67, .18);
    border-radius: 12px;
    margin-top: 14px;
    overflow: hidden;
    width: 100%;
}

.map-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.final-name {
    font-size: 3rem;
    margin-top: 5px;
}

.rsvp-intro {
    margin-bottom: 22px;
    font-size: 1.15rem;
}

.rsvp-form {
    width: 100%;
    max-width: 350px;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
    width: 100%;
    padding: 13px;
    margin-bottom: 12px;
    border-radius: 14px;
    border: 1px solid rgba(179, 143, 67, .22);
    background: rgba(255, 255, 255, .9);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
}

.rsvp-form button {
    width: 100%;
    border: none;
    background: linear-gradient(180deg, var(--honey), var(--honey-dark));
    color: white;
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    font-family: "Cinzel", serif;
    letter-spacing: 1px;
}

.rsvp-message {
    display: none;
    margin-top: 20px;
    color: var(--honey-dark);
    font-weight: 600;
}

.admin-link {
    margin-top: 26px;
    font-size: .78rem;
    opacity: .38;
}

.admin-link a {
    color: var(--text);
    text-decoration: none;
}

.admin-link a:hover,
.admin-link a:focus {
    opacity: 1;
    text-decoration: underline;
}

.bee {
    position: fixed;
    width: 24px;
    height: 18px;
    z-index: 100;
    opacity: .55;
    pointer-events: none;
    background: var(--honey);
    border-radius: 50%;
}

.bee::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 25%, rgba(81, 75, 66, .55) 26% 34%, transparent 35% 58%, rgba(81, 75, 66, .55) 59% 67%, transparent 68%);
    border-radius: 50%;
}

.bee::after {
    content: "";
    position: absolute;
    top: -9px;
    left: 3px;
    width: 18px;
    height: 11px;
    background: rgba(221, 234, 244, .75);
    border-radius: 50% 50% 40% 40%;
    box-shadow: 10px 2px 0 rgba(221, 234, 244, .65);
}

.bee1 {
    animation: fly1 22s linear infinite;
}

.bee2 {
    animation: fly2 28s linear infinite;
}

.bee3 {
    animation: fly3 34s linear infinite;
}

@keyframes fly1 {
    from {
        transform: translate(-70px, 150px) rotate(8deg);
    }

    to {
        transform: translate(120vw, -50px) rotate(20deg);
    }
}

@keyframes fly2 {
    from {
        transform: translate(110vw, 350px) rotate(-18deg);
    }

    to {
        transform: translate(-70px, 50px) rotate(-5deg);
    }
}

@keyframes fly3 {
    from {
        transform: translate(-70px, 600px) rotate(10deg);
    }

    to {
        transform: translate(120vw, 150px) rotate(-12deg);
    }
}

.floral-corner {
    position: absolute;
    width: 125px;
    height: 125px;
    opacity: .22;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 80%, var(--sage) 0 8px, transparent 9px),
        radial-gradient(circle at 45% 60%, var(--honey) 0 5px, transparent 6px),
        radial-gradient(circle at 65% 35%, #f8c8d0 0 6px, transparent 7px),
        linear-gradient(135deg, transparent 42%, var(--forest) 43% 46%, transparent 47%);
}

.floral-top-left {
    top: 0;
    left: 0;
}

.floral-bottom-right {
    right: 0;
    bottom: 0;
    transform: rotate(180deg);
}

@media (max-width: 500px) {
    .storybook {
        max-width: 100%;
    }

    .page {
        padding: 62px 24px;
    }

    .cover-title {
        font-size: 3.35rem;
    }

    .art-frame {
        width: 260px;
        height: 260px;
    }

    .woodland-art {
        width: 225px;
        height: 225px;
    }

    .section-title {
        font-size: 1.25rem;
    }
}
