:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --ink: #3a3532;
  --muted: #6b625c;
  --accent: #a8513e;
  --line: #bfb5ab;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { position: relative; margin: 0; background: var(--paper); color: var(--ink); font: 300 17px/1.65 var(--sans); }
body::before { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; background: url("assets/paper.svg"); mix-blend-mode: multiply; opacity: 0.5; }
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.7 var(--sans); letter-spacing: 0.2em; 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-path: inset(50%); white-space: nowrap; border: 0; }
.watercolor-definitions { position: absolute; }
.wash-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wash-layer > svg { position: absolute; left: 50%; transform: translateX(-50%); overflow: visible; }

.site-header { position: relative; 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); }
.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 { position: relative; padding-block: 40px 96px; text-align: center; }
.hero-wash { top: -20px; width: 1100px; height: 660px; }
.hero-content { position: relative; }
.hero-eyebrow { margin-top: 40px; font-size: 14px; letter-spacing: 0.24em; }
h1 { margin-top: 14px; font-size: clamp(72px, 11vw, 140px); line-height: 0.95; letter-spacing: -0.02em; }
.hero-name { display: inline-block; max-width: 100%; }
.hero-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; margin-top: 28px; font: 26px/1.5 var(--serif); }
.wedding-date:has(+ .hero-location)::after { content: " ·"; }
.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; margin-top: 6px; color: var(--muted); font-size: 16px; }
.countdown > span { white-space: nowrap; }
.countdown > span:not(:last-child)::after { content: " ·"; margin-left: 8px; }
.countdown [data-countdown-unit] { font-variant-numeric: tabular-nums; }
.hero-button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 28px; padding: 10px 30px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 16px; font-weight: 600; }
.hero-button:hover { background: var(--accent); color: #fff; }
.hero-collage { position: relative; display: grid; grid-template-columns: 3fr 4fr 3fr; align-items: end; gap: 24px; max-width: 848px; margin: 80px auto 0; padding-inline: 8px; }
.hero-photo { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
.hero-photo--left { transform: rotate(-4deg); }
.hero-photo--center { aspect-ratio: 4 / 5; }
.hero-photo--right { transform: rotate(4deg); }

.couple-section { padding-block: 72px 104px; text-align: center; }
.couple-section > .container { max-width: 1048px; }
.couple-portraits { display: flex; flex-wrap: wrap; justify-content: center; gap: 56px 120px; margin-top: 64px; }
.person { position: relative; flex: 0 1 260px; min-width: 0; }
.portrait { position: relative; width: min(220px, 100%); margin-inline: auto; }
.portrait-wash { position: absolute; left: 50%; top: -30px; width: 155%; height: auto; aspect-ratio: 1; transform: translateX(-50%); overflow: visible; pointer-events: none; }
.portrait img { position: relative; width: 100%; height: auto; aspect-ratio: 22 / 26; object-fit: cover; object-position: top; border-radius: 50%; }
.person figcaption { position: relative; margin-top: 40px; }
.person h3 { font-size: 36px; line-height: 1.3; }
.person figcaption p { margin-top: 8px; color: var(--muted); white-space: pre-line; }
.family-section { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 64px; margin-top: 64px; }
.family-group { flex: 0 1 280px; min-width: 0; }
.family-pair + .family-pair { margin-top: 24px; }
.family-pair p { margin-top: 4px; font: 24px/1.5 var(--serif); }

.story-section { position: relative; padding-block: 72px 104px; }
.story-wash { top: 20px; width: 900px; height: 340px; }
.story-heading { position: relative; max-width: 680px; margin-inline: auto; text-align: center; }
.story-message { font: 22px/1.6 var(--serif); }
.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 { position: relative; max-width: none; margin-top: 96px; }
.story-section .invitation-story-gallery__grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.story-section .invitation-story-gallery__photo { aspect-ratio: 1; border-radius: 16px; }

.events-section { padding-block: 72px 104px; }
.events-section h2, .events-date { text-align: center; }
.events-date { margin-top: 10px; font-size: 14px; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 56px 28px; margin-top: 64px; }
.event-card { min-width: 0; text-align: center; }
.event-photo-stage { position: relative; }
.event-wash { position: absolute; top: -30px; left: 50%; width: min(340px, 110%); height: auto; aspect-ratio: 300 / 200; transform: translateX(-50%); overflow: visible; color: #f2b9a0; pointer-events: none; }
.event-card:nth-child(2) .event-wash { color: #b9c9ae; }
.event-card:nth-child(3) .event-wash { color: #ebc3c8; }
.event-photo { position: relative; width: 86%; height: auto; margin-inline: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; }
.event-details { position: relative; padding-top: 24px; }
.event-time { font: 40px/1 var(--serif); }
.event-card h3 { margin-top: 8px; font: 600 14px/1.7 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.event-date { margin-top: 8px; color: var(--muted); font-size: 14px; }
.event-location, .event-address, .event-description { max-width: 300px; margin-inline: auto; color: var(--muted); }
.event-location { margin-top: 8px; }
.event-description { margin-top: 12px; font-size: 15px; 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; text-decoration: underline; font-size: 15px; font-weight: 600; }

.rsvp-section { position: relative; padding: 96px 24px; }
.rsvp-wash { top: 40px; width: 900px; height: 800px; }
.rsvp-card { position: relative; max-width: 726px; margin-inline: auto; padding: clamp(28px, 6vw, 52px); border-radius: 20px; background: rgba(251, 248, 243, 0.92); box-shadow: 0 30px 60px -40px rgba(58, 53, 50, 0.45); }
.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); 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: 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(--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: 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; width: 100%; min-height: 44px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 300 17px/1.6 var(--sans); }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--muted); 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: #8c4232; }
.form-status { margin-top: 24px; padding: 16px; border: 1px solid #5e7356; 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 { position: relative; padding-block: 24px 88px; text-align: center; }
.footer-wash { top: 0; width: 420px; height: 170px; }
.invitation-footer > .container { position: relative; }
.footer-names { margin-top: 32px; 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; white-space: pre-line; }
.wedday-credit { display: inline-block; margin-top: 16px; font-size: 12px; }

@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-wash { width: 950px; height: 570px; }
  .hero-details { font-size: 24px; }
  .hero-collage { margin-top: 64px; gap: 20px; padding-inline: 12px; }
  .couple-section, .events-section { padding-block: 64px 72px; }
  .couple-portraits { gap: 48px 72px; margin-top: 56px; }
  .family-section { margin-top: 48px; gap: 28px 40px; }
  .story-section { padding-block: 72px; }
  .story-wash { width: 800px; height: 340px; }
  .story-section .invitation-story-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rsvp-section { padding-block: 72px; }
  .rsvp-card h2 { font-size: 44px; }
}

@media (max-width: 620px) {
  .container { padding-inline: 20px; }
  .hero-wash { top: 0; width: 750px; height: 600px; }
  .hero-eyebrow { margin-top: 28px; font-size: 12px; }
  h1 { font-size: clamp(56px, 12vw, 74px); }
  .hero-name { display: block; }
  .hero-conjunction { display: block; font-size: 0.55em; line-height: 1.5; }
  .hero-details { display: block; font-size: 22px; }
  .hero-location { display: block; }
  .wedding-date:has(+ .hero-location)::after { content: none; }
  .hero-collage { gap: 12px; margin-top: 56px; padding-inline: 6px; }
  .hero-photo { border-radius: 10px; }
  .couple-portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .portrait { width: 90%; }
  .portrait-wash { top: -18px; width: 140%; }
  .person h3 { font-size: 30px; }
  .person figcaption { margin-top: 28px; }
  .person figcaption p { font-size: 15px; }
  .family-section { flex-direction: column; }
  .family-group { flex: none; }
  .story-message { font-size: 20px; }
  .story-wash { top: 28px; width: 680px; height: 340px; }
  .story-section .invitation-story-gallery { margin-top: 64px; }
  .story-section .invitation-story-gallery__grid { gap: 16px; }
  .event-grid, .form-grid { grid-template-columns: 1fr; }
  .rsvp-wash { width: 680px; height: 1000px; }
  .rsvp-card { padding: 32px 24px; }
  .attendance-field { gap: 8px; }
  .attendance-field label { padding-inline: 8px; gap: 6px; font-size: 13px; }
}

@media (max-width: 380px) {
  .site-header nav { gap: 4px 18px; font-size: 14px; }
  .countdown { font-size: 14px; gap: 0 6px; }
  .countdown > span:not(:last-child)::after { margin-left: 6px; }
  .couple-portraits { gap: 28px; }
  .rsvp-section { padding-inline: 20px; }
  .rsvp-card { padding-inline: 20px; }
  .rsvp-card h2 { font-size: 36px; }
  .attendance-field { flex-direction: column; }
  .attendance-field label { flex: none; font-size: 15px; }
  .footer-names { font-size: 36px; }
}

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