:root {
    --bg-dark: #1a1c18;
    --bg-light: #fdfcf9;
    --primary-green: #4a5043;
    --accent-gold: #c5a37d;
    --text-main: #3d3d3d;
    --text-muted: #8a8a8a;
    --white: #fff;
    --decorative-font: 'Marck Script', cursive;
    --main-font: Montserrat, sans-serif
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden
}

body {
    font-family: var(--main-font);
    background: var(--bg-light);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    animation: zoomOut 12s ease-out forwards
}

.overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, #0003 0%, #00000080 100%);
    z-index: 2
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center
}

.name {
    font-family: var(--decorative-font);
    font-size: clamp(4.5rem, 18vw, 8rem);
    font-weight: 400;
    line-height: .8;
    margin: 0;
    text-shadow: 0 4px 15px #0000004d;
    color: var(--white)
}

.date {
    margin-top: 25px;
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    letter-spacing: .4em;
    text-transform: uppercase;
    font-weight: 300;
    opacity: .9;
    color: var(--white)
}

.invitation-text {
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 80px 24px;
    text-align: center
}

.invitation-inner {
    max-width: 600px;
    margin: 0 auto
}

.invitation-heading {
    font-family: var(--decorative-font);
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 30px
}

.invitation-inner p {
    font-size: 1.09rem;
    margin-bottom: 20px;
    color: var(--text-main)
}

.invitation-signature {
    font-family: var(--decorative-font);
    font-size: 1.9rem;
    margin-top: 30px;
    color: var(--primary-green)
}

.photo-stack {
    background-color: var(--bg-light);
    padding-bottom: 100px;
    display: flex;
    justify-content: center
}

.photo-frame {
    position: relative;
    width: min(340px, 85vw);
    aspect-ratio: 3/4
}

.photo-frame-image {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background-color: #e0e0e0;
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 40px #00000026;
    z-index: 2;
    border: 8px solid var(--white)
}

.photo-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary-green);
    transform: rotate(3deg) translate(10px, 10px);
    opacity: .2;
    z-index: 1
}

.location-section {
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 0 24px 60px;
    text-align: center
}

.location-heading {
    font-family: var(--decorative-font);
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary-green)
}

.location-address {
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto 30px;
    color: var(--text-muted)
}

.location-button {
    display: inline-block;
    padding: 14px 35px;
    border: 1px solid var(--primary-green);
    background: transparent;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .8rem;
    border-radius: 40px;
    cursor: pointer;
    transition: all .4s ease;
    text-decoration: none
}

.location-button:hover {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 10px 20px #4a504333
}

.calendar-section {
    background-color: var(--bg-light);
    color: var(--text-main);
    padding: 0 24px 80px;
    text-align: center
}

.calendar-heading {
    font-family: var(--decorative-font);
    font-size: 4rem;
    color: var(--text-main);
    margin-bottom: 30px;
    font-weight: 400
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px 10px;
    max-width: 400px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 1.2rem
}

.calendar-day-name {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 10px
}

.calendar-day {
    position: relative;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1
}

.calendar-day.active {
    font-weight: 600;
    color: var(--primary-green)
}

.calendar-day.active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff4d4d' stroke-width='1.5'%3E%3Cpath d='M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    z-index: -1;
    opacity: 0;
    animation: drawHeart 1.5s ease-out forwards 0.5s, heartBeat 2s infinite ease-in-out 2s
}

@keyframes drawHeart {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5)
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3)
    }
}

.reveal-blur-wrapper .char,
.reveal-blur-wrapper .word,
.reveal-blur-day {
    opacity: 0;
    will-change: transform, opacity, filter
}

@keyframes revealBlur {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(10px) scale(1.05)
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1)
    }
}

.reveal-blur-active .char,
.reveal-blur-active .word,
.reveal-blur-active.calendar-day,
.reveal-blur-active.reveal-blur-day {
    animation: revealBlur 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards
}

@keyframes heartBeat {
    0% {
        transform: translate(-50%, -50%) scale(1.3)
    }

    15% {
        transform: translate(-50%, -50%) scale(1.5)
    }

    30% {
        transform: translate(-50%, -50%) scale(1.3)
    }

    45% {
        transform: translate(-50%, -50%) scale(1.45)
    }

    60% {
        transform: translate(-50%, -50%) scale(1.3)
    }

    100% {
        transform: translate(-50%, -50%) scale(1.3)
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 10px 5px
    }

    .calendar-day {
        padding: 5px;
        font-size: 1rem
    }

    .calendar-heading {
        font-size: 3rem
    }
}

.timeline-section {
    background-color: var(--bg-light);
    padding: 0 24px;
    margin-bottom: -5px
}

.timeline-heading {
    font-family: var(--decorative-font);
    font-size: 3rem;
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 60px
}

.timeline-track {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    min-height: 500px
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
    transform: translateX(-50%)
}

.timeline-item {
    position: absolute;
    width: 45%;
    font-size: .9rem
}

.timeline-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    top: 5px
}

.timeline-time {
    font-weight: 700;
    display: block;
    color: var(--primary-green);
    margin-bottom: 5px
}

.timeline-text {
    color: var(--text-main);
    font-weight: 400
}

.dresscode-section {
    background-color: var(--primary-green);
    padding: 160px 24px 100px;
    text-align: center;
    position: relative;
    z-index: 1;
    color: var(--white);
    margin-bottom: -5px
}

.dresscode-heading {
    font-family: var(--decorative-font);
    font-size: 3rem;
    margin-bottom: 30px
}

.dresscode-text {
    max-width: 500px;
    margin: 0 auto 40px;
    font-weight: 300;
    opacity: .9
}

.dresscode-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap
}

.dresscode-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff3;
    box-shadow: 0 10px 20px #0003
}

.rsvp-section {
    background-color: var(--primary-green);
    padding: 1px 24px 80px
}

.rsvp-card-container {
    background: var(--bg-light);
    max-width: 420px;
    margin: 0 auto;
    padding: 40px 32px;
    border-radius: 24px;
    box-shadow: 0 25px 50px #00000050;
    color: var(--text-main)
}

.rsvp-heading {
    font-family: var(--decorative-font);
    font-size: 2.6rem;
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 4px
}

.rsvp-subtitle {
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    letter-spacing: .03em
}

.rsvp-field {
    margin-bottom: 20px
}

.rsvp-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #999;
    display: block;
    margin-bottom: 8px
}

.rsvp-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text-main);
    outline: none;
    transition: all .3s ease
}

.rsvp-input:focus {
    border-color: var(--primary-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 9, 9, 0.1)
}

.rsvp-textarea {
    min-height: 70px;
    resize: none;
    border-radius: 12px
}

.rsvp-presence-toggle {
    display: flex;
    gap: 10px;
    margin-top: 6px
}

.presence-option {
    flex: 1;
    cursor: pointer
}

.presence-option input {
    display: none
}

.presence-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa
}

.presence-box .emoji {
    font-size: 1.1rem;
    filter: grayscale(1);
    transition: all .3s
}

.presence-box .text {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted)
}

.presence-option input:checked+.presence-box {
    border-color: var(--primary-green);
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(74, 9, 9, 0.15)
}

.presence-option input:checked+.presence-box .emoji {
    filter: grayscale(0);
    transform: scale(1.15)
}

.presence-option input:checked+.presence-box .text {
    color: var(--primary-green)
}

.rsvp-row {
    display: flex;
    gap: 12px
}

.rsvp-row .rsvp-field {
    flex: 1
}

.rsvp-button {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease
}

.rsvp-button:hover {
    background: #3a0707;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 9, 9, 0.3)
}

.paper--top::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 67px;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: 100% 100%;
    top: 64px;
    transform: translateY(-99%);
    z-index: 10;
    pointer-events: none
}

.paper--bottom::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 67px;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% 100%;
    bottom: 62px;
    transform: translateY(99%);
    z-index: 10;
    pointer-events: none
}

.bottom-spacer {
    height: 1px;
    background: transparent
}

.reveal,
.reveal-heading,
.reveal-text,
.reveal-card,
.reveal-circle {
    will-change: transform, opacity, filter
}

.reveal-heading {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1)
}

.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(5px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1)
}

.reveal-card {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    filter: blur(12px);
    transition: all 1.1s cubic-bezier(0.19, 1, 0.22, 1)
}

.reveal-circle {
    opacity: 0;
    transform: scale(0.5) rotate(-30deg);
    filter: blur(11px);
    transition: all 3s cubic-bezier(0.34, 1.56, 0.64, 1)
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    filter: blur(10px);
    transition: all 1.6s cubic-bezier(0.2, 0.8, 0.2, 1)
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    filter: blur(10px);
    transition: all 1.6s cubic-bezier(0.2, 0.8, 0.2, 1)
}

.active.reveal-heading,
.active.reveal-text,
.active.reveal-card,
.active.reveal-circle,
.active.reveal-left,
.active.reveal-right,
.active.reveal {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg) translateX(0);
    filter: blur(0)
}

.delay-1 {
    transition-delay: 100ms
}

.delay-2 {
    transition-delay: 200ms
}

.delay-3 {
    transition-delay: 300ms
}

.location-button,
.rsvp-button {
    transition: transform .3s ease, box-shadow .3s ease !important
}

.location-button:hover,
.rsvp-button:hover {
    transform: translateY(-3px) scale(1.05) !important
}

.hero-img {
    transform-origin: center center;
    will-change: transform
}

@media (max-width: 768px) {
    .timeline-track {
        min-height: auto
    }

    .timeline-item {
        width: 40%
    }

    .rsvp-card-container {
        padding: 40px 20px
    }

    .rsvp-presence-toggle {
        gap: 10px
    }

    .presence-box {
        padding: 15px 5px
    }

    .paper--top::before,
    .paper--bottom::after {
        height: 67px
    }
}

@media (max-width: 480px) {
    .invitation-heading {
        font-size: 2.5rem
    }

    .dresscode-heading,
    .timeline-heading,
    .location-heading {
        font-size: 2.5rem
    }

    .rsvp-heading {
        font-size: 2.8rem
    }
}