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

:root {
    --oliveGreen: #414B26;
    --bg1: #E6E2E1;
    --intro-image: url("../assets/images/intro.png");
}

html, body {
    width: 100%;
    overscroll-behavior-y: none;
    overscroll-behavior: none;
}

body {
    background: var(--bg1);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Full-height sections */
.full-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 24px;
    width: 100%;
    margin: 20px;
}

html.is-safari-ios .full-section {
    min-height: 100svh;
}

.introduction-section {
    position: relative;
    overflow: hidden;
    background-color: var(--bg1);
    isolation: isolate;
}

.introduction-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--intro-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 100% center;
    z-index: -1;
}

body.intro-pan-started .introduction-section::before {
    animation: intro-pan 20s ease-out forwards;
}

.introduction-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.62);
    z-index: 0;
    pointer-events: none;
}

.introduction-section > * {
    position: relative;
    z-index: 1;
}

.ceremony-section {
    background-color: var(--bg1);
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 0;
}

.ceremony-section > :not(.ceremony-top-leaves) {
    position: relative;
    z-index: 1;
}

.ceremony-section .section-title {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: 3.3rem;
    color: var(--oliveGreen);
    width: calc(100% - 48px);
    margin: clamp(-72px, -12vw, -52px) auto 12px;
    z-index: 2;
}

.ceremony-top-leaves {
    position: relative;
    display: block;
    width: calc(100% + 48px);
    height: auto;
    max-width: none;
    margin: 0 -24px;
    padding: 0;
    z-index: 0;
    pointer-events: none;
}

.leaves-divider-section {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.leaves-divider-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 100px 0;
    padding: 0;
}

.transition-section {
    --transition-leaves-width: 55%;
    display: flex;
    flex-direction: row;
    background: var(--bg1);
    position: relative;
    overflow: hidden;
    min-height: auto;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: stretch;
}

.transition-side-image {
    display: block;
    width: var(--transition-leaves-width);
    height: auto;
    margin: 0;
    padding: 0;
}

.transition-bird-image {
    position: absolute;
    display: block;
    width: calc(var(--transition-leaves-width) / 2);
    height: auto;
    left: calc(
        var(--transition-leaves-width) +
        ((100% - var(--transition-leaves-width)) / 2) -
        (var(--transition-leaves-width) / 4)
    );
    top: 40%;
    margin: 0;
    padding: 0;
    z-index: 1;
    pointer-events: none;
}

.transition-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.transition-section .transition-message {
    font-size: clamp(1.45rem, 6vw, 4.2rem);
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    text-align: center;
    color: var(--oliveGreen);
    margin: 0;
    line-height: 1.1;
    z-index: 1;
    max-width: 24ch;
    text-wrap: balance;
}

.thank-you-screen .transition-message {
    font-size: clamp(1.9rem, 8vw, 4.2rem);
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    text-align: center;
    margin: 0 20px 180px 20px;
    line-height: 1.1;
    z-index: 1;
}

.transition-divider {
    position: static;
    width: 100%;
    height: auto;
    margin: 0;
}

.transition-section .section-placeholder.transition-note {
    margin-top: 0;
    font-family: "Inter", sans-serif;
    font-weight: 300;
    color: var(--oliveGreen);
}

.thank-you-screen .section-placeholder.transition-note {
    margin-top: 40px;
    font-family: "Inter", sans-serif;
    font-weight: 300;
    max-width: 720px;
}

.venue-section {
    background-color: var(--bg1);
    min-height: auto;
}

.venue-section .section-title {
    color: var(--oliveGreen);
    font-size: 3.3rem;
}

.venue-schedule-divider {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.venue-schedule-divider-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 70px 0;
    padding: 0;
}

html.is-safari-ios .venue-section {
    min-height: auto;
}

.schedule-section {
    background-color: var(--bg1);
}

.schedule-main-section .section-title {
    color: var(--oliveGreen);
    font-size: 3.3rem;
}

.wedding-list-section {
    min-height: auto;
    justify-content: center;
    align-items: center;
    text-align: center;
}

html.is-safari-ios .wedding-list-section {
    min-height: auto;
}

.wedding-list-section .section-title {
    color: var(--oliveGreen);
    font-size: 3.3rem;
}

.schedule-main-section {
    position: relative;
    overflow: hidden;
    min-height: auto;
    padding: 40px 24px;
    justify-content: center;
    align-items: center;
}

html.is-safari-ios .schedule-main-section {
    min-height: auto;
}

.schedule-main-section > * {
    position: relative;
    z-index: 1;
}

.schedule-content {
    height: auto;
    width: 100%;
    margin-top: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.schedule-divider {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 24px;
}

.schedule-date {
    font-size: 0.9375rem;
    font-weight: 300;
    font-family: "Inter", sans-serif;
    text-align: center;
    color: #70745A;
    letter-spacing: 2px;
    margin: 0 0 24px;
    padding-left: 40px;
    padding-right: 40px;
    white-space: nowrap;
}

.schedule-timeline {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 320px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1fr 10px 1fr;
    align-items: center;
    column-gap: 24px;
    width: 100%;
}

.schedule-line {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 50%;
    width: 1.5px;
    background-color: var(--oliveGreen);
    transform: translateX(-50%);
}

.schedule-dot {
    position: relative;
    z-index: 1;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--oliveGreen);
    border: none;
}

.schedule-time,
.schedule-event {
    font-size: 15px;
    font-weight: 300;
    font-family: "Inter", sans-serif;
    color: var(--oliveGreen);
    line-height: 1.2;
}

.schedule-time {
    text-align: right;
}

.schedule-event {
    text-align: left;
}

h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    color: var(--oliveGreen);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    font-family: "Cormorant Garamond", serif;
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

.section-placeholder {
    font-size: 1rem;
    color: #999;
    text-align: center;
    max-width: 600px;
}

.greeting {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    font-family: "Cormorant Garamond", serif;
    color: #333;
    margin-bottom: 24px;
}

.intro-logo {
    height: 16.67vh;
    width: auto;
    max-width: 90%;
    display: block;
    margin: 20px auto 20px;
}

.intro-title {
    font-size: clamp(5rem, 12vw, 6.5rem);
    font-weight: 300;
    font-family: "Cormorant Garamond", serif;
    text-align: center;
    color: var(--oliveGreen);
    margin: 20px 20px 20px 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.intro-date {
    font-size: 1.25rem;
    font-weight: 300;
    font-family: "Inter", sans-serif;
    font-stretch: condensed;
    text-align: center;
    color: #70745A;
    letter-spacing: 2px;
    margin: 40px 20px 0 20px;
    padding: 0;
    white-space: nowrap;
}

.intro-address {
    font-size: 1.25rem;
    font-weight: 300;
    font-family: "Inter", sans-serif;
    font-stretch: condensed;
    text-align: center;
    color: #70745A;
    letter-spacing: 2px;
    margin: 0 20px 20px 20px;
    padding: 0;
    white-space: nowrap;
}

.intro-invitation {
    font-size: clamp(1.35rem, 4.05vw, 2.25rem);
    font-weight: 300;
    font-family: "Inter", sans-serif;
    text-align: center;
    color: var(--oliveGreen);
    margin: 40px 20px 20px 20px;
    padding: 0;
    line-height: 1.4;
}

@keyframes intro-pan {
    from {
        background-position: 100% center;
    }
    to {
        background-position: 0% center;
    }
}

.ceremony-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 24px 0;
    padding: 0;
}

.venue-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 24px 0;
    padding: 0;
}

.ceremony-subtitle {
    font-family: "Inter", sans-serif;
    font-weight: 300;
    color: #70745A;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 24px;
}

.ceremony-location {
    font-size: 1rem;
    color: #70745A;
    text-align: center;
    margin-bottom: 24px;
    font-family: "Inter", sans-serif;
    font-weight: 300;
}

/* Reusable Button Component */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 0;
    font-family: "Inter", sans-serif;
    font-weight: 300;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--oliveGreen);
    color: #ffffff;
}

.ceremony-section .btn {
    align-self: center;
    margin-top: 24px;
}

.venue-section .btn {
    margin-top: 24px;
}

.rsvp-bottom-leaves-wrap {
    width: 100vw;
    margin: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0;
    line-height: 0;
}

.rsvp-bottom-leaves-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .full-section {
        margin: 0;
    }
}

/* Mobile-first responsive design */
@media (min-width: 320px) {
    body {
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    body {
        max-width: 600px;
        margin: 0 auto;
    }
}
