:root {
    color-scheme: light;
    --wine: #8f2738;
    --deep-wine: #641726;
    --cream: #f7f0e5;
    --paper: #fffaf2;
    --ink: #2d2020;
    --muted: #735f5b;
    --gold: #bd8a4a;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    background:
        radial-gradient(circle at 18% 20%, rgba(255,255,255,.6), transparent 28rem),
        linear-gradient(135deg, #ead8cc, #f4e9dc 48%, #dfc0bb);
    overflow-x: hidden;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .16;
    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='.25'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
}

.lock-shell, .invite-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.lock-card, .invite-card, .answer-card {
    position: relative;
    width: min(680px, 100%);
    background: var(--paper);
    border: 1px solid rgba(100, 23, 38, .15);
    box-shadow: 0 30px 80px rgba(72, 28, 30, .2);
    text-align: center;
}

.lock-card { padding: clamp(42px, 8vw, 78px) clamp(24px, 8vw, 72px); }

.lock-card::before, .invite-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(189, 138, 74, .35);
    pointer-events: none;
}

.seal {
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 28px;
    border-radius: 50%;
    color: #f8dfb6;
    background: var(--wine);
    box-shadow: inset 0 0 0 4px var(--wine), inset 0 0 0 5px rgba(255,255,255,.28), 0 6px 14px rgba(100,23,38,.22);
    font: 600 2rem/1 "Cormorant Garamond", serif;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--wine);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

h1, h2 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    line-height: .98;
}

h1 { font-size: clamp(2.65rem, 8vw, 5rem); }
h1 em { color: var(--wine); font-weight: 500; }
.intro, .date-note { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.intro { margin: 24px auto 32px; max-width: 420px; }

.password-form { position: relative; z-index: 1; text-align: left; }
.password-form label { display: block; margin-bottom: 9px; font-size: .86rem; font-weight: 600; }
.field-row { display: flex; gap: 10px; }
input, button { font: inherit; }
input {
    width: 100%; min-width: 0; padding: 14px 15px;
    color: var(--ink); background: #fff; border: 1px solid #cebdb0; border-radius: 4px;
}
input:focus { outline: 2px solid rgba(143,39,56,.25); border-color: var(--wine); }
button { cursor: pointer; border: 0; border-radius: 4px; font-weight: 600; }
.field-row button, .yes-button {
    padding: 14px 24px; color: white; background: var(--wine);
    box-shadow: 0 8px 18px rgba(100,23,38,.2); transition: transform .2s, background .2s;
}
.field-row button:hover, .yes-button:hover { background: var(--deep-wine); transform: translateY(-2px); }
.form-message { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.form-message.is-error { color: var(--wine); }

.invite-card { min-height: min(680px, calc(100svh - 56px)); padding: clamp(68px, 11vw, 110px) clamp(24px, 9vw, 80px) 48px; overflow: hidden; }
.invite-card h1 { font-size: clamp(2.6rem, 8vw, 5.25rem); }
.date-note { margin: 28px 0 38px; }
.postmark {
    position: absolute; top: 32px; right: 34px; transform: rotate(7deg);
    padding: 7px 10px; border: 1px solid rgba(143,39,56,.45); border-radius: 50%;
    color: rgba(143,39,56,.65); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.postmark span { font-size: .5rem; letter-spacing: .04em; }
.choices { position: relative; min-height: 112px; max-width: 470px; margin: 0 auto; }
.yes-button, .no-button { position: absolute; top: 18px; min-height: 52px; }
.yes-button { left: 10%; width: 48%; z-index: 2; }
.no-button {
    left: 66%; width: 24%; padding: 13px 18px; color: var(--wine); background: transparent;
    border: 1px solid rgba(143,39,56,.45); transition: left .16s ease, top .16s ease, transform .16s ease;
}
.signature { margin: 10px 0 0; color: var(--gold); font: italic 500 1.1rem "Cormorant Garamond", serif; }

.answer-card { padding: clamp(48px, 8vw, 78px) 28px; animation: reveal .75s cubic-bezier(.2,.8,.2,1) both; }
.answer-card h2 { color: var(--wine); font-size: clamp(3rem, 9vw, 5.4rem); }
.answer-card > p:not(.eyebrow) { color: var(--muted); font: 500 clamp(1.2rem, 3vw, 1.5rem)/1.6 "Cormorant Garamond", serif; }
.answer-card .vienna-note { margin: 22px 0 20px; }
.vienna-note strong { color: var(--wine); font-weight: 600; }
.date-options { display: flex; justify-content: center; gap: 12px; margin: 20px auto 16px; }
.date-choice {
    min-height: 52px; padding: 13px 21px; color: var(--wine); background: transparent;
    border: 1px solid rgba(143,39,56,.48); transition: color .2s, background .2s, transform .2s;
}
.date-choice:hover, .date-choice.is-selected { color: #fff; background: var(--wine); transform: translateY(-2px); }
.answer-card .paris-note { margin: 14px 0; font-size: 1rem; line-height: 1.45; }
.date-confirmation { margin-top: 20px; animation: reveal .5s ease both; }
.date-confirmation .heart { display: block; margin: 0; }
.date-confirmation p { margin: 8px 0 2px; color: var(--wine); font: 600 1.5rem "Cormorant Garamond", serif; }
.date-confirmation small { color: var(--gold); font: italic 500 1rem "Cormorant Garamond", serif; }
.heart { margin-top: 28px; color: var(--wine); font-size: 2rem; animation: heartbeat 1.4s infinite; }
.confetti { position: fixed; z-index: 5; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall var(--duration) linear forwards; }

@keyframes reveal { from { opacity: 0; transform: scale(.94) rotate(-1deg); } to { opacity: 1; transform: none; } }
@keyframes heartbeat { 50% { transform: scale(1.18); } }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(720deg); } }

@media (max-width: 560px) {
    .field-row { flex-direction: column; }
    .field-row button { width: 100%; }
    .invite-card { padding-left: 20px; padding-right: 20px; }
    .postmark { top: 25px; right: 25px; }
    .yes-button { left: 3%; width: 58%; }
    .no-button { left: 69%; width: 28%; }
    .date-options { flex-direction: column; }
    .date-choice { width: 100%; }
}

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