:root {
  --paper: #f3eee4;
  --paper-dark: #e8e0cf;
  --ink: #2e3a2c;
  --accent: #56644c;
  --muted: #4f574b;
  --line: #bdb39e;
  --serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 16px/1.6 "Jost", system-ui, sans-serif;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: clamp(42px, 5vw, 64px); line-height: 1.1; }
section { scroll-margin-top: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: #fffdf8; z-index: 10; }
.skip-link:focus { top: 16px; }
.container, .site-header { width: min(100% - 80px, 1160px); margin-inline: auto; }
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px; }
.monogram { font: italic 30px/1 var(--serif); text-decoration: none; white-space: nowrap; }
.monogram span { font-size: 22px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 30px; font-size: 12px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding-block: 60px 130px; }
.hero-copy { padding-bottom: 20px; min-width: 0; }
.hero h1 { font-size: clamp(70px, 9.4vw, 128px); line-height: .96; letter-spacing: -.025em; margin-block: 24px 36px; }
.hero h1 > span { display: block; }
.hero .groom-name { padding-left: 40px; }
.hero h1 em { font-size: .6em; font-weight: 400; color: var(--accent); }
.hero-details { font: italic 24px/1.5 var(--serif); max-width: 440px; }
.countdown { display: flex; width: fit-content; gap: 26px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.countdown span { display: block; font: 40px/1 var(--serif); }
.countdown small { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.outline-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 36px; padding: 12px 30px; border: 1px solid var(--accent); border-radius: 99px; text-decoration: none; font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.outline-button:hover { background: var(--ink); color: var(--paper); }
.hero-photos { position: relative; min-width: 0; height: 600px; }
.leaf-sprig { position: absolute; right: 40px; top: -30px; width: 230px; height: 420px; transform: rotate(18deg); opacity: .8; }
.polaroid { position: relative; background: #fffdf8; padding: 14px 14px 56px; box-shadow: 0 1px 2px #2e3a2c1f, 0 22px 40px -18px #2e3a2c73; }
.polaroid::before, .paper-leaves .invitation-story-gallery__photo::before { content: ""; position: absolute; z-index: 1; top: -12px; left: 40%; width: 80px; height: 26px; background: #e2d6bacc; transform: rotate(-5deg); }
.polaroid img { width: 100%; height: auto; object-fit: cover; filter: saturate(.85) sepia(.08); }
.hero-photo { position: absolute; }
.hero-photo--main { left: 1%; top: 20px; width: 74%; transform: rotate(-2.5deg); }
.hero-photo--main img { aspect-ratio: 4 / 5; }
.hero-photo--main figcaption { position: absolute; bottom: 14px; left: 10px; right: 10px; text-align: center; font: italic 22px/1.1 var(--serif); }
.hero-photo--small { right: 0; bottom: 0; width: 49%; padding: 10px 10px 40px; transform: rotate(4deg); }
.hero-photo--small img { aspect-ratio: 1; }
.hero-photo--small::before { left: auto; right: 18px; transform: rotate(8deg); }

.couple-section { position: relative; background: var(--paper-dark); padding-block: 100px 110px; text-align: center; }
.couple-section::before, .couple-section::after { content: ""; position: absolute; left: 0; width: 100%; height: 36px; background: url("assets/torn-edge.svg") center / 100% 100% no-repeat; }
.couple-section::before { bottom: calc(100% - 1px); }
.couple-section::after { top: calc(100% - 1px); transform: scaleY(-1); }
.couple-portraits { display: flex; justify-content: center; gap: 48px 96px; margin-top: 64px; }
.person { flex: 0 1 280px; min-width: 0; }
.portrait { width: 220px; height: 280px; max-width: 100%; margin: auto; padding: 8px; border: 1px solid #a9a08c; border-radius: 50%; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 50%; }
.person h3 { margin-top: 24px; font-size: 36px; font-style: italic; }
.person p { color: var(--muted); }
.godparents { max-width: 620px; margin: 72px auto 0; padding: 32px 24px; border-block: 1px solid var(--line); }
.godparents .family-pair + .family-pair { margin-top: 28px; }
.godparents h3 { margin-top: 8px; font-size: 40px; font-style: italic; line-height: 1.2; }
.parents { display: flex; justify-content: center; max-width: 840px; margin: 44px auto 0; }
.parents .family-pair { flex: 1; padding-inline: 32px; }
.parents .family-pair + .family-pair { border-left: 1px solid var(--line); }
.parents h3 { font-size: 28px; line-height: 1.3; }
.parents .eyebrow { margin-top: 8px; font-size: 11px; }

.story-section { padding-block: 130px 100px; }
.section-heading { max-width: 680px; margin: auto; text-align: center; }
.story-message { margin-top: 28px; font: 24px/1.5 var(--serif); }
.story-message p + p { margin-top: 16px; }
.signature { font: italic 23px/1.5 var(--serif); margin-top: 18px; }
.section-heading > p { margin-top: 20px; }
.paper-leaves .invitation-story-gallery { max-width: 1100px; margin-top: 80px; }
.paper-leaves .invitation-story-gallery__grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 48px 36px; padding-inline: 12px; }
.paper-leaves .invitation-story-gallery__photo { position: relative; flex: 0 1 calc((100% - 72px) / 3); width: auto; aspect-ratio: auto; padding: 12px 12px 40px; border-radius: 0; overflow: visible; background: #fffdf8; transform: rotate(-3deg); box-shadow: 0 1px 2px #2e3a2c1f, 0 18px 32px -16px #2e3a2c66; transition: transform .2s; }
.paper-leaves .invitation-story-gallery__photo img { height: auto; aspect-ratio: 4 / 5; filter: saturate(.85) sepia(.08); }
.paper-leaves .invitation-story-gallery__photo:nth-child(2) { margin-top: 48px; transform: rotate(1.8deg); }
.paper-leaves .invitation-story-gallery__photo:nth-child(2) img, .paper-leaves .invitation-story-gallery__photo:nth-child(4) img { aspect-ratio: 4 / 3; }
.paper-leaves .invitation-story-gallery__photo:nth-child(3) { margin-top: 8px; transform: rotate(-1.2deg); }
.paper-leaves .invitation-story-gallery__photo:nth-child(3) img { aspect-ratio: 1; }
.paper-leaves .invitation-story-gallery__photo:nth-child(4) { flex-basis: 34%; transform: rotate(2.6deg); }
.paper-leaves .invitation-story-gallery__photo:nth-child(5) { margin-top: 30px; transform: rotate(-2deg); }
.paper-leaves .invitation-story-gallery__photo:nth-child(even)::before { left: 18%; transform: rotate(5deg); }
.paper-leaves .invitation-story-gallery__photo:hover { transform: rotate(0); }

.events-section { max-width: 900px; padding-block: 50px 110px; }
.section-lead { color: var(--muted); }
.event-timeline { margin-top: 64px; padding-left: 40px; border-left: 1px solid #a9a08c; }
.event-card { position: relative; display: flex; gap: 32px; align-items: center; padding-bottom: 56px; }
.event-card:last-child { padding-bottom: 0; }
.event-card::before { content: ""; position: absolute; left: -47px; top: 14px; width: 13px; height: 13px; border: 1px solid var(--accent); border-radius: 50%; background: var(--paper); }
.event-card:last-child::before { background: var(--accent); }
.event-details { flex: 1; min-width: 0; }
.event-time { display: block; font: 44px/1 var(--serif); color: var(--accent); }
.event-card h3 { margin-block: 10px 6px; font-size: 30px; font-weight: 500; line-height: 1.2; }
.event-details p { color: var(--muted); font-size: 15px; }
.event-date { margin-bottom: 8px; }
.event-location { font-weight: 400; }
.event-description { margin-top: 6px; }
.event-photo { flex: 0 0 auto; width: 220px; height: 150px; border-radius: 120px; object-fit: cover; filter: saturate(.8) sepia(.1); }
.paper-leaves .invitation-navigation { justify-content: flex-start; gap: 8px 24px; }
.paper-leaves .invitation-navigation a { min-height: 44px; padding: 4px 0; border: 0; border-radius: 0; text-decoration: underline; }
.paper-leaves .invitation-navigation a::after { content: " →"; margin-left: 4px; }

.rsvp-section { padding-block: 40px 110px; }
.rsvp-card { max-width: 660px; margin: auto; padding: 10px; border: 1px solid #d6ccb8; background: #fbf8f1; box-shadow: 0 24px 50px -30px #2e3a2c73; }
.rsvp-card-inner { padding: 48px 44px; border: 1px solid #d6ccb8; }
.rsvp-card h2 { font-size: 52px; text-align: center; }
.rsvp-intro, .rsvp-deadline, .guest-greeting { max-width: 440px; margin: 18px auto 0; text-align: center; color: var(--muted); }
.rsvp-deadline { margin-top: 8px; }
.attendance-field { min-width: 0; margin: 36px 0 0; padding: 0; border: 0; }
.attendance-options { display: flex; gap: 12px; }
.attendance-options label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px; border: 1px solid #a9a08c; border-radius: 99px; font-size: 14px; cursor: pointer; }
.attendance-options label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.attendance-options input { accent-color: var(--accent); }
.attendance-options label:has(input:checked) input { accent-color: var(--paper); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.form-field { min-width: 0; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; }
.form-field input, .form-field textarea { display: block; width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid #a9a08c; border-radius: 0; background: transparent; padding: 10px 0; color: var(--ink); font-size: 16px; }
.form-field textarea { resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #6a7062; opacity: 1; }
.paper-leaves .invitation-guest-count-help { font-size: 12px; }
.submit-button { width: 100%; min-height: 52px; margin-top: 36px; padding: 12px 18px; border: 0; border-radius: 99px; background: var(--accent); color: #fbf8f1; font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.submit-button:hover { background: var(--ink); }
.form-status, .form-feedback:not(:empty) { margin-top: 20px; padding: 12px; border: 1px solid var(--line); text-align: center; }
.form-status--error { color: #8d3030; }
.form-feedback:empty { display: none; }

.invitation-footer { padding: 40px 24px 80px; text-align: center; }
.invitation-footer > img { margin-inline: auto; }
.footer-names { margin-top: 8px; font: italic 44px/1.3 var(--serif); }
.footer-date { margin-top: 4px; font-size: 12px; letter-spacing: .3em; color: var(--muted); }
.footer-message { margin-top: 16px; font: italic 22px/1.4 var(--serif); }
.wedday-credit { display: inline-block; padding: 12px; margin-top: 24px; font-size: 12px; color: var(--muted); }

@media (max-width: 1000px) {
  .container, .site-header { width: calc(100% - 64px); }
  .hero { gap: 24px; padding-block: 40px 100px; }
  .hero-photos { height: 480px; }
  .hero-photo--main { width: 82%; }
  .hero-photo--small { width: 58%; }
  .leaf-sprig { right: 20px; width: 160px; height: 320px; }
  .hero .groom-name { padding-left: 20px; }
}

@media (max-width: 700px) {
  .container, .site-header { width: calc(100% - 40px); }
  .site-header { flex-direction: column; gap: 12px; padding-block: 24px 12px; }
  .site-header nav { justify-content: center; gap: 4px 16px; font-size: 10px; letter-spacing: .12em; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 36px 80px; }
  .hero-copy { padding-bottom: 0; text-align: center; }
  .hero h1 { font-size: clamp(64px, 16vw, 100px); margin-block: 20px 24px; }
  .hero .groom-name { padding-left: 0; }
  .hero-details { margin: auto; font-size: 22px; }
  .countdown { margin-inline: auto; gap: 30px; }
  .outline-button { margin-top: 28px; }
  .hero-photos { width: min(100%, 440px); height: auto; aspect-ratio: .9; margin: 20px auto 0; }
  .hero-photo--main { width: 72%; left: 2%; top: 10px; padding: 10px 10px 42px; }
  .hero-photo--main figcaption { font-size: 18px; bottom: 12px; }
  .hero-photo--small { width: 46%; right: 2%; padding: 8px 8px 30px; }
  .leaf-sprig { top: -20px; right: 12%; width: 140px; height: 280px; }
  .couple-section { padding-block: 64px 70px; }
  .couple-section::before, .couple-section::after { height: 20px; }
  .couple-portraits { gap: 24px; margin-top: 40px; }
  .portrait { width: 160px; height: auto; aspect-ratio: 11 / 14; padding: 5px; }
  .person h3 { font-size: 30px; margin-top: 18px; }
  .person p { font-size: 14px; }
  .godparents { margin-top: 44px; padding: 28px 10px; }
  .godparents h3 { font-size: 34px; }
  .parents { margin-top: 32px; }
  .parents .family-pair { padding-inline: 12px; }
  .parents h3 { font-size: 24px; }
  .parents .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .story-section { padding-block: 80px 60px; }
  .story-message { font-size: 22px; margin-top: 24px; }
  .paper-leaves .invitation-story-gallery { margin-top: 48px; }
  .paper-leaves .invitation-story-gallery__grid { gap: 30px 20px; padding-inline: 6px; }
  .paper-leaves .invitation-story-gallery__photo { flex-basis: calc((100% - 20px) / 2); padding: 7px 7px 26px; }
  .paper-leaves .invitation-story-gallery__photo::before { width: 48px; height: 18px; top: -9px; left: 30%; }
  .paper-leaves .invitation-story-gallery__photo:nth-child(2) { margin-top: 26px; }
  .paper-leaves .invitation-story-gallery__photo:nth-child(4) { flex-basis: calc((100% - 20px) / 2); margin-top: 24px; }
  .paper-leaves .invitation-story-gallery__photo:nth-child(5) { flex-basis: 58%; margin-top: 6px; }
  .events-section { padding-block: 24px 60px; }
  .event-timeline { padding-left: 22px; margin-top: 40px; }
  .event-card { align-items: flex-start; gap: 16px; padding-bottom: 36px; }
  .event-card::before { left: -29px; }
  .event-time { font-size: 36px; }
  .event-card h3 { font-size: 26px; }
  .event-details p { font-size: 14px; }
  .event-photo { width: 110px; height: 84px; margin-top: 16px; }
  .rsvp-section { padding-block: 24px 60px; }
  .rsvp-card { padding: 6px; }
  .rsvp-card-inner { padding: 32px 20px; }
  .rsvp-card h2 { font-size: 42px; }
  .attendance-options { gap: 8px; }
  .attendance-options label { font-size: 13px; gap: 4px; }
  .form-grid { gap: 24px 16px; }
  .form-field label { font-size: 10px; letter-spacing: .1em; }
  .invitation-footer { padding-block: 20px 44px; }
  .footer-names { font-size: 38px; }
}

@media (max-width: 380px) {
  .site-header nav { gap: 4px 12px; font-size: 9px; }
  .hero h1 { font-size: 62px; }
  .event-photo { width: 82px; height: 68px; }
  .rsvp-card-inner { padding-inline: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .attendance-options { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paper-leaves .invitation-story-gallery__photo { transition: none; }
}
