/* =========================================
   Wedding invitation
   ========================================= */

:root {
  --accent: #80825b;
  --light: #c5c494;
  --dark: #482a1c;
  --curtain: #482a1c;
  --gold: #b59a61;
  --gold-light: #dfcfaa;
  --ivory: #fbf8f1;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

body {
  margin: 0;
  color: var(--dark);
  background: var(--ivory);
  font-family: Arial, "Noto Serif Khmer", sans-serif;
}

body.cover-open,
body.viewer-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  margin-bottom: 20px;
  font: 400 clamp(28px, 4vw, 50px)/1.3 Georgia, serif;
}

h3 {
  margin-bottom: 20px;
  font: italic 400 26px Georgia, serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .4;
  cursor: default;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.section {
  padding: 90px 24px;
}

.container {
  width: 100%;
  max-width: 1024px;
  margin: auto;
}

.narrow {
  max-width: 672px;
  margin: auto;
}

.centered {
  text-align: center;
}

.italic {
  font-style: italic;
}

.dark {
  background: var(--dark);
  color: white;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.light {
  color: var(--gold-light);
}

hr {
  border: 0;
  border-top: 1px solid #b59a6138;
}

.background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shade {
  position: absolute;
  inset: 0;
  background: #0005;
  pointer-events: none;
}

/* =========================================
   Opening curtain
   ========================================= */

#cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--dark);
  color: white;
}

#cover > .background,
#cover > .shade {
  transition: opacity .8s;
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 50.5%;
  background-color: var(--curtain);
  background-image: repeating-linear-gradient(
    90deg,
    #0003 0%,
    #ffffff0d 5%,
    #0005 10%,
    #ffffff08 15%,
    #0002 20%
  );
}

.curtain-left {
  left: 0;
  transform-origin: left top;
}

.curtain-right {
  right: 0;
  transform-origin: right top;
}

.cover-center {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-height: 100%;
  padding: 24px 20px;
  gap: clamp(16px, 3.5vh, 32px);
  overflow-y: auto;
  transition: opacity .45s, transform .7s;
}

.logo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 180px;
  height: 180px;
}

.logo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid #dfcfaa90;
  border-radius: 50%;
  background: #482a1c60;
}

#cover-logo {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

#cover-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: "Noto Serif Khmer", serif;
  font-size: 22px;
}

#cover-names small {
  font: italic 18px Georgia, serif;
}

.ring {
  position: absolute;
  inset: -10px;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  animation: ring-pulse 4.5s infinite;
}

.hint {
  color: #f0e5ce;
  font-size: 11px;
  letter-spacing: .14em;
}

#cover.opening {
  animation: cover-fade .6s 3.4s forwards;
  pointer-events: none;
}

#cover.opening > .background,
#cover.opening > .shade {
  opacity: 0;
}

#cover.opening .cover-center {
  opacity: 0;
  transform: scale(.9);
}

#cover.opening .curtain-left {
  animation: gather-left 3.4s ease forwards;
}

#cover.opening .curtain-right {
  animation: gather-right 3.4s ease forwards;
}

/* Guest greeting */

.guest-invitation {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  width: min(100%, 560px);
  text-align: center;
}

.guest-invitation-label {
  color: #e8d7b3;
  font-family: "Noto Serif Khmer", serif;
  font-size: clamp(14px, 3.5vw, 18px);
  line-height: 1.8;
}

.guest-invitation-name {
  display: block;
  max-width: 100%;
  color: #fff5df;
  font-family: "Noto Serif Khmer", serif;
  font-size: clamp(21px, 5vw, 34px);
  font-weight: 600;
  line-height: 1.9;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.guest-invitation-divider {
  color: #d8bd83;
  font-size: 15px;
}

/* =========================================
   Main cover
   ========================================= */

#hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 680px;
  height: 100svh;
  overflow: hidden;
  background: var(--dark);
  color: white;
  text-align: center;
}

#hero-bg {
  z-index: -2;
  object-position: center;
}

#hero > .shade {
  z-index: -1;
  background: linear-gradient(
    to bottom,
    #1b130b45,
    #1b130b12 35%,
    #1b130b38 65%,
    #1b130b85
  );
}

#frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.frame {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.invited-heading {
  position: absolute;
  top: 10%;
  left: 0;
  z-index: 4;
  width: 100%;
  padding: 0 24px;
  color: #fff8e9;
  font: italic clamp(28px, 4vw, 46px) Georgia, serif;
  text-shadow: 0 3px 15px #0005;
}

.invited-heading small {
  display: block;
  margin-top: 10px;
  color: var(--gold-light);
  font-size: 20px;
}

.hero-text {
  position: relative;
  z-index: 4;
  width: min(90%, 680px);
  padding-top: 60px;
  text-shadow: 0 3px 15px #0006;
}

.hero-text h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: "Noto Serif Khmer", serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.5;
}

.hero-text h1 small {
  color: var(--gold-light);
  font: italic 26px Georgia, serif;
}

.wedding-label {
  margin-top: 15px;
  color: #fff4db;
  font: italic 30px Georgia, serif;
}

.hero-text hr {
  width: 110px;
  margin: 25px auto;
  border-color: #dfcfaa90;
}

.hero-text > p:not(.wedding-label) {
  font-size: 14px;
  line-height: 2;
}

.location {
  opacity: .85;
}

#hero.revealed .hero-text {
  animation: romantic-enter 1.2s both;
}

.scroll-cue {
  position: absolute;
  bottom: 35px;
  left: calc(50% - 8px);
  z-index: 5;
  width: 16px;
  height: 16px;
  border-right: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
  transform: rotate(45deg);
}

/* =========================================
   Navigation
   ========================================= */

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 22px 16px;
  border-bottom: 1px solid #b59a612e;
  background: var(--ivory);
}

nav a {
  flex-shrink: 0;
  padding: 4px 0;
  font-family: "Noto Serif Khmer", serif;
  font-size: 13px;
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

/* =========================================
   Envelope
   ========================================= */

#story {
  padding: 60px 16px;
  background: #f6f3eb;
  text-align: center;
  overflow: hidden;
}

#wedding-envelope {
  --envelope-height: 187px;
  --paper-height: 700px;

  position: relative;
  isolation: isolate;
  width: min(100%, 360px);
  max-width: 360px;
  height: calc(var(--envelope-height) + 24px);
  margin: 0 auto;
  overflow: hidden;
  perspective: 1000px;
  cursor: pointer;
  transition: height 2.2s ease;
}

#wedding-envelope.is-open {
  height: calc(var(--paper-height) + 24px);
  cursor: default;
}

#wedding-paper {
  position: absolute;
  top: 12px;
  left: 6%;
  z-index: 1;
  width: 88%;
  height: var(--paper-height);
  margin: 0;
  border: 1px solid #b59a6185;
  border-radius: 4px;
  background: #fffdf7;
  font-family: "Noto Serif Khmer", serif;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;

  transform: translateY(calc(var(--envelope-height) - 48px));

  transition:
    transform 2.2s ease,
    opacity .3s,
    visibility 0s linear 2.2s;
}

#wedding-envelope.is-open #wedding-paper {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: .55s, .55s, 0s;
}

#wedding-paper-content {
  padding: 24px 16px calc(var(--envelope-height) + 12px);
}

#envelope-pocket,
#envelope-flap {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--envelope-height);
  pointer-events: none;
}

#envelope-pocket {
  z-index: 2;
  display: block;
  object-fit: fill;
}

#envelope-flap {
  z-index: 3;
  transform-origin: center top;
  backface-visibility: hidden;
}

#envelope-overlay {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

#wedding-envelope.is-open #envelope-flap {
  animation: envelope-flip 1.1s ease forwards;
}

.paper-title {
  margin-bottom: 20px;
  color: #95804f;
  font-size: 21px;
  line-height: 1.8;
}

.paper-parents {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.paper-parents p {
  margin: 5px 0;
  font-size: 11px;
  line-height: 1.9;
}

#wedding-paper .paper-intro {
  margin-bottom: 14px;
  color: #685032;
  font-family: "Noto Serif Khmer", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
}

.paper-message {
  margin-bottom: 22px;
  font-size: 13px;
  line-height: 2.1;
}

.paper-couple {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.paper-couple p {
  margin-bottom: 8px;
  font-size: 12px;
}

#wedding-paper .paper-couple h3 {
  margin: 0;
  font-family: "Noto Serif Khmer", serif;
  font-size: 20px;
  font-style: normal;
  line-height: 1.8;
}

.paper-couple > span {
  color: var(--accent);
  font-size: 24px;
}

.paper-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--gold);
}

.paper-divider span {
  width: 48px;
  height: 1px;
  background: var(--gold-light);
}

.paper-event p {
  margin: 10px 0;
  font-size: 13px;
  line-height: 2;
}

.paper-closing {
  color: #95804f;
}

#envelope-toggle {
  max-width: 100%;
  margin-top: 20px;
  padding: 13px 26px;
  border: 1px solid #b59a6175;
  background: #fffdf7;
  color: #685032;
  font-size: 12px;
  letter-spacing: .1em;
}

#envelope-help,
#envelope-error {
  margin-top: 12px;
  color: #95804f;
  font-size: 12px;
  line-height: 1.8;
}

/* =========================================
   Programme
   ========================================= */

#details,
#rsvp {
  background: var(--light);
}

#details {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#details > .background {
  z-index: -2;
}

#details.has-bg {
  color: white;
  background: var(--dark);
}

#details.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #1e140ab0;
}

#details.has-bg .eyebrow,
#details.has-bg .date,
#details.has-bg #agenda time {
  color: var(--gold-light);
}

.details-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
}

.date {
  max-width: 360px;
  color: var(--accent);
  font-size: 17px;
  line-height: 1.8;
}

.programme {
  margin-top: 40px;
}

#agenda {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
}

#agenda li {
  position: relative;
  display: grid;
  grid-template-columns: 85px 7px minmax(0, 1fr);
  column-gap: 18px;
  padding-bottom: 30px;
  font-size: 14px;
  line-height: 1.9;
}

#agenda li:last-child {
  padding-bottom: 0;
}

#agenda time {
  padding-top: 2px;
  color: var(--accent);
  font-size: 12px;
}

#agenda .dot {
  width: 7px;
  height: 7px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--gold);
}

#agenda li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 19px;
  bottom: 0;
  left: 106px;
  width: 1px;
  background: #b59a614d;
}

/* =========================================
   Minimal venue card
   ========================================= */

#venue.location-section {
  padding: 56px 20px;
  background: #fbf8f1;
}

#venue .location-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: center;
  gap: 36px;

  width: 100%;
  max-width: 820px;
  margin: auto;
  padding: 32px;

  border: 1px solid #b59a6138;
  border-radius: 16px;
  background: #fffdf8;
}

#venue .location-info {
  min-width: 0;
}

#venue .location-label {
  margin: 0 0 14px;
  color: #95804f;
  font: 10px/1.5 Arial, sans-serif;
  letter-spacing: .2em;
}

#venue .location-info h2 {
  margin: 0 0 12px;
  color: #482a1c;
  font-family: "Noto Serif Khmer", serif;
  font-size: clamp(17px, 2.5vw, 24px);
  font-weight: 500;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

#venue .location-address {
  margin: 0;
  color: #817666;
  font-family: "Noto Serif Khmer", serif;
  font-size: 12px;
  line-height: 2;
  overflow-wrap: anywhere;
}

#venue .location-button {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 10px 16px;

  border: 1px solid #b59a6160;
  border-radius: 30px;
  background: transparent;

  color: #685032;
  font-size: 12px;
  line-height: 1.8;
  text-decoration: none;

  transition:
    background .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

#venue .location-button:hover,
#venue .location-button:focus-visible {
  background: #f1ebdf;
  border-color: #b59a61;
  transform: translateY(-2px);
}

#venue .location-button span {
  transition: transform .25s ease;
}

#venue .location-button:hover span {
  transform: translate(2px, -2px);
}

#venue .location-qr {
  display: block;
  width: 140px;
  justify-self: center;
  color: #95804f;
  text-align: center;
  text-decoration: none;
}

#venue .location-qr img {
  display: block;
  width: 100%;
  height: auto;
  padding: 5px;
  border: 1px solid #b59a6138;
  border-radius: 8px;
  background: white;
}

#venue .location-qr span {
  display: block;
  margin-top: 10px;
  font-family: "Noto Serif Khmer", serif;
  font-size: 10px;
  line-height: 1.8;
}

/* =========================================
   Countdown and dress code
   ========================================= */

#countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}

#countdown span {
  display: block;
  font: clamp(38px, 6vw, 72px) Georgia, serif;
}

#countdown small {
  display: block;
  margin-top: 10px;
  color: var(--gold-light);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.body-copy {
  font-size: 14px;
  line-height: 1.9;
  opacity: .8;
}

#swatches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 35px;
}

#swatches i {
  display: block;
  width: 54px;
  height: 54px;
  margin: auto;
  border: 2px solid #ffffff80;
  border-radius: 50%;
}

#swatches p {
  margin-top: 10px;
  font-size: 10px;
}

.dress-note {
  margin-top: 25px;
  font-size: 12px;
  font-style: italic;
  opacity: .7;
}

/* =========================================
   Film album
   ========================================= */

#album {
  --film-card-width: min(70vw, 660px);

  padding: 75px 0 60px;
  overflow: hidden;
  color: #f7efdf;
  background: #20231d;
}

.album-heading {
  padding: 0 24px 35px;
  text-align: center;
}

.album-heading .eyebrow {
  color: var(--gold-light);
}

.album-ornament {
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 22px;
}

.album-instruction {
  color: #dfcfaa95;
  font-size: 12px;
  line-height: 1.8;
}

.film-shell {
  border-top: 1px solid #dfcfaa40;
  border-bottom: 1px solid #dfcfaa40;
  background: #10120f;
}

.film-edge {
  height: 30px;
  margin: 0 12px;
  background: repeating-linear-gradient(
    90deg,
    #b8ad8d 0,
    #b8ad8d 12px,
    transparent 12px,
    transparent 30px
  ) center / auto 11px repeat-x;
}

#film-track {
  position: relative;
  display: flex;
  gap: 18px;
  width: 100%;
  padding: 8px max(18px, calc((100% - var(--film-card-width)) / 2));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

#film-track::-webkit-scrollbar {
  display: none;
}

.film-photo {
  position: relative;
  flex: 0 0 var(--film-card-width);
  height: clamp(300px, 58vh, 530px);
  padding: 0;
  border: 1px solid #dfcfaa30;
  background: #292d25;
  overflow: hidden;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.film-photo.is-current {
  border-color: var(--gold-light);
}

.film-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.film-photo.is-loaded img {
  opacity: 1;
}

.film-photo::before {
  content: "Select this frame";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #dfcfaa;
  font: italic 18px Georgia, serif;
  pointer-events: none;
}

.film-photo.is-loading::before {
  content: "Loading photograph…";
}

.film-photo.has-error::before {
  content: "Photo unavailable";
}

.film-photo.is-loaded::before {
  display: none;
}

.film-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px 0;
}

.film-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #dfcfaa45;
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
}

#film-counter {
  min-width: 68px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .14em;
}

#film-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding: 0 20px;
}

#film-dots button {
  width: 24px;
  height: 24px;
  padding: 8px;
  border: 0;
  background: transparent;
}

#film-dots button::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dfcfaa45;
}

#film-dots button.is-current::before {
  background: var(--gold-light);
}

/* =========================================
   Photo viewer
   ========================================= */

#lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 65px 70px;
  border: 0;
  background: #151611;
  color: var(--gold-light);
}

#lightbox[open] {
  display: grid;
  place-items: center;
}

#lightbox::backdrop {
  background: #000e;
}

#lightbox-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
}

#lightbox.is-loading #lightbox-photo {
  opacity: 0;
}

#viewer-status {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 20px;
  text-align: center;
  font: italic 18px Georgia, serif;
}

#close-lightbox,
#lightbox-prev,
#lightbox-next {
  position: absolute;
  z-index: 2;
  padding: 12px 16px;
  border: 1px solid #dfcfaa50;
  border-radius: 30px;
  background: #1d2019;
  color: var(--gold-light);
}

#close-lightbox {
  top: 18px;
  right: 18px;
  font-size: 12px;
}

#lightbox-prev {
  top: calc(50% - 23px);
  left: 14px;
}

#lightbox-next {
  top: calc(50% - 23px);
  right: 14px;
}

#lightbox-count {
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 11px;
  letter-spacing: .14em;
  pointer-events: none;
}

/* =========================================
   RSVP
   ========================================= */

.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 55px;
  margin-top: 40px;
}

form > label,
#guest-field > label,
legend {
  display: block;
  margin: 18px 0 8px;
  font-size: 11px;
  line-height: 1.5;
}

form > input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #b59a6145;
  background: #fffdf7;
  color: var(--dark);
  font-size: 14px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.attendance {
  display: flex;
  gap: 12px;
}

.attendance label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid #b59a6145;
  background: #fffdf7;
  font-size: 12px;
}

input[type="radio"] {
  accent-color: var(--accent);
}

.prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.prompts button {
  padding: 7px 10px;
  border: 1px solid #80825b4d;
  background: transparent;
  color: var(--dark);
  font-size: 11px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.outline {
  display: inline-block;
  padding: 14px 22px;
  border: 1px solid var(--dark);
  background: transparent;
  color: var(--dark);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
}

.dark .outline {
  margin-top: 30px;
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.form-note {
  margin: 12px 0;
  font-size: 12px;
  line-height: 1.6;
  opacity: .75;
}

#wishes {
  max-height: 480px;
  overflow-y: auto;
}

.wish-card {
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid #b59a6138;
  background: #fffdf7;
}

.wish-card .message {
  margin-bottom: 12px;
  font: italic 16px/1.6 Georgia, serif;
  overflow-wrap: anywhere;
}

.wish-card .author {
  font-size: 11px;
  opacity: .7;
}

#thanks {
  padding: 50px 0;
}

#thanks p {
  margin: 12px 0;
  line-height: 1.8;
}

/* =========================================
   Footer and music
   ========================================= */

footer h2 {
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
}

footer p {
  line-height: 1.8;
}

.footer-names {
  margin-top: 55px;
  font-size: 12px;
  opacity: .75;
}

#music {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  width: 52px;
  height: 52px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--dark);
  color: var(--gold-light);
}

.reveal {
  transition: opacity .8s, transform .8s;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(16px);
}

/* =========================================
   Animations
   ========================================= */

@keyframes gather-left {
  0% {
    transform: scaleX(1);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      0 100%
    );
  }

  45% {
    transform: scaleX(.65);
    clip-path: polygon(
      0 0,
      100% 0,
      96% 20%,
      82% 55%,
      58% 100%,
      0 100%
    );
  }

  100% {
    transform: scaleX(.035);
    clip-path: polygon(
      0 0,
      100% 0,
      90% 20%,
      70% 55%,
      40% 100%,
      0 100%
    );
  }
}

@keyframes gather-right {
  0% {
    transform: scaleX(1);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      0 100%
    );
  }

  45% {
    transform: scaleX(.65);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      42% 100%,
      18% 55%,
      4% 20%
    );
  }

  100% {
    transform: scaleX(.035);
    clip-path: polygon(
      0 0,
      100% 0,
      100% 100%,
      60% 100%,
      30% 55%,
      10% 20%
    );
  }
}

@keyframes cover-fade {
  to {
    opacity: 0;
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    opacity: .35;
    transform: scale(1);
  }

  50% {
    opacity: 0;
    transform: scale(1.15);
  }
}

@keyframes envelope-flip {
  0% {
    transform: rotateX(0deg);
    z-index: 3;
    opacity: 1;
  }

  49% {
    z-index: 3;
    opacity: 1;
  }

  50% {
    transform: rotateX(90deg);
    z-index: 0;
    opacity: 1;
  }

  100% {
    transform: rotateX(180deg);
    z-index: 0;
    opacity: 0;
  }
}

@keyframes romantic-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 767px) {
  .section {
    padding: 70px 20px;
  }

  #hero {
    min-height: 620px;
  }

  nav {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 22px;
  }

  nav a:first-child {
    margin-left: auto;
  }

  nav a:last-child {
    margin-right: auto;
  }

  #story {
    padding: 45px 16px;
  }

  .details-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .rsvp-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #countdown {
    gap: 24px;
  }

  .attendance {
    flex-direction: column;
  }

  #album {
    --film-card-width: 82vw;
    padding-top: 60px;
  }

  .film-photo {
    height: clamp(320px, 58svh, 470px);
  }

  #film-track {
    gap: 12px;
  }

  .film-edge {
    height: 26px;
  }

  #lightbox {
    padding: 65px 12px 75px;
  }

  #lightbox-prev,
  #lightbox-next {
    top: auto;
    bottom: 17px;
  }

  #lightbox-count {
    bottom: 32px;
  }
}

@media (max-width: 600px) {
  #venue.location-section {
    padding: 36px 16px;
  }

  #venue .location-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 18px;
    padding: 24px 18px;
    border-radius: 12px;
  }

  #venue .location-qr {
    width: 112px;
  }

  #venue .location-info h2 {
    font-size: 16px;
  }

  #venue .location-address {
    font-size: 11px;
  }

  #venue .location-button {
    gap: 12px;
    padding: 8px 12px;
  }
}

@media (max-width: 380px) {
  #story {
    padding-right: 12px;
    padding-left: 12px;
  }

  #wedding-paper-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .paper-title {
    font-size: 19px;
  }

  #wedding-paper .paper-couple h3 {
    font-size: 18px;
  }

  #countdown {
    gap: 18px;
  }
}

@media (max-width: 350px) {
  #venue .location-card {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
}

@media (max-height: 560px) {
  #cover .logo-wrap {
    width: 110px;
    height: 110px;
  }

  #cover .cover-center {
    gap: 12px;
    padding-block: 16px;
  }

  .guest-invitation-name {
    font-size: 22px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal.pending {
    opacity: 1;
    transform: none;
  }

  #wedding-envelope.is-open #envelope-flap {
    transform: rotateX(180deg);
    z-index: 0;
    opacity: 0;
  }

  #venue .location-button:hover,
  #venue .location-button:focus-visible,
  #venue .location-button:hover span {
    transform: none;
  }
}