:root {
    color-scheme: dark;
    --navy-950: #04111f;
    --navy-900: #071626;
    --navy-850: #0b1d2f;
    --navy-800: #10263a;
    --gold-300: #efc477;
    --gold-400: #dda452;
    --gold-500: #bf7f2f;
    --ivory-100: #f4eee5;
    --ivory-200: #ddd5ca;
    --muted: #9ca8b2;
    --line: rgba(239, 196, 119, .22);
    --radius: 2px;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: 'Avenir Next', Avenir, 'Helvetica Neue', Arial, sans-serif;
    --shell: min(1220px, calc(100vw - 48px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--navy-950);
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ivory-100);
    background:
        radial-gradient(circle at 12% 8%, rgba(199, 132, 46, .12), transparent 28rem),
        var(--navy-950);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 20;
    opacity: .055;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

::selection {
    color: var(--navy-950);
    background: var(--gold-300);
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 10px 16px;
    color: var(--navy-950);
    background: var(--gold-300);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.site-header,
.admin-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 10;
    display: flex;
    width: var(--shell);
    height: 74px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

.monogram {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--ivory-100);
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
}

.monogram strong {
    color: var(--gold-300);
    font-size: 15px;
    font-weight: 500;
}

.site-header nav,
.admin-header nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-header nav a,
.admin-header nav a {
    color: var(--ivory-200);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .035em;
    text-decoration: none;
    transition: color .25s ease;
}

.site-header nav a:hover,
.admin-header nav a:hover {
    color: var(--gold-300);
}

.site-header .nav-cta {
    padding: 10px 0;
    color: var(--gold-300);
}

.hero {
    position: relative;
    display: flex;
    min-height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-950);
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero::before {
    background:
        linear-gradient(90deg, rgba(4, 17, 31, .58), transparent 28%, transparent 72%, rgba(4, 17, 31, .58)),
        radial-gradient(circle at 50% 48%, transparent 32%, rgba(4, 17, 31, .18) 100%);
}

.hero::after {
    background:
        linear-gradient(180deg, rgba(4, 17, 31, .64), transparent 16%),
        linear-gradient(0deg, rgba(4, 17, 31, .78), transparent 24%);
}

.eyebrow {
    margin: 0 0 23px;
    color: var(--gold-300);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .32em;
    line-height: 1.4;
    text-transform: uppercase;
}

.details h2,
.gifts h2,
.rsvp h2,
.admin-main h1,
.login-panel h1 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -.045em;
}

.hero-cta {
    position: absolute;
    z-index: 2;
    bottom: 34px;
    left: 50%;
    translate: -50% 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .32);
}

.button {
    display: inline-flex;
    min-height: 54px;
    padding: 0 25px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.button-primary {
    color: #091522;
    background: var(--gold-300);
    border-color: var(--gold-300);
}

.button-primary:hover {
    color: var(--ivory-100);
    background: var(--gold-500);
    border-color: var(--gold-500);
}

.button:active {
    transform: translateY(1px) scale(.985);
}

.button:disabled {
    cursor: wait;
    opacity: .66;
}

.text-link {
    padding: 8px 0 5px;
    color: var(--ivory-200);
    border-bottom: 1px solid rgba(244, 238, 229, .35);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

.text-link:hover {
    color: var(--gold-300);
    border-color: var(--gold-300);
}

.hero-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    overflow: hidden;
    background: var(--navy-900);
}

.hero-picture,
.hero-picture img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.hero-picture img {
    object-fit: cover;
    object-position: 50% 50%;
    filter: saturate(.96) contrast(1.02) brightness(.94);
}

.section-shell {
    width: var(--shell);
    margin: 0 auto;
}

.details {
    padding: 150px 0 160px;
}

.details-lead {
    max-width: 760px;
    margin-left: 8.5%;
}

.details h2,
.gifts h2,
.rsvp h2 {
    margin: 0;
    font-size: clamp(43px, 5.1vw, 76px);
    line-height: 1.02;
}

.countdown {
    margin: 24px 0 0;
    color: var(--gold-300);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
}

.detail-grid {
    display: grid;
    width: min(100%, 960px);
    margin: 90px auto 0;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.detail-grid article {
    display: flex;
    min-height: 280px;
    padding: 44px 40px;
    align-items: center;
    gap: 30px;
    background: rgba(11, 29, 47, .42);
}

.detail-day {
    color: var(--gold-300);
    font-family: var(--serif);
    font-size: clamp(90px, 12vw, 170px);
    line-height: .75;
}

.detail-grid h3 {
    margin: 0 0 7px;
    font-family: var(--serif);
    font-size: 31px;
    font-weight: 400;
    line-height: 1.1;
}

.detail-grid p {
    margin: 0;
    color: var(--muted);
}

.lock-mark {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--gold-300);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 28px;
}

.all-inclusive {
    display: grid;
    width: min(100%, 960px);
    min-height: 118px;
    margin: 18px auto 0;
    padding: 28px 40px;
    grid-template-columns: .45fr 1fr;
    align-items: center;
    gap: 36px;
    background:
        radial-gradient(circle at 8% 50%, rgba(221, 164, 82, .13), transparent 18rem),
        rgba(11, 29, 47, .7);
}

.all-inclusive strong {
    color: var(--gold-300);
    font-family: var(--serif);
    font-size: clamp(27px, 3vw, 36px);
    font-weight: 400;
    letter-spacing: -.025em;
}

.all-inclusive p {
    max-width: 520px;
    margin: 0;
    color: var(--ivory-200);
    font-size: 16px;
}

.gifts {
    display: grid;
    padding: 130px 0 150px;
    grid-template-columns: .75fr 1.25fr;
    gap: 110px;
}

.gifts-heading {
    position: sticky;
    top: 70px;
    height: max-content;
}

.gifts-heading p {
    max-width: 440px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.gift-list {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 30px;
    list-style: none;
}

.gift-list li {
    display: grid;
    min-height: 180px;
    padding: 36px 0;
    grid-template-columns: 72px 1fr;
    align-items: start;
}

.gift-list li > span {
    color: var(--gold-400);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
}

.gift-list h3 {
    margin: -4px 0 10px;
    font-family: var(--serif);
    font-size: clamp(28px, 3vw, 41px);
    font-weight: 400;
    line-height: 1.1;
}

.gift-list p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
}

.gift-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--gold-300);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .2s ease;
}

.gift-link:hover {
    color: var(--ivory-100);
}

.gift-link:focus-visible {
    outline: 2px solid var(--gold-300);
    outline-offset: 4px;
}

.rsvp {
    display: grid;
    width: 100%;
    margin-top: 110px;
    margin-bottom: 140px;
    padding: clamp(72px, 8vw, 112px) max(24px, calc((100vw - 1220px) / 2));
    grid-template-columns: .72fr 1.28fr;
    align-items: start;
    gap: clamp(64px, 8vw, 120px);
    color: var(--navy-950);
    background: var(--gold-300);
}

.rsvp .eyebrow,
.rsvp h2 {
    color: var(--navy-950);
}

.rsvp-copy {
    position: sticky;
    top: 90px;
    display: flex;
    padding: 8px 0;
    flex-direction: column;
}

.rsvp-copy > p:not(.eyebrow) {
    max-width: 410px;
    margin: 26px 0 0;
    color: rgba(4, 17, 31, .78);
}

.rsvp-note {
    display: flex;
    margin-top: 48px;
    flex-direction: column;
    color: var(--navy-950);
}

.rsvp-note strong {
    font-family: var(--serif);
    font-size: 31px;
    font-weight: 400;
}

.rsvp-note span {
    color: rgba(4, 17, 31, .66);
    font-size: 14px;
}

.form-wrap {
    width: 100%;
    padding: 46px 48px 50px;
    background: rgba(244, 238, 229, .22);
    border: 1px solid rgba(4, 17, 31, .42);
    box-shadow: inset 0 1px 0 rgba(244, 238, 229, .28);
}

form {
    display: grid;
    gap: 31px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label,
.field legend {
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .025em;
}

.field input[type='text'],
.field input[type='tel'],
.field input[type='password'],
.field textarea {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px;
    color: var(--navy-950);
    background: rgba(244, 238, 229, .48);
    border: 1px solid rgba(4, 17, 31, .38);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.field textarea {
    min-height: 116px;
    padding: 14px 16px;
    line-height: 1.5;
    resize: vertical;
}

.field input:hover,
.field textarea:hover {
    background: rgba(244, 238, 229, .66);
    border-color: rgba(4, 17, 31, .72);
}

.field input:focus-visible,
.field textarea:focus-visible {
    border-color: var(--navy-950);
    background: rgba(244, 238, 229, .78);
    box-shadow: 0 0 0 2px rgba(4, 17, 31, .14);
}

.optional-label {
    color: rgba(4, 17, 31, .62);
    font-weight: 500;
}

.memory-prompt {
    max-width: 560px;
    margin: 0 0 7px;
    color: rgba(4, 17, 31, .76);
    font-size: 14px;
    line-height: 1.55;
}

.field small,
.check-row small,
.privacy-note {
    color: rgba(4, 17, 31, .66);
    font-size: 12px;
}

.check-row {
    display: flex;
    min-height: 58px;
    padding: 10px 16px;
    align-items: center;
    gap: 13px;
    background: rgba(244, 238, 229, .34);
    border: 1px solid rgba(4, 17, 31, .3);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.check-row:hover {
    background: rgba(244, 238, 229, .54);
    border-color: rgba(4, 17, 31, .62);
}

.check-row input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--navy-950);
}

.check-row span {
    display: grid;
    gap: 1px;
}

.check-row strong {
    font-size: 13px;
}

.choice-field {
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-field legend {
    margin-bottom: 8px;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.choice-grid label {
    position: relative;
    cursor: pointer;
}

.choice-grid input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-grid span {
    display: flex;
    min-height: 54px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    color: rgba(4, 17, 31, .82);
    background: rgba(244, 238, 229, .38);
    border: 1px solid rgba(4, 17, 31, .34);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.choice-grid label:hover span {
    background: rgba(244, 238, 229, .6);
    border-color: rgba(4, 17, 31, .66);
}

.choice-grid input:checked + span {
    color: var(--ivory-100);
    background: var(--navy-950);
    border-color: var(--navy-950);
}

.choice-grid input[value='yes']:checked + span {
    color: var(--navy-950);
    background: #8fbe93;
    border-color: #477b57;
}

.choice-grid input:focus-visible + span {
    outline: 2px solid var(--navy-950);
    outline-offset: 3px;
}

.privacy-note {
    margin: -4px 0 0;
}

.submit-button {
    width: auto;
    min-width: 190px;
    margin-top: 5px;
    justify-self: start;
    color: var(--ivory-100);
    background: var(--navy-950);
    border-color: var(--navy-950);
}

.submit-button:hover {
    color: var(--ivory-100);
    background: var(--navy-800);
    border-color: var(--navy-800);
}

.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}

.guest-two[hidden] {
    display: none;
}

.form-status {
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid;
    outline: none;
}

.form-status strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 400;
}

.form-status p,
.form-status ul {
    margin: 0;
}

.form-status ul {
    padding-left: 20px;
}

.form-status.success {
    color: #dff3df;
    background: #123322;
    border-color: #477f5b;
}

.form-status.error {
    color: #ffe5dc;
    background: #3a1a19;
    border-color: #96544d;
}

.site-footer {
    display: grid;
    width: var(--shell);
    min-height: 140px;
    margin: 0 auto;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.site-footer p:last-child {
    text-align: right;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .75s cubic-bezier(.16, 1, .3, 1), transform .75s cubic-bezier(.16, 1, .3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-enter {
    animation: hero-in .85s both cubic-bezier(.16, 1, .3, 1);
}

.hero-cta { animation-delay: .16s; }

@keyframes hero-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin */
.admin-body {
    min-height: 100dvh;
}

.admin-login {
    display: grid;
    width: min(500px, calc(100vw - 32px));
    min-height: 100dvh;
    margin: 0 auto;
    padding: 55px 0;
    align-content: center;
    gap: 32px;
}

.login-panel,
.empty-state {
    padding: 42px;
    background: var(--navy-850);
    border: 1px solid var(--line);
}

.login-panel h1,
.admin-main h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1;
}

.login-panel > p:not(.eyebrow) {
    margin: 18px 0 30px;
    color: var(--muted);
}

.admin-header {
    position: relative;
}

.admin-main {
    width: var(--shell);
    margin: 0 auto;
    padding: 88px 0 120px;
}

.admin-title {
    margin-bottom: 52px;
}

.summary-grid {
    display: grid;
    margin-bottom: 52px;
    grid-template-columns: 1.2fr 1fr 1fr;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.summary-grid article {
    display: grid;
    padding: 34px;
    border-right: 1px solid var(--line);
}

.summary-grid article:last-child {
    border: 0;
}

.summary-grid strong {
    color: var(--gold-300);
    font-family: var(--serif);
    font-size: 58px;
    font-weight: 400;
    line-height: 1;
}

.summary-grid span {
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

.memory-cell {
    min-width: 260px;
    max-width: 360px;
    white-space: normal;
}

th,
td {
    padding: 17px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(239, 196, 119, .16);
}

th {
    color: var(--gold-300);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

td {
    color: var(--ivory-200);
    font-size: 14px;
}

td:first-child {
    color: var(--ivory-100);
    font-weight: 600;
}

td a {
    color: var(--gold-300);
}

.empty-state h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 400;
}

.empty-state p {
    margin: 8px 0 0;
    color: var(--muted);
}

@media (max-width: 980px) {
    :root { --shell: min(100% - 40px, 760px); }

    .hero::before {
        background: linear-gradient(90deg, rgba(4, 17, 31, .4), transparent 24%, transparent 76%, rgba(4, 17, 31, .4));
    }

    .details-lead {
        margin-left: 0;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-grid article {
        padding: 36px 26px;
        gap: 20px;
    }

    .detail-day {
        font-size: clamp(72px, 10vw, 110px);
    }

    .detail-grid h3 {
        font-size: 27px;
    }

    .gifts {
        grid-template-columns: 1fr;
        gap: 65px;
    }

    .gifts-heading {
        position: static;
    }

    .rsvp {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .rsvp-copy {
        position: static;
        min-height: 0;
    }
}

@media (max-width: 640px) {
    :root { --shell: calc(100vw - 32px); }

    .site-header,
    .admin-header {
        height: 66px;
    }

    .site-header nav,
    .admin-header nav {
        gap: 18px;
    }

    .site-header nav > a:first-child {
        display: none;
    }

    .hero-cta {
        bottom: 30px;
    }

    .hero::before {
        background: linear-gradient(
            180deg,
            rgba(4, 17, 31, .34) 0%,
            transparent 24%,
            transparent 68%,
            rgba(4, 17, 31, .76) 100%
        );
    }

    .details,
    .gifts {
        padding: 95px 0;
    }

    .details h2,
    .gifts h2,
    .rsvp h2 {
        font-size: 43px;
    }

    .detail-grid {
        margin-top: 55px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .all-inclusive {
        margin-top: 14px;
        padding: 26px 24px;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .detail-grid article {
        min-height: 220px;
        padding: 32px 20px;
        gap: 20px;
    }

    .detail-day {
        font-size: 92px;
    }

    .detail-grid h3 {
        font-size: 26px;
    }

    .detail-place {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .gift-list li,
    .gift-list li:nth-child(even) {
        min-height: 0;
        padding: 28px 0;
        grid-template-columns: 48px 1fr;
    }

    .gift-list p {
        font-size: 14px;
    }

    .rsvp {
        margin: 70px 0 90px;
        padding: 72px 24px 78px;
        gap: 48px;
    }

    .rsvp-copy {
        min-height: 0;
    }

    .form-wrap {
        padding: 28px 20px 32px;
    }

    .choice-grid {
        gap: 8px;
    }

    .submit-button {
        width: 100%;
    }

    .site-footer {
        display: flex;
        min-height: 190px;
        padding: 38px 0;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .site-footer p,
    .site-footer p:last-child {
        text-align: left;
    }

    .site-footer .monogram {
        margin-bottom: 18px;
    }

    .login-panel {
        padding: 32px 22px;
    }

    .admin-main {
        padding-top: 58px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid article {
        padding: 25px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .summary-grid article:last-child {
        border-bottom: 0;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    tr {
        margin-bottom: 20px;
        padding: 14px 0;
        border-top: 1px solid var(--line);
    }

    td {
        display: grid;
        padding: 7px 0;
        grid-template-columns: 112px 1fr;
        gap: 12px;
        border: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .field input,
    .choice-grid span,
    .check-row {
        background: var(--navy-950) !important;
    }
}
