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

:root {
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Manrope', sans-serif;
    --color-ink: #2d2926;
    --color-soft-ink: #5a5652;
    --color-accent: #a53f65;
    --color-paper: #f7f2ee;
    --color-card: #fffdfa;
    --radius-lg: 24px;
    --shadow-soft: 0 18px 45px rgba(45, 41, 38, 0.12);
}

html {
    min-height: 100%;
    background: #eee4dc;
}

body {
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--color-ink);
    background: radial-gradient(circle at 20% 10%, #fff8f1 0%, #f5eee7 55%, #eee4dc 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    position: relative;
    z-index: 1;
}

.hero,
.photo-break {
    position: relative;
    min-height: 72vh;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero {
    min-height: 100vh;
    align-items: flex-end;
    padding-bottom: 5vh;
}

.hero-engagement {
    background-size: cover;
    background-position: center 30%;
    background-blend-mode: normal;
}

.photo-break-garden {
    background-size: cover;
    background-position: center 38%;
    background-blend-mode: normal;
}

.photo-break-bridge {
    background-size: cover;
    background-position: center 26%;
    background-blend-mode: normal;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(26, 21, 17, 0.44) 0%, rgba(60, 34, 49, 0.2) 60%, rgba(24, 32, 22, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    width: fit-content;
    max-width: 90vw;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: riseIn 1.1s ease-out both;
}

.hero h1 {
    font-family: 'Mea Culpa', cursive;
    font-weight: 400;
    font-size: clamp(2.8rem, 9vw, 9rem);
    line-height: 1;
    margin-bottom: 0;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), 0 12px 40px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.01em;
    white-space: nowrap;
    display: inline-block;
}

.hero-amp {
    font-size: 0.55em;
    vertical-align: middle;
    opacity: 0.85;
}

.hero-flutes {
    margin-top: 0.85em;
}

.hero-flutes svg {
    width: clamp(5.8rem, 12.5vw, 8.8rem);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.section-block {
    width: min(92vw, 1160px);
    margin: 0 auto;
    padding: 5rem 0;
}

.intro {
    position: relative;
    isolation: isolate;
}

.intro::before,
.intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.intro::before {
    width: min(48vw, 500px);
    height: min(48vw, 500px);
    left: -6%;
    top: 5%;
    background:
        radial-gradient(circle at 30% 35%, rgba(224, 139, 172, 0.5) 0 18%, transparent 19%),
        radial-gradient(circle at 62% 62%, rgba(199, 137, 186, 0.38) 0 14%, transparent 15%),
        radial-gradient(circle at 43% 70%, rgba(144, 187, 134, 0.28) 0 20%, transparent 21%),
        radial-gradient(circle at 52% 50%, rgba(255, 221, 233, 0.42) 0 54%, transparent 55%);
    filter: blur(16px);
}

.intro::after {
    width: min(42vw, 420px);
    height: min(42vw, 420px);
    right: -4%;
    bottom: -10%;
    background:
        radial-gradient(circle at 45% 35%, rgba(228, 143, 174, 0.46) 0 16%, transparent 17%),
        radial-gradient(circle at 68% 60%, rgba(129, 172, 118, 0.26) 0 18%, transparent 19%),
        radial-gradient(circle at 48% 52%, rgba(255, 230, 240, 0.38) 0 56%, transparent 57%);
    filter: blur(14px);
}

.section-copy {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.82) 0%, rgba(251, 244, 238, 0.86) 100%);
    border: 1px solid rgba(165, 63, 101, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: clamp(1.8rem, 4vw, 3.2rem);
}

h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 600;
    line-height: 1.05;
    margin-bottom: 0.9rem;
}

.section-copy p,
.gallery-section p {
    color: var(--color-soft-ink);
    font-size: 1.05rem;
}

.intro .section-copy {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 253, 250, 0.84) 0%, rgba(255, 246, 239, 0.82) 52%, rgba(253, 241, 245, 0.82) 100%),
        url('../images/bg.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(178, 94, 129, 0.3);
    box-shadow:
        0 20px 50px rgba(71, 44, 58, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.intro .section-copy::before,
.intro .section-copy::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.intro .section-copy::before {
    background:
        radial-gradient(circle at 10% 20%, rgba(186, 222, 172, 0.28) 0 11%, transparent 12%),
        radial-gradient(circle at 16% 28%, rgba(230, 154, 183, 0.24) 0 8%, transparent 9%),
        radial-gradient(circle at 84% 18%, rgba(238, 165, 196, 0.25) 0 9%, transparent 10%),
        radial-gradient(circle at 90% 28%, rgba(178, 215, 165, 0.22) 0 10%, transparent 11%),
        radial-gradient(circle at 78% 82%, rgba(236, 170, 197, 0.22) 0 10%, transparent 11%),
        radial-gradient(circle at 14% 82%, rgba(178, 215, 165, 0.2) 0 12%, transparent 13%);
    opacity: 0.5;
}

.intro .section-copy::after {
    border: 1px solid rgba(194, 121, 153, 0.32);
    inset: 16px;
    border-radius: calc(var(--radius-lg) - 8px);
}

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

.intro h2 {
    margin-bottom: 0.4rem;
    font-size: clamp(2.1rem, 5vw, 3.25rem);
    letter-spacing: 0.03em;
    color: #6f2a47;
}

.wedding-day {
    color: #7b6159;
    font-style: italic;
    letter-spacing: 0.02em;
    margin-bottom: 0.7rem;
}

.wedding-venue {
    color: #7b6159;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.7rem;
}


.closing .section-copy {
    position: relative;
    overflow: hidden;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    background:
        linear-gradient(145deg, rgba(255, 253, 250, 0.84) 0%, rgba(255, 246, 239, 0.82) 52%, rgba(253, 241, 245, 0.82) 100%),
        url('../images/bg.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(178, 94, 129, 0.3);
    box-shadow:
        0 20px 50px rgba(71, 44, 58, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.closing .section-copy::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(186, 222, 172, 0.28) 0 11%, transparent 12%),
        radial-gradient(circle at 16% 28%, rgba(230, 154, 183, 0.24) 0 8%, transparent 9%),
        radial-gradient(circle at 84% 18%, rgba(238, 165, 196, 0.25) 0 9%, transparent 10%),
        radial-gradient(circle at 90% 28%, rgba(178, 215, 165, 0.22) 0 10%, transparent 11%),
        radial-gradient(circle at 78% 82%, rgba(236, 170, 197, 0.22) 0 10%, transparent 11%),
        radial-gradient(circle at 14% 82%, rgba(178, 215, 165, 0.2) 0 12%, transparent 13%);
    opacity: 0.5;
    pointer-events: none;
}

.closing .section-copy::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(194, 121, 153, 0.32);
    border-radius: calc(var(--radius-lg) - 8px);
    pointer-events: none;
}

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

.closing h2 {
    margin-bottom: 0.4rem;
    font-size: clamp(2.1rem, 5vw, 3.25rem);
    letter-spacing: 0.03em;
    color: #6f2a47;
}

.closing .section-copy p {
    color: #7b6159;
}

.map-embed {
    margin-top: 1.1rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(194, 121, 153, 0.28);
    box-shadow: 0 10px 24px rgba(45, 41, 38, 0.16);
}

.map-embed iframe {
    display: block;
    width: 100%;
    min-height: 340px;
    border: 0;
}

.closing a {
    color: #8a2f52;
    font-weight: 600;
    text-underline-offset: 0.18em;
}

.closing a:hover {
    color: #6f2a47;
}

.photo-break {
    min-height: 62vh;
}

.photo-break::before {
    content: none;
}

.photo-caption {
    position: relative;
    display: inline-block;
    color: #fff;
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4.5vw, 3rem);
    font-style: italic;
    letter-spacing: 0.04em;
    line-height: 1.35;
    padding: 0.65em 0;
    text-align: center;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.75),
        0 6px 28px rgba(0, 0, 0, 0.5);
}

.photo-caption::before,
.photo-caption::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.75) 30%, rgba(255, 255, 255, 0.75) 70%, transparent);
}

.photo-caption::before {
    margin-bottom: 0.45em;
}

.photo-caption::after {
    margin-top: 0.45em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.photo-card {
    grid-column: span 6;
    border-radius: 18px;
    overflow: hidden;
    background: var(--color-card);
    box-shadow: 0 10px 28px rgba(45, 41, 38, 0.18);
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.photo-card.tall {
    grid-row: span 2;
}

.photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.lightbox-trigger {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: zoom-in;
    display: block;
}

.photo-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 16px 36px rgba(45, 41, 38, 0.24);
}

.lightbox-trigger:focus-visible {
    outline: 3px solid rgba(165, 63, 101, 0.75);
    outline-offset: -3px;
}

.closing {
    padding-top: 4.5rem;
    padding-bottom: 6rem;
}

.no-scroll {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(18, 14, 12, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 20;
    padding: 2rem 1rem;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    width: auto;
    max-width: min(92vw, 1200px);
    max-height: 86vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@keyframes riseIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero,
    .photo-break {
        background-attachment: scroll;
    }

    .gallery-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .photo-card,
    .photo-card.tall {
        grid-column: span 3;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    .section-block {
        width: 96vw;
        padding: 2.8rem 0;
    }

    .intro::before,
    .intro::after {
        opacity: 0.72;
    }

    .intro .section-copy::after,
    .closing .section-copy::after {
        inset: 8px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .photo-card,
    .photo-card.tall {
        grid-column: span 1;
    }

    .hero {
        min-height: 100vh;
        min-height: 100svh;
        padding-bottom: 4vh;
    }

    .hero h1 {
        white-space: normal;
        font-size: clamp(1.9rem, 12vw, 3rem);
        line-height: 1.2;
    }

    .hero-flutes svg {
        width: clamp(3rem, 16vw, 5rem);
    }

    .photo-break {
        min-height: 50vh;
    }

    .photo-caption {
        font-size: clamp(1.2rem, 5.5vw, 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .map-embed iframe {
        min-height: 240px;
    }

    .closing {
        padding-top: 3rem;
        padding-bottom: 4rem;
    }
}

/* Disable hover lift on touch devices */
@media (hover: none) {
    .photo-card:hover {
        transform: none;
        box-shadow: 0 10px 28px rgba(45, 41, 38, 0.18);
    }
}
