@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    --cream: #f8f5ed;
    --ink: #29382d;
    --olive: #455746;
    --gold: #a38452;
    --serif: 'Playfair Display', Georgia, serif
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
    line-height: 1.7
}

a {
    color: inherit
}

a:focus-visible,
summary:focus-visible {
    outline: 3px solid #bd955a;
    outline-offset: 5px
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px clamp(20px, 6vw, 90px);
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid #ded9cd
}

.brand {
    font: 500 26px var(--serif);
    text-decoration: none;
    letter-spacing: .1em
}

.brand span {
    font-style: italic;
    color: var(--gold)
}

nav {
    display: flex;
    gap: clamp(14px, 3vw, 38px)
}

nav a {
    font-size: 13px;
    text-decoration: none
}

nav a:hover {
    text-decoration: underline
}

.hero {
    min-height: min(760px, 85svh);
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    color: white;
    background: #394b3d;
    isolation: isolate
}

.hero-photo {
    position: absolute !important;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, #526653, #25392d) !important
}

.hero-photo.loaded {
    background-size: cover !important;
    background-position: center !important
}

.hero:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #18291c99, #18291c33);
    z-index: -1
}

.hero-photo span {
    position: absolute;
    bottom: 16px;
    right: 16px;
    color: #fff9;
    font-size: 12px
}

.hero-copy {
    padding: 70px 24px
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 18px
}

.hero h1 {
    font: 400 clamp(58px, 10vw, 132px)/1.05 var(--serif);
    margin: 0
}

.script {
    font: italic 400 clamp(25px, 4vw, 43px) var(--serif);
    margin: 20px 0
}

.button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    border: 1px solid currentColor;
    margin-top: 18px;
    min-height: 48px
}

.button.light {
    background: var(--cream);
    color: var(--ink);
    border-color: var(--cream)
}

.button:hover {
    opacity: .85
}

.section {
    padding: clamp(32px, 5vw, 65px) clamp(24px, 8vw, 120px);
    text-align: center;
}

.section h2 {
    font: 400 clamp(36px, 5.5vw, 66px)/1.15 var(--serif);
    margin: 0 0 24px
}

.intro p:not(.eyebrow),
.rsvp p {
    max-width: 630px;
    margin: 20px auto
}

.ornament {
    color: var(--gold);
    font-size: 32px;
    margin-top: 32px
}

.details {
    background: #eaece2
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1100px;
    margin: 50px auto 0;
    gap: 24px
}

.detail-grid article {
    border-top: 1px solid #a8b09d;
    padding: 28px 10px
}

.number {
    color: #65755e;
    font-size: 12px;
    letter-spacing: .2em
}

h3 {
    font: 400 30px var(--serif);
    margin: 12px 0
}

p {
    margin: 8px 0
}

.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(30px, 7vw, 100px);
    text-align: left;
    max-width: 1400px;
    margin: auto
}

.photo {
    position: relative;
    background: #e3e1d6;
    display: grid;
    place-items: center;
    color: #58634f;
    background-size: cover;
    background-position: center;
    overflow: hidden
}

.photo span {
    font-size: 12px;
    letter-spacing: .1em
}

.photo.loaded span {
    display: none
}

.portrait {
    aspect-ratio: 4/5
}

.gallery {
    background: #efebe0
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 40px auto 0;
    max-width: 1100px
}

.gallery-grid .photo {
    aspect-ratio: 3/4
}

.faq {
    max-width: 720px;
    margin: 40px auto 0;
    text-align: left
}

details {
    border-bottom: 1px solid #c9c8b8;
    padding: 20px 0
}

summary {
    cursor: pointer;
    font-weight: 600
}

details p {
    padding: 10px 0
}

.rsvp {
    background: var(--olive);
    color: white
}

footer {
    text-align: center;
    padding: 50px 20px
}

footer a {
    font-size: 13px
}

[hidden] {
    display: none !important
}

@media(max-width:700px) {

    .detail-grid,
    .story {
        grid-template-columns: 1fr
    }

    .story {
        text-align: center
    }

    .portrait {
        max-height: 550px;
        width: 100%
    }

    .gallery-grid {
        gap: 8px
    }

    .gallery-grid .photo span {
        font-size: 10px
    }

    .hero {
        min-height: 75svh
    }

    .detail-grid {
        gap: 0;
        margin-top: 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }
}

/* Native RSVP form */
#native-rsvp {
    width: 100%;
    max-width: 640px;
    margin: 32px auto;
    text-align: left;
    background: #f8f5ed;
    color: #29382d;
    padding: clamp(20px, 5vw, 40px);
    border-radius: 12px;
    display: grid;
    gap: 20px;
    box-shadow: 0 12px 32px #0002
}

#native-rsvp label {
    display: grid;
    gap: 8px;
    font-weight: 600
}

#native-rsvp input:not([type=radio]),
#native-rsvp textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #a8b09d;
    border-radius: 6px;
    font: inherit;
    font-size: 16px;
    background: #fff;
    color: #29382d
}

#native-rsvp textarea {
    resize: vertical
}

#native-rsvp fieldset {
    min-width: 0;
    margin: 0;
    border: 1px solid #a8b09d;
    border-radius: 6px;
    padding: 14px 16px
}

#native-rsvp legend {
    font-weight: 600;
    padding: 0 6px
}

#native-rsvp .choice {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    padding: 6px 0
}

#native-rsvp input[type=radio] {
    accent-color: #455746;
    width: 18px;
    height: 18px;
    margin: 0
}

#native-rsvp :is(input, textarea, button):focus-visible {
    outline: 3px solid #a38452;
    outline-offset: 3px
}

#native-rsvp button {
    width: 100%;
    margin: 0;
    background: #455746;
    color: #fff;
    border: 1px solid #455746;
    border-radius: 6px;
    cursor: pointer;
    font: 600 15px 'DM Sans', Arial, sans-serif
}

#native-rsvp button:disabled {
    opacity: .6;
    cursor: wait
}

#native-rsvp #rsvp-status {
    margin: 0;
    overflow-wrap: anywhere
}

#native-rsvp #rsvp-status:empty {
    display: none
}

@media(max-width:600px) {
    #native-rsvp {
        padding: 20px;
        gap: 16px
    }
}

/* Rolling photo gallery */
.rolling-gallery {
    max-width: 1200px;
    margin: 40px auto 0
}

.gallery-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 12px
}

.gallery-slide {
    flex: 0 0 calc((100% - 32px)/3);
    min-width: 0;
    aspect-ratio: 3/4;
    scroll-snap-align: start;
    background: #e3e1d6;
    display: grid;
    place-items: center;
    overflow: hidden
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.gallery-slide span {
    font-size: 12px
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px
}

.gallery-controls button {
    border: 1px solid #455746;
    background: transparent;
    color: #29382d;
    padding: 10px 20px;
    min-height: 44px;
    font: inherit;
    cursor: pointer
}

.gallery-controls button:focus-visible,
.gallery-track:focus-visible {
    outline: 3px solid #a38452;
    outline-offset: 3px
}

@media(max-width:700px) {
    .gallery-slide {
        flex-basis: 80%
    }
}

/* Engagement story */
[data-field="story"] {
    white-space: pre-line;
    font-size: 16px;
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 24px;
}