:root {
    color-scheme: dark;
    --ink: #fffaf1;
    --muted: #cabec5;
    --dim: #998b93;
    --night: #0b0509;
    --wine: #3b0b1d;
    --wine-bright: #8d1738;
    --panel: rgba(24, 10, 18, 0.96);
    --panel-soft: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 232, 203, 0.14);
    --gold: #e5bf6c;
    --green: #r1ab5d;
    --gold-pale: #fff0bd;
    --pink: #f53794;
    --cyan: #22d3ee;
    --danger: #ff9aac;
    --shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.48);
    --serif: Georgia, 'Times New Roman', serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    background: var(--night);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(141, 23, 56, 0.28), transparent 30rem),
        radial-gradient(circle at 92% 88%, rgba(18, 130, 155, 0.18), transparent 32rem),
        var(--night);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select,
input[type='radio'] {
    cursor: pointer;
}

a {
    color: var(--gold-pale);
}

[hidden] {
    display: none !important;
}

.page-glow {
    position: fixed;
    z-index: 0;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    filter: blur(7rem);
    opacity: 0.13;
    pointer-events: none;
}

.page-glow--magenta {
    top: -8rem;
    left: -8rem;
    background: var(--pink);
}

.page-glow--cyan {
    right: -8rem;
    bottom: -10rem;
    background: var(--cyan);
}

.invitation-shell {
    position: relative;
    z-index: 1;
    width: min(96rem, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    grid-template-columns: minmax(25rem, 0.9fr) minmax(34rem, 1.1fr);
    align-items: start;
    border: 1px solid rgba(229, 191, 108, 0.22);
    border-radius: 1.75rem;
    overflow: visible;
    box-shadow: var(--shadow);
    background: #150a11;
}

.poster-panel {
    position: sticky;
    top: 1rem;
    min-height: calc(100vh - 2rem);
    border-radius: 1.7rem 0 0 1.7rem;
    overflow: hidden;
    isolation: isolate;
    background: #160810;
}

.poster-panel__art,
.poster-panel__art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.poster-panel__art img {
    object-fit: cover;
    object-position: center;
    filter: saturate(0.92) contrast(1.04) brightness(0.72);
    transform: scale(1.01);
}

.disco-ball-shimmer {
    position: absolute;
    top: 20.1%;
    left: 50%;
    z-index: 1;
    height: 18.4%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.68;
}

.disco-ball-shimmer::before {
    content: "";
    position: absolute;
    inset: -32%;
    background:
        conic-gradient(
            from 20deg,
            transparent 0deg 52deg,
            rgba(255, 255, 255, 0.32) 70deg,
            transparent 92deg 178deg,
            rgba(242, 91, 178, 0.22) 205deg,
            transparent 230deg 300deg,
            rgba(90, 221, 255, 0.2) 320deg,
            transparent 342deg
        );
    animation: disco-ball-shimmer 12s linear infinite;
    will-change: transform;
}

@keyframes disco-ball-shimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.poster-panel__shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(8, 2, 6, 0.6) 0%, rgba(8, 2, 6, 0.02) 36%, rgba(8, 2, 6, 0.78) 100%),
        linear-gradient(90deg, rgba(10, 3, 8, 0.22), transparent 40%, rgba(10, 3, 8, 0.22));
}

.poster-panel__content {
    position: relative;
    z-index: 3;
    min-height: calc(100vh - 2rem);
    padding: clamp(2rem, 5vw, 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.overline {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gold-pale);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.overline::before,
.overline::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.poster-panel h1 {
    max-width: 11ch;
    margin: auto 0 1.5rem;
    color: #fff9ef;
    font-family: var(--serif);
    font-size: clamp(3rem, 7vw, 6.8rem);
    font-weight: 500;
    line-height: 0.92;
    letter-spacing: -0.055em;
    text-wrap: balance;
    text-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.64);
}

.age-mark {
    width: min(100%, 34rem);
    margin: 0 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.3rem;
    color: var(--gold-pale);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.74rem;
    font-weight: 800;
}

.age-mark span {
    max-width: 100%;
    font-size: clamp(1.25rem, 2.3vw, 2rem);
    line-height: 1.08;
    letter-spacing: 0.08em;
    text-wrap: balance;
}

.age-mark strong {
    max-width: 18ch;
    color: white;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 2.7vw, 2.35rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-transform: none;
    text-wrap: balance;
}

.channel-badges {
    width: min(100%, 34rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.channel-badge {
    min-height: 4.5rem;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.85rem;
    background: rgba(8, 4, 7, 0.68);
    backdrop-filter: blur(14px);
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
}

.channel-badge__dot {
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 50%;
}

.channel-badge--magenta .channel-badge__dot {
    background: var(--pink);
    box-shadow: 0 0 1.1rem var(--pink);
}

.channel-badge--cyan .channel-badge__dot {
    background: var(--cyan);
    box-shadow: 0 0 1.1rem var(--cyan);
}

.channel-badge--gold .channel-badge__dot {
    background: #4ade80;
    box-shadow: 0 0 1.1rem #4ade80;
}

.channel-badge--gold {
    grid-column: 1 / -1;
    min-height: 3.8rem;
}

.channel-badge span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: #e7dde2;
    font-size: 0.82rem;
    line-height: 1.3;
}

.channel-badge b {
    margin-bottom: 0.15rem;
    color: white;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rsvp-panel {
    min-height: calc(100vh - 2rem);
    border-radius: 0 1.7rem 1.7rem 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        var(--panel);
    background-size: 100% 4rem;
}

.rsvp-panel__inner {
    width: min(100%, 47rem);
    min-height: calc(100vh - 2rem);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4.75rem);
    display: flex;
    flex-direction: column;
}

.kicker {
    margin: 0 0 0.7rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.rsvp-header h2,
.gate h2 {
    max-width: 17ch;
    margin: 0;
    color: #fffaf2;
    font-family: var(--serif);
    font-size: clamp(2.35rem, 4vw, 4.4rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.intro {
    max-width: 39rem;
    margin: 1.2rem 0 0;
    color: var(--muted);
    font-size: 1.06rem;
}

.event-details {
    margin: 2.2rem 0 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.detail-card {
    margin: 0;
    padding: 1rem 1.15rem;
    border-top: 1px solid rgba(229, 191, 108, 0.38);
    background: var(--panel-soft);
}

.detail-card--wide {
    grid-column: 1 / -1;
}

.detail-card dt {
    margin-bottom: 0.3rem;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.detail-card dd {
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.detail-card dd span {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 450;
}

.rsvp-form {
    display: grid;
    gap: 1.25rem;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend,
.field label,
.gate-form label {
    margin-bottom: 0.55rem;
    display: block;
    color: #f5edf1;
    font-size: 0.88rem;
    font-weight: 750;
}

.field label span {
    color: var(--dim);
    font-size: 0.78rem;
    font-weight: 500;
}

.attendance-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.attendance-option {
    position: relative;
    display: block;
}

.attendance-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.attendance-option span {
    min-height: 4.6rem;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.032);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.attendance-option span:hover {
    border-color: rgba(229, 191, 108, 0.48);
    transform: translateY(-1px);
}

.attendance-option input:checked + span {
    border-color: var(--gold);
    background: rgba(229, 191, 108, 0.12);
    box-shadow: inset 0 0 0 1px rgba(229, 191, 108, 0.2), 0 0 1.6rem rgba(229, 191, 108, 0.08);
}

.attendance-option input:focus-visible + span {
    outline: 3px solid rgba(34, 211, 238, 0.42);
    outline-offset: 3px;
}

.attendance-option b,
.attendance-option small {
    display: block;
}

.attendance-option b {
    color: white;
    font-size: 0.96rem;
}

.attendance-option small {
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.field input,
.field select,
.field textarea,
.gate-form input {
    width: 100%;
    min-height: 3.15rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    outline: none;
    color: #fff;
    background: rgba(4, 2, 4, 0.5);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea {
    min-height: 6.4rem;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.gate-form input:focus {
    border-color: var(--cyan);
    background: rgba(4, 2, 4, 0.76);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.field input::placeholder,
.field textarea::placeholder {
    color: #786c73;
}

.submit-row {
    margin-top: 0.35rem;
    padding-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
}

.submit-row p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.submit-row strong {
    color: var(--gold-pale);
}

.primary-button {
    position: relative;
    min-height: 3.2rem;
    padding: 0.72rem 1.35rem;
    border: 1px solid #f7dc9b;
    border-radius: 999px;
    color: #241207;
    background: linear-gradient(135deg, #fff0bd, #d49a38);
    box-shadow: 0 0.75rem 1.8rem rgba(180, 118, 28, 0.18);
    font-weight: 850;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 1rem 2.2rem rgba(180, 118, 28, 0.25);
}

.primary-button:focus-visible,
.text-button:focus-visible,
.text-link:focus-visible,
.site-footer a:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.65);
    outline-offset: 3px;
}

.primary-button:disabled {
    cursor: wait;
    filter: grayscale(0.2);
    opacity: 0.68;
    transform: none;
}

.notice {
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
}

.notice--error {
    border-color: rgba(255, 154, 172, 0.38);
    color: #ffd7df;
    background: rgba(174, 28, 55, 0.16);
}

.success-card {
    padding: clamp(1.7rem, 4vw, 3rem);
    border: 1px solid rgba(229, 191, 108, 0.35);
    border-radius: 1rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(245, 55, 148, 0.16), transparent 13rem),
        radial-gradient(circle at 10% 100%, rgba(34, 211, 238, 0.12), transparent 12rem),
        rgba(255, 255, 255, 0.035);
    text-align: center;
}

.success-card__star {
    width: 3.1rem;
    height: 3.1rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(229, 191, 108, 0.5);
    border-radius: 50%;
    color: var(--gold-pale);
    background: rgba(229, 191, 108, 0.1);
    box-shadow: 0 0 2.2rem rgba(229, 191, 108, 0.18);
}

.success-card h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
}

.success-card p:not(.kicker) {
    margin: 0.7rem auto 1rem;
    color: var(--muted);
}

.text-button,
.text-link {
    padding: 0;
    border: 0;
    color: var(--gold-pale);
    background: transparent;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

.party-note {
    margin-top: 1.7rem;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    border-block: 1px solid var(--line);
}

.party-note span {
    color: var(--gold);
}

.party-note p {
    margin: 0;
    font-family: var(--serif);
    font-size: 1rem;
    font-style: italic;
}

.site-footer {
    margin-top: auto;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--dim);
    font-size: 0.75rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--dim);
    text-underline-offset: 0.2em;
}

.gate {
    margin: auto 0;
}

.gate-form {
    max-width: 27rem;
    margin-top: 2rem;
    display: grid;
    gap: 0.9rem;
}

.gate-form .primary-button {
    justify-self: start;
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 68rem) {
    .invitation-shell {
        width: min(52rem, calc(100% - 1.25rem));
        margin-block: 0.625rem;
        grid-template-columns: 1fr;
        border-radius: 1.4rem;
        overflow: hidden;
    }

    .poster-panel {
        position: relative;
        top: auto;
        min-height: 33rem;
        border-radius: 1.35rem 1.35rem 0 0;
    }

    .poster-panel__content {
        min-height: 33rem;
        padding: clamp(1.5rem, 7vw, 3.3rem);
    }

    .poster-panel h1 {
        max-width: 12ch;
        font-size: clamp(3.3rem, 12vw, 6.2rem);
    }

    .rsvp-panel {
        min-height: auto;
        border-radius: 0 0 1.35rem 1.35rem;
    }

    .rsvp-panel__inner {
        min-height: auto;
    }
}

@media (max-width: 40rem) {
    .invitation-shell {
        width: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .poster-panel {
        min-height: 29rem;
        border-radius: 0;
    }

    .poster-panel__content {
        min-height: 29rem;
        padding: 1.45rem;
    }

    .poster-panel h1 {
        font-size: clamp(3.1rem, 17vw, 5.4rem);
    }

    .channel-badges {
        grid-template-columns: 1fr;
    }

    .channel-badge--gold {
        grid-column: auto;
    }

    .channel-badge {
        min-height: 3.8rem;
    }

    .rsvp-panel {
        border-radius: 0;
    }

    .rsvp-panel__inner {
        padding: 2.2rem 1.2rem;
    }

    .rsvp-header h2,
    .gate h2 {
        font-size: clamp(2.3rem, 12vw, 3.5rem);
    }

    .event-details,
    .field-row,
    .attendance-options {
        grid-template-columns: 1fr;
    }

    .detail-card--wide {
        grid-column: auto;
    }

    .submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button {
        width: 100%;
    }

    .gate-form .primary-button {
        justify-self: stretch;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .disco-ball-shimmer::before {
        animation: none !important;
    }
}
