:root {
  color-scheme: light;
  --paper: #f7f4ef;
  --ink: #171717;
  --muted: #77716b;
  --line: #c8c1b8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Marck Script", cursive;
  --sans: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #e8e3dc; color: var(--ink); font-family: var(--serif); }
button, input, select { font: inherit; }
img { display: block; max-width: 100%; }

.invitation {
  width: min(100%, 520px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 70px rgb(36 31 27 / 16%);
}

.hero { position: relative; min-height: 100svh; background: #151515; color: white; }
.hero > img { width: 100%; height: 100svh; object-fit: cover; object-position: 51% center; filter: contrast(1.05); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 18%), transparent 35%, rgb(0 0 0 / 76%)); }
.hero-copy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 38px 24px 48px; text-align: center; }
.eyebrow { margin-bottom: 13px; font: 500 11px/1 var(--sans); letter-spacing: .34em; }
.hero h1 { display: flex; align-items: center; gap: 9px; margin: 0; font: 400 clamp(45px, 15vw, 74px)/.8 var(--script); text-shadow: 0 3px 18px rgb(0 0 0 / 45%); }
.hero h1.long-names { gap: 6px; font-size: clamp(34px, 10.5vw, 48px); }
.hero h1 i { font: italic 400 26px/1 var(--serif); }
.hero-copy > p { margin: 23px 0 20px; font: 500 12px/1 var(--sans); letter-spacing: .3em; }
.hero-copy > a { border: 1px solid rgb(255 255 255 / 68%); padding: 12px 20px; color: white; font: 500 10px/1 var(--sans); letter-spacing: .17em; text-decoration: none; text-transform: uppercase; backdrop-filter: blur(8px); }

.music-button { position: fixed; z-index: 20; top: 18px; right: max(18px, calc((100vw - 520px) / 2 + 18px)); display: flex; align-items: center; gap: 8px; border: 1px solid rgb(255 255 255 / 65%); border-radius: 999px; padding: 8px 12px 8px 8px; background: rgb(20 20 20 / 62%); color: white; font: 500 10px/1 var(--sans); letter-spacing: .06em; backdrop-filter: blur(10px); cursor: pointer; }
.music-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: white; color: #111; font-size: 14px; }
.music-button[aria-pressed="true"] .music-icon { animation: pulse 1.1s infinite; }

.paper-section { position: relative; padding: 76px 30px; text-align: center; background: var(--paper); }
.section-number { position: absolute; top: 28px; left: 30px; color: #a39b92; font: 500 10px/1 var(--sans); letter-spacing: .18em; }
.script-title { margin: 0 0 12px; font: 400 48px/.9 var(--script); color: #57514b; }
.paper-section h2 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: .08em; }
.body-copy { max-width: 390px; margin: 22px auto 0; color: #5e5954; font-size: 16px; line-height: 1.55; }

.calendar { width: min(100%, 380px); margin: 42px auto 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 18px 2px 22px; }
.calendar-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 8px 15px; }
.calendar-head span { font-size: 22px; letter-spacing: .13em; }
.calendar-head b { font: 500 13px/1 var(--sans); letter-spacing: .14em; }
.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); align-items: center; }
.weekdays { color: var(--muted); font: 500 9px/1 var(--sans); }
.weekdays span { padding: 8px 0; }
.days span { display: grid; height: 38px; place-items: center; font-size: 16px; }
.wedding-day { position: relative; color: white; z-index: 1; }
.wedding-day::before { position: absolute; z-index: -1; width: 36px; height: 36px; border-radius: 50% 50% 46% 54%; background: var(--ink); content: ""; transform: rotate(-8deg); }

.photo-section { padding: 0 22px 76px; background: var(--paper); }
.editorial-photo { margin: 0; }
.editorial-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 55%; }
.editorial-photo figcaption { padding: 14px 0 0; color: var(--muted); font: 400 27px/1 var(--script); text-align: center; }

.details { padding-top: 72px; }
.detail-card { margin: 34px auto 0; border: 1px solid var(--ink); padding: 29px 19px; }
.date-line { display: flex; justify-content: center; align-items: center; gap: 13px; margin: 0 0 20px; font: 500 13px/1 var(--sans); letter-spacing: .06em; }
.date-line i { width: 1px; height: 17px; background: var(--ink); }
.detail-card > p:not(.date-line) { margin: 0 0 12px; font-size: 17px; }
.detail-card strong { display: block; font-size: 38px; font-weight: 500; letter-spacing: .06em; }
.detail-card > span { display: block; margin-top: -3px; color: var(--muted); font: 500 10px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 27px; }
.detail-actions a { border: 1px solid var(--line); padding: 12px 6px; color: var(--ink); font: 500 10px/1 var(--sans); text-decoration: none; text-transform: uppercase; }

.countdown-section { padding: 48px 24px 55px; background: #171717; color: white; text-align: center; }
.countdown-section > p { margin: 0 0 25px; font: 500 11px/1 var(--sans); letter-spacing: .24em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.countdown b { display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid rgb(255 255 255 / 38%); border-radius: 50%; font-size: 25px; font-weight: 400; }
.countdown span { color: #bcb6af; font: 400 10px/1 var(--sans); text-transform: uppercase; }

.rsvp form { display: grid; gap: 24px; margin-top: 34px; text-align: left; }
.rsvp label > span, .rsvp legend { display: block; margin-bottom: 8px; font: 500 11px/1.3 var(--sans); letter-spacing: .04em; }
.rsvp input:not([type="radio"]), .rsvp select { width: 100%; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 12px 2px; background: transparent; color: var(--ink); outline: none; }
.rsvp fieldset { display: grid; gap: 12px; margin: 0; border: 0; padding: 0; }
.rsvp fieldset label { display: flex; align-items: center; gap: 9px; color: #514d48; font-size: 15px; }
.rsvp input[type="radio"] { accent-color: #111; }
.rsvp button { border: 1px solid #111; padding: 16px; background: #111; color: white; font: 600 11px/1 var(--sans); letter-spacing: .18em; cursor: pointer; }
.form-success { margin: 0; color: #356044; font: 500 14px/1.4 var(--sans); text-align: center; }

.closing { position: relative; min-height: 720px; background: #111; color: white; }
.closing > img { width: 100%; height: 720px; object-fit: cover; object-position: center; filter: brightness(.78); }
.closing::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 78%)); content: ""; }
.closing > div { position: absolute; z-index: 1; inset: auto 20px 48px; text-align: center; }
.closing p { margin: 0 0 6px; font: 500 10px/1 var(--sans); letter-spacing: .3em; }
.closing h2 { margin: 0; font: 400 54px/.9 var(--script); }
.closing h2.long-names { font-size: 42px; }
.closing h2 i { padding: 0 5px; font: italic 400 24px/1 var(--serif); }
.closing span { display: block; margin-top: 17px; color: #ddd7cf; font-size: 16px; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes pulse { 50% { transform: scale(.86); } }

@media (max-width: 380px) {
  .paper-section { padding-inline: 22px; }
  .countdown b { width: 55px; height: 55px; }
  .hero h1 { font-size: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
