:root {
  --olive: #5b6b3a;
  --olive-dark: #3f4a28;
  --rust: #5b6b3a;
  /* --rust: #b4521d; */
  --paper: #f3f1ec;
  --ink: #3b4327;
  /* thu phap */
  --script: "Allison", cursive;
  /* co chan */
  --serif: "Cormorant SC", Georgia, serif;
  --w: 430px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
  cursor: zoom-in;
  /* background: #d9d6cc; */
}

.card {
  /* Fixed design width; zoom scales the whole card (fonts, gaps, absolute
     offsets) down together so mobile is a proportional match of desktop
     instead of the same px values on a narrower box. */
  width: var(--w);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(0, 0, 0, .08);
  zoom: min(1, calc(100vw / var(--w)));
}

.script {
  font-family: var(--script);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.1;
}

h2.script {
  font-size: 64px;
  /* text-align: center; */
  /* margin-bottom: 10px; */
}

h3.script {
  font-size: 36px;
  /* text-align: center; */
}

h4.script {
  font-size: 32px;
  /* text-align: center; */
}

.section {
  padding: 48px 22px;
  text-align: center;
  position: relative;
}

.paper {
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, .025) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
}

.olive {
  background: var(--olive);
  color: #f4f1e6;
}

.olive .script {
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  /* height: 85dvh;
  width: 100%; */
  position: relative;
  aspect-ratio: 3 / 4.4;
  border-radius: 0 0 22px 22px;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  height: 100%;
}

.hero__frame {
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255, 255, 255, .85);
  border-radius: 4px 4px 18px 18px;
  pointer-events: none;
}

.hero__side {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 45px;
  padding-left: 100px;
  gap: 14px;
  background: linear-gradient(90deg, transparent, rgba(40, 44, 30, .65) 75%);
  pointer-events: none;
  opacity: 0;
  animation: heroSideIn .9s ease-out .2s both;
}

.hero__badge {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: heroBadgeIn .6s ease-out .5s both;
}

.hero__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero__pill {
  /* background: var(--olive); */
  /* border: 1.5px solid rgba(255, 255, 255, .8); */
  border-radius: 18px;
  padding: 16px 8px;
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--script);
  color: #fff;
  font-size: 48px;
  line-height: 1.15;
  text-align: center;
  word-spacing: 100vw;
  /* one word per line */
  opacity: 0;
  animation: heroPillIn .6s ease-out .75s both;
}

.hero__pill .dot {
  font-family: var(--serif);
  font-size: 14px;
  margin: 10px 0;
}

.hero__diamonds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.hero__diamonds .diamond {
  opacity: 0;
  animation: heroDiamondIn .5s ease-out both;
}

.hero__diamonds .diamond:nth-child(1) {
  animation-delay: 1.05s;
}

.hero__diamonds .diamond:nth-child(2) {
  animation-delay: 1.2s;
}

.hero__diamonds .diamond:nth-child(3) {
  animation-delay: 1.35s;
}

@keyframes heroSideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

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

@keyframes heroBadgeIn {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

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

@keyframes heroPillIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

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

@keyframes heroDiamondIn {
  from {
    opacity: 0;
    transform: translateY(14px) rotate(45deg);
  }

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

.diamond {
  width: 26px;
  height: 26px;
  background: var(--rust);
  transform: rotate(45deg);
  display: grid;
  place-items: center;
  margin: 2px auto;
}

.diamond b {
  transform: rotate(-45deg);
  color: #fff;
  font: 500 11px var(--serif);
}

/* ---------- Countdown ---------- */
.countdown {
  padding-top: 25px;
}

.torn-text {
  position: relative;
  z-index: 10;
}

.torn {
  z-index: 1;
  position: relative;
  top: -25px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  background-image: url(../assets/img/our-wedding-day-bg.webp);
  background-size: 100% 100%;
  padding: 32px 10px 22px;
}

.cd {
  min-width: 64px;
}

.cd span {
  display: block;
  font: 400 34px/1 var(--serif);
  color: var(--olive);
  letter-spacing: 1px;
}

.cd small {
  font: 400 12px var(--serif);
  color: var(--ink);
}

.torn i {
  font: 400 24px/1.2 var(--serif);
  color: var(--olive);
  font-style: normal;
}

/* ---------- Save the Date + Venue ---------- */
/* Card: children are placed in % of the card so the layout scales;
   font sizes use cqw (1% of card width). */
.stdv__card {
  position: relative;
  aspect-ratio: 420 / 572;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
  background: #1e2418;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
  container-type: inline-size;
  text-align: left;
}

.stdv__card>* {
  position: absolute;
  margin: 0;
}

.stdv__bg {
  inset: 0;
  height: 100%;
  filter: brightness(.55) saturate(.8) blur(1px);
  transform: scale(1.04);
  cursor: default;
}

.stdv__shade {
  width: 74%;
  top: 16.3%;
  bottom: 7px;
  right: 7px;
  border-bottom-right-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.stdv .stdv__save,
.stdv .stdv__dateword {
  color: #fff;
  font-size: 26cqw;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.stdv .stdv__save {
  left: 7%;
  top: .5%;
  transform: rotate(-6deg);
}

.stdv .stdv__the {
  left: 23.5%;
  top: 16.2%;
  font: 500 5cqw/1 var(--serif);
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .6);
}

.stdv .stdv__dateword {
  left: 16%;
  top: 17%;
  transform: rotate(-6deg);
}

.stdv__badge {
  left: 32%;
  width: 17.6%;
  top: 39.8%;
  height: 13.3%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1cqw;
  background: url(../assets/img/song-hy-gb.webp) center/cover;
  border-radius: 2cqw;
  outline: 1px solid rgba(255, 240, 225, .7);
  outline-offset: -3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  color: #fff;
  font: 400 5.2cqw/1 var(--serif);
}

.stdv__badge span {
  display: flex;
  align-items: center;
  gap: 1cqw;
  padding-bottom: 1cqw;
  border-bottom: 1px solid rgba(255, 240, 225, .6);
}

.stdv__badge b {
  font-weight: 400;
}

.stdv__badge i {
  width: 1px;
  height: 5.5cqw;
  background: rgba(255, 240, 225, .8);
}

.stdv__card img[data-lightbox] {
  border-radius: 4.5cqw;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.stdv__p1 {
  left: 60%;
  width: 36.2%;
  top: 5.2%;
  height: 52.4%;
}

.stdv__p2 {
  left: 28.1%;
  width: 30%;
  top: 59.4%;
  height: 38%;
}

.stdv__p3 {
  left: 60%;
  width: 36.2%;
  top: 59.4%;
  height: 38%;
}

/* ---------- Venue ---------- */
.stdv {
  padding-top: 0px;
  padding-bottom: 0;
  overflow: hidden;
}

.stdv p {
  font-size: 14px;
}

.venue {
  position: relative;
  margin: 26px -22px 0;
  padding: 100px 20px;
}

.venue__deco {
  position: absolute;
  top: -60px;
  left: -30px;
  width: 58%;
  opacity: .45;
  pointer-events: none;
  cursor: default;
  background: none;
}

.venue__deco--br {
  top: auto;
  bottom: -60px;
  left: auto;
  right: -30px;
  transform: rotate(-123deg);
}

/* drop-shadow on the wrapper: box-shadow would be cut off by the sheet's clip-path */
.venue__paper {
  position: relative;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18));
}

.venue__sheet {
  padding: 30px 26px 30px;
  background-image: url(../assets/img/venue-bg.webp);
  background-size: 100% 100%;
}

.stdv .venue__invite {
  font: 500 13px/1.35 var(--serif);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--olive);
}

.venue__name {
  font: 500 24px/1.15 var(--serif);
  letter-spacing: 1px;
  white-space: pre-line;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin: 22px 0 6px;
}

.stdv .venue__addr {
  font: italic 400 15px var(--serif);
  color: var(--olive-dark);
}

.stdv .venue__time {
  margin: 22px 0 20px;
  font: 500 21px var(--serif);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--olive-dark);
}

.venue__map {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  line-height: 0;
}

.venue__map iframe {
  display: block;
}

.venue__maplink {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff;
  color: var(--olive);
  font: 600 12px var(--serif);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
  letter-spacing: .5px;
}

.stdv .mid-script {
  font-size: 32px;
  margin-top: 15px;
}

.venue__badge {
  margin: 18px auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font: 500 13px var(--serif);
  letter-spacing: 2px;
  padding: 12px 28px;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.btn--ghost {
  border: 1px solid var(--olive);
  color: var(--olive);
  background: transparent;
}

/* ---------- Wedding of + families ---------- */
.wedof__doodle {
  display: block;
  width: 100px;
  height: 18px;
  margin: 0 auto 22px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.2;
  opacity: .6;
}

.wedof__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
  text-align: left;
}

.wedof__col.right {
  margin-top: 35px;
}

.wedof__photo {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.wedof__photo img {
  aspect-ratio: 3 / 4;
}

.wedof__label {
  position: absolute;
  right: 0;
  top: -40px;
  display: block;
  text-align: right;
  font-size: 78px;
  margin-bottom: 8px;
}

.wedof__name {
  font: 700 19px var(--serif);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.wedof__name.right {
  justify-content: flex-end;
}

.wedof__fam {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wedof__famlabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 12px var(--serif);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive-dark);
}

.wedof__fam.right .wedof__famlabel {
  justify-content: flex-end;
}

.wedof__famnames {
  font: 500 12px/1.6 var(--serif);
  white-space: pre-line;
}

.wedof__fam.right .wedof__famnames {
  padding-left: 0;
  text-align: right;
}

.border-left {
  border-left: 1px solid rgba(91, 107, 58, .3);
  padding-left: 10px;
}

.border-right {
  border-right: 1px solid rgba(91, 107, 58, .3);
  padding-right: 10px;
}

.bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
  flex: none;
}

.wedof__amp {
  position: absolute;
  top: 52%;
  left: 52%;
  translate: -50% 0;
  font: italic 300 120px var(--script);
  color: #b9b3a4;
  pointer-events: none;
}

/* ---------- Album ---------- */

.album {
  padding-top: 10px;
}

.our_mem {
  text-align: left;
  position: relative;
  margin-bottom: -15px;
}

.album__card {
  margin: 0 auto 10px;
  padding: 20px 20px 26px;
  background-image: url(../assets/img/our-memories-bg.webp);
  background-size: 100% 100%;
}

.album__text {
  font: italic 400 16px/1.5 var(--serif);
  text-align: left;
  padding-bottom: 45px;
}

.album__banner {
  position: absolute;
  top: 150px;
  right: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 14px;
  z-index: 10;
}

.album__forever {
  font-size: 54px;
  padding-left: 13px;
}

.hero__badge.small {
  width: 40px;
  height: 40px;
}

.collage-big {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.collage-big img {
  aspect-ratio: 1;
  border-radius: 4px;
}

.hightlight-1 {
  position: relative;
  top: -60px;
  height: 128%;
}

.hightlight-2 {
  height: 100%;
}

.grid {
  column-count: 3;
  column-gap: 6px;
  padding-bottom: 60px
}

.grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 6px;
  border-radius: 4px;
  break-inside: avoid;
  transition: transform .3s;
}

.grid img:hover {
  transform: scale(1.03);
}

/* ---------- Closing ---------- */
.closing {
  padding: 0;
  padding-bottom: 100px;
}

.closing__img {
  border-radius: 22px 22px 0 0;
}

.closing__fade {
  position: absolute;
  inset: 0;
  top: 60%;
  background: linear-gradient(to top, rgba(20, 24, 14, 1), rgba(20, 24, 14, 1) 66%, transparent);
}

.closing__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 24px 75px;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(20, 24, 14, .85), rgba(20, 24, 14, .45) 75%, transparent);
}

.closing__overlay p {
  font: italic 400 15px/1.5 var(--serif);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}

.thanks {
  font-size: 46px;
  margin-top: 10px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}

/* ---------- Music ---------- */
.music {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--olive);
  border: 1px solid rgba(91, 107, 58, .3);
  box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 30;
}

.music__slash {
  position: absolute;
  width: 26px;
  height: 2px;
  background: var(--rust);
  transform: rotate(-45deg);
}

.music.playing {
  animation: spin 4s linear infinite;
}

.music.playing .music__slash {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(20, 22, 15, .75);
  animation: fade .25s;
}

[hidden] {
  display: none !important;
}

.lightbox img {
  width: auto;
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  cursor: default;
  border-radius: 4px;
}

.lb__btn {
  position: absolute;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 34px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.lb__close {
  top: 16px;
  right: 16px;
}

.lb__prev {
  left: 12px;
  top: 50%;
  translate: 0 -50%;
}

.lb__next {
  right: 12px;
  top: 50%;
  translate: 0 -50%;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s ease;
}

.reveal--left {
  transform: translateX(-30px);
}

.reveal--right {
  transform: translateX(30px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .music.playing {
    animation: none;
  }

  .hero__side,
  .hero__side>*,
  .hero__diamonds .diamond {
    opacity: 1;
    animation: none;
  }
}

.text-left {
  text-align: left;
}

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