:root {
  --page-width: 650px;
  --page-height: 882px;
  --ink: #02082a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img {
  -webkit-user-drag: none;
  pointer-events: none;
  user-select: none;
}

a {
  pointer-events: auto;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  overflow-x: hidden;

  background: #fff;
  color: var(--ink);

  font-family: "Lora", serif;
}


/* ==================================================
   PAGE
   Không scale bằng transform nữa
================================================== */

.page {
  position: relative;

  width: min(650px, 100vw);

  overflow: hidden;

  background: #fff;
}


/* ==================================================
   COVER
================================================== */

.cover-card {
  position: relative;

  width: 100%;
  aspect-ratio: 650 / 882;

  background: #fff;

  /*
    Cho phép dùng cqw:
    1cqw = 1% chiều rộng cover-card
  */
  container-type: inline-size;
}


/* ==================================================
   PHOTO
================================================== */

.photo-frame {
  position: absolute;
  z-index: 3;

  /* 80 / 882 */
  top: 8.2%;

  /* 175 / 650 */
  left: 26.5%;

  /* 260 / 650 */
  width: 47%;

  /*
    10px khi card = 650px
  */
  padding: 1.538cqw;
  box-sizing: border-box;

  background: #fff;

  box-shadow:
    0 0 0 1px rgba(215, 215, 215, 0.8),
    0 4px 18px rgba(0, 0, 0, 0.25);

  overflow: hidden;
}

.photo-frame img {
  display: block;

  width: 100%;
  height: auto;

  /*
    Nếu dùng file 520x720 thì nó tự ra đúng 13:18.
  */
}


/* ==================================================
   ENVELOPE
================================================== */

.envelope-back,
.envelope-front {
  position: absolute;

  /* 254 / 882 */
  top: 28.2%;

  /* 91 / 650 */
  left: 4%;

  /* 442 / 650 */
  width: 92%;

  height: auto;

  filter:
    drop-shadow(
      0
      5px
      7px
      rgba(0, 0, 0, 0.22)
    );
}

.envelope-back {
  z-index: 2;
}

.envelope-front {
  z-index: 4;
}


/* ==================================================
   FLOWER RIGHT
================================================== */

.flower-right {
  position: absolute;
  z-index: 6;

  /* 200 / 882 */
  top: 18.4%;

  /* 380 / 650 */
  left: 63%;

  /* 172 / 650 */
  width: 31%;

  height: auto;

  filter:
    drop-shadow(
      7px
      7px
      7px
      rgba(0, 0, 0, 0.26)
    );
}


/* ==================================================
   FLOWER LEFT
================================================== */

.flower-left {
  position: absolute;
  z-index: 7;

  /* 492 / 882 */
  top: 54.8%;

  /* 80 / 650 */
  left: 4%;

  /* 160 / 650 */
  width: 31%;

  height: auto;

  filter:
    drop-shadow(
      5px
      6px
      5px
      rgba(0, 0, 0, 0.20)
    );
}


/* ==================================================
   NAME BOARD
================================================== */

.name-board {
  position: absolute;
  z-index: 8;

  /* 460 / 882 */
  top: 58%;

  /* 389 / 650 */
  left: 58%;

  /* 202 / 650 */
  width: 36%;

  height: auto;

  filter:
    drop-shadow(
      0
      5px
      6px
      rgba(0, 0, 0, 0.32)
    );
}


/* ==================================================
   NAMES
================================================== */

.names {
  position: absolute;
  z-index: 9;

  /* 524 / 882 */
  top: 66%;

  /* 429 / 650 */
  left: 65.2%;

  /* 130 / 650 */
  width: 22%;

  display: grid;
  place-items: center;

  color: var(--ink);

  text-align: center;
}

.names p {
  font-family: "Great Vibes", cursive;

  /*
    26px khi card rộng 650px
  */
  font-size: 4.5cqw;

  line-height: 1.08;

  white-space: nowrap;
}

.names span {
  margin: 0.462cqw 0;

  font-family: "Great Vibes", cursive;

  /* 25px / 650 */
  font-size: 4.15cqw;

  line-height: 1;
}

.names time {
  margin-top: 1.385cqw;

  /* 16px / 650 */
  font-size: 2.65cqw;

  line-height: 1;
}


/* ==================================================
   COUNTDOWN
================================================== */

.countdown-section {
  width: 100%;
  padding: 0 5.385% 4.4%;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.countdown-section h2 {
  margin-bottom: 4.2%;
  font-size: clamp(22px, 4.15cqw, 27px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.46%;
  width: 100%;
  perspective: 900px;
}

.countdown-item {
  display: grid;
  justify-items: center;
  gap: 0.95cqw;
  min-width: 0;
  transform-style: preserve-3d;
}

.countdown-item strong {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.12 / 1;
  border-radius: 24%;
  background: #555b34;
  color: #fff;
  font-size: clamp(30px, 5.85cqw, 38px);
  font-weight: 400;
  line-height: 1;
}

.countdown-item span {
  font-size: clamp(15px, 2.77cqw, 18px);
  line-height: 1;
}


/* ==================================================
   COUPLE PHOTO SECTION
================================================== */

.couple-section {
  position: relative;
  width: 100%;
  aspect-ratio: 650 / 520;
  margin-top: 2%;
  background: #fff;
  container-type: inline-size;
}

.couple-card {
  position: absolute;
  z-index: 2;
  display: grid;
  grid-template-rows: 76% 24%;
  padding: 1.54cqw;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(218, 218, 218, 0.86),
    0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.couple-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.couple-card-groom {
  top: 3%;
  left: 3%;
  width: 48%;
  height: 82%;
}

.couple-card-bride {
  top: 16%;
  left: 51%;
  width: 48%;
  height: 82%;
}

.couple-card-groom img {
  object-position: center top;
}

.couple-card-bride img {
  object-position: center 42%;
}

.couple-caption {
  display: grid;
  place-items: center;
  padding-top: 1.35cqw;
  color: var(--ink);
  text-align: center;
}

.couple-caption em {
  font-family: "Great Vibes", cursive;
  font-size: clamp(28px, 6.6cqw, 43px);
  font-style: normal;
  line-height: 0.95;
}

.couple-caption strong {
  margin-top: 0.7cqw;
  font-size: clamp(14px, 2.65cqw, 17px);
  font-weight: 500;
  line-height: 1;
}

.couple-flower {
  position: absolute;
  z-index: 5;
  top: 18%;
  left: 48%;
  width: 24%;
  height: auto;
  translate: -50% 0;
  filter:
    drop-shadow(
      6px
      7px
      6px
      rgba(0, 0, 0, 0.26)
    );
}


/* ==================================================
   FAMILIES SECTION
================================================== */

.families-section {
  width: 100%;
  padding: 1.6% 3.2% 6.5%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
}

.married-photo {
  position: relative;
  width: 91%;
  margin: 0 auto;
  overflow: hidden;
}

.married-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.married-photo figcaption {
  position: absolute;
  left: 50%;
  bottom: 4.5%;
  display: grid;
  justify-items: center;
  width: 70%;
  color: #fff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.28),
    0 7px 16px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%);
  pointer-events: none;
}

.married-photo figcaption span {
  margin-bottom: -4.4cqw;
  font-family: "Great Vibes", cursive;
  font-size: clamp(52px, 13.5cqw, 88px);
  line-height: 0.9;
}

.married-photo figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 10.8cqw, 70px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.families-invite {
  margin: 8.2% auto 8.6%;
  width: 92%;
  font-size: clamp(18px, 4cqw, 26px);
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0;
}

.families-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3%;
  width: 100%;
  margin: 0 auto;
}

.family-block {
  min-width: 0;
}

.family-block h3 {
  margin-bottom: 6.5%;
  font-size: clamp(16px, 3.15cqw, 20px);
  font-weight: 700;
  line-height: 1;
}

.family-block p {
  font-size: clamp(14px, 2.9cqw, 14px);
  line-height: 1.42;
  white-space: nowrap;
}


/* ==================================================
   EVENTS SECTION
================================================== */

.events-section {
  width: 100%;
  padding: 3.8% 3.3% 6.8%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
}

.events-names {
  display: grid;
  place-items: center;
  margin-bottom: 7.3%;
}

.events-names p,
.events-names span {
  font-family: "Great Vibes", cursive;
  line-height: 0.96;
}

.events-names p {
  font-size: clamp(42px, 11.6cqw, 76px);
}

.events-names span {
  margin: 1.6cqw 0;
  font-size: clamp(34px, 8.2cqw, 54px);
}

.event-card {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 47.8cqw;
  margin: 0 auto 6.9%;
  padding: 5.2% 6.4%;
  border-radius: 4.1cqw;
  background: #555b34;
  color: #fff;
  overflow: hidden;
}

.event-card:last-child {
  margin-bottom: 0;
}

.event-content {
  display: grid;
  justify-items: center;
  width: 100%;
}

.event-card h2,
.event-card h3 {
  font-size: clamp(17px, 3.35cqw, 22px);
  font-weight: 700;
  line-height: 1.2;
}

.event-card h2 {
  margin-bottom: 3.2%;
}

.event-card h3 {
  margin: 3.6% 0 3.8%;
}

.event-card p {
  font-size: clamp(14px, 2.75cqw, 18px);
  font-weight: 500;
  line-height: 1.35;
}

.event-date {
  display: grid;
  place-items: center;
  width: 44%;
  margin: 3.8% auto 3.2%;
  padding: 1.1% 0 1.2%;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  font-size: clamp(27px, 6.2cqw, 40px);
  font-weight: 700;
  line-height: 1;
}

.event-lunar {
  font-size: clamp(13px, 2.52cqw, 16px);
  font-weight: 600;
}

.event-address {
  width: 100%;
  margin-bottom: 4.5%;
}

.event-map-link {
  display: inline-grid;
  place-items: center;
  min-width: 54%;
  min-height: 5.4cqw;
  padding: 1.2% 5.8%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(14px, 2.72cqw, 18px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.event-map-link.is-visible {
  animation: mapLinkPulse 1.55s ease-in-out infinite;
}

@keyframes mapLinkPulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }

  50% {
    opacity: 0.72;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.42);
  }
}


/* ==================================================
   LOVE SECTION
================================================== */

.love-section {
  width: 100%;
  padding: 4.8% 5.2% 6.6%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
}

.love-hero {
  width: 91%;
  margin: 0 auto;
  overflow: hidden;
}

.love-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.love-title {
  margin: 11.5% 0 7.3%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 10.6cqw, 69px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.love-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.6%;
  width: 82%;
  margin: 0 auto 5.5%;
}

.love-thumb {
  aspect-ratio: 0.72 / 1;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(226, 226, 226, 0.9),
    0 4px 11px rgba(0, 0, 0, 0.18);
}

.love-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.love-copy {
  width: 82%;
  margin: 0 auto;
  font-size: clamp(15px, 2.7cqw, 17px);
  line-height: 1.45;
}


/* ==================================================
   CALENDAR SECTION
================================================== */

.calendar-section {
  width: 100%;
  padding: 1.8% 5.2% 9.5%;
  background: #fff;
  color: #fff;
  text-align: center;
  container-type: inline-size;
}

.calendar-line {
  width: 1px;
  height: 10.6cqw;
  margin: 0 auto 8.6%;
  background: rgba(0, 0, 0, 0.62);
}

.calendar-wrap {
  position: relative;
  width: 78%;
  margin: 0 auto;
}

.calendar-card {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 61.2cqw;
  padding: 8.2% 5.6% 6.4%;
  border-radius: 4.2cqw;
  background: #555b34;
  overflow: visible;
}

.calendar-card h2 {
  margin-bottom: 6.2%;
  font-size: clamp(17px, 3.2cqw, 21px);
  font-weight: 700;
  line-height: 1.34;
}

.calendar-month {
  margin-bottom: 7.5%;
  font-family: "Great Vibes", cursive;
  font-size: clamp(42px, 9.7cqw, 63px);
  line-height: 0.88;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 3.25cqw;
  align-items: center;
  width: 100%;
  font-size: clamp(13px, 2.45cqw, 16px);
  font-weight: 700;
  line-height: 1;
}

.calendar-grid span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 3cqw;
}

.calendar-grid b {
  position: relative;
  z-index: 2;
  font: inherit;
}

.calendar-day-heart i {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  font-family: Arial, sans-serif;
  font-size: clamp(34px, 7.3cqw, 47px);
  font-style: normal;
  line-height: 1;
  transform: translate(-50%, -48%);
  animation: calendarHeartBeat 1.12s ease-in-out infinite;
}

.calendar-flower-left,
.calendar-flower-top,
.calendar-flower-right,
.calendar-seal {
  position: absolute;
  height: auto;
  pointer-events: none;
}

.calendar-flower-left {
  z-index: 5;
  top: -8%;
  left: -14%;
  width: 27%;
  filter: drop-shadow(4px 6px 6px rgba(0, 0, 0, 0.24));
}

.calendar-flower-top {
  z-index: 4;
  top: -17%;
  left: 54%;
  width: 28%;
  transform: translateX(-50%);
  filter: drop-shadow(4px 5px 5px rgba(0, 0, 0, 0.2));
}

.calendar-seal {
  z-index: 6;
  top: -10%;
  left: 50%;
  width: 17%;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.28));
}

.calendar-flower-right {
  z-index: 5;
  right: -14%;
  bottom: -20%;
  width: 25%;
  filter: drop-shadow(5px 7px 6px rgba(0, 0, 0, 0.24));
}

@keyframes calendarHeartBeat {
  0%,
  100% {
    opacity: 0.68;
    transform:
      translate(-50%, -48%)
      scale(0.92);
  }

  50% {
    opacity: 1;
    transform:
      translate(-50%, -48%)
      scale(1.08);
  }
}


/* ==================================================
   ANIMATION BASE
================================================== */

.js-animate {
  opacity: 0;

  will-change:
    opacity,
    transform;
}

.js-animate.is-visible {
  opacity: 1;
}


/* ==================================================
   ENVELOPE ANIMATION
================================================== */

.js-animate[data-effect="envelope"] {
  transform:
    translateY(2.77cqw)
    scale(0.985);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.js-animate[data-effect="envelope"].is-visible {
  transform:
    translateY(0)
    scale(1);
}


/* ==================================================
   PHOTO ANIMATION
================================================== */

.js-animate[data-effect="photo"] {
  transform:
    translateY(11.08cqw)
    scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.2,
        0.8,
        0.2,
        1
      );
}

.js-animate[data-effect="photo"].is-visible {
  transform:
    translateY(0)
    scale(1);
}


/* ==================================================
   FLOWER RIGHT ANIMATION
================================================== */

.js-animate[data-effect="flower-right"] {
  transform:
    translate(
      4.31cqw,
      2.46cqw
    )
    rotate(3deg)
    scale(0.96);

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="flower-right"].is-visible {
  transform:
    translate(0, 0)
    rotate(0)
    scale(1);
}


/* ==================================================
   FLOWER LEFT ANIMATION
================================================== */

.js-animate[data-effect="flower-left"] {
  transform:
    translate(
      -4.31cqw,
      2.77cqw
    )
    rotate(-4deg)
    scale(0.96);

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="flower-left"].is-visible {
  transform:
    translate(0, 0)
    rotate(0)
    scale(1);
}


/* ==================================================
   BOARD ANIMATION
================================================== */

.js-animate[data-effect="board"] {
  transform:
    translateY(3.69cqw)
    scale(0.94);

  transition:
    opacity 0.75s ease,
    transform 0.85s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="board"].is-visible {
  transform:
    translateY(0)
    scale(1);
}


/* ==================================================
   NAMES ANIMATION
================================================== */

.js-animate[data-effect="names"] {
  transform:
    translateY(1.54cqw)
    scale(0.92);

  transition:
    opacity 0.65s ease,
    transform 0.75s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="names"].is-visible {
  transform:
    translateY(0)
    scale(1);
}


/* ==================================================
   COUNTDOWN TITLE ANIMATION
================================================== */

.js-animate[data-effect="countdown-title"] {
  transform:
    translateY(4.2cqw);

  transition:
    opacity 0.9s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="countdown-title"].is-visible {
  transform:
    translateY(0);
}


/* ==================================================
   COUNTDOWN CARD FLIP ANIMATION
================================================== */

.js-animate[data-effect="countdown-card"] {
  transform:
    rotateX(86deg)
    translateY(2.4cqw)
    scale(0.96);

  transform-origin:
    center bottom;

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="countdown-card"].is-visible {
  transform:
    rotateX(0deg)
    translateY(0)
    scale(1);
}


/* ==================================================
   COUPLE SECTION ANIMATION
================================================== */

.js-animate[data-effect="couple-photo-left"] {
  transform:
    translate(-16cqw, 4cqw)
    rotate(-2deg)
    scale(0.96);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="couple-photo-left"].is-visible {
  transform:
    translate(0, 0)
    rotate(0)
    scale(1);
}

.js-animate[data-effect="couple-photo-right"] {
  transform:
    translate(16cqw, 4cqw)
    rotate(2deg)
    scale(0.96);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="couple-photo-right"].is-visible {
  transform:
    translate(0, 0)
    rotate(0)
    scale(1);
}

.js-animate[data-effect="couple-flower"] {
  transform:
    translateY(3.2cqw)
    scale(0.9);

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="couple-flower"].is-visible {
  transform:
    translateY(0)
    scale(1);
}


/* ==================================================
   FAMILIES SECTION ANIMATION
================================================== */

.js-animate[data-effect="families-photo"] {
  transform:
    translateY(5cqw)
    scale(0.96);

  transition:
    opacity 0.95s ease,
    transform 1.15s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="families-photo"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="families-invite"] {
  transform:
    translateY(4.2cqw)
    scale(0.98);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="families-invite"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="family-left"] {
  transform:
    translate(-5cqw, 3cqw)
    scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="family-right"] {
  transform:
    translate(5cqw, 3cqw)
    scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="family-left"].is-visible,
.js-animate[data-effect="family-right"].is-visible {
  transform:
    translate(0, 0)
    scale(1);
}


/* ==================================================
   EVENTS SECTION ANIMATION
================================================== */

.js-animate[data-effect="events-names"] {
  transform:
    translateY(4.5cqw)
    scale(0.96);

  transition:
    opacity 0.95s ease,
    transform 1.1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="events-names"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="event-card-party"],
.js-animate[data-effect="event-card-ceremony"] {
  transform:
    translateY(5.2cqw)
    scale(0.965);

  transition:
    opacity 0.9s ease,
    transform 1.05s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="event-card-party"].is-visible,
.js-animate[data-effect="event-card-ceremony"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.event-text.js-animate {
  transform:
    translateY(2.4cqw);

  transition:
    opacity 0.7s ease,
    transform 0.8s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.event-text.js-animate.is-visible {
  transform:
    translateY(0);
}


/* ==================================================
   LOVE SECTION ANIMATION
================================================== */

.js-animate[data-effect="love-hero"] {
  transform:
    translateY(5cqw)
    scale(0.965);

  transition:
    opacity 0.95s ease,
    transform 1.15s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="love-hero"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="love-title"] {
  transform:
    translateY(4.4cqw)
    scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="love-title"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="love-thumb"] {
  transform:
    translateY(3.2cqw)
    scale(0.94);

  transition:
    opacity 0.82s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="love-thumb"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="love-copy"] {
  transform:
    translateY(3cqw);

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="love-copy"].is-visible {
  transform:
    translateY(0);
}


/* ==================================================
   CALENDAR SECTION ANIMATION
================================================== */

.js-animate[data-effect="calendar-line"] {
  transform:
    scaleY(0);
  transform-origin:
    center top;

  transition:
    opacity 0.7s ease,
    transform 0.9s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-line"].is-visible {
  transform:
    scaleY(1);
}

.js-animate[data-effect="calendar-card"] {
  transform:
    translateY(5cqw)
    scale(0.965);

  transition:
    opacity 0.95s ease,
    transform 1.1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-card"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="calendar-copy"] {
  transform:
    translateY(2.8cqw);

  transition:
    opacity 0.75s ease,
    transform 0.85s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-copy"].is-visible {
  transform:
    translateY(0);
}

.js-animate[data-effect="calendar-flower-left"] {
  transform:
    translate(-4cqw, 2.6cqw)
    rotate(-4deg)
    scale(0.92);

  transition:
    opacity 0.85s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-flower-top"] {
  transform:
    translate(-50%, 3cqw)
    rotate(5deg)
    scale(0.92);

  transition:
    opacity 0.85s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-seal"] {
  transform:
    translateX(-50%)
    scale(0.8);

  transition:
    opacity 0.8s ease,
    transform 0.9s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-flower-right"] {
  transform:
    translate(4cqw, 3cqw)
    rotate(4deg)
    scale(0.92);

  transition:
    opacity 0.85s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="calendar-flower-left"].is-visible,
.js-animate[data-effect="calendar-flower-right"].is-visible {
  transform:
    translate(0, 0)
    rotate(0)
    scale(1);
}

.js-animate[data-effect="calendar-flower-top"].is-visible {
  transform:
    translateX(-50%)
    rotate(0)
    scale(1);
}

.js-animate[data-effect="calendar-seal"].is-visible {
  transform:
    translateX(-50%)
    scale(1);
}


/* ==================================================
   ACCESSIBILITY
================================================== */

@media (prefers-reduced-motion: reduce) {

  .js-animate,
  .js-animate.is-visible {
    opacity: 1;

    transform: none;

    transition: none;
  }

}


/* ==================================================
   THANK YOU SECTION
================================================== */

.thank-section {
  position: relative;
  width: 100%;
  aspect-ratio: 650 / 520;
  background: #111;
  color: #fff;
  overflow: hidden;
  container-type: inline-size;
}

.thank-section img {
  display: block;
  width: 100%;
  height: calc(100% - 6.2cqw);
  object-fit: cover;
  object-position: center 43%;
}

.thank-section::after {
  content: "";
  position: absolute;
  inset: 0 0 6.2cqw;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.02) 15%,
      rgba(0, 0, 0, 0.44) 100%
    );
  pointer-events: none;
}

.thank-overlay {
  position: absolute;
  z-index: 2;
  left: 5%;
  right: 5%;
  bottom: 8.8cqw;
  display: grid;
  justify-items: center;
  text-align: center;
}

.thank-overlay h2 {
  margin-bottom: 1.2cqw;
  font-family: "Great Vibes", cursive;
  font-size: clamp(40px, 10.5cqw, 68px);
  font-weight: 400;
  line-height: 0.9;
}

.thank-overlay p {
  font-size: clamp(12px, 2.55cqw, 16px);
  font-weight: 700;
  line-height: 1.35;
}

.thank-section footer {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  height: 6.2cqw;
  background: #000;
  color: #fff;
  font-size: clamp(10px, 2.15cqw, 14px);
  font-weight: 700;
  line-height: 1;
}


/* ==================================================
   THANK YOU SECTION ANIMATION
================================================== */

.js-animate[data-effect="thank-section"] {
  transform:
    translateY(4.6cqw)
    scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 1.05s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="thank-section"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="thank-text"] {
  transform:
    translateY(2.6cqw);

  transition:
    opacity 0.8s ease,
    transform 0.9s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="thank-text"].is-visible {
  transform:
    translateY(0);
}

@media (max-width: 650px) {

  .thank-overlay {
    left: 3.5%;
    right: 3.5%;
  }

  .thank-overlay p {
    font-size: clamp(10px, 2.52cqw, 13px);
  }

}


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

.rsvp-section {
  width: 100%;
  padding: 5.5% 7.2% 8.5%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
}

.rsvp-intro {
  margin: 0 auto 6%;
  font-size: clamp(15px, 2.75cqw, 18px);
  line-height: 1.45;
}

.rsvp-form {
  display: grid;
  gap: 2.6cqw;
  width: 86%;
  margin: 0 auto;
}

.rsvp-form label {
  display: grid;
  text-align: left;
}

.rsvp-form label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
  width: 100%;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: clamp(15px, 2.72cqw, 18px);
  outline: none;
}

.rsvp-form input,
.rsvp-form select {
  min-height: 6.2cqw;
  padding: 0 3.1%;
}

.rsvp-form textarea {
  min-height: 13.4cqw;
  padding: 2.4% 3.1%;
  border-radius: 2.5cqw;
  resize: vertical;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(2, 8, 42, 0.74);
}

.rsvp-form button {
  display: grid;
  place-items: center;
  min-height: 6.1cqw;
  border: 0;
  border-radius: 999px;
  background: #555b34;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: clamp(14px, 2.62cqw, 17px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.rsvp-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.rsvp-status {
  min-height: 1.2em;
  font-size: clamp(13px, 2.4cqw, 15px);
  line-height: 1.35;
}

.rsvp-status.is-success {
  color: #555b34;
  font-weight: 700;
}

.rsvp-status.is-error {
  color: #a12d2d;
  font-weight: 700;
}

.gift-button {
  display: grid;
  place-items: center;
  width: 86%;
  min-height: 6.1cqw;
  margin: 3.8cqw auto 0;
  border: 0;
  border-radius: 999px;
  background: #555b34;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: clamp(14px, 2.62cqw, 17px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gift-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gift-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 42, 0.52);
}

.gift-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  width: min(560px, 100%);
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(0.96);
  transition: transform 0.25s ease;
}

.gift-modal.is-open .gift-dialog {
  transform: translateY(0) scale(1);
}

.gift-close {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.gift-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.gift-info {
  display: grid;
  gap: 9px;
  text-align: left;
}

.gift-info strong,
.gift-info span {
  display: block;
  line-height: 1.25;
}

.gift-info strong {
  font-size: clamp(18px, 3.4cqw, 22px);
  font-weight: 700;
}

.gift-info span {
  font-size: clamp(16px, 3cqw, 20px);
  font-weight: 500;
}

body.gift-modal-open {
  overflow: hidden;
}


/* ==================================================
   RSVP SECTION ANIMATION
================================================== */

.js-animate[data-effect="rsvp-intro"] {
  transform:
    translateY(3.4cqw);

  transition:
    opacity 0.85s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="rsvp-form"] {
  transform:
    translateY(4cqw)
    scale(0.98);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="rsvp-intro"].is-visible {
  transform:
    translateY(0);
}

.js-animate[data-effect="rsvp-form"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="gift-button"] {
  transform:
    translateY(3cqw);

  transition:
    opacity 0.75s ease,
    transform 0.85s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="gift-button"].is-visible {
  transform:
    translateY(0);
}

@media (max-width: 650px) {

  .rsvp-section {
    padding-inline: 3.2%;
  }

  .rsvp-form {
    width: 94%;
  }

  .gift-button {
    width: 94%;
    min-height: 9.4cqw;
    font-size: clamp(12px, 3.05cqw, 15px);
  }

  .rsvp-form input,
  .rsvp-form select {
    min-height: 9.4cqw;
  }

  .rsvp-form textarea {
    min-height: 20cqw;
  }

  .rsvp-form button {
    min-height: 9.4cqw;
    font-size: clamp(12px, 3.05cqw, 15px);
  }

  .gift-dialog {
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 360px;
    padding: 22px 18px 20px;
  }

  .gift-qr {
    width: min(250px, 100%);
    margin: 0 auto;
  }

  .gift-info {
    text-align: center;
  }

}

@media (max-width: 650px) {

  body {
    padding-inline: 0.5cm;
  }

  .page {
    width: calc(100vw - 1cm);
  }

  .families-invite {
    width: 100%;
    font-size: clamp(15px, 3.35cqw, 19px);
    line-height: 1.45;
  }

  .families-section {
    padding-inline: 1.2%;
  }

  .families-grid {
    gap: 1.2%;
    width: 100%;
  }

  .family-block h3 {
    font-size: clamp(14px, 3.05cqw, 17px);
  }

  .family-block p {
    font-size: clamp(11px, 2.62cqw, 14px);
    line-height: 1.38;
  }

  .calendar-section {
    padding-inline: 1.2%;
  }

  .calendar-wrap {
    width: 88%;
  }

  .calendar-card {
    padding-inline: 4.2%;
  }

  .calendar-card h2 {
    font-size: clamp(14px, 3.1cqw, 18px);
    line-height: 1.32;
  }

  .calendar-grid {
    row-gap: 3.85cqw;
    font-size: clamp(11px, 2.55cqw, 15px);
  }

  .calendar-flower-left {
    left: -7%;
  }

.calendar-flower-right {
  right: -5%;
  bottom: -10%;
}

}


/* ==================================================
   ALBUM SECTION
================================================== */

.album-section {
  width: 100%;
  padding: 4.2% 5.8% 7.2%;
  background: #fff;
  color: var(--ink);
  text-align: center;
  container-type: inline-size;
}

.album-title {
  margin-bottom: 5.2%;
  font-family: "Great Vibes", cursive;
  font-size: clamp(48px, 12.6cqw, 82px);
  font-weight: 400;
  line-height: 0.92;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.7cqw 2.2%;
  width: 82%;
  margin: 0 auto;
}

.album-photo {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f2f2f0;
}

.album-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


/* ==================================================
   ALBUM SECTION ANIMATION
================================================== */

.js-animate[data-effect="album-title"] {
  transform:
    translateY(4cqw)
    scale(0.96);

  transition:
    opacity 0.9s ease,
    transform 1s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="album-title"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

.js-animate[data-effect="album-photo"] {
  transform:
    translateY(4.2cqw)
    scale(0.94);

  transition:
    opacity 0.82s ease,
    transform 0.95s
      cubic-bezier(
        0.18,
        0.82,
        0.22,
        1
      );
}

.js-animate[data-effect="album-photo"].is-visible {
  transform:
    translateY(0)
    scale(1);
}

@media (prefers-reduced-motion: reduce) {

  .js-animate[data-effect="album-title"],
  .js-animate[data-effect="album-photo"],
  .js-animate[data-effect="album-title"].is-visible,
  .js-animate[data-effect="album-photo"].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

}
