:root {
  --sage: #a9b59b;
  --sage-soft: #b8c2ac;
  --sage-deep: #66745f;
  --sage-dark: #435140;
  --blush: #e8c3c5;
  --blush-light: #f4dfdf;
  --burgundy: #743b48;
  --burgundy-dark: #4c2630;
  --ivory: #fffaf3;
  --ink: #322c2c;
  --shadow: 0 24px 70px rgba(57, 66, 53, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 30%, rgba(244,223,223,.34), transparent 24rem),
    radial-gradient(circle at 90% 72%, rgba(116,59,72,.10), transparent 30rem),
    var(--sage);
  background-attachment: fixed, fixed, fixed;
  background-size: cover;
  font-family: "Trebuchet MS", Arial, sans-serif;
  line-height: 1.7;
}

h1, h2, h3, blockquote, footer p, .nav-names {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

main { overflow: hidden; }
main > section::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: clamp(.65rem, 1.25vw, 1.25rem);
  padding: 1.5px;
  border-radius: 20px;
  background: conic-gradient(
    from 0deg,
    rgba(255,250,243,.86) 0deg,
    rgba(255,250,243,.22) 43deg,
    rgba(255,250,243,.82) 90deg,
    rgba(255,250,243,.2) 133deg,
    rgba(255,250,243,.86) 180deg,
    rgba(255,250,243,.22) 223deg,
    rgba(255,250,243,.82) 270deg,
    rgba(255,250,243,.2) 317deg,
    rgba(255,250,243,.86) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: drop-shadow(0 0 5px rgba(255,250,243,.28));
  pointer-events: none;
}
.site-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem max(5vw, 1.25rem);
  background: var(--burgundy-dark);
}
.site-nav::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: -44px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(76,38,48,.3), rgba(76,38,48,0));
  pointer-events: none;
}
.site-nav a { color: var(--ivory); text-decoration: none; }
.nav-names { font-size: 1.45rem; }
.nav-names span { color: var(--blush); font-style: italic; }
.nav-links { display: flex; gap: clamp(.9rem, 3vw, 2.3rem); }
.nav-links a { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--blush); }

.hero {
  position: relative;
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, .75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(4.5rem, 7vw, 7rem) max(6vw, 2rem) clamp(1.5rem, 2vw, 2.5rem);
  max-width: 1400px;
  margin: 0 auto;
}
.hero-copy { position: relative; z-index: 2; text-align: center; }
.eyebrow, .detail-label {
  color: var(--burgundy-dark);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
h1 {
  color: var(--burgundy-dark);
  font-size: clamp(4rem, 8.5vw, 8.5rem);
  line-height: .84;
  letter-spacing: -.055em;
  margin: 1.2rem 0 2rem;
}
h1 span { color: var(--ivory); display: block; font-size: .66em; line-height: .72; font-style: italic; }
.date-line { font-family: Georgia, serif; color: var(--burgundy-dark); font-size: clamp(1.15rem, 2vw, 1.55rem); margin: 0; }
.place-line { color: var(--sage-dark); font-size: .94rem; letter-spacing: .04em; margin: .45rem 0 2rem; }
.hero-visual { position: relative; z-index: 1; width: min(100%, 520px); justify-self: center; }
.hero-photo-wrap {
  position: relative;
  margin: 0;
  width: 100%;
  padding: .7rem;
  border-radius: 48% 48% 18px 18px;
  background: rgba(255,250,243,.72);
  box-shadow: var(--shadow);
}
.hero-photo { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 42%; border-radius: 48% 48% 12px 12px; }
.hero-verse {
  margin: 1.35rem auto 0;
  padding: 1.15rem .7rem 1rem;
  max-width: 470px;
  color: var(--burgundy-dark);
  text-align: center;
  border-top: 1px solid rgba(76,38,48,.3);
  border-bottom: 1px solid rgba(76,38,48,.3);
}
.hero-verse p { margin: 0 0 .35rem; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.35; font-style: italic; }
.hero-verse cite { font-family: "Trebuchet MS", sans-serif; font-size: .66rem; font-style: normal; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.floral { position: absolute; width: min(31vw, 410px); opacity: .86; pointer-events: none; }
.floral-top { top: -45px; left: -48px; transform: rotate(2deg); }
.floral-bottom { right: -45px; bottom: -70px; transform: rotate(182deg); }

.button {
  display: inline-block;
  min-width: 230px;
  padding: .92rem 1.45rem;
  border: 1px solid var(--burgundy);
  border-radius: 999px;
  background: var(--burgundy);
  color: white;
  text-decoration: none;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(76,38,48,.18);
}
.button-disabled { opacity: .78; cursor: default; }
.button-light { background: var(--ivory); color: var(--burgundy-dark); border-color: var(--ivory); }

.section { position: relative; padding: clamp(6rem, 10vw, 10rem) max(5vw, 1.25rem); }
.section-heading { max-width: 760px; margin: 0 auto clamp(3.5rem, 6vw, 6rem); text-align: center; }
h2 { color: var(--burgundy); font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1.02; margin: .25rem 0 1.2rem; }
.small-script { margin: 0; color: var(--sage-deep); font-family: Georgia, serif; font-size: 1.1rem; font-style: italic; }
.section-intro { max-width: 620px; margin: 0 auto; color: var(--sage-dark); font-family: Georgia, serif; font-size: 1.08rem; }

.details-section { padding-top: clamp(2rem, 3vw, 3.5rem); }
.event-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 7rem); max-width: 1120px; margin: 0 auto; }
.event-detail { position: relative; padding: .7rem .5rem 2rem 1.6rem; border-left: 1px solid rgba(116,59,72,.42); }
.event-detail-middle { transform: translateY(3.4rem); }
.event-detail .detail-label { position: relative; margin: 0 0 1rem; }
.event-detail h3 { margin: 0 0 1rem; color: var(--burgundy-dark); font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.18; }
.event-detail p:not(.detail-number,.detail-label) { color: var(--sage-dark); }
.text-link { display: inline-block; margin-top: .6rem; color: var(--burgundy); font-weight: 700; text-underline-offset: .3rem; }

.gallery-section {
  margin-top: clamp(3rem, 8vw, 8rem);
  background: linear-gradient(
    to bottom,
    rgba(255,250,243,0) 0%,
    rgba(255,250,243,.16) 12%,
    rgba(255,250,243,.27) 38%,
    rgba(255,250,243,.27) 65%,
    rgba(255,250,243,.14) 88%,
    rgba(255,250,243,0) 100%
  );
}
.gallery-floral { position: absolute; width: min(29vw, 360px); right: -55px; top: -90px; opacity: .55; transform: rotate(92deg); pointer-events: none; }
.gallery { max-width: 1040px; margin: 0 auto; }
.gallery-viewer { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: clamp(.65rem, 2vw, 1.5rem); }
.gallery-stage {
  position: relative;
  margin: 0;
  height: clamp(460px, 66vw, 720px);
  overflow: hidden;
  background: transparent;
}
.gallery-stage img { width: 100%; height: 100%; display: block; object-fit: contain; background: transparent; }
.gallery-stage figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: .42rem .75rem;
  border-radius: 999px;
  background: rgba(76,38,48,.78);
  color: var(--ivory);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.gallery-arrow {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0 0 .16em;
  border: 1px solid rgba(116,59,72,.38);
  border-radius: 50%;
  background: rgba(255,250,243,.46);
  color: var(--burgundy-dark);
  font-family: Georgia, serif;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-arrow:hover, .gallery-arrow:focus-visible { background: var(--ivory); outline: 2px solid var(--burgundy); outline-offset: 3px; }
.gallery-thumbs { display: flex; justify-content: center; gap: .75rem; margin-top: 1.4rem; padding: .25rem; overflow-x: auto; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 86px;
  height: 70px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: rgba(255,250,243,.45);
  opacity: .68;
  cursor: pointer;
}
.gallery-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 5px; }
.gallery-thumb.is-active { border-color: var(--burgundy); background: var(--ivory); opacity: 1; }
.gallery-thumb:hover, .gallery-thumb:focus-visible { opacity: 1; outline: 2px solid var(--burgundy); outline-offset: 2px; }

.gifts-section { padding-bottom: clamp(7rem, 11vw, 11rem); }
.gift-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); max-width: 980px; margin: 0 auto; }
.gift-option {
  position: relative;
  min-height: 340px;
  padding: clamp(2.2rem, 5vw, 4rem);
  overflow: hidden;
  background: rgba(255,250,243,.58);
  border: 1px solid rgba(116,59,72,.16);
  border-radius: 50% 50% 18px 18px / 24% 24% 18px 18px;
  box-shadow: 0 18px 50px rgba(57,66,53,.12);
  text-align: center;
}
.gift-option-blush { background: rgba(232,195,197,.46); }
.gift-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 1.5rem; border: 1px solid rgba(116,59,72,.42); border-radius: 50%; color: var(--burgundy); font-family: Georgia, serif; font-size: 1.5rem; }
.gift-option h3 { margin: .2rem 0 .9rem; color: var(--burgundy-dark); font-size: clamp(1.7rem, 3vw, 2.35rem); }
.gift-option p:not(.detail-label) { max-width: 340px; margin: 0 auto 1.5rem; color: var(--sage-dark); }
.gift-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.gift-link-placeholder {
  display: inline-block;
  min-width: 150px;
  padding: .72rem 1rem;
  border: 1px dashed rgba(116,59,72,.52);
  border-radius: 999px;
  color: var(--burgundy);
  background: rgba(255,250,243,.35);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rsvp-section {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10rem 1.5rem 7rem;
  background: linear-gradient(
    to bottom,
    rgba(76,38,48,0) 0%,
    rgba(76,38,48,.24) 13%,
    rgba(76,38,48,.7) 30%,
    rgba(76,38,48,.96) 50%,
    var(--burgundy-dark) 68%
  );
  color: var(--ivory);
}
.rsvp-inner { position: relative; z-index: 2; max-width: 700px; text-align: center; }
.rsvp-inner .small-script { color: var(--blush); }
.rsvp-inner h2 { color: var(--ivory); margin-bottom: 1.4rem; }
.rsvp-inner > p:not(.small-script) { margin: 0 0 2rem; }
.rsvp-floral { position: absolute; width: min(34vw, 440px); opacity: .23; filter: saturate(.75) brightness(1.12); }
.rsvp-floral-left { left: -100px; bottom: -90px; }
.rsvp-floral-right { right: -100px; top: -90px; transform: rotate(180deg); }

footer { padding: 2.6rem 1rem 3rem; background: #391d24; color: var(--ivory); text-align: center; }
footer p { margin: 0; font-size: 1.8rem; }
footer p span { color: var(--blush); font-style: italic; }
footer small { letter-spacing: .3em; color: var(--blush-light); }

@media (max-width: 820px) {
  body { background-attachment: scroll, scroll, scroll; }
  .site-nav { padding-top: 1rem; padding-bottom: 1rem; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 2.4rem; padding: 4.5rem 1.25rem 6rem; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; width: min(88vw, 430px); }
  h1 { font-size: clamp(4rem, 20vw, 6.5rem); }
  .floral { width: 240px; }
  .floral-top { top: -42px; left: -70px; }
  .floral-bottom { right: -75px; bottom: -42px; }
  .event-path { grid-template-columns: 1fr; max-width: 520px; gap: 3rem; }
  .event-detail-middle { transform: none; }
  .event-detail { padding-left: 1.5rem; }
  .gallery-viewer { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: .6rem; }
  .gallery-arrow { width: 44px; height: 44px; font-size: 2rem; }
  .gallery-stage { height: min(72vh, 660px); }
  .gift-options { grid-template-columns: 1fr; max-width: 520px; }
}

@media (max-width: 520px) {
  main > section::after { inset: .45rem; padding: 1px; border-radius: 14px; }
  .site-nav { align-items: flex-start; }
  .nav-links { display: grid; grid-template-columns: repeat(2, auto); gap: .2rem 1.1rem; }
  .nav-links a { font-size: .66rem; }
  .section { padding-left: 1rem; padding-right: 1rem; }
  .gallery-viewer { position: relative; display: block; }
  .gallery-stage { height: 62vh; min-height: 420px; }
  .gallery-arrow { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); background: rgba(255,250,243,.82); }
  .gallery-prev { left: .55rem; }
  .gallery-next { right: .55rem; }
  .gallery-thumbs { justify-content: flex-start; }
  .gallery-thumb { width: 72px; height: 60px; }
  .gift-option { min-height: 310px; padding: 2.5rem 1.4rem; }
  .rsvp-section { min-height: 540px; padding-top: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-stage img { transition: none; }
}
