:root {
  color-scheme: light;
  --cream: #f7f1e3;
  --sand: #efe6d2;
  --ink: #2e2a1e;
  --muted: #5e5643;
  --gold: #b8933f;
  --bronze: #7d5e24;
  --dark: #24211a;
  --light: #e9dfc6;
  --display: "Cinzel", Georgia, serif;
  --serif: "EB Garamond", Georgia, serif;
  --foil: linear-gradient(100deg, #8c6a2f 0%, #d9b76a 22%, #f3e2a9 36%, #b88a3e 54%, #e6c878 72%, #8c6a2f 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 19px/1.6 var(--serif); }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--bronze); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3, p, a { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
h2 { font-size: clamp(34px, 4.1vw, 52px); line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase; }
section { scroll-margin-top: 24px; }
.container { width: 100%; max-width: 1208px; margin-inline: auto; padding-inline: 24px; }
.foil { color: var(--bronze); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .foil { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.eyebrow { color: var(--bronze); font: 400 13px/1.7 var(--display); letter-spacing: 0.24em; text-transform: uppercase; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 12px; background: var(--cream); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wheat-definitions { position: absolute; }

.site-header { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-block: 28px; }
.header-monogram { font: 500 24px/1.3 var(--display); letter-spacing: 0.1em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 32px; font: 400 13px/1.6 var(--display); letter-spacing: 0.16em; text-transform: uppercase; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.hero { position: relative; max-width: 1048px; padding-block: 48px 96px; text-align: center; }
.hero-gold-flecks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-content { position: relative; }
.hero-wheat { width: 150px; height: 180px; }
.hero-eyebrow { margin-top: 16px; font-size: 14px; letter-spacing: 0.28em; }
h1 { margin-top: 24px; font-size: clamp(64px, 10vw, 128px); line-height: 1; letter-spacing: 0.04em; }
.hero-name { display: block; width: fit-content; max-width: 100%; margin-inline: auto; text-transform: uppercase; }
.hero-conjunction { display: block; color: var(--bronze); font: italic 0.5em/1.4 var(--serif); letter-spacing: 0; }
.wedding-date { display: block; max-width: 560px; margin: 32px auto 0; font-size: 24px; font-style: italic; line-height: 1.45; }
.wedding-date span { display: block; }
.gold-divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 28px; }
.gold-divider::before, .gold-divider::after { content: ""; width: 120px; max-width: 30%; height: 1px; background: var(--gold); }
.gold-divider span { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.hero-location { margin-top: 20px; font: 400 15px/1.6 var(--display); letter-spacing: 0.22em; text-transform: uppercase; }
.hero-photo-stage { padding: 0 32px 104px; }
.hero-photo-frame { max-width: 784px; margin-inline: auto; padding: 10px; border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: 8px; }
.hero-photo { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; filter: sepia(0.15) saturate(0.9); }
.countdown-section { padding-block: 64px; background: var(--dark); color: var(--light); }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 64px; max-width: 1000px; text-align: center; }
.countdown-intro { font-size: 24px; font-style: italic; }
.countdown-unit > [data-countdown-unit] { display: block; font: 400 64px/1 var(--display); font-variant-numeric: tabular-nums; }
.countdown-label { font: 400 12px/1.6 var(--display); letter-spacing: 0.22em; text-transform: uppercase; }

.couple-section { padding-block: 112px 104px; text-align: center; }
.couple-section > .container { max-width: 1048px; }
.couple-portraits { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 96px; margin-top: 60px; }
.person { flex: 0 1 260px; min-width: 0; }
.portrait { width: min(230px, 100%); aspect-ratio: 23 / 30; margin-inline: auto; padding: 8px; border: 1px solid var(--gold); border-radius: 50%; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 50%; }
.person figcaption { margin-top: 24px; }
.person h3 { font: italic 36px/1.3 var(--serif); }
.person figcaption p { margin-top: 8px; color: var(--muted); white-space: pre-line; }
.family-section { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 56px; max-width: 700px; margin: 72px auto 0; }
.family-group { min-width: 0; flex: 0 1 280px; }
.family-godparents { flex-basis: 100%; }
.family-pair + .family-pair { margin-top: 24px; }
.family-pair p { margin-top: 4px; font-size: 22px; }
.family-godparents .family-pair p { margin-top: 8px; font-style: italic; font-size: 34px; }
.family-group:not(.family-godparents) .eyebrow { font-size: 12px; letter-spacing: 0.22em; }

.story-section { padding-block: 104px; background: var(--sand); }
.story-section > .container { max-width: 1148px; }
.story-heading { text-align: center; }
.story-message { max-width: 620px; margin-inline: auto; font-size: 22px; }
.story-message p { margin-top: 24px; }
.story-signature, .story-video { margin-top: 18px; }
.story-signature { font-style: italic; font-size: 24px; }
.story-section .invitation-story-gallery { max-width: none; margin-top: 60px; }
.story-section .invitation-story-gallery__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 32px; align-items: start; }
.story-section .invitation-story-gallery__photo { aspect-ratio: 4 / 5; padding: 8px; border: 1px solid var(--gold); border-radius: 0; }
.story-section .invitation-story-gallery__photo:nth-child(2) { margin-top: 40px; }
.story-section .invitation-story-gallery__photo img { filter: sepia(0.15) saturate(0.9); }

.events-section { padding-block: 112px; }
.events-section h2, .events-date { text-align: center; }
.events-date { margin-top: 10px; font-size: 22px; font-style: italic; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px; margin-top: 56px; }
.event-card { min-width: 0; padding: 12px 12px 32px; border: 1px solid var(--gold); text-align: center; }
.event-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(0.15) saturate(0.9); }
.event-details { padding: 24px 12px 0; }
.event-time { display: block; font: 400 40px/1 var(--display); }
.event-card h3 { margin-top: 10px; font-size: 16px; font-weight: 500; line-height: 1.7; letter-spacing: 0.16em; text-transform: uppercase; }
.event-date { margin-top: 8px; color: var(--muted); font-size: 15px; }
.event-location { margin-top: 8px; color: var(--muted); font-size: 18px; }
.event-address { color: var(--muted); font-size: 18px; }
.event-description { margin-top: 12px; color: var(--muted); font-size: 17px; white-space: pre-line; }
.event-card .invitation-navigation { gap: 8px 24px; margin-top: 14px; }
.event-card .invitation-navigation a { padding: 0; border: 0; border-radius: 0; font-style: italic; font-size: 18px; text-decoration: underline; }

.rsvp-section { padding: 104px 24px; background: var(--dark); color: var(--light); }
.rsvp-card { max-width: 746px; margin-inline: auto; padding: clamp(28px, 6vw, 52px); border: 1px solid var(--gold); outline: 1px solid rgba(184, 147, 63, 0.5); outline-offset: -10px; }
.rsvp-card h2 { text-align: center; font-size: 46px; }
.rsvp-intro, .rsvp-deadline, .guest-greeting { max-width: 440px; margin: 16px auto 0; text-align: center; font-size: 20px; font-style: italic; white-space: pre-line; }
.attendance-field { display: flex; gap: 12px; margin: 30px 0 0; padding: 0; border: 0; }
.attendance-field label { display: flex; flex: 1; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 50px; padding: 10px 12px; border: 1px solid rgba(233, 223, 198, 0.35); font: 400 13px/1.5 var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; cursor: pointer; }
.attendance-field label:has(input:checked) { border-color: #d9b76a; background: rgba(217, 183, 106, 0.14); }
.attendance-field input { flex-shrink: 0; margin: 0; accent-color: #d9b76a; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.form-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-field[hidden] { display: none; }
.form-field--full { grid-column: 1 / -1; }
.form-field > label { color: #d9ccae; font: 400 12px/1.6 var(--display); letter-spacing: 0.16em; text-transform: uppercase; }
.form-field input, .form-field textarea { min-width: 0; width: 100%; min-height: 44px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--gold); border-radius: 0; background: transparent; color: var(--cream); font: 400 19px/1.6 var(--serif); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #a99d80; opacity: 1; }
.form-field textarea { resize: vertical; }
.submit-button { width: 100%; margin-top: 32px; min-height: 54px; padding: 14px; border: 0; border-radius: 0; background: linear-gradient(100deg, #b88a3e 0%, #e6c878 35%, #f3e2a9 50%, #d9b76a 70%, #b88a3e 100%); color: var(--dark); font: 500 15px/1.6 var(--display); letter-spacing: 0.18em; text-transform: uppercase; }
.submit-button:hover { filter: brightness(1.08); }
.form-status { margin-top: 24px; padding: 16px; border: 1px solid var(--gold); }
.form-status--error { border-color: #e6a397; color: #f3c6bb; }
.form-feedback { margin-top: 16px; font-size: 17px; }
.form-feedback:empty { display: none; }
.invitation-footer { padding-block: 64px 72px; text-align: center; }
.footer-wheat { width: 80px; height: 96px; }
.footer-names { margin-top: 12px; font: 400 34px/1.4 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.footer-date { margin-top: 4px; font-size: 20px; font-style: italic; }
.footer-note { margin-top: 16px; white-space: pre-line; }
.wedday-credit { display: inline-block; margin-top: 16px; font-size: 14px; }

@media (max-width: 840px) {
  .site-header { justify-content: center; gap: 12px; padding-block: 20px; text-align: center; }
  .header-monogram { width: 100%; justify-content: center; }
  .site-header nav { justify-content: center; gap: 8px 24px; }
  .hero { padding-block: 24px 72px; }
  .hero-wheat { width: 120px; height: 144px; }
  .hero-eyebrow { max-width: 560px; margin-inline: auto; }
  .hero-photo-stage { padding-bottom: 80px; }
  .countdown { gap: 24px 40px; }
  .countdown-intro { flex-basis: 100%; }
  .couple-section, .events-section { padding-block: 72px; }
  .couple-portraits { gap: 48px 56px; margin-top: 40px; }
  .family-section { margin-top: 48px; gap: 32px; }
  .story-section { padding-block: 72px; }
  .story-message { font-size: 21px; }
  .story-section .invitation-story-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .event-grid { margin-top: 40px; }
  .rsvp-section { padding-block: 72px; }
  .rsvp-card h2 { font-size: 40px; }
}

@media (max-width: 620px) {
  .container { padding-inline: 20px; }
  .hero { padding-bottom: 60px; }
  .hero-eyebrow { font-size: 12px; letter-spacing: 0.2em; }
  h1 { font-size: clamp(48px, 11.5vw, 72px); letter-spacing: 0.02em; }
  .hero-gold-flecks { opacity: 0.55; }
  .hero-photo-stage { padding-inline: 28px; padding-bottom: 64px; }
  .hero-photo-frame { padding: 6px; outline-offset: 6px; }
  .countdown-section { padding-block: 48px; }
  .countdown { column-gap: 30px; }
  .countdown-unit > [data-countdown-unit] { font-size: 48px; }
  .couple-portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .portrait { padding: 5px; }
  .person h3 { font-size: 30px; }
  .person figcaption p { font-size: 18px; }
  .story-section .invitation-story-gallery { margin-top: 40px; }
  .story-section .invitation-story-gallery__grid { grid-template-columns: 1fr; gap: 28px; }
  .story-section .invitation-story-gallery__photo:nth-child(2) { margin-top: 0; }
  .event-grid, .form-grid { grid-template-columns: 1fr; }
  .rsvp-card { padding: 32px 28px; }
  .rsvp-card h2 { font-size: 32px; letter-spacing: 0.03em; }
  .attendance-field { flex-direction: column; }
  .attendance-field label { flex: none; min-height: 50px; }
}

@media (max-width: 380px) {
  .site-header nav { gap: 4px 18px; font-size: 11px; }
  .countdown { column-gap: 22px; }
  .countdown-unit > [data-countdown-unit] { font-size: 40px; }
  .countdown-label { font-size: 11px; }
  .couple-portraits { gap: 20px; }
  .rsvp-section { padding-inline: 20px; }
  .rsvp-card { padding-inline: 22px; }
  .rsvp-card h2 { font-size: 26px; }
  .submit-button { font-size: 13px; letter-spacing: 0.1em; }
  .footer-names { font-size: 28px; }
}

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

@media (forced-colors: active) {
  .foil { background: none; color: CanvasText; }
}
