:root {
    --gold: #c9a96e;
    --gold-light: #e8d5a3;
    --gold-dark: #a07840;
    --brown: #6b4f3a;
    --cream: #fdf8f3;
    --cream-dark: #f5ede0;
    --rose: #c9899c;
    --sage: #8a9b8e;
    --text: #4a3728;
    --text-light: #7a6558;
    --dark: #1f150d;
    --white: #ffffff;
    --shadow: 0 24px 60px rgba(160, 120, 64, 0.14);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Jost', sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--cream) 0%, #fffdf9 38%, var(--cream-dark) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 100px 0;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: linear-gradient(150deg, #fdf8f3 0%, #f5ede0 58%, #ead9cc 100%);
}

.topbar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
}

.brand {
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    color: var(--gold);
}

.topbar__links {
    display: flex;
    gap: 28px;
    font-size: 0.76rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.topbar__links a:hover {
    color: var(--gold-dark);
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 88px 0 120px;
    min-height: calc(100vh - 94px);
}

.hero__eyebrow,
.section-head__label,
.couple-card__eyebrow,
.footer__eyebrow {
    margin: 0;
    color: var(--gold-dark);
    font-size: 0.74rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.hero__script,
.couple-card__script {
    display: block;
    font-family: 'Great Vibes', cursive;
    color: var(--rose);
}

.hero__script {
    margin-top: 18px;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.hero__title,
.section-head__title,
.couple-card h3,
.event-card h3,
.countdown__head h3,
.guestbook__head .section-head__title {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    color: var(--dark);
}

.hero__title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1.02;
    margin-top: 10px;
}

.hero__title span {
    color: var(--gold);
    font-style: italic;
}

.hero__copy,
.section-head__desc,
.couple-card p,
.event-card p,
.comment-card__message,
.footer__copy {
    line-height: 1.85;
    color: var(--text-light);
    font-weight: 300;
}

.hero__copy {
    max-width: 720px;
    margin: 18px auto 0;
    font-size: 1rem;
}

.hero__pill {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding: 14px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(201, 169, 110, 0.24);
    box-shadow: 0 16px 36px rgba(201, 169, 110, 0.14);
}

.hero__pill span {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    background: var(--gold);
    color: var(--white);
    box-shadow: 0 14px 34px rgba(201, 169, 110, 0.32);
}

.button--primary:hover {
    background: var(--gold-dark);
}

.button--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(201, 169, 110, 0.36);
}

.button--full {
    width: 100%;
}

.ring,
.petal {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ring {
    border: 1px solid rgba(201, 169, 110, 0.34);
    animation: spin 26s linear infinite;
}

.ring--one {
    width: 220px;
    height: 220px;
    top: 90px;
    right: 7%;
}

.ring--two {
    width: 120px;
    height: 120px;
    left: 8%;
    bottom: 110px;
    opacity: 0.55;
    animation-direction: reverse;
}

.petal {
    background: rgba(201, 169, 110, 0.56);
    animation: float 6s ease-in-out infinite;
}

.petal--one {
    width: 8px;
    height: 8px;
    top: 24%;
    left: 15%;
}

.petal--two {
    width: 6px;
    height: 6px;
    right: 18%;
    bottom: 28%;
    animation-delay: 1.5s;
}

.mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mode-badge--php {
    color: #245f43;
    background: rgba(112, 165, 137, 0.16);
    border: 1px solid rgba(112, 165, 137, 0.28);
}

.mode-badge--local {
    color: #7a5b1f;
    background: rgba(201, 169, 110, 0.16);
    border: 1px solid rgba(201, 169, 110, 0.28);
}

.intro__grid,
.story-grid,
.rsvp-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.section-head,
.couple-card,
.event-card,
.countdown,
.story-panel,
.gallery-grid,
.rsvp-panel,
.guestbook,
.preview-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(201, 169, 110, 0.2);
    box-shadow: var(--shadow);
}

.section-head,
.couple-card,
.story-panel,
.rsvp-panel,
.guestbook,
.preview-card {
    border-radius: var(--radius-xl);
    padding: 38px;
}

.section-head__title {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    margin-top: 12px;
}

.section-head__desc {
    margin: 14px 0 0;
}

.guest-card {
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(253, 248, 243, 0.96), rgba(245, 237, 224, 0.96));
    border: 1px solid rgba(201, 169, 110, 0.18);
}

.guest-card__label,
.event-card__label {
    display: block;
    color: var(--gold-dark);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.guest-card__name {
    display: block;
    margin-top: 10px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--dark);
}

.couple-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.couple-card__names {
    display: grid;
    gap: 18px;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    margin-top: 18px;
}

.couple-card__script {
    font-size: 1.6rem;
}

.couple-card h3 {
    font-size: 2.3rem;
    margin-top: 6px;
}

.couple-card__amp {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.7rem;
    color: var(--gold);
}

.event-section {
    background: rgba(255, 255, 255, 0.38);
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 42px;
}

.event-card,
.countdown-card,
.comment-card {
    border-radius: var(--radius-lg);
}

.event-card {
    padding: 30px;
}

.event-card h3 {
    font-size: 1.8rem;
    margin: 12px 0 10px;
}

.countdown {
    margin-top: 28px;
    border-radius: var(--radius-xl);
    padding: 34px;
}

.countdown__head h3 {
    font-size: 2.2rem;
    margin-top: 10px;
}

.countdown__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.countdown-card {
    padding: 22px;
    text-align: center;
    background: linear-gradient(180deg, rgba(253, 248, 243, 0.98), rgba(245, 237, 224, 0.98));
    border: 1px solid rgba(201, 169, 110, 0.2);
}

.countdown-card strong {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    color: var(--dark);
}

.countdown-card span {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

.story-note {
    margin-top: 26px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 248, 243, 0.96));
    border-left: 3px solid var(--gold);
}

.story-note p {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--brown);
}

.gallery-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        'tall soft'
        'wide wide';
    padding: 24px;
}

.gallery-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 21, 13, 0.04), rgba(31, 21, 13, 0.56));
}

.gallery-card span {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.7rem;
}

.gallery-card--tall {
    grid-area: tall;
    min-height: 320px;
    background-image: linear-gradient(145deg, rgba(201, 137, 156, 0.18), rgba(107, 79, 58, 0.28)), radial-gradient(circle at top, #efe1d2, #d0b193 68%, #8b6a51 100%);
}

.gallery-card--soft {
    grid-area: soft;
    background-image: linear-gradient(145deg, rgba(138, 155, 142, 0.18), rgba(245, 237, 224, 0.16)), radial-gradient(circle at center, #f6efe5, #dec6aa 70%, #9c7c5f 100%);
}

.gallery-card--wide {
    grid-area: wide;
    min-height: 220px;
    background-image: linear-gradient(145deg, rgba(201, 169, 110, 0.14), rgba(122, 101, 88, 0.26)), radial-gradient(circle at center, #efe4d5, #d7b99a 62%, #7e5d46 100%);
}

.rsvp-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(245, 237, 224, 0.9));
}

.rsvp-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(201, 169, 110, 0.22);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.field:focus {
    outline: 2px solid rgba(201, 169, 110, 0.18);
    border-color: rgba(201, 169, 110, 0.42);
}

.field--textarea {
    min-height: 150px;
    padding: 16px 18px;
    resize: vertical;
}

.attendance-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.attendance-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid rgba(201, 169, 110, 0.22);
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.attendance-option input {
    position: absolute;
    opacity: 0;
}

.attendance-option span {
    color: var(--text);
}

.attendance-option input:checked + span {
    color: var(--gold-dark);
    font-weight: 600;
}

.attendance-option:has(input:checked) {
    border-color: rgba(201, 169, 110, 0.48);
    background: rgba(245, 237, 224, 0.96);
}

.form-alert {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 18px;
}

.form-alert--success {
    color: #245f43;
    background: rgba(112, 165, 137, 0.16);
    border: 1px solid rgba(112, 165, 137, 0.28);
}

.form-alert--error {
    color: #934646;
    background: rgba(206, 121, 121, 0.15);
    border: 1px solid rgba(206, 121, 121, 0.26);
}

.guestbook__list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.comment-card {
    padding: 22px;
    background: linear-gradient(180deg, rgba(253, 248, 243, 0.96), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(201, 169, 110, 0.18);
}

.comment-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.comment-card__name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--dark);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.status-pill--attending {
    color: #245f43;
    background: rgba(112, 165, 137, 0.16);
}

.status-pill--absent {
    color: #8a4f4f;
    background: rgba(206, 121, 121, 0.15);
}

.footer {
    padding: 0 0 90px;
}

.footer__inner {
    padding: 38px;
    text-align: center;
    border-top: 1px solid rgba(201, 169, 110, 0.22);
}

.preview-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.preview-card {
    width: min(720px, 100%);
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal--visible,
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(8px, -12px);
    }
}

@media (max-width: 980px) {
    .intro__grid,
    .story-grid,
    .rsvp-grid,
    .event-grid,
    .countdown__grid,
    .couple-card__names {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            'tall'
            'soft'
            'wide';
    }

    .couple-card__amp {
        display: none;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 78px 0;
    }

    .topbar {
        flex-direction: column;
        gap: 12px;
    }

    .topbar__links {
        gap: 18px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero__inner {
        padding: 62px 0 90px;
    }

    .section-head,
    .couple-card,
    .story-panel,
    .rsvp-panel,
    .guestbook,
    .preview-card,
    .event-card,
    .countdown {
        padding: 28px 22px;
    }

    .attendance-options {
        grid-template-columns: 1fr;
    }
}