:root {
    --invite-primary: #d6b36a;
    --invite-secondary: #f4e6c5;
    --invite-bg: #10201b;
    --invite-text: #fffaf0;
    --invite-envelope: #d6b36a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    overflow-x: hidden;
    background: var(--invite-bg);
    color: var(--invite-text);
    font-family: "DM Sans", system-ui, sans-serif;
}
body:not(.invitation-opened) { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }

.preview-banner {
    position: fixed;
    z-index: 120;
    inset: 0 0 auto;
    padding: 9px 15px;
    background: #111827;
    color: #fff;
    font-size: .75rem;
    text-align: center;
}
.preview-banner a { color: #67e8f9; }

.invitation {
    width: min(100%, 1100px);
    margin: 0 auto;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--invite-primary) 12%, transparent), transparent 26%),
        var(--invite-bg);
    box-shadow: 0 0 90px rgba(0,0,0,.35);
}

.photo-panel {
    position: relative;
    display: grid;
    min-height: 78vh;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--invite-bg) 85%, #000), var(--invite-bg));
    isolation: isolate;
}
.photo-panel::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: -3%;
    background-image: var(--panel-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}
.panel-shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.1) 35%, rgba(0,0,0,.55)),
        radial-gradient(circle, transparent 30%, rgba(0,0,0,.26));
}

.hero-panel { min-height: 100svh; }
.hero-content, .closing-content {
    width: min(90%, 760px);
    max-width: 100%;
    padding: 55px 20px;
    text-align: center;
    text-shadow: 0 3px 20px rgba(0,0,0,.55);
}
.event-type, .section-kicker {
    margin: 0 0 18px;
    color: var(--invite-secondary);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}
.hero-content h1, .closing-content h2 {
    margin: 0;
    color: var(--invite-text);
    font-family: "Great Vibes", cursive;
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 400;
    line-height: .92;
}
.event-date {
    display: inline-block;
    margin: 30px 0 0;
    padding: 12px 22px;
    border-block: 1px solid color-mix(in srgb, var(--invite-secondary) 55%, transparent);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1rem, 2.8vw, 1.45rem);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 600px);
    max-width: 600px;
    margin: 42px auto 0;
}
.countdown div {
    min-width: 0;
    padding: 16px 8px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    background: rgba(0,0,0,.2);
    backdrop-filter: blur(8px);
}
.countdown strong, .countdown span { display: block; }
.countdown strong { font-family: "Playfair Display", serif; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.countdown span { margin-top: 5px; color: rgba(255,255,255,.7); font-size: .62rem; text-transform: uppercase; }

.content-section {
    position: relative;
    padding: clamp(70px, 10vw, 125px) clamp(22px, 8vw, 95px);
    text-align: center;
}
.content-section h2 {
    margin: 0;
    color: var(--invite-primary);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-style: italic;
    font-weight: 500;
    line-height: 1.05;
}
.ornament { margin-bottom: 22px; color: var(--invite-primary); font-size: 1.6rem; }
.ornament.small { margin-bottom: 14px; font-size: 1rem; }
.lead-copy {
    max-width: 690px;
    margin: 30px auto 0;
    color: color-mix(in srgb, var(--invite-text) 78%, transparent);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.1rem, 3vw, 1.55rem);
    line-height: 1.8;
}

.interlude { min-height: 58vh; }
.interlude-mark {
    padding: 30px;
    color: #fff;
    font-family: "Great Vibes", cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    line-height: .9;
    text-align: center;
    text-shadow: 0 5px 25px rgba(0,0,0,.65);
}
.interlude-mark i { color: var(--invite-primary); font-family: "Playfair Display", serif; font-size: .4em; }

.venue-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 55px;
}
.venue-card {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--invite-primary) 28%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--invite-text) 5%, transparent);
    text-align: left;
}
.venue-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.venue-body { padding: 26px; }
.venue-body > span { color: var(--invite-primary); font-size: .67rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.venue-body h3 { margin: 10px 0; font-family: "Playfair Display", serif; font-size: 1.55rem; font-weight: 500; }
.venue-body p { margin: 0; color: color-mix(in srgb, var(--invite-text) 65%, transparent); line-height: 1.65; }
.venue-body time { display: block; margin-top: 18px; color: var(--invite-secondary); font-size: .78rem; text-transform: uppercase; }
.venue-body a {
    display: inline-flex;
    gap: 12px;
    margin-top: 22px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--invite-primary);
    color: var(--invite-primary);
    font-size: .78rem;
    font-weight: 600;
}

.people-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; }
.people-card h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.people-card p { margin: 22px 0 5px; font-family: "Playfair Display", serif; font-size: clamp(1.1rem, 3vw, 1.45rem); }
.people-card span { color: var(--invite-primary); font-family: "Great Vibes", cursive; font-size: 2rem; }

.gallery-section { background: color-mix(in srgb, var(--invite-text) 3%, transparent); }
.gallery-grid {
    columns: 3 230px;
    column-gap: 12px;
    margin-top: 50px;
}
.gallery-grid button {
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    overflow: hidden;
    break-inside: avoid;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: zoom-in;
}
.gallery-grid img { width: 100%; transition: transform .35s ease; }
.gallery-grid button:hover img { transform: scale(1.035); }

.schedule-list {
    position: relative;
    max-width: 680px;
    margin: 55px auto 0;
    padding: 0;
    list-style: none;
    text-align: left;
}
.schedule-list::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 30px;
    width: 1px;
    background: color-mix(in srgb, var(--invite-primary) 45%, transparent);
}
.schedule-list li {
    position: relative;
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 24px;
    padding: 17px 0;
}
.schedule-icon {
    z-index: 1;
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border: 1px solid var(--invite-primary);
    border-radius: 50%;
    background: var(--invite-bg);
    color: var(--invite-primary);
    font-size: 1.2rem;
}
.schedule-list h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 1.55rem; font-weight: 500; }
.schedule-list p { margin: 6px 0 0; color: var(--invite-secondary); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }

.extras-section { padding-top: 20px; }
.extras-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.extra-card {
    padding: 45px 30px;
    border: 1px solid color-mix(in srgb, var(--invite-primary) 28%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--invite-text) 4%, transparent);
}
.extra-icon { display: block; margin-bottom: 18px; color: var(--invite-primary); font-size: 1.8rem; }
.extra-card h2 { font-size: clamp(2rem, 5vw, 3.3rem); }
.extra-card p { margin: 22px 0 0; color: color-mix(in srgb, var(--invite-text) 72%, transparent); line-height: 1.75; }

.closing-panel { min-height: 88vh; }
.closing-content p {
    max-width: 640px;
    margin: 0 auto 30px;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    line-height: 1.75;
}
.closing-content h2 { font-size: clamp(4.5rem, 13vw, 8rem); }
.closing-content a {
    display: inline-flex;
    margin-top: 38px;
    padding: 16px 24px;
    border-radius: 999px;
    background: var(--invite-primary);
    color: color-mix(in srgb, var(--invite-bg) 90%, #000);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: none;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    background: #050806;
    color: rgba(255,255,255,.55);
    font-size: .7rem;
}
footer img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
footer a { color: inherit; text-decoration: none; }

.envelope {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: color-mix(in srgb, var(--envelope-color) 82%, #15120d);
    transition: opacity .45s ease .65s, visibility .45s ease .65s;
}
.envelope::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(255,255,255,.12), transparent 32%),
        repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,255,255,.025) 22px 23px);
}
.envelope-top, .envelope-bottom { position: absolute; width: 130%; height: 58%; background: color-mix(in srgb, var(--envelope-color) 90%, #000); }
.envelope-top {
    top: 0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform .8s cubic-bezier(.7,0,.2,1);
}
.envelope-bottom {
    bottom: 0;
    clip-path: polygon(0 100%, 100% 100%, 50% 0);
    filter: brightness(.88);
    transition: transform .85s cubic-bezier(.7,0,.2,1) .15s;
}
.envelope button {
    position: relative;
    z-index: 2;
    display: grid;
    width: 145px;
    height: 145px;
    padding: 20px;
    place-items: center;
    border: 2px solid rgba(255,255,255,.34);
    border-radius: 50%;
    background: color-mix(in srgb, var(--envelope-color) 75%, #6f4d20);
    box-shadow: 0 18px 50px rgba(0,0,0,.25), inset 0 2px 1px rgba(255,255,255,.3);
    color: #fff;
    cursor: pointer;
    font-family: "Playfair Display", serif;
    font-size: .9rem;
    text-align: center;
}
.envelope button span { display: block; font-size: 1.5rem; }
.envelope.opened { opacity: 0; visibility: hidden; }
.envelope.opened .envelope-top { transform: rotateX(180deg) translateY(-80%); }
.envelope.opened .envelope-bottom { transform: translateY(110%); }

.music-control {
    position: fixed;
    z-index: 80;
    top: 18px;
    right: 18px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(5,8,6,.7);
    color: var(--invite-primary);
    backdrop-filter: blur(10px);
}

.gallery-modal {
    width: min(92vw, 900px);
    max-height: 90vh;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}
.gallery-modal::backdrop { background: rgba(0,0,0,.9); }
.gallery-modal img { display: block; max-width: 100%; max-height: 88vh; margin: auto; border-radius: 12px; }
.gallery-modal button {
    position: absolute;
    z-index: 2;
    top: -42px;
    right: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 2.3rem;
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 700px) {
    .invitation { width: 100%; }
    .hero-panel { min-height: 100svh; }
    .hero-content h1 {
        max-width: 100%;
        font-size: clamp(3.9rem, 19vw, 5.3rem);
        overflow-wrap: anywhere;
    }
    .countdown { gap: 5px; }
    .countdown { width: 100%; margin-inline: 0; }
    .countdown div { padding: 12px 3px; }
    .countdown span { font-size: .47rem; }
    .content-section { padding-inline: 20px; }
    .venue-grid, .people-grid, .extras-grid { grid-template-columns: 1fr; }
    .people-grid { gap: 70px; }
    .gallery-grid { columns: 2 140px; }
    .interlude { min-height: 48vh; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
    .hero-content {
        width: 100%;
        padding-inline: 16px;
    }
