:root {
  --cream: #fff8ee;
  --blush: #f7e8e2;
  --burgundy: #853345;
  --wine: #762a3a;
  --gold: #b88a28;
  --ink: #68544c;
  --line: #e4c3bd;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --text-label: .75rem;
  --text-small: .875rem;
  --text-body: 1rem;
  --text-quote: clamp(1.25rem, 1.1875rem + .3vw, 1.375rem);
  --text-card-title: clamp(1.375rem, 1.25rem + .4vw, 1.5rem);
  --text-section-title: clamp(1.875rem, 1.625rem + .8vw, 2.25rem);
  --text-couple-names: clamp(3.25rem, 2.5rem + 3vw, 4.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font: var(--text-body)/1.65 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { color: var(--burgundy); font-family: var(--serif); font-weight: 500; line-height: 1.15; overflow-wrap: anywhere; }
h2 { font-size: var(--text-section-title); line-height: 1.2; }
h3 { font-size: var(--text-card-title); line-height: 1.3; }
a { color: var(--burgundy); text-underline-offset: 5px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 5px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; top: 10px; left: 10px; z-index: 10000; padding: 12px; background: var(--cream); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.section { padding: 76px 24px; }
.container { width: 100%; max-width: 900px; margin-inline: auto; }
.container--narrow { max-width: 670px; }
.eyebrow { font-size: var(--text-label); font-weight: 600; line-height: 1.5; letter-spacing: 2px; text-transform: uppercase; }
.flower, .sparkle { display: block; color: var(--gold); text-align: center; font-size: 23px; line-height: 1; }
.sparkle { margin-bottom: 17px; font-size: 17px; }
.divider { display: flex; align-items: center; gap: 16px; width: min(100%, 490px); margin: 30px auto; color: var(--burgundy); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.divider::after { transform: rotate(180deg); }
.divider span { font-size: 15px; line-height: 1; }
.section-heading { text-align: center; margin-bottom: 36px; }
.section-heading .eyebrow { margin-bottom: 12px; color: var(--burgundy); }
.section-heading .divider { margin-bottom: 0; }
.section-lead { max-width: 570px; margin: 14px auto 0; font-size: var(--text-body); }
.framed { position: relative; border: 1px solid var(--line); background: rgba(255, 250, 242, .88); box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px #efd7cf, 0 3px 12px #762a3a06; }
.framed::before { content: ""; position: absolute; inset: 9px; pointer-events: none; background: linear-gradient(var(--line), var(--line)) left top / 22px 1px no-repeat, linear-gradient(var(--line), var(--line)) left top / 1px 22px no-repeat, linear-gradient(var(--line), var(--line)) right top / 22px 1px no-repeat, linear-gradient(var(--line), var(--line)) right top / 1px 22px no-repeat, linear-gradient(var(--line), var(--line)) left bottom / 22px 1px no-repeat, linear-gradient(var(--line), var(--line)) left bottom / 1px 22px no-repeat, linear-gradient(var(--line), var(--line)) right bottom / 22px 1px no-repeat, linear-gradient(var(--line), var(--line)) right bottom / 1px 22px no-repeat; }

.hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 800px; padding: 80px 24px; background: #d7d2c5; }
.hero-background { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 247, 235, .32); }
.hero-card { width: min(100%, 510px); padding: 43px 45px 35px; text-align: center; border: 1px solid #fff7ecb3; border-radius: 5px; background: rgba(255, 249, 239, .93); box-shadow: 0 16px 60px #5a42340a; }
.hero-card > .eyebrow { margin: 25px 0 22px; }
.hero h1 { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--text-couple-names); letter-spacing: -.02em; line-height: 1.05; }
.hero h1 > span { max-width: 100%; }
.hero .ampersand { display: flex; align-items: center; gap: 18px; margin: 7px 0; color: var(--gold); font-size: 1.75rem; font-style: italic; }
.ampersand::before, .ampersand::after { content: ""; width: 40px; height: 1px; background: #cfb37677; }
.hero-card .divider { margin: 23px auto; width: 85%; color: var(--gold); }
.hero-invitation { font-size: var(--text-body); line-height: 1.65; }
.date-card { display: inline-flex; flex-direction: column; margin: 22px 0 14px; padding: 15px 25px 17px; background: #f0dfd8; border-radius: 5px; }
.date-card .eyebrow { color: var(--burgundy); }
.wedding-date { margin-top: 5px; color: var(--burgundy); font: 500 clamp(1.5rem, 1.375rem + .6vw, 1.875rem)/1.3 var(--serif); }
.hero-rsvp { display: block; margin: 6px 0 22px; font-size: var(--text-small); text-decoration: none; }
.hero-rsvp:hover { text-decoration: underline; }
.hero-rsvp span { margin-left: 8px; color: var(--gold); }

.story-section { background: linear-gradient(165deg, #fff1e5, #f5e3df); }
.story-message { padding: 34px 40px; color: var(--burgundy); text-align: center; font: 400 var(--text-quote)/1.6 var(--serif); }
.story-message p + p { margin-top: 16px; }
.family-list { display: grid; gap: 16px; margin-top: 22px; }
.family-card { display: flex; align-items: center; gap: 22px; padding: 26px 34px; }
.family-flower { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; color: var(--burgundy); background: #f4e5df; border: 1px solid #e5c9c0; border-radius: 50%; font-size: 26px; }
.family-role { font-size: var(--text-small); margin-bottom: 4px; }
.story-signature { margin: 36px 0 16px; color: var(--burgundy); font: italic var(--text-quote)/1.5 var(--serif); text-align: center; }
.story-video { margin: 25px 0; text-align: center; }
.story-section .container > .flower:last-child { margin-top: 25px; font-size: 20px; }

.photo-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 27px; margin: 30px auto 25px; max-width: 740px; padding-inline: 12px; }
.polaroid { width: 190px; padding: 8px 8px 31px; background: #fffefa; box-shadow: 0 5px 12px #64493720; transform: rotate(-4deg); }
.polaroid:nth-child(3n+2) { transform: rotate(2deg); }
.polaroid:nth-child(3n) { transform: rotate(5deg); }
.polaroid img { width: 100%; height: 185px; object-fit: cover; }
.polaroid:first-child img { object-position: 20% center; }

.events-section { background: linear-gradient(120deg, #ffead7, #fff6ce 55%, #fffbed); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px; }
.event-card { padding: 34px 25px 30px; text-align: center; overflow-wrap: anywhere; }
.event-icon { display: block; width: 35px; height: 35px; margin: 0 auto 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; color: var(--burgundy); }
.event-card h3 { margin-bottom: 12px; }
.event-location { font-weight: 600; }
.event-address, .event-description { margin-top: 7px; }
.event-date { color: var(--burgundy); margin-top: 18px; font-weight: 600; }
.sunset-romance .invitation-navigation { margin-top: 17px; justify-content: center; gap: 8px; }
.sunset-romance .invitation-navigation a { color: var(--burgundy); border-color: var(--line); background: transparent; font-size: var(--text-small); }

.rsvp-section { background: linear-gradient(155deg, #fff1e6, #f5e3df); }
.rsvp-deadline { font-size: var(--text-small); margin-top: 15px; }
.guest-greeting { margin-bottom: 22px; text-align: center; }
.rsvp-form { max-width: 550px; margin: 0 auto; padding: 36px; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { min-width: 0; margin-bottom: 22px; }
.form-field > label, .attendance-field legend { display: block; margin-bottom: 7px; padding: 0; font-size: var(--text-small); font-weight: 600; }
.form-field input, .form-field textarea { display: block; width: 100%; min-height: 44px; border: 1px solid #e7ccc0; border-radius: 5px; background: #fff3e7; color: #514139; padding: 11px 12px; font-size: var(--text-body); line-height: 1.5; }
.form-field textarea { min-height: 115px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #8b7166; opacity: 1; font-size: var(--text-small); }
.attendance-field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.attendance-options { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.attendance-options label { display: flex; align-items: center; gap: 7px; min-height: 36px; cursor: pointer; font-size: var(--text-small); }
.attendance-options input { width: 17px; height: 17px; margin: 0; accent-color: var(--burgundy); }
.rsvp-form .invitation-guest-count-help { color: #80685c; font-size: var(--text-small); line-height: 1.6; }
.submit-button { display: block; margin: 30px auto 0; padding: 12px 26px; min-height: 46px; border: 1px solid var(--burgundy); border-radius: 30px; background: var(--burgundy); color: #fff8ef; box-shadow: 0 4px 10px #85334526; font: 500 var(--text-quote)/1.2 var(--serif); cursor: pointer; transition: background .2s ease; }
.submit-button:hover { background: var(--wine); }
.submit-button span { font: 14px var(--sans); margin-left: 10px; }
.form-status, .form-feedback { max-width: 550px; margin: 0 auto 20px; padding: 18px; text-align: center; color: var(--burgundy); background: #fff6e9; }
.form-status--error { border: 1px solid var(--burgundy); }
.form-feedback { margin: 22px 0 0; padding: 0; background: transparent; font-size: var(--text-small); }
.form-feedback:empty { display: none; }

.invitation-footer { padding: 56px 24px 35px; background: var(--wine); text-align: center; color: #f8e9dd; }
.monogram { display: flex; justify-content: center; align-items: center; gap: 10px; width: fit-content; min-width: 120px; min-height: 85px; margin: 0 auto 23px; padding: 14px 22px; border: 1px solid #f0d4c449; border-radius: 50%; font: 500 38px/1 var(--serif); }
.monogram span { color: #d9b45b; font-style: italic; }
.footer-date { font: 500 var(--text-quote)/1.4 var(--serif); }
.footer-names { margin-top: 5px; font-size: var(--text-small); opacity: .8; overflow-wrap: anywhere; }
.invitation-footer .divider { color: #d9b45b; max-width: 360px; margin-block: 27px; }
.invitation-footer .divider::before, .invitation-footer .divider::after { background: linear-gradient(90deg, transparent, #f0d4c438); }
.footer-message { font: italic var(--text-quote)/1.4 var(--serif); color: #f5dfc6; }
.footer-flowers { margin: 25px 0 17px; color: #d9b45b; font-size: 22px; word-spacing: 8px; }
.footer-flowers span { color: #f0d4c490; }
.wedday-credit { color: #f8e9dd; opacity: .75; font-size: var(--text-label); text-decoration: none; }
.wedday-credit:hover { opacity: 1; text-decoration: underline; }

@media (min-width: 1600px) {
  .hero { min-height: 900px; }
}
@media (max-width: 700px) {
  .section { padding: 56px 22px; }
  .hero { min-height: 720px; padding: 50px 22px; }
  .hero-background { object-position: 39% center; }
  .hero-card { max-width: 440px; padding: 34px 28px 30px; }
  .story-message { padding: 28px; }
  .family-card { padding: 25px; gap: 16px; }
  .family-flower { width: 44px; height: 44px; }
  .photo-gallery { gap: 16px; padding: 8px 5px; }
  .polaroid { width: calc((100% - 32px) / 3); padding: 5px 5px 22px; }
  .polaroid img { height: auto; aspect-ratio: 4 / 5; }
  .event-grid { gap: 18px; }
  .rsvp-form { padding: 30px 25px; }
  .name-fields { gap: 12px; }
}
@media (max-width: 420px) {
  .hero { min-height: 680px; padding: 35px 18px; }
  .hero-card { padding-inline: 22px; }
  .hero-card > .eyebrow { letter-spacing: 2px; }
  .section { padding-inline: 18px; }
  .name-fields { grid-template-columns: 1fr; gap: 0; }
  .family-card { padding: 23px; gap: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
