:root {
    --cream: #fffaf1;
    --paper: #fdf5e8;
    --ivory: #fffdf8;
    --coral: #df684c;
    --coral-dark: #c8523b;
    --peach: #edaa8c;
    --sand: #e6c6a5;
    --brown: #50372d;
    --muted: #80695d;
    --line: #e8b893;
    --jade: #7fae96;
    --jade-light: #a8c9b4;
    --jade-deep: #527d69;
    --emerald: #2f6b50;
    --shadow: 0 10px 30px rgba(105, 62, 43, .12);
    --serif: Georgia, "Times New Roman", serif;
    --script: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
    --sans: "Trebuchet MS", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--brown);
    background:
        radial-gradient(ellipse at 12% 6%, rgba(235, 151, 113, .12), transparent 25%),
        radial-gradient(ellipse at 87% 58%, rgba(239, 185, 145, .13), transparent 24%),
        repeating-linear-gradient(117deg, rgba(116, 75, 50, .018) 0 1px, transparent 1px 7px),
        var(--paper);
    font-family: var(--serif);
    line-height: 1.5;
}

body.modal-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 8px;
    left: 8px;
    transform: translateY(-150%);
    padding: .6rem 1rem;
    color: #fff;
    background: var(--coral-dark);
    border-radius: 4px;
}

.skip-link:focus { transform: none; }

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 4vw, 4rem);
    background: rgba(255, 250, 241, .96);
    border-bottom: 1px solid rgba(204, 138, 105, .32);
    box-shadow: 0 2px 10px rgba(90, 48, 32, .05);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    color: var(--coral);
    text-decoration: none;
}

.brand img { width: 52px; height: 48px; color: var(--coral); }
.brand span { font-family: var(--script); font-size: clamp(1.65rem, 2.5vw, 2.4rem); line-height: 1; }

.site-nav { display: flex; align-items: center; gap: clamp(1.3rem, 2.5vw, 2.9rem); }
.site-nav a {
    position: relative;
    padding: 1.55rem 0 1.25rem;
    color: #61463a;
    font-family: var(--sans);
    font-size: .74rem;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}
.site-nav a::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: .92rem;
    left: 50%;
    height: 1px;
    background: var(--coral);
    transition: left .2s ease, right .2s ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { color: var(--coral-dark); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a.active::after { left: 0; right: 0; }
.nav-heart { color: #ed8a6e; font-size: 1.6rem; filter: drop-shadow(0 2px 2px rgba(180, 73, 45, .2)); }
.nav-toggle { display: none; }

.hero {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    border-bottom: 1px solid rgba(224, 153, 112, .24);
}

.hero-image {
    position: relative;
    z-index: 0;
    width: 100%;
    height: auto;
    display: block;
}

.hero-copy {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    width: min(52%, 760px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2.5vw, 2.5rem);
    text-align: center;
    background: radial-gradient(circle at 40% 48%, rgba(255, 249, 242, .24), transparent 68%);
}

.anniversary, .theme, .hero h1, .invitation, .event-date { position: relative; z-index: 4; margin: 0; }
.anniversary { font-size: clamp(2.35rem, 4.1vw, 4rem); line-height: 1; }
.theme { color: var(--coral); font-family: var(--script); font-size: clamp(2.35rem, 4.2vw, 4.15rem); font-weight: 400; line-height: 1.08; }
.hero-divider { position: relative; z-index: 4; width: 270px; height: 47px; margin: .1rem auto -.2rem; }
.hero h1 {
    color: var(--coral);
    font-family: var(--script);
    font-size: clamp(3rem, 5vw, 4.45rem);
    font-weight: 400;
    letter-spacing: -.05em;
    line-height: 1.12;
    text-shadow: 0 2px 0 #fff;
    white-space: nowrap;
}
.symbol-line { position: relative; z-index: 4; display: flex; align-items: center; gap: .55rem; margin: .15rem 0 0; color: var(--jade-deep); font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.symbol-line span { width: 24px; height: 1px; background: linear-gradient(90deg, transparent, var(--jade)); }
.symbol-line span:last-child { transform: scaleX(-1); }
.invitation { margin-top: .75rem; font-size: clamp(1.05rem, 1.7vw, 1.38rem); line-height: 1.42; }
.event-date { display: flex; align-items: center; gap: .85rem; margin-top: 1rem; font-size: clamp(1.2rem, 2.15vw, 1.75rem); }
.event-date svg { width: 27px; color: var(--coral); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.event-date strong { color: var(--coral); font-size: 1.25em; font-weight: 400; }

.primary-button, .outline-button, .text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 44px;
    border-radius: 9px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button {
    color: #fff;
    background: linear-gradient(180deg, #ec7859, #dc583f);
    border: 1px solid #d1513b;
    box-shadow: 0 5px 12px rgba(157, 63, 42, .22), inset 0 1px rgba(255,255,255,.35);
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(157, 63, 42, .28), inset 0 1px rgba(255,255,255,.35); }
.primary-button:active { transform: translateY(0); }
.primary-button svg, .outline-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-button { position: relative; z-index: 5; min-width: 278px; margin-top: 1.1rem; padding: .55rem 1.55rem; font-family: var(--sans); font-size: 1.2rem; }

.page-body { position: relative; isolation: isolate; overflow: hidden; padding: .2rem 1rem 0; }
.page-body::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    background:
        radial-gradient(circle at 5% 30%, rgba(227, 153, 116, .1), transparent 23%),
        radial-gradient(circle at 88% 68%, rgba(233, 167, 129, .11), transparent 24%),
        linear-gradient(rgba(255, 251, 243, .7), rgba(255, 248, 236, .58));
}
.side-decoration { position: absolute; z-index: -1; width: clamp(260px, 31vw, 460px); opacity: .46; pointer-events: none; }
.side-decoration-left { top: 70px; left: max(-220px, -15vw); }
.side-decoration-right { top: 470px; right: max(-240px, -16vw); }

.section { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: 1.2rem 0 0; }
.section-heading { display: grid; justify-items: center; margin-bottom: .7rem; }
.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 2.6vw, 2.1rem);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    font-variant: small-caps;
    letter-spacing: .025em;
}
.section-heading img { width: 170px; height: 34px; margin-top: -.1rem; }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.7rem; }
.detail-card {
    display: flex;
    align-items: center;
    min-height: 106px;
    padding: .75rem 1.25rem;
    background: rgba(255, 252, 246, .72);
    border: 1px solid rgba(224, 153, 112, .7);
    border-radius: 10px;
    box-shadow: 0 5px 18px rgba(103, 62, 43, .04);
}
.event-icon { flex: 0 0 72px; color: var(--coral); }
.detail-card h3, .detail-card p { margin: 0; font-size: 1.25rem; font-weight: 400; }
.detail-card p { font-size: 1.16rem; }

.locations { padding-top: 1.45rem; }
.symbolism { padding-top: 1.45rem; }
.symbol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.symbol-card { display: grid; grid-template-columns: 58px 1fr; gap: .1rem .85rem; min-height: 154px; padding: 1rem; background: rgba(255, 252, 246, .78); border: 1px solid rgba(224, 153, 112, .65); border-radius: 10px; box-shadow: 0 5px 18px rgba(103, 62, 43, .04); }
.symbol-icon { grid-row: 1; width: 58px; color: var(--coral); }
.symbol-card h3 { margin: -.05rem 0 0; font-size: 1.32rem; font-weight: 400; }
.symbol-label { margin: 0; color: var(--muted); font-family: var(--sans); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.symbol-card > p:last-child { grid-column: 1 / -1; margin: .35rem 0 0; color: #6b5145; font-size: .91rem; line-height: 1.4; }
.jade-symbol { border-top-color: var(--jade); }
.jade-symbol .symbol-icon { color: var(--jade-deep); }
.emerald-symbol { border-top-color: var(--jade-deep); }
.emerald-symbol .symbol-icon { color: var(--emerald); }
.location-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem; }
.location-card {
    overflow: hidden;
    padding: 0 .75rem 1rem;
    text-align: center;
    background: rgba(255, 252, 247, .8);
    border: 1px solid rgba(224, 153, 112, .67);
    border-radius: 11px;
    box-shadow: var(--shadow);
}
.location-card h3 { margin: .4rem 0 .3rem; color: var(--coral-dark); font-size: clamp(1.35rem, 2.3vw, 1.8rem); font-weight: 400; }
.map-art { width: 100%; aspect-ratio: 2.8 / 1; display: block; object-fit: cover; border: 1px solid rgba(125, 101, 87, .2); border-radius: 8px; background-color: #f0eee8; background-position: center; background-size: cover; filter: saturate(.82); }
.map-church { background-image: url("/img/decorations/map-church.svg"); }
.map-reception { background-image: url("/img/decorations/map-reception.svg"); }
.address { margin: .7rem 0 .55rem; font-size: 1rem; }
.address span { color: var(--coral); margin-right: .45rem; }
.outline-button { min-height: 38px; padding: .35rem 1.3rem; color: var(--coral-dark); background: rgba(255,255,255,.4); border: 1px solid var(--coral); }
.outline-button:hover { color: #fff; background: var(--coral); transform: translateY(-1px); }
.outline-button svg { width: 20px; }

.rsvp-section { padding-top: 1.65rem; }
.rsvp-form {
    position: relative;
    padding: 1rem 1.35rem 1.1rem;
    background: rgba(255, 253, 248, .9);
    border: 1px solid rgba(224, 153, 112, .4);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(101, 61, 42, .11);
}
.form-status:empty { display: none; }
.form-status { margin: 0 0 .8rem; padding: .65rem .8rem; color: #7b3326; background: #fff0ea; border: 1px solid #efb5a2; border-radius: 7px; text-align: center; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: 1.1fr .92fr 1.2fr; gap: .85rem 1rem; }
.field { position: relative; min-width: 0; }
.field label, .field legend { display: block; margin: 0 0 .35rem .15rem; font-family: var(--sans); font-size: .82rem; }
.field label span { color: var(--muted); }
.field input[type="text"], .field select, .field textarea {
    width: 100%;
    color: var(--brown);
    background: #fffefa;
    border: 1px solid #d8b79d;
    border-radius: 7px;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input[type="text"], .field select { height: 44px; padding: 0 .75rem; }
.field textarea { min-height: 66px; padding: .75rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(223, 104, 76, .13); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"], .attendance-field[aria-invalid="true"] .choice { border-color: #b83228; }
.field-comment { grid-column: 1 / -1; }
.character-count { position: absolute; right: .6rem; top: .1rem; color: var(--muted); font-family: var(--sans); font-size: .72rem; }
.field-error { display: block; min-height: 1rem; margin: .15rem 0 0 .15rem; color: #a32e25; font-family: var(--sans); font-size: .72rem; }

.attendance-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.attendance-options { display: grid; grid-template-columns: 1fr 1.3fr; gap: .5rem; }
.choice {
    position: relative;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    gap: .45rem;
    margin: 0 !important;
    padding: .35rem .5rem;
    background: #fffefa;
    border: 1px solid #d8b79d;
    border-radius: 7px;
    cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #a98a77; border-radius: 50%; font-size: 1rem; }
.choice:has(input:checked) { color: var(--coral-dark); border-color: var(--coral); background: #fff4ee; box-shadow: 0 0 0 2px rgba(223, 104, 76, .1); }
.choice:has(input:focus-visible) { outline: 3px solid rgba(223, 104, 76, .25); outline-offset: 2px; }

.submit-button { display: flex; min-width: 252px; margin: -.15rem auto 0; padding: .45rem 1.5rem; font-size: 1.05rem; }
.submit-button[disabled] { cursor: wait; filter: grayscale(.25); opacity: .75; }
.submit-button svg { width: 23px; }

.site-footer { position: relative; width: min(1040px, 100%); margin: 0 auto; padding: 1rem 0 1.4rem; text-align: center; }
.closing { margin: 0; color: #8b513f; font-family: var(--script); font-size: clamp(1.5rem, 3.4vw, 2.35rem); font-style: italic; }
.closing span { display: inline-block; margin: 0 1.2rem; color: var(--coral); font-style: normal; }
.renewal-line { margin: -.1rem 0 .15rem; color: var(--jade-deep); font-size: .82rem; font-style: italic; }
.love-years { margin: -.15rem 0 .25rem; color: var(--coral-dark); font-size: .95rem; letter-spacing: .05em; }
.contact-line { margin: .15rem 0; font-family: var(--sans); font-size: .78rem; }
.site-footer > p a { color: var(--coral-dark); }
.admin-link { color: var(--muted); font-family: var(--sans); font-size: .68rem; }

.success-modal {
    width: min(560px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 2rem;
    color: var(--brown);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(66, 35, 24, .35);
    text-align: center;
}
.success-modal::backdrop { background: rgba(62, 39, 30, .62); backdrop-filter: blur(4px); }
.modal-art { width: 70px; margin: 0 auto .4rem; color: var(--coral); }
.success-modal h2 { margin: 0; color: var(--coral-dark); font-size: 2rem; font-weight: 400; }
.modal-lead { margin: .45rem 0 1rem; }
.rsvp-summary { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; padding: .9rem 1rem; background: rgba(237, 170, 140, .1); border-radius: 9px; text-align: left; }
.rsvp-summary dt { color: var(--muted); }
.rsvp-summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.message-notice { min-height: 1.6rem; margin: .8rem 0 0; color: #80523f; font-size: .9rem; }
.desktop-fallback { margin-top: .8rem; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.desktop-fallback p { margin: 0 0 .6rem; font-size: .92rem; }
.desktop-fallback textarea { width: 100%; padding: .65rem; color: var(--brown); background: #fffdfa; border: 1px solid #d8b79d; border-radius: 6px; font-family: var(--sans); font-size: .8rem; resize: vertical; }
.fallback-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; margin-top: .6rem; }
.fallback-actions a { color: var(--coral-dark); }
.modal-actions { display: flex; justify-content: center; gap: .75rem; margin-top: 1rem; }
.modal-actions .primary-button { padding: .5rem 1rem; }
.text-button { padding: .45rem 1rem; color: var(--brown); background: transparent; border: 1px solid #bfa898; }
.text-button:hover { background: #f4e8dc; }

:focus-visible { outline: 3px solid rgba(202, 75, 51, .42); outline-offset: 3px; }

@media (max-width: 900px) {
    .site-header { height: 62px; padding: 0 1rem; }
    .brand img { width: 44px; }
    .nav-toggle { display: grid; width: 44px; height: 44px; place-content: center; gap: 5px; color: var(--coral-dark); background: transparent; border: 0; border-radius: 5px; }
    .nav-toggle > span:not(.sr-only) { width: 25px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
    .nav-toggle[aria-expanded="true"] > span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] > span:nth-of-type(3) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] > span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
    .site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; flex-direction: column; gap: 0; padding: .35rem 1rem 1rem; background: rgba(255,250,241,.98); border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(90,48,32,.12); }
    .site-nav.open { display: flex; }
    .site-nav a { width: 100%; padding: .75rem 0; text-align: center; }
    .site-nav a::after { bottom: .55rem; }
    .nav-heart { display: none; }
    .hero-copy { width: 53%; padding: 1rem; }
    .anniversary { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
    .theme { font-size: clamp(1.8rem, 4.7vw, 2.85rem); }
    .hero-divider { width: 170px; height: 32px; }
    .hero h1 { font-size: clamp(2rem, 5.6vw, 3.2rem); }
    .symbol-line { font-size: .54rem; }
    .invitation { margin-top: .35rem; font-size: clamp(.72rem, 1.65vw, 1rem); line-height: 1.3; }
    .event-date { gap: .45rem; margin-top: .45rem; font-size: clamp(.8rem, 2vw, 1.1rem); }
    .event-date svg { width: 20px; }
    .hero-button { min-width: 0; min-height: 38px; margin-top: .55rem; padding: .35rem .85rem; font-size: .88rem; }
    .hero-button svg { width: 20px; }
    .detail-grid { gap: .75rem; }
    .symbol-grid { gap: .75rem; }
    .detail-card { padding: .65rem; }
    .event-icon { flex-basis: 57px; }
    .detail-card h3, .detail-card p { font-size: 1rem; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .attendance-field { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 64px; }
    .brand span { font-size: 1.55rem; }
    .hero-copy { width: 58%; padding: .35rem .2rem .35rem .55rem; }
    .anniversary { font-size: clamp(1.08rem, 5.1vw, 1.45rem); }
    .theme { font-size: clamp(1.16rem, 5.4vw, 1.55rem); }
    .hero-divider { width: 88px; height: 15px; margin: 0 auto; }
    .hero h1 { font-size: clamp(1.28rem, 6.5vw, 1.8rem); line-height: 1.03; white-space: nowrap; }
    .symbol-line { display: none; }
    .invitation br { display: none; }
    .invitation { max-width: 100%; margin-top: .2rem; font-size: clamp(.48rem, 2.15vw, .65rem); line-height: 1.22; }
    .event-date { gap: .25rem; margin-top: .28rem; font-size: clamp(.56rem, 2.5vw, .72rem); }
    .event-date svg { width: 13px; }
    .hero-button { min-width: 0; min-height: 30px; margin-top: .28rem; padding: .15rem .4rem; border-radius: 6px; font-size: clamp(.55rem, 2.5vw, .72rem); }
    .hero-button svg { width: 14px; }
    .page-body { padding-right: .25rem; padding-left: .25rem; }
    .side-decoration { opacity: .22; }
    .side-decoration-left { left: -205px; }
    .side-decoration-right { right: -210px; }
    .section { width: calc(100% - 1.2rem); }
    .section-heading h2 { font-size: 1.45rem; }
    .detail-grid, .symbol-grid, .location-grid { grid-template-columns: 1fr; gap: .8rem; }
    .symbol-card { min-height: 0; }
    .detail-card { min-height: 90px; padding: .6rem 1.1rem; }
    .event-icon { flex-basis: 65px; }
    .detail-card h3, .detail-card p { font-size: 1.08rem; }
    .location-card { padding-right: .55rem; padding-left: .55rem; }
    .map-art { aspect-ratio: 2.3 / 1; }
    .address { font-size: .88rem; }
    .rsvp-form { padding: .9rem; }
    .form-grid { grid-template-columns: 1fr; }
    .attendance-field { grid-column: auto; }
    .attendance-options { grid-template-columns: 1fr; }
    .field-comment { grid-column: auto; }
    .submit-button { width: 100%; min-width: 0; margin-top: .3rem; }
    .closing span { margin: 0 .3rem; }
    .success-modal { padding: 1.25rem; }
    .modal-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .hero { min-height: clamp(275px, 72vw, 320px); }
    .anniversary { font-size: clamp(1.2rem, 5.4vw, 1.45rem); }
    .theme { font-size: clamp(1.25rem, 5.8vw, 1.55rem); }
    .hero h1 { font-size: clamp(1.4rem, 6.7vw, 1.8rem); }
    .invitation { font-size: clamp(.58rem, 2.5vw, .7rem); line-height: 1.25; }
    .event-date { font-size: clamp(.65rem, 2.8vw, .78rem); }
    .hero-button { min-height: 34px; font-size: clamp(.64rem, 2.7vw, .76rem); }
}

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