:root {
  color-scheme: light;
  --ink: #293a3b;
  --muted: #536566;
  --accent: #295d62;
  --accent-dark: #21474b;
  --page-background: #d7ebeb;
  --aqua: #e6f3f2;
  --line: #d4e4e2;
  --rose: #985c51;
  --heading: "Cormorant Garamond", Georgia, serif;
  --body: Sarabun, Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  isolation: isolate;
  background: var(--page-background);
  font: 1rem/1.65 var(--body);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 31%, #f7fbf6 12%, #e8f5f3 55%, #d7ebeb);
  pointer-events: none;
  content: "";
}

body:has(.lightbox[open]) { overflow: hidden; }
[hidden] { display: none !important; }

h1, h2, p, figure { margin: 0; }
h2 { font-weight: 600; font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.4; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
main:focus { outline: none; }
section[id] { scroll-margin-top: 1.25rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.display, .wordmark {
  font-family: var(--heading);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .92;
}

.couple-mark {
  display: inline-flex;
  align-items: baseline;
  gap: .20em;
  white-space: nowrap;
}

.rings {
  display: inline-block;
  flex: none;
  width: .69em;
  height: auto;
}

.couple-mark .rings {
  align-self: center;
  transform: translateY(.05em);
}

.eyebrow {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .21em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .7rem 1.3rem;
  min-height: 3rem;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}

.button:hover { background: var(--accent-dark); }

.intro {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2.4rem 1.1rem;
  text-align: center;
}

.intro-content { width: min(100%, 29rem); }
.intro-title { margin: .55rem 0 .7rem; font-size: clamp(3.15rem, 13vw, 6.15rem); }
.intro-date { color: var(--accent-dark); font-size: clamp(1.25rem, 3.2vw, 1.65rem); font-weight: 600; }

.open-button {
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  width: 100%;
  margin: 1.75rem auto 0;
  padding: 0;
  border: 0;
  border-radius: .35rem;
  background: transparent;
}

.envelope {
  position: relative;
  display: block;
  width: min(100%, 25rem);
  transition: transform .28s ease;
  filter: drop-shadow(0 14px 16px #37676c35);
}

.envelope-art { width: 100%; height: auto; }

.seal-logo {
  position: absolute;
  top: 69.2%;
  left: 50%;
  width: 9%;
  height: auto;
  transform: translate(-50%, -50%);
}

.open-button:hover .envelope { transform: translateY(-.25rem); }
.open-button:hover .button { background: var(--accent-dark); box-shadow: 0 6px 18px #295d6230; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 79rem;
  margin: auto;
  padding: .95rem clamp(1rem, 4vw, 3rem);
}

.wordmark { font-size: 1.8rem; text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .15rem clamp(.55rem, 2.6vw, 1.55rem); }
.site-header nav a { display: inline-flex; min-height: 2.5rem; align-items: center; text-decoration: none; font-size: .9rem; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .25em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.27fr);
  width: min(calc(100% - 2 * clamp(1rem, 4vw, 3rem)), 73rem);
  min-height: 28.5rem;
  margin: 0 auto;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--aqua);
}

.hero-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  padding: clamp(1.5rem, 4.6vw, 4.1rem);
}

.hero .display { margin: .65rem 0 1.2rem; font-size: clamp(2.8rem, 5.75vw, 5.2rem); }
.hero-date { font-size: clamp(1.05rem, 2.1vw, 1.42rem); font-weight: 700; }
.hero-venue { color: var(--muted); margin: .25rem 0 1.3rem; }
.hero-photo { position: relative; min-height: 100%; background: #e0ded9; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 49%; }

.content-section {
  width: min(calc(100% - 2 * clamp(1rem, 4vw, 3rem)), 67rem);
  margin-inline: auto;
  text-align: center;
}

.event-content { padding: clamp(2.8rem, 6vw, 5rem) 0; }
.schedule-date { margin-top: .35rem; color: var(--accent-dark); font-size: clamp(1.25rem, 3vw, 1.9rem); font-weight: 700; }
.section-note { margin-top: .22rem; color: var(--muted); }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  padding: 0;
  margin: 1.6rem 0 1rem;
  list-style: none;
}

.timeline li, .detail { border: 1px solid var(--line); border-radius: 1rem; background: #fffefa; }
.timeline li { padding: 1.25rem .45rem; }
.timeline img { width: clamp(5rem, 11vw, 8rem); height: auto; margin: 0 auto .55rem; }
.timeline time { color: var(--rose); font-size: clamp(1.14rem, 2.15vw, 1.45rem); font-weight: 700; white-space: nowrap; }
.timeline p { margin-top: .3rem; line-height: 1.45; }

.event-details { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.detail { padding: 1.45rem .9rem 1.6rem; }
.detail h2 { font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
.detail p { margin: .35rem 0 .85rem; }
.swatches { display: flex; justify-content: center; gap: .58rem; padding: .4rem 0 0; margin: 0; list-style: none; }
.swatches li { width: clamp(1.7rem, 7vw, 2.35rem); aspect-ratio: 1; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #2c34331b; }

.gallery, .printed-content, .music { padding: clamp(2.9rem, 7vw, 5.5rem) 0; }
.photo-grid { columns: 4; column-gap: clamp(.45rem, 1.6vw, 1rem); margin-top: 1.5rem; }
.image-link { display: block; overflow: hidden; border-radius: .55rem; background: #e9e4dc; }
.image-link img { width: 100%; height: auto; transition: transform .35s ease; }
.image-link:hover img { transform: scale(1.03); }
.photo-grid .image-link { margin-bottom: clamp(.45rem, 1.6vw, 1rem); break-inside: avoid; }

.slideshow { max-width: 54rem; margin-inline: auto; }
.photo-grid.slide-stage { columns: auto; touch-action: pan-y; }
.slide-stage .image-link {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  height: clamp(18rem, 63svh, 36rem);
  margin: 0;
  border: 1px solid #dfe8e5;
  border-radius: .9rem;
  background: radial-gradient(ellipse, #f4f5f0, #e5efed);
}
.slide-stage .image-link:focus-visible { outline-offset: -5px; }
.slide-stage .image-link img { height: 100%; width: 100%; min-height: 0; object-fit: contain; }
.slide-stage .image-link:hover img { transform: none; }

.slideshow-controls {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: .75rem 0 .65rem;
  gap: .45rem .8rem;
  flex-wrap: wrap;
}

.slideshow-navigation { display: inline-flex; align-items: center; gap: .65rem; }
.slide-arrow, .slide-toggle {
  min-height: 2.75rem;
  border: 1px solid #b5cdcc;
  border-radius: 99px;
  background: #f3faf8;
  color: var(--accent-dark);
}
.slide-arrow:hover, .slide-toggle:hover { background: #e2efed; }
.slide-arrow { width: 2.75rem; font: 1.65rem/1 system-ui, sans-serif; }
.slide-toggle { position: absolute; right: 0; padding: .25rem .8rem; font-size: .9rem; }
.slide-count { min-width: 3.25rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.slide-thumbnails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 36rem;
  margin-inline: auto;
  gap: .45rem;
}
.slide-thumbnails button {
  flex: 0 0 4rem;
  padding: 2px;
  min-width: 0;
  border: 2px solid transparent;
  border-radius: .42rem;
  background: transparent;
}
.slide-thumbnails button[aria-current="true"] { border-color: var(--accent); }
.slide-thumbnails img { width: 100%; aspect-ratio: 1; border-radius: .23rem; object-fit: cover; object-position: center 38%; }

.printed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.65rem, 3vw, 1.7rem); max-width: 43rem; margin: 1.5rem auto 0; }
.printed-grid .image-link { border: 1px solid #ead6c5; box-shadow: 0 9px 20px #89604d15; }
.printed-grid figcaption { margin-top: .55rem; color: var(--muted); }

.song-title { margin-top: .6rem; font-size: 1.2rem; font-weight: 700; }
.player { display: block; width: min(100%, 29rem); aspect-ratio: 16/9; min-height: 200px; margin: 1rem auto .75rem; border: 0; border-radius: .65rem; background: #161e20; }
.player:not([src]) { display: none; }
.text-link { color: var(--accent-dark); font-weight: 600; text-underline-offset: .22em; }
footer { padding: 1.8rem 1rem 2rem; border-top: 1px solid var(--line); text-align: center; }
.footer-logo { width: 2.65rem; height: auto; margin: 0 auto .6rem; }
footer .display { font-size: 2.7rem; margin-bottom: .6rem; }
footer p:last-child { color: var(--muted); }

.lightbox {
  width: min(calc(100% - 1.5rem), 64rem);
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 0;
  border-radius: .75rem;
  background: #172325;
  color: #fff;
}

.lightbox::backdrop { background: #11191aeb; }
.lightbox-content { position: relative; display: grid; gap: .55rem; justify-items: center; padding: .65rem; }
.lightbox-content img { width: 100%; height: min(72dvh, 50rem); object-fit: contain; }
.lightbox-controls { width: min(100%, 34rem); display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; align-items: center; gap: .55rem; text-align: center; }
.lightbox button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid #ffffff60; background: #253e41; color: #fff; font: 1.75rem/1 system-ui, sans-serif; }
.lightbox button:hover { background: #36555a; }
.lightbox button:focus-visible { outline-color: #def5f3; }
.lightbox-close { position: absolute; top: .7rem; right: .7rem; }
.photo-count { color: #c7d8d9; font-size: .875rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { justify-items: center; text-align: center; padding: 2rem 1rem 1.7rem; }
  .hero .display { font-size: clamp(3.05rem, 12.5vw, 5.75rem); margin-bottom: .85rem; }
  .hero-photo { aspect-ratio: 1.5; }
  .photo-grid { columns: 2; }
}

@media (max-width: 520px) {
  .site-header { padding: .45rem clamp(.65rem, 3vw, 1rem); gap: .35rem; }
  .wordmark { font-size: clamp(1.15rem, 4.7vw, 1.65rem); }
  .site-header nav { gap: .15rem .6rem; }
  .site-header nav a { font-size: .875rem; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .event-details { grid-template-columns: 1fr; }
  .slide-toggle { position: static; }
  .slide-thumbnails { max-width: 18rem; gap: .3rem; }
  .slide-thumbnails button { flex-basis: calc((100% - 1.2rem) / 5); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
