:root {
  color-scheme: light;
  --paper: #f4f1f6;
  --cream: #fbf9f5;
  --ink: #3b2f4a;
  --muted: #5e536b;
  --accent: #6a5596;
  --pale: #eee9f4;
  --line: #d9d0e6;
  --serif: "Literata", Georgia, serif;
  --sans: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); 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: 300; }
h2 { font-size: clamp(40px, 4.7vw, 58px); line-height: 1.02; }
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.16em; 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; }
.lavender-definitions { position: absolute; }
.lavender-border { display: block; width: 100%; height: 260px; pointer-events: none; }

.site-header { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding-block: 28px; }
.header-names { font: italic 300 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-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px 72px; align-items: center; padding-top: 40px; }
.hero-eyebrow { font-size: 14px; letter-spacing: 0.22em; }
h1 { margin-top: 16px; font-size: clamp(68px, 9vw, 120px); line-height: 0.98; letter-spacing: -0.02em; }
.hero-name { display: inline-block; max-width: 100%; }
.hero-conjunction { font-style: italic; color: var(--accent); }
.hero-details { margin-top: 28px; font: 300 26px/1.3 var(--serif); }
.wedding-date { display: block; }
.hero-location { display: block; margin-top: 6px; font-size: 22px; font-style: italic; }
.countdown { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; font-size: 15px; }
.countdown > span { padding: 8px 18px; border-radius: 999px; background: #e6dff0; white-space: nowrap; }
.countdown [data-countdown-unit] { font: 400 22px/1.4 var(--serif); 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: var(--cream); text-decoration: none; font-size: 16px; font-weight: 600; }
.hero-button:hover, .submit-button:hover { background: #554279; color: #fff; }
.hero-photo-stage { position: relative; min-width: 0; }
.hero-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 220px 220px 28px 28px; filter: saturate(0.85) hue-rotate(-8deg); }
.hero-bouquet { position: absolute; left: -36px; bottom: -40px; width: 130px; height: 310px; transform: rotate(-14deg); pointer-events: none; }
.hero > .lavender-border { margin-top: 56px; }

.couple-section { padding-block: 100px 104px; background: var(--cream); text-align: center; }
.couple-section > .container { max-width: 1008px; }
.couple-portraits { position: relative; display: flex; justify-content: center; gap: 80px 180px; margin-top: 56px; }
.person { flex: 0 1 280px; min-width: 0; }
.portrait { width: min(240px, 100%); margin-inline: auto; padding: 7px; border: 2px solid var(--line); border-radius: 50%; }
.portrait img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.person figcaption { margin-top: 22px; }
.person h3 { font-size: 34px; font-style: italic; }
.person figcaption p { margin-top: 4px; color: var(--muted); white-space: pre-line; }
.couple-bouquet { position: absolute; top: 110px; left: 50%; width: 90px; height: 150px; transform: translateX(-50%); pointer-events: none; }
.family-section { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 60px; }
.family-group { display: contents; }
.family-pair { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; max-width: 100%; padding: 16px 28px; border-radius: 999px; background: var(--pale); }
.family-pair p { min-width: 0; font: 300 20px/1.5 var(--serif); }

.story-section { padding-block: 104px 96px; }
.story-layout { display: grid; grid-template-columns: minmax(0, 454fr) minmax(0, 634fr); gap: 48px 72px; align-items: center; }
.story-layout:not(:has(.story-photos)) { grid-template-columns: minmax(0, 1fr); max-width: 848px; text-align: center; }
.story-heading h2 em { color: var(--accent); }
.story-message { margin-top: 24px; font: 300 22px/1.55 var(--serif); }
.story-message p + p { margin-top: 16px; }
.story-signature { margin-top: 20px; font: italic 300 22px/1.5 var(--serif); }
.story-video { margin-top: 16px; font-size: 15px; }
.story-photos { position: relative; min-width: 0; }
.story-section .invitation-story-gallery { margin: 0; }
.story-section .invitation-story-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.story-section .invitation-story-gallery__photo { aspect-ratio: 4 / 3; border-radius: 22px; }
.story-section .invitation-story-gallery__photo:nth-child(-n+2) { aspect-ratio: 4 / 5; }
.story-section .invitation-story-gallery__photo:nth-child(even) { margin-top: 48px; }
.story-lavender { position: absolute; left: 44%; top: 36%; width: 40px; height: 300px; transform: rotate(38deg); pointer-events: none; }

.events-section { padding-block: 100px 104px; background: var(--pale); }
.events-section h2, .events-date { text-align: center; }
.events-date { margin-top: 10px; font-size: 14px; letter-spacing: 0.2em; }
.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; padding: 14px 14px 28px; border-radius: 26px; background: var(--cream); }
.event-photo { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 16px; }
.event-details { padding: 20px 12px 0; }
.event-time-row { display: flex; align-items: center; gap: 10px; }
.event-time-row svg { flex-shrink: 0; width: 12px; height: 56px; }
.event-time { font: 300 34px/1.3 var(--serif); }
.event-card h3 { margin-top: 6px; font-size: 26px; font-weight: 400; font-style: italic; }
.event-details p { margin-top: 6px; color: var(--muted); }
.event-date { font-size: 14px; }
.event-description { white-space: pre-line; }
.fine-line .invitation-navigation { justify-content: flex-start; gap: 10px; margin-top: 14px; }
.fine-line .invitation-navigation a { padding: 8px 18px; border: 0; border-radius: 999px; background: var(--pale); font-size: 15px; font-weight: 600; }

.rsvp-section { padding: 140px 24px 72px; }
.rsvp-card { position: relative; width: 100%; max-width: 640px; margin-inline: auto; padding: 80px clamp(24px, 6vw, 52px) 48px; border-radius: 30px; background: var(--cream); box-shadow: 0 30px 60px -40px rgb(59 47 74 / 45%); }
.rsvp-bouquet { position: absolute; left: 50%; top: -110px; width: 80px; height: 190px; transform: translateX(-50%); pointer-events: none; }
.rsvp-card h2 { text-align: center; font-size: 50px; }
.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: 4px; margin: 30px 0 0; padding: 4px; border: 0; border-radius: 999px; background: var(--pale); }
.attendance-field label { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 46px; padding: 8px; border-radius: 999px; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
.attendance-field label:has(input:checked) { background: var(--accent); color: var(--cream); }
.attendance-field input { flex-shrink: 0; margin: 0; accent-color: var(--cream); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.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: 14px; font-weight: 600; }
.form-field input, .form-field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); font: 300 16px/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%; min-height: 54px; margin-top: 26px; padding: 14px; border: 0; border-radius: 999px; background: var(--accent); color: var(--cream); font-size: 17px; font-weight: 600; }
.form-status { margin-top: 24px; padding: 16px; border: 1px solid #5e7356; border-radius: 16px; }
.form-status--error { border-color: #9b3942; }
.form-feedback { margin-top: 16px; font-size: 14px; }
.form-feedback:empty { display: none; }
.invitation-footer { text-align: center; }
.footer-names { margin-top: 24px; font: italic 300 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; }
.invitation-footer .lavender-border { height: 200px; margin-top: 32px; }

@media (max-width: 840px) {
  .site-header { justify-content: center; gap: 12px; padding-block: 20px; text-align: center; }
  .header-names { width: 100%; justify-content: center; }
  .site-header nav { justify-content: center; gap: 8px 24px; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 24px; text-align: center; }
  .countdown { justify-content: center; }
  .hero-photo-stage { width: min(100%, 520px); margin-inline: auto; }
  .hero-bouquet { left: -16px; }
  .hero > .lavender-border { height: 180px; margin-top: 24px; }
  .couple-section, .events-section { padding-block: 64px 72px; }
  .couple-portraits { gap: 96px; }
  .couple-bouquet { top: 100px; width: 76px; height: 140px; }
  .story-section { padding-block: 72px; }
  .story-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story-heading { max-width: 640px; }
  .story-heading h2 br { display: none; }
  .story-photos { width: 100%; max-width: 620px; margin-inline: auto; }
  .rsvp-section { padding-top: 132px; }
}

@media (max-width: 620px) {
  .container { padding-inline: 20px; }
  h1 { font-size: clamp(54px, 13vw, 76px); }
  .hero-details { font-size: 23px; }
  .hero-location { font-size: 21px; }
  .hero-bouquet { left: -10px; bottom: -34px; width: 90px; height: 220px; }
  .countdown { gap: 8px; }
  .countdown > span { padding: 8px 12px; }
  .couple-portraits { gap: 44px; }
  .couple-bouquet { top: 56px; width: 44px; height: 104px; }
  .portrait { padding: 4px; }
  .person h3 { font-size: 28px; }
  .person figcaption p { font-size: 15px; }
  .family-section { margin-top: 40px; }
  .family-pair { width: 100%; padding: 14px 20px; border-radius: 28px; }
  .family-pair .eyebrow { font-size: 11px; }
  .family-pair p { font-size: 18px; }
  .story-message { font-size: 20px; }
  .story-section .invitation-story-gallery__grid { gap: 12px; }
  .story-section .invitation-story-gallery__photo { border-radius: 16px; }
  .story-section .invitation-story-gallery__photo:nth-child(even) { margin-top: 24px; }
  .story-lavender { width: 24px; height: 180px; }
  .event-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .rsvp-section { padding-inline: 20px; }
  .rsvp-card { padding: 72px 24px 32px; }
  .rsvp-card h2 { font-size: 40px; }
  .attendance-field label { font-size: 13px; gap: 6px; }
  .footer-names { font-size: 36px; }
  .invitation-footer .lavender-border { height: 140px; }
}

@media (max-width: 380px) {
  .site-header nav { gap: 4px 18px; font-size: 14px; }
  .countdown { gap: 6px; font-size: 13px; }
  .countdown > span { padding: 8px 10px; }
  .countdown [data-countdown-unit] { font-size: 20px; }
  .couple-portraits { gap: 36px; }
  .couple-bouquet { top: 40px; width: 38px; }
  .rsvp-card { padding-inline: 20px; }
  .rsvp-card h2 { font-size: 36px; }
  .attendance-field { flex-direction: column; border-radius: 26px; }
  .attendance-field label { flex: none; font-size: 15px; }
}

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