:root {
  color-scheme: light;
  --background: #fbf8f1;
  --cream: #f2ede0;
  --ink: #2c2a24;
  --muted: #5c574c;
  --accent: #b8322a;
  --line: #ded5c2;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Mulish", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--ink); font: 300 17px/1.65 var(--sans); }
a { color: inherit; text-underline-offset: 4px; }
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, h3 { font-family: var(--serif); font-weight: 400; font-style: italic; }
h2 { font-size: clamp(40px, 4.7vw, 60px); line-height: 1; }
section { scroll-margin-top: 24px; }
.container { width: 100%; max-width: 1208px; margin-inline: auto; padding-inline: 24px; }
.eyebrow { color: var(--accent); font: 600 13px/1.6 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 10; padding: 12px; background: var(--background); }
.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; }
.flower-definitions { position: absolute; }
.meadow-border { display: block; width: 100%; height: auto; min-height: 200px; }

.site-header { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-block: 28px; }
.header-monogram { font: italic 24px/1.3 var(--serif); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 400; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.hero { text-align: center; }
.hero-content { max-width: 1048px; padding-top: 40px; padding-bottom: 24px; }
.hero-bouquet { width: 120px; height: 90px; }
h1 { margin-top: 12px; font-size: clamp(72px, 11vw, 144px); line-height: 0.92; letter-spacing: -0.02em; }
h1 > span { display: block; }
.hero-conjunction { margin-top: 24px; color: var(--accent); font-size: 0.4em; font-style: normal; line-height: 1.4; letter-spacing: 0.1em; }
.wedding-date { display: block; margin-top: 32px; font: 26px/1.5 var(--serif); }
.countdown { margin-top: 4px; color: var(--muted); font-size: 16px; }
.countdown span { font-variant-numeric: tabular-nums; }
.hero-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 30px; padding: 10px 30px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-size: 16px; font-weight: 600; }
.hero-button:hover { background: #922821; color: #fff; }

.couple-section { padding-block: 100px 104px; background: var(--cream); text-align: center; }
.couple-section > .container { max-width: 1048px; }
.couple-portraits { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 96px; margin-top: 56px; }
.person { flex: 0 1 260px; min-width: 0; }
.portrait { position: relative; width: min(230px, 100%); margin-inline: auto; }
.portrait img { width: 100%; height: auto; aspect-ratio: 23 / 30; object-fit: cover; object-position: top; border-radius: 50%; }
.portrait-flowers { position: absolute; right: -24px; bottom: -30px; width: 90px; height: 124px; pointer-events: none; }
.person--groom .portrait-flowers { left: -24px; right: auto; }
.person figcaption { margin-top: 28px; }
.person h3 { font-size: 36px; line-height: 1.3; }
.person figcaption p { margin-top: 8px; color: var(--muted); }
.family-section { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 0; margin-top: 64px; }
.family-group { flex: 1 1 260px; min-width: 0; padding-inline: 20px; }
.family-group + .family-group { border-left: 1px solid #d5ccb8; }
.family-pair + .family-pair { margin-top: 24px; }
.family-pair p { margin-top: 6px; font: 22px/1.5 var(--serif); }

.story-section { padding-block: 104px 96px; }
.story-heading { max-width: 680px; margin-inline: auto; text-align: center; }
.story-message { font-size: 19px; }
.story-message p { margin-top: 24px; }
.story-signature, .story-video { margin-top: 18px; }
.story-signature { font: italic 24px/1.5 var(--serif); }
.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 28px; }
.story-section .invitation-story-gallery__photo { position: relative; aspect-ratio: 4 / 5; overflow: visible; border-radius: 6px; }
.story-section .invitation-story-gallery__photo img { border-radius: 6px; }
.story-section .invitation-story-gallery__photo::after { content: ""; position: absolute; left: -18px; top: -26px; width: 52px; height: 120px; background: url("assets/poppy.svg") center / contain no-repeat; transform: rotate(-24deg); pointer-events: none; }
.story-section .invitation-story-gallery__photo:nth-child(2)::after { left: auto; right: -16px; background-image: url("assets/cornflower.svg"); transform: rotate(22deg); }
.story-section .invitation-story-gallery__photo:nth-child(3)::after { background-image: url("assets/chamomile.svg"); transform: rotate(-18deg); }

.events-section { padding-block: 100px 104px; background: var(--cream); }
.events-section h2, .events-date { text-align: center; }
.events-date { margin-top: 12px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; margin-top: 52px; }
.event-card { min-width: 0; background: var(--background); border-radius: 10px; overflow: hidden; }
.event-photo { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.event-details { padding: 24px 26px 28px; }
.event-time-row { display: flex; align-items: center; gap: 12px; }
.event-flower { width: 40px; height: 40px; flex-shrink: 0; }
.event-time { font: 30px/1.3 var(--serif); }
.event-card h3 { margin-top: 10px; font-size: 28px; line-height: 1.3; }
.event-date { margin-top: 8px; color: var(--muted); font-size: 14px; }
.event-location { margin-top: 6px; color: var(--muted); }
.event-address { color: var(--muted); }
.event-description { margin-top: 12px; color: var(--muted); font-size: 15px; }
.event-card .invitation-navigation { justify-content: flex-start; gap: 12px 24px; margin-top: 14px; }
.event-card .invitation-navigation a { padding: 0; border: 0; border-radius: 0; text-decoration: underline; font-size: 15px; font-weight: 600; }

.rsvp-section { padding-top: 104px; padding-bottom: 40px; }
.rsvp-card { max-width: 746px; margin-inline: auto; padding: clamp(28px, 6vw, 52px); border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rsvp-card h2 { text-align: center; font-size: 52px; }
.rsvp-intro, .rsvp-deadline, .guest-greeting { max-width: 440px; margin: 14px auto 0; text-align: center; color: var(--muted); }
.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: 8px; min-width: 0; min-height: 48px; padding: 8px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 16px; font-weight: 400; text-align: center; cursor: pointer; }
.attendance-field label:has(input:checked) { background: var(--ink); color: var(--background); }
.attendance-field input { flex-shrink: 0; margin: 0; accent-color: var(--background); }
.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 { font-size: 14px; font-weight: 600; }
.form-field input, .form-field textarea { min-width: 0; max-width: 100%; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid #bdb29c; border-radius: 0; background: transparent; color: var(--ink); font: 300 17px/1.6 var(--sans); }
.form-field input::placeholder, .form-field textarea::placeholder { color: #6d685e; opacity: 1; }
.form-field textarea { resize: vertical; }
.submit-button { width: 100%; margin-top: 30px; min-height: 54px; padding: 14px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; }
.submit-button:hover { background: #922821; }
.form-status { margin-top: 24px; padding: 16px; border: 1px solid #5e7a3a; border-radius: 6px; }
.form-status--error { border-color: var(--accent); }
.form-feedback { margin-top: 16px; font-size: 14px; }
.form-feedback:empty { display: none; }
.invitation-footer { padding-top: 56px; text-align: center; }
.footer-names { font: italic 44px/1.1 var(--serif); }
.footer-date { margin-top: 6px; color: var(--muted); font-size: 14px; letter-spacing: 0.24em; }
.footer-note { margin-top: 16px; }
.wedday-credit { display: inline-block; margin-top: 16px; font-size: 12px; }
.invitation-footer .meadow-border { margin-top: 16px; transform: scaleX(-1); }

@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-content { padding-top: 24px; }
  .hero-bouquet { width: 100px; height: 75px; }
  .wedding-date { font-size: 24px; }
  .meadow-border { min-height: 160px; }
  .couple-section, .events-section { padding-block: 64px 72px; }
  .couple-portraits { gap: 48px 56px; margin-top: 40px; }
  .family-section { flex-direction: column; gap: 24px; margin-top: 48px; }
  .family-group { flex: none; }
  .family-group + .family-group { border-left: 0; }
  .story-section { padding-block: 72px; }
  .story-message { font-size: 18px; }
  .story-section .invitation-story-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .story-section .invitation-story-gallery__photo::after { left: 0; top: -20px; transform: rotate(-12deg); }
  .story-section .invitation-story-gallery__photo:nth-child(2)::after { left: auto; right: 0; transform: rotate(12deg); }
  .event-grid { margin-top: 40px; }
  .rsvp-section { padding-top: 72px; }
  .rsvp-card h2 { font-size: 44px; }
}

@media (max-width: 620px) {
  .couple-portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .portrait-flowers { right: -12px; bottom: -20px; width: 60px; height: 83px; }
  .person--groom .portrait-flowers { left: -12px; }
  .person h3 { font-size: 30px; }
  .person figcaption p { font-size: 15px; }
  .story-section .invitation-story-gallery__grid { grid-template-columns: 1fr; gap: 40px; }
  .event-grid, .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .container { padding-inline: 20px; }
  .site-header nav { gap: 4px 18px; font-size: 14px; }
  .hero-conjunction { margin-top: 18px; }
  .countdown { font-size: 15px; }
  .couple-portraits { gap: 20px; }
  .rsvp-card { padding: 28px 20px; }
  .rsvp-card h2 { font-size: 38px; }
  .attendance-field { gap: 8px; }
  .attendance-field label { gap: 6px; padding-inline: 8px; font-size: 13px; }
  .footer-names { font-size: 36px; }
}

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