:root {
  --ivory: #f4f0e7;
  --paper: #fffdf8;
  --ink: #1c1a18;
  --muted: #786f64;
  --stone: #b8ad9e;
  --taupe: #857967;
  --bronze: #9a6b38;
  --line: rgba(84, 73, 58, .22);
  --shadow: 0 24px 70px rgba(49, 42, 33, .15);
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Italiana", "Times New Roman", serif;
  --sans: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(88, 77, 63, .025) 1px, transparent 1px) 0 0 / 7px 100%,
    var(--ivory);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}
main,
header,
footer {
  width: 100%;
  max-width: 100%;
}
main { overflow-x: hidden; }
@supports (overflow: clip) {
  main { overflow-x: clip; }
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

.hero {
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 74px 22px 34px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: min(34vw, 340px);
  height: min(34vw, 340px);
  border: 1px solid rgba(154, 107, 56, .18);
  border-radius: 50%;
  z-index: -1;
}
.hero::before { top: -18%; right: -8%; }
.hero::after { bottom: 7%; left: -15%; }
.hero__copy {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  justify-items: center;
  text-align: center;
  z-index: 3;
}
.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--bronze);
  font-family: var(--sans);
  font-size: .69rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.hero h1 {
  width: 100%;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 11vw, 7.6rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.045em;
  text-align: center;
}
.hero h1 em,
.invitation__card h2 em {
  display: inline-block;
  margin: 0 .09em;
  color: var(--bronze);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.date {
  width: 100%;
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: clamp(1rem, 3.3vw, 1.42rem);
  letter-spacing: .2em;
  text-align: center;
  text-indent: .2em;
}

.envelope {
  width: min(720px, 95vw);
  margin: -3px auto -6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transform: translateZ(0);
}
.envelope img {
  width: 100%;
  aspect-ratio: 1.028;
  object-fit: cover;
  filter: drop-shadow(0 25px 30px rgba(58, 50, 39, .16));
  transition: transform 1.1s cubic-bezier(.2,.78,.2,1), filter .8s ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.envelope:hover img { transform: translateY(-8px) rotate(-.6deg); filter: drop-shadow(0 34px 40px rgba(58, 50, 39, .22)); }
.envelope.is-open img { animation: openEnvelope 1.35s cubic-bezier(.16,1,.3,1) both; }
.envelope__halo {
  position: absolute;
  inset: 18% 14% 10%;
  z-index: -1;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 67%);
  filter: blur(9px);
}
.envelope__prompt {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
  min-width: 160px;
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  color: #fff;
  background: rgba(32, 28, 23, .48);
  backdrop-filter: blur(10px);
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: opacity .35s ease, transform .35s ease;
}
.envelope.is-open .envelope__prompt { opacity: 0; transform: translate(-50%, 10px); }
.scroll-cue {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .66rem;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
}
.scroll-cue i { width: 1px; height: 42px; background: linear-gradient(var(--bronze), transparent); animation: pulseLine 2s ease-in-out infinite; }

.section { width: min(1160px, calc(100% - 40px)); max-width: 100%; margin: 0 auto; padding: 118px 0; }
.display-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6.7rem);
  font-weight: 400;
  line-height: .95;
  text-transform: uppercase;
}
.section-heading { text-align: center; margin-bottom: 58px; }
.paper-card {
  background:
    linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78)),
    radial-gradient(circle at 20% 10%, rgba(99,85,67,.07) 0 1px, transparent 1.5px) 0 0 / 8px 8px,
    var(--paper);
  border: 1px solid rgba(84,73,58,.12);
  box-shadow: var(--shadow);
}

.music {
  width: min(900px, calc(100% - 40px));
  margin: 54px auto 112px;
  padding: 30px 38px 34px;
  position: relative;
  border-top: 1px solid rgba(84,73,58,.26);
  border-bottom: 1px solid rgba(84,73,58,.26);
  background:
    linear-gradient(90deg, rgba(255,255,255,.58), rgba(255,255,255,.86) 50%, rgba(255,255,255,.58)),
    var(--ivory);
  box-shadow: 0 18px 55px rgba(49,42,33,.07);
}
.music::before {
  content: "";
  position: absolute;
  inset: 7px 0;
  border-top: 1px solid rgba(154,107,56,.12);
  border-bottom: 1px solid rgba(154,107,56,.12);
  pointer-events: none;
}
.music__meta {
  display: grid;
  grid-template-columns: auto minmax(35px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}
.music__monogram {
  color: var(--bronze);
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .28em;
}
.music__line { height: 1px; background: rgba(84,73,58,.2); }
.music__meta .section-kicker { margin: 0; }
.music__player {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
}
.music__control {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  position: relative;
}
.music__ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(154,107,56,.55);
  border-radius: 50%;
}
.music__ring::before,
.music__ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(84,73,58,.16);
  border-radius: inherit;
}
.music__ring::after { display: none; }
.music h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.05;
}
.music__artist { margin: 4px 0 0; color: var(--muted); font-style: italic; }
.music__progress {
  width: 100%;
  height: 1px;
  margin-top: 20px;
  background: rgba(84,73,58,.2);
}
.music__progress span { display: block; width: 28%; height: 1px; position: relative; background: var(--bronze); }
.music__progress span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bronze);
  transform: translate(50%, -50%);
}
.music__hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.music__mark {
  align-self: start;
  color: rgba(154,107,56,.32);
  font-family: var(--display);
  font-size: 3.7rem;
  line-height: 1;
}
.round-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  cursor: pointer;
  transition: color .25s ease, transform .25s ease, background .25s ease;
}
.round-button:hover { color: #fff; transform: scale(1.04); background: var(--ink); }
.music:has(.round-button.is-playing) .music__ring { animation: musicSpin 9s linear infinite; }
.play-icon { width: 0; height: 0; margin-left: 4px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid currentColor; }
.round-button.is-playing .play-icon { width: 12px; height: 14px; margin: 0; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }

.invitation { min-height: 760px; display: grid; grid-template-columns: .95fr 1fr; align-items: center; gap: 0; }
.photo-stack { position: relative; min-width: 0; min-height: 600px; z-index: 1; }
.polaroid { position: absolute; width: min(390px, 90%); margin: 0; padding: 15px 15px 62px; background: #fff; box-shadow: 0 24px 48px rgba(53,46,38,.18); }
.polaroid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.polaroid--back { top: 92px; left: 5%; transform: rotate(-8deg); }
.polaroid--front { top: 180px; left: 22%; transform: rotate(4deg); }
.invitation__card { min-height: 590px; margin-left: -55px; padding: 90px 62px 70px; text-align: center; position: relative; z-index: 3; }
.gold-clip { position: absolute; top: -20px; left: 50%; width: 28px; height: 74px; border: 3px solid #b58b48; border-radius: 18px; transform: translateX(-50%); box-shadow: inset 0 0 0 2px var(--paper); }
.invitation__intro { max-width: 420px; margin: 50px auto 28px; font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.2; }
.invitation__card h2 { display: grid; gap: 4px; margin: 24px 0; font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 400; line-height: 1; }

.quote-band { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.quote-band blockquote { margin: 0; font-size: clamp(2rem, 4.8vw, 4rem); font-style: italic; line-height: 1.08; }
.quote-band blockquote::before { content: "“"; display: block; color: var(--bronze); font-family: var(--display); font-size: 5rem; line-height: .5; }
.wide-photo { overflow: hidden; border-radius: 48% 48% 5px 5px; box-shadow: var(--shadow); }
.wide-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transform: scale(1.08); }

.countdown { text-align: center; padding-top: 150px; padding-bottom: 150px; }
.countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 920px; margin: 55px auto 26px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.countdown__grid div { padding: 36px 10px; background: var(--ivory); }
.countdown__grid strong { display: block; font-family: var(--display); font-size: clamp(2.4rem, 7vw, 5.7rem); font-weight: 400; line-height: 1; }
.countdown__grid span { display: block; margin-top: 12px; font-family: var(--sans); font-size: .65rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.countdown__date { color: var(--bronze); font-size: 1rem; letter-spacing: .24em; }

.timeline { position: relative; overflow: hidden; }
@supports (overflow: clip) {
  .timeline { overflow: clip; }
}
.timeline::before { content: "A·C"; position: absolute; right: -4vw; bottom: 3%; color: rgba(119,107,88,.08); font-family: var(--display); font-size: clamp(9rem, 25vw, 22rem); line-height: 1; z-index: -1; }
.timeline__list { width: min(780px, 100%); margin: 0 auto; position: relative; }
.timeline__list::before { content: ""; position: absolute; top: 20px; bottom: 20px; left: 28px; width: 1px; background: linear-gradient(transparent, var(--bronze) 14%, var(--bronze) 86%, transparent); }
.timeline-item { display: grid; grid-template-columns: 58px 1fr auto; gap: 24px; align-items: center; min-height: 158px; padding: 30px 0; }
.timeline-item__number { width: 58px; height: 58px; display: grid; place-items: center; position: relative; z-index: 1; border: 1px solid var(--bronze); border-radius: 50%; background: var(--ivory); font-family: var(--display); font-size: 1.25rem; }
.timeline-item h3 { margin: 0; font-family: var(--display); font-size: clamp(1.55rem, 3vw, 2.25rem); font-weight: 400; text-transform: uppercase; }
.timeline-item p { margin: 3px 0 0; color: var(--muted); }
.timeline-item__place { font-style: italic; }
.outline-button,
.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.outline-button { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.outline-button[aria-disabled="true"] { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.primary-button { width: 100%; border: 1px solid var(--ink); color: #fff; background: var(--ink); transition: background .25s ease, transform .25s ease; }
.primary-button:hover { background: var(--bronze); transform: translateY(-2px); }

.dress { display: grid; place-items: center; }
.dress__card { width: min(640px, 100%); padding: 74px 62px; text-align: center; border-radius: 300px 300px 8px 8px; }
.dress__card h2 { margin: 10px 0 15px; font-family: var(--display); font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 400; }
.dress__card > p:last-of-type { max-width: 440px; margin: 0 auto; color: var(--muted); }
.monogram { font-family: var(--display); font-size: clamp(4rem, 12vw, 8rem); letter-spacing: -.08em; }
.monogram--small { margin: 16px auto 0; color: var(--bronze); font-size: 2.5rem; }
.palette { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }
.swatch { width: 34px; height: 34px; border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.swatch--black { background: #1d1b1a; }
.swatch--taupe { background: #817462; }
.swatch--bronze { background: #9a6b38; }
.swatch--navy { background: #1f2b3b; }

.gallery__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: center; }
.gallery-card { margin: 0; padding: 14px 14px 55px; background: #fff; box-shadow: 0 20px 50px rgba(51,44,36,.14); transform: rotate(-2.5deg); }
.gallery-card:nth-child(2) { transform: rotate(1.5deg) translateY(-22px); }
.gallery-card:nth-child(3) { transform: rotate(3deg); }
.gallery-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.gallery-card figcaption { padding-top: 17px; text-align: center; font-style: italic; }

.rsvp { min-height: 830px; display: grid; place-items: center; position: relative; isolation: isolate; }
.rsvp__floral { position: absolute; inset: 8% 0 0; z-index: -1; background: url("assets/envelope-hero.webp") center / min(780px, 95vw) auto no-repeat; opacity: .7; filter: saturate(.8); }
.rsvp__card { width: min(560px, 100%); padding: 70px 58px; text-align: center; }
.rsvp__card h2 { margin: 8px 0 22px; font-family: var(--display); font-size: clamp(2.4rem, 5.6vw, 4.7rem); font-weight: 400; line-height: 1; }
.rsvp__card > p { color: var(--muted); }
.passes { margin: 30px 0; padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink) !important; }

footer { min-height: 70svh; padding: 110px 24px; display: grid; place-content: center; text-align: center; }
footer p { margin: 5px 0; }
footer .date { margin-top: 25px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 999px; color: #fff; background: rgba(28,26,24,.92); box-shadow: 0 14px 40px rgba(0,0,0,.22); font-family: var(--sans); font-size: .78rem; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .3s ease, transform .3s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(35px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal--left { transform: translateX(-45px); }
.reveal--right { transform: translateX(45px); }
.reveal--down { transform: translateY(-25px); }
.reveal.is-visible { opacity: 1; transform: translate(0); }

@keyframes openEnvelope {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-14px) scale(1.02) rotate(-.7deg); }
  100% { transform: translateY(-5px) scale(1.01); }
}
@keyframes pulseLine { 0%,100% { opacity: .28; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes musicSpin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  body { font-size: 17px; }
  .hero { padding-top: 48px; }
  .section { width: min(calc(100% - 30px), 650px); padding: 88px 0; }
  .music { padding: 28px 28px 32px; }
  .invitation { display: block; min-height: auto; }
  .photo-stack { min-height: 420px; }
  .polaroid { width: 74%; padding: 10px 10px 40px; }
  .polaroid--back { top: 30px; left: 5%; }
  .polaroid--front { top: 105px; left: 22%; }
  .invitation__card { min-height: 0; margin: -82px 0 0; padding: 76px 28px 56px; }
  .invitation__intro { margin-top: 38px; }
  .quote-band { grid-template-columns: 1fr; gap: 40px; }
  .quote-band blockquote { padding: 0 12px; }
  .wide-photo { width: 88%; margin-left: auto; }
  .countdown__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-item { grid-template-columns: 48px 1fr; gap: 16px; }
  .timeline-item__number { width: 48px; height: 48px; }
  .timeline__list::before { left: 23px; }
  .timeline-item .outline-button { grid-column: 2; justify-self: start; }
  .dress__card { padding: 65px 24px 50px; }
  .gallery__grid { grid-template-columns: 1fr; gap: 52px; }
  .gallery-card { width: 86%; margin: 0 auto; }
  .gallery-card:nth-child(2) { transform: rotate(1.5deg); }
  .rsvp { min-height: 720px; }
  .rsvp__card { padding: 60px 25px; }
}

@media (max-width: 440px) {
  .hero { padding-inline: 15px; }
  .hero__copy { padding-inline: 8px; }
  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10.5vw, 2.85rem);
    letter-spacing: -.055em;
    line-height: 1;
  }
  .hero h1 span { display: block; width: 100%; white-space: nowrap; text-align: center; }
  .hero h1 em { display: block; width: 100%; margin: .1em 0; text-align: center; }
  .hero .date { padding-inline: 0; font-size: .98rem; letter-spacing: .17em; text-indent: .17em; }
  .envelope { width: min(100%, 410px); max-width: 100%; margin-inline: auto; }
  .envelope__prompt { bottom: 12%; }
  .music { width: calc(100% - 30px); margin: 18px auto 78px; padding: 26px 20px 28px; }
  .music__meta { grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 24px; }
  .music__meta .section-kicker { grid-column: 1 / -1; font-size: .62rem; letter-spacing: .18em; }
  .music__player { grid-template-columns: 68px minmax(0, 1fr); gap: 17px; }
  .music__control { width: 64px; height: 64px; }
  .music__ring::before { inset: 5px; }
  .music__mark { display: none; }
  .music h2 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .music__artist { font-size: .95rem; }
  .music__progress { margin-top: 16px; }
  .music__hint { max-width: 170px; font-size: .58rem; line-height: 1.4; }
  .photo-stack { overflow: hidden; }
  @supports (overflow: clip) {
    .photo-stack { overflow: clip; }
  }
  .polaroid { width: 70%; }
  .polaroid--back { left: 7%; transform: rotate(-6deg); }
  .polaroid--front { left: 23%; transform: rotate(3deg); }
  .gallery-card { width: 82%; }
  .round-button { width: 48px; height: 48px; }
  .countdown__grid strong { font-size: 3.2rem; }
  .timeline-item h3 { font-size: 1.42rem; }
  .reveal--left { transform: translateX(-20px); }
  .reveal--right { transform: translateX(20px); }
  .reveal.is-visible { transform: translate(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
