:root {
  color-scheme: light;
  --background: #f4efe6;
  --paper: #fffdf9;
  --ink: #1e1b18;
  --muted: #5e5650;
  --accent: #a3242b;
  --line: #dcd3c4;
  --serif: "Spectral", Georgia, serif;
  --sans: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font: 400 16px/1.6 var(--sans); }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); 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 { font-family: var(--serif); font-weight: 300; line-height: 1; }
h2 { font-size: clamp(40px, 4.7vw, 60px); }
section { scroll-margin-top: 24px; }
.container { width: 100%; max-width: 1148px; margin-inline: auto; padding-inline: 24px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 12px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.embroidery-definitions { position: absolute; color: var(--accent); }
.embroidery-band { display: block; width: 100%; height: 63px; color: var(--accent); }
.embroidery-band--top { margin-top: 20px; }
.section-motif { width: 40px; height: 40px; color: var(--accent); }

.site-header { padding-top: 16px; }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 36px; font-size: 14px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.hero { max-width: 948px; padding-top: 80px; padding-bottom: 104px; text-align: center; }
.hero-godparents { margin-top: 22px; }
.hero-godparents:first-child { margin-top: 0; }
.family-list { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px; margin: 10px 0 0; padding: 0; list-style: none; font: 22px/1.5 var(--serif); }
.family-pair { max-width: 100%; overflow-wrap: anywhere; }
.family-pair + .family-pair::before { content: "·"; margin-right: 12px; }
h1 { margin-top: 48px; font-size: clamp(72px, 11vw, 140px); line-height: 0.95; letter-spacing: -0.02em; }
h1 > span, h1 > em { display: block; }
h1 > em { color: var(--accent); font-size: 0.55em; font-weight: 300; }
.hero-invitation { max-width: 520px; margin: 36px auto 0; font: italic 24px/1.5 var(--serif); }
.wedding-date { display: block; margin-top: 44px; font-size: 14px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.wedding-date__row { display: flex; justify-content: center; align-items: center; gap: 28px; }
.wedding-date__label { min-width: 120px; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.wedding-date__day { color: var(--accent); font: 300 72px/1 var(--serif); letter-spacing: 0; }
.wedding-date__year { display: block; margin-top: 10px; letter-spacing: 0.3em; }

.countdown-section { background: var(--paper); border-block: 1px solid var(--line); }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 56px; max-width: 948px; padding-block: 36px; }
.countdown > p { font: italic 22px/1.5 var(--serif); }
.countdown-units { display: flex; align-items: center; gap: 56px; }
.countdown-unit { text-align: center; }
[data-countdown-unit] { display: block; font: 300 52px/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.countdown-motif { width: 18px; height: 18px; color: var(--accent); }

.couple-section { max-width: 1048px; padding-block: 112px 104px; text-align: center; }
.couple-section h2 { margin-top: 12px; }
.couple-portraits { display: flex; flex-wrap: wrap; justify-content: center; gap: 56px 96px; margin-top: 64px; }
.person { flex: 0 1 280px; min-width: 0; }
.portrait { position: relative; margin: 14px; }
.portrait-stitches { position: absolute; left: -14px; top: -14px; width: calc(100% + 28px); height: calc(100% + 28px); color: var(--accent); }
.portrait img { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.person figcaption { margin-top: 28px; }
.person h3 { font: 400 34px/1.2 var(--serif); }
.person figcaption p { margin-top: 6px; color: var(--muted); }

.story-section { background: var(--paper); border-block: 1px solid var(--line); }
.story-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; padding-block: 104px; }
.story-copy { flex: 1 1 320px; min-width: 0; }
.story-copy .section-motif { width: 32px; height: 32px; }
.story-copy h2 { margin-top: 12px; font-size: 56px; line-height: 1.05; }
.story-message { font: 21px/1.6 var(--serif); }
.story-message p { margin-top: 24px; }
.story-signature { margin-top: 24px; font: italic 22px/1.5 var(--serif); }
.story-video { margin-top: 24px; }
.story-layout--text-only { max-width: 728px; text-align: center; }
.story-section .invitation-story-gallery { flex: 1 1 520px; min-width: 0; margin: 0; }
.story-section .invitation-story-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.story-section .invitation-story-gallery__photo { aspect-ratio: 1; border-radius: 0; }

.events-section { padding-block: 112px 104px; }
.events-section > h2, .events-date { text-align: center; }
.events-date { margin-top: 14px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 56px; border-top: 1px solid var(--ink); }
.event-card { min-width: 0; padding: 32px 28px; border-right: 1px solid var(--line); text-align: center; }
.event-card:last-child { border-right: 0; }
.event-time { display: block; color: var(--accent); font: 300 52px/1 var(--serif); }
.event-card h3 { margin-top: 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.event-date { margin-top: 6px; color: var(--muted); font-size: 13px; }
.event-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; margin-top: 20px; object-fit: cover; }
.event-location { margin-top: 16px; font: 18px/1.6 var(--serif); }
.event-address { font: 18px/1.6 var(--serif); }
.event-description { margin-top: 12px; color: var(--muted); font-size: 15px; }
.event-card .invitation-navigation { gap: 8px 24px; }
.event-card .invitation-navigation a { border: 0; border-radius: 0; padding: 0; text-decoration: underline; font-weight: 500; }

.rsvp-section { padding-top: 24px; padding-bottom: 112px; }
.rsvp-card { max-width: 680px; margin-inline: auto; background: var(--paper); border: 1px solid var(--line); }
.rsvp-card > .embroidery-band { margin-top: 28px; }
.rsvp-content { padding: 40px clamp(24px, 6vw, 56px) 52px; }
.rsvp-content h2 { text-align: center; font-size: 52px; }
.rsvp-intro, .rsvp-deadline, .guest-greeting { max-width: 440px; margin: 16px auto 0; text-align: center; color: var(--muted); }
.attendance-field { display: flex; gap: 12px; margin: 32px 0 0; padding: 0; border: 0; }
.attendance-field label { display: flex; flex: 1; align-items: center; justify-content: center; gap: 10px; min-height: 50px; min-width: 0; padding: 10px 8px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.attendance-field label:has(input:checked) { background: var(--ink); color: var(--paper); }
.attendance-field input { flex-shrink: 0; margin: 0; accent-color: var(--paper); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field[hidden] { display: none; }
.form-field--full { grid-column: 1 / -1; }
.form-field > label { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.form-field input, .form-field textarea { min-width: 0; max-width: 100%; width: 100%; padding: 12px 14px; border: 1px solid #a39a8c; border-radius: 0; background: var(--background); color: var(--ink); font: 16px/1.6 var(--sans); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #6e675c; opacity: 1; }
.form-field textarea { resize: vertical; }
.submit-button { width: 100%; margin-top: 28px; min-height: 54px; padding: 14px; border: 0; background: var(--accent); color: var(--paper); font-size: 14px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.submit-button:hover { background: #801c22; }
.form-status { margin-top: 24px; padding: 16px; border: 1px solid #687456; }
.form-status--error { border-color: var(--accent); }
.form-feedback { margin-top: 16px; font-size: 14px; }
.form-feedback:empty { display: none; }
.invitation-footer { padding-bottom: 20px; text-align: center; }
.footer-names { font: 300 44px/1.1 var(--serif); }
.footer-names em { color: var(--accent); }
.footer-date { margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.3em; }
.footer-note { margin-top: 16px; font: italic 18px/1.5 var(--serif); }
.wedday-credit { display: inline-block; margin-top: 16px; font-size: 12px; }
.invitation-footer > .embroidery-band { margin-top: 40px; }

@media (max-width: 760px) {
  .site-header nav { gap: 8px 24px; font-size: 12px; }
  .hero { padding-block: 56px 72px; }
  .hero .eyebrow { font-size: 12px; letter-spacing: 0.18em; }
  .family-list { font-size: 20px; }
  .hero-invitation { font-size: 22px; }
  .countdown { gap: 24px; padding-block: 28px; }
  .countdown > p { width: 100%; text-align: center; }
  .countdown-units { gap: 28px; }
  .couple-section, .events-section { padding-block: 72px; }
  .couple-portraits { gap: 48px; margin-top: 48px; }
  .person { flex-basis: 260px; }
  .story-layout { padding-block: 64px; gap: 36px; }
  .story-copy h2 { font-size: 44px; }
  .story-message { font-size: 20px; }
  .event-grid { margin-top: 36px; }
  .event-card { padding-inline: 20px; }
  .rsvp-section { padding-bottom: 72px; }
  .rsvp-content h2 { font-size: 44px; }
  .rsvp-content { padding: 32px 24px 40px; }
}

@media (max-width: 620px) {
  .event-grid { grid-template-columns: 1fr; }
  .event-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .event-card:last-child { border-bottom: 0; }
  .event-photo { max-width: 400px; margin-inline: auto; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .container { padding-inline: 20px; }
  .site-header nav { gap: 4px 20px; font-size: 11px; letter-spacing: 0.1em; }
  .wedding-date { font-size: 11px; letter-spacing: 0.12em; }
  .wedding-date__row { gap: 16px; }
  .wedding-date__label { min-width: 0; flex: 1; max-width: 120px; }
  .wedding-date__day { font-size: 64px; }
  .countdown-units { gap: 18px; }
  [data-countdown-unit] { font-size: 44px; }
  .attendance-field { gap: 8px; }
  .attendance-field label { gap: 6px; font-size: 11px; letter-spacing: 0.05em; }
  .rsvp-content { padding-inline: 20px; }
}

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