*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --bg: #0b0908;
    --bg2: #13100e;
    --paper: #f8f2e7;
    --gold: #d6b77a;
    --gold-soft: #ead7ad;
    --text: #f6efe5;
    --muted: #b7aa9b;
    --line: rgba(214,183,122,.28);
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 15%, rgba(214,183,122,.08), transparent 34%),
        linear-gradient(180deg, #0b0908 0%, #0d0a09 45%, #120e0c 100%);
    font-family: "Geeza Pro", "Noto Naskh Arabic", "Tahoma", system-ui, sans-serif;
    overflow-x: hidden;
}

body:not(.invitation-open) { overflow: hidden; }

a { color: inherit; }

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particles i {
    position: absolute;
    display: block;
    border-radius: 999px;
    background: var(--gold-soft);
    animation: floatParticle linear infinite;
    filter: blur(.1px);
}

@keyframes floatParticle {
    from { transform: translate3d(0, 25px, 0) scale(.8); }
    50% { transform: translate3d(8px, -22px, 0) scale(1.2); }
    to { transform: translate3d(-5px, -70px, 0) scale(.7); }
}

.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 42%, rgba(214,183,122,.11), transparent 30%),
        linear-gradient(180deg, #0c0a09, #080706);
    transition: opacity .9s ease, transform 1.1s cubic-bezier(.16,.84,.36,1);
}

.intro-screen::before,
.intro-screen::after {
    content: "";
    position: absolute;
    width: min(78vw, 580px);
    aspect-ratio: 1;
    border: 1px solid rgba(214,183,122,.16);
    border-radius: 50%;
    animation: introRing 9s linear infinite;
}

.intro-screen::after {
    width: min(61vw, 450px);
    opacity: .6;
    animation-direction: reverse;
    animation-duration: 12s;
}

@keyframes introRing {
    from { transform: rotate(0deg) scale(.95); }
    50% { transform: rotate(180deg) scale(1.04); }
    to { transform: rotate(360deg) scale(.95); }
}

.intro-screen.opening {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

.intro-content {
    position: relative;
    z-index: 2;
    width: min(92vw, 660px);
    text-align: center;
}

.intro-kicker {
    margin: 0 0 16px;
    color: var(--gold);
    font-size: clamp(.82rem, 2.8vw, 1rem);
    letter-spacing: .08em;
    opacity: 0;
    animation: riseIn 1s .15s forwards;
}

.guest-name {
    margin: 0;
    font-size: clamp(2.8rem, 11vw, 6.2rem);
    line-height: 1.08;
    font-weight: 500;
    color: var(--paper);
    text-shadow: 0 8px 45px rgba(0,0,0,.35);
    opacity: 0;
    animation: riseIn 1.15s .4s forwards;
}

.intro-line {
    width: 0;
    height: 1px;
    margin: 28px auto 18px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: lineGrow 1.4s .75s forwards;
}

.intro-sub {
    margin: 0 auto 32px;
    color: var(--muted);
    font-size: clamp(.95rem, 3vw, 1.15rem);
    opacity: 0;
    animation: riseIn 1s 1s forwards;
}

.open-button {
    min-width: 190px;
    border: 1px solid rgba(214,183,122,.55);
    border-radius: 999px;
    padding: 14px 22px;
    background: rgba(255,255,255,.02);
    color: var(--paper);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font: inherit;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 50px rgba(0,0,0,.18);
    opacity: 0;
    animation: riseIn 1s 1.25s forwards;
    transition: .3s ease;
}

.open-button:hover {
    background: rgba(214,183,122,.11);
    transform: translateY(-2px);
}

.open-arrow { color: var(--gold); }

@keyframes riseIn {
    from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes lineGrow { to { width: min(230px, 70%); } }

.invitation {
    display: none;
    position: relative;
    z-index: 2;
}

.invitation.active { display: block; }

.section {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 88px 24px;
    text-align: center;
}

.hero {
    min-height: 100svh;
    background:
        radial-gradient(circle at 50% 10%, rgba(214,183,122,.12), transparent 25%),
        linear-gradient(180deg, rgba(255,255,255,.015), transparent 35%);
}

.eyebrow {
    color: var(--gold);
    font-size: .82rem;
    letter-spacing: .08em;
    margin: 0 0 18px;
}

.hero-small {
    margin: 6px 0 24px;
    color: var(--muted);
}

.names {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 20px 0 22px;
}

.names h2 {
    margin: 0;
    font-size: clamp(3.2rem, 14vw, 7.4rem);
    line-height: 1;
    font-weight: 500;
    color: var(--paper);
}

.amp {
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: clamp(1.8rem, 6vw, 3.2rem);
    margin: 3px 0;
}

.hero-copy {
    width: min(620px, 92vw);
    margin: 10px auto 30px;
    color: #d0c4b6;
    line-height: 2;
    font-size: clamp(1rem, 3vw, 1.18rem);
}

.guest-card {
    width: min(420px, 92vw);
    margin: 0 auto;
    padding: 18px 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.025);
    backdrop-filter: blur(12px);
}

.guest-card span {
    display: block;
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 6px;
}

.guest-card strong {
    color: var(--paper);
    font-size: 1.45rem;
    font-weight: 500;
}

.scroll-cue {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 38px;
    border: 1px solid rgba(214,183,122,.35);
    border-radius: 999px;
}

.scroll-cue span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 7px;
    border-radius: 99px;
    background: var(--gold);
    transform: translateX(-50%);
    animation: scrollDot 1.8s infinite;
}

@keyframes scrollDot {
    0% { opacity: 0; transform: translate(-50%, 0); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, 13px); }
}

.date-section {
    background:
        radial-gradient(circle at 50% 50%, rgba(214,183,122,.08), transparent 35%),
        linear-gradient(180deg, #0e0b0a, #14100e);
}

.glass-card {
    width: min(760px, 94vw);
    padding: clamp(34px, 8vw, 72px) 22px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
    box-shadow: 0 25px 100px rgba(0,0,0,.28);
    backdrop-filter: blur(16px);
}

.glass-card h3,
.venue-section h3,
.rsvp-card h3 {
    margin: 0 0 22px;
    color: var(--paper);
    font-size: clamp(2rem, 8vw, 4.4rem);
    font-weight: 500;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 34px;
}

.countdown div {
    padding: 18px 8px;
    border-top: 1px solid var(--line);
}

.countdown strong {
    display: block;
    color: var(--gold-soft);
    font-size: clamp(1.8rem, 8vw, 3.6rem);
    font-weight: 400;
    font-family: Georgia, serif;
}

.countdown span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    margin-top: 3px;
}

.venue-section {
    min-height: 78svh;
    background: #0c0a09;
}

.venue-section > div { width: min(680px, 92vw); }

.venue-section p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.9;
}

.outline-button {
    display: inline-flex;
    margin-top: 20px;
    padding: 13px 22px;
    border: 1px solid rgba(214,183,122,.48);
    border-radius: 999px;
    text-decoration: none;
    color: var(--paper);
    transition: .3s ease;
}

.outline-button:hover { background: rgba(214,183,122,.1); }

.rsvp-section {
    background:
        radial-gradient(circle at 50% 35%, rgba(214,183,122,.1), transparent 35%),
        linear-gradient(180deg, #120e0c, #0b0908);
}

.rsvp-card {
    width: min(680px, 95vw);
    padding: clamp(30px, 7vw, 58px);
    border-radius: 32px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.025);
    box-shadow: 0 25px 90px rgba(0,0,0,.25);
    backdrop-filter: blur(14px);
}

.rsvp-card h3 { font-size: clamp(1.8rem, 7vw, 3.2rem); }

.muted-light { color: var(--muted); line-height: 1.8; }

.rsvp-form {
    display: grid;
    gap: 20px;
    margin-top: 30px;
    text-align: right;
}

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

.choice input { position: absolute; opacity: 0; }

.choice span {
    display: block;
    padding: 15px 12px;
    text-align: center;
    border: 1px solid rgba(214,183,122,.23);
    border-radius: 16px;
    cursor: pointer;
    color: #d5c9ba;
    transition: .25s ease;
}

.choice input:checked + span {
    border-color: var(--gold);
    background: rgba(214,183,122,.1);
    color: var(--paper);
    box-shadow: inset 0 0 0 1px rgba(214,183,122,.15);
}

.field { display: grid; gap: 8px; color: #d7cbbd; }
.field small { color: var(--muted); }

.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(214,183,122,.2);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    color: var(--paper);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.field textarea { resize: vertical; min-height: 110px; }

.field select:focus,
.field textarea:focus { border-color: rgba(214,183,122,.65); }

.submit-button {
    border: 0;
    border-radius: 999px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #d8bd84, #b99859);
    color: #17110a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.submit-button:disabled { opacity: .55; cursor: wait; }

.rsvp-result { min-height: 26px; margin: 0; text-align: center; }
.rsvp-result.success { color: #d8cda8; }
.rsvp-result.error { color: #f1a4a4; }

.footer {
    min-height: 58svh;
    background: #090807;
}

.footer p { color: var(--muted); }
.footer h3 {
    margin: 5px 0 10px;
    color: var(--paper);
    font-size: clamp(2.3rem, 9vw, 4.6rem);
    font-weight: 500;
}
.footer h3 span { color: var(--gold); font-family: Georgia, serif; }
.footer small { color: var(--gold); }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}

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

.music-toggle {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 30;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(10,8,7,.72);
    color: var(--gold);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.music-toggle.playing { animation: pulseMusic 1.8s infinite; }

@keyframes pulseMusic {
    50% { box-shadow: 0 0 0 9px rgba(214,183,122,.08); }
}

.generic-page,
.invalid-shell {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.generic-shell,
.invalid-shell {
    width: min(620px, 94vw);
}

.monogram {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    margin: 0 auto 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 1.6rem;
}

.generic-shell h1 {
    margin: 0;
    color: var(--paper);
    font-weight: 500;
    font-size: clamp(3rem, 12vw, 6rem);
}
.generic-shell h1 span { color: var(--gold); font-family: Georgia, serif; }
.generic-shell .date { color: var(--gold-soft); }
.generic-shell .muted,
.invalid-shell p { color: var(--muted); line-height: 1.8; }

@media (max-width: 560px) {
    .section { padding-left: 18px; padding-right: 18px; }
    .countdown { gap: 4px; }
    .countdown div { padding: 14px 2px; }
    .glass-card { border-radius: 24px; }
    .rsvp-card { border-radius: 24px; padding: 28px 18px; }
}

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