/* Clone styling — inspired by thiepcuoionline / Flatsome (Questrial + Dancing Script, accent #f30000) */
:root {
  --bg-page: #f3f3f3;
  --text: #222020;
  --heading: #1f1d1d;
  --accent: #f30000;
  --maroon: #800000;
  /* Một layout mobile cố định; desktop chỉ là khung giữa màn hình */
  --mobile-frame-max: 420px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Questrial", sans-serif;
  font-size: 100%;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #b8b8b8;
}

.mobile-frame {
  width: 100%;
  max-width: var(--mobile-frame-max);
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 12px 48px rgba(0, 0, 0, 0.22);
}

@media (min-width: 440px) {
  .mobile-frame {
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: calc(100vh - 32px);
    border-radius: 16px;
  }
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Questrial", sans-serif;
  font-weight: 700;
  color: var(--heading);
  margin: 0.5em 0;
}

.alt-font {
  font-family: "Dancing Script", cursive;
  font-weight: 400;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.container {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.section {
  padding: 28px 0;
}

.section--white {
  background: #fff;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 48px 16px 80px;
  background-size: cover;
  background-position: 69% 62%;
  color: #fff;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
}

.hero__title-img {
  width: 96%;
  max-width: 820px;
  margin: 0 auto 1rem;
}

.hero__quote {
  font-size: 1.15rem;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hero--mobile {
  display: flex;
  background-image: url("assets/images/01-hero-bg-mobile.jpg");
}

.hero--desktop {
  display: none !important;
}

/* —— Intro strip —— */
.intro-strip {
  text-align: center;
  padding: 2rem 16px 1rem;
}

.intro-strip__deco {
  width: 55%;
  max-width: 420px;
  margin: 0 auto 1rem;
}

.intro-strip__sub {
  font-size: 1rem;
  margin: 1rem 0;
}

.intro-strip__sub em {
  font-style: italic;
}

.intro-strip__wide {
  margin-top: 1.5rem;
}

/* —— Dark story section —— */
.story-dark {
  position: relative;
  padding: 32px 16px 40px;
  color: #f5f5f5;
  background-image: url("assets/images/06-bg-story-section.jpg");
  background-size: cover;
  background-position: 0% 20%;
  background-attachment: scroll;
}

.story-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 0;
}

.story-dark>.container {
  position: relative;
  z-index: 1;
}

.story-dark h1,
.story-dark h2,
.story-dark h3,
.story-dark h4,
.story-dark h5 {
  color: #fff;
}

.story-dark p {
  color: #eee;
}

.story-dark .alt-font {
  color: #fff;
}

.story-top-img {
  width: 92%;
  max-width: 460px;
  margin: 0 auto 1.5rem;
  display: block;
}

.story-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

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

.story-col img {
  margin-bottom: 0.75rem;
}

.story-col .portrait {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.story-col .heading-img {
  width: 63%;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}

.parents-deco {
  width: 40%;
  margin: 0.5rem auto;
}

.ampersand-img {
  width: 54%;
  max-width: 200px;
  margin: 0.5rem auto;
}

.darling-img {
  width: 47%;
  max-width: 200px;
  margin: 0.5rem auto;
}

/* Nhà trai | họa tiết giữa | nhà gái */
.story-col--parents-3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 30%) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
}

.parents-3__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  text-align: center;
}

.parents-3__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.story-col--parents-3 .parents-deco {
  width: 100%;
  max-width: 72px;
  margin: 0;
}

.story-col--parents-3 .ampersand-img {
  width: 100%;
  max-width: 88px;
  margin: 0;
}

.story-col--parents-3 .darling-img {
  width: 100%;
  max-width: 76px;
  margin: 0;
}

.story-col--parents-3 .parents-3__names {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  word-break: break-word;
}

.story-col--parents-3 .parents-3__side--gai .parents-3__names {
  padding-top: 0.15rem;
}

/* —— Section headings (image bars) —— */
.section-heading-img {
  display: block;
  width: 69%;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

/* —— Save the date + invitation —— */
.invite-row {
  display: grid;
  gap: 0;
}

.save-box {
  min-height: 440px;
  position: relative;
  background-image: url("assets/images/16-bg-save-the-date.jpg");
  background-size: cover;
  background-position: 47% 30%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 1rem 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.save-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.save-box__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  width: 100%;
  padding-top: min(35vh, 200px);
}

.save-box__inner h1 {
  color: #fff;
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.save-box__inner .divider {
  width: 80px;
  height: 2px;
  background: #fff;
  margin: 1rem auto;
}

.save-box__save-img {
  width: 60%;
  max-width: 280px;
  margin: 0 auto 1rem;
}

.invite-card {
  background: #fff;
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.invite-card .deco-line {
  width: 85%;
  max-width: 640px;
  margin: 0 auto 1rem;
}

.invite-maroon {
  color: var(--maroon);
}

.invite-card--timeline {
  text-align: left;
}

.invite-card--timeline>.deco-line {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.invite-card__kicker {
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

/* —— Event timeline (card) —— */
.event-timeline {
  position: relative;
  margin: 1.25rem 0 0;
  padding: 0 0 0 1.35rem;
  border-left: 2px solid rgba(128, 0, 0, 0.35);
}

.event-timeline--party {
  margin-top: 1.75rem;
  padding-top: 0.5rem;
  border-left-color: rgba(128, 0, 0, 0.22);
}

.event-timeline__section-label {
  margin: 0 0 1rem -1.35rem;
  padding: 0.35rem 0.65rem;
  width: fit-content;
  max-width: calc(100% + 1.35rem);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--maroon);
  border-radius: 4px;
}

.event-timeline__item {
  position: relative;
  margin: 0 0 1.1rem;
  padding-bottom: 0.25rem;
}

.event-timeline__item:last-of-type {
  margin-bottom: 0;
}

.event-timeline__dot {
  position: absolute;
  left: -1.35rem;
  top: 0.65rem;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--maroon);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(128, 0, 0, 0.25);
}

.event-timeline__card {
  background: linear-gradient(145deg, #fffefb 0%, #faf7f5 100%);
  border: 1px solid rgba(128, 0, 0, 0.12);
  border-radius: 10px;
  padding: 0.85rem 0.95rem 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.event-timeline__title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.3;
}

.event-timeline__venue {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--heading);
}

.event-timeline__addr {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #444;
}

.event-timeline__time {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--heading);
}

.event-timeline__lunar {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-style: italic;
  color: #666;
}

.event-timeline__map {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--maroon);
  text-decoration: none;
  border-bottom: 1px solid rgba(128, 0, 0, 0.35);
  padding-bottom: 1px;
}

.event-timeline__map:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.event-party-intro {
  text-align: center;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.5rem 1rem;
  background: rgba(128, 0, 0, 0.04);
  border-radius: 10px;
  border: 1px dashed rgba(128, 0, 0, 0.2);
}

.event-party-intro__line {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--heading);
}

.guest-name-line {
  margin: 0.35rem 0 0.65rem;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  font-family: "Dancing Script", cursive;
  color: var(--heading);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 0.25rem;
  min-height: 1.5em;
}

.guest-name-line--filled {
  letter-spacing: 0.05em;
  border-bottom-color: rgba(128, 0, 0, 0.28);
}

.event-timeline__closing {
  text-align: center;
  margin: 1.25rem 0 0.35rem;
  font-size: 1.05rem;
  color: var(--heading);
}

.event-timeline__closing-sub {
  text-align: center;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--maroon);
}

.map-wrap {
  margin-top: 1.25rem;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  display: block;
  border: 0;
}

/* —— Gallery strip —— */
.gallery-3 {
  display: grid;
  gap: 12px;
  margin-top: 1.5rem;
}

/* Luôn ẩn cột thứ 3 như bản mobile gốc */
.hide-mobile-tall {
  display: none;
}

.gallery-3 .tall {
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.gallery-3 .tall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Timeline dark —— */
.timeline-section {
  position: relative;
  padding: 36px 16px 48px;
  color: #eee;
  background-image: url("assets/images/23-bg-timeline.jpg");
  background-size: cover;
  background-position: 77% 66%;
}

.timeline-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 0;
}

.timeline-section>.container {
  position: relative;
  z-index: 1;
}

.timeline-section p {
  color: #e8e8e8;
}

.timeline-grid {
  display: grid;
  gap: 2rem;
}

.timeline-col .tl-img {
  width: 46%;
  max-width: 360px;
  margin: 0 auto 1rem;
  display: block;
}

.timeline-col p {
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.timeline-spacer {
  display: none;
}

/* —— RSVP —— */
.rsvp-section {
  background: #fff;
  padding: 2.5rem 16px 3rem;
}

.rsvp-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.form-flat label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--heading);
}

.form-flat input[type="text"],
.form-flat select,
.form-flat textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-flat textarea {
  min-height: 140px;
  resize: vertical;
}

.form-flat .field {
  margin-bottom: 1.1rem;
}

.btn-submit {
  display: inline-block;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.btn-submit:hover {
  filter: brightness(0.92);
}

.form-msg {
  margin-top: 1rem;
  padding: 12px;
  border-radius: 4px;
  display: none;
}

.form-msg.visible {
  display: block;
}

.form-msg.success {
  background: #e8f5e0;
  color: #2d5016;
}

.rsvp-side-banner {
  min-height: 280px;
  border-radius: 4px;
  background-image: url("assets/images/02-hero-bg-desktop-rsvp-banner.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* —— Bank row —— */
.bank-row {
  display: grid;
  gap: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

.bank-row .qr {
  max-width: 200px;
  margin: 0.75rem auto 0;
  border-radius: 4px;
}

.bank-mid-qr {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

/* —— Music —— */
.music-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* Căn nút nhạc vào trong khung ~420px khi xem trên desktop */
@media (min-width: 440px) {
  .music-fab {
    right: calc((100vw - var(--mobile-frame-max)) / 2 + 12px);
  }
}

.music-fab:hover {
  filter: brightness(1.05);
}

.music-fab.paused::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 3px;
  background: #fff;
  transform: rotate(-45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

footer.footnote {
  text-align: center;
  padding: 2rem 16px;
  font-size: 0.9rem;
  color: #666;
}

/* —— Hiệu ứng xuất hiện (ảnh / khối) —— */
.lux-reveal {
  --lux-delay: 0ms;
  opacity: 0;
  transform: translate3d(0, 2rem, 0) scale(0.97);
  transition:
    opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.05s ease-out;
  transition-delay: var(--lux-delay);
  will-change: opacity, transform;
}

.lux-reveal--photo {
  filter: saturate(0.92) brightness(0.97);
}

.lux-reveal--photo.is-visible {
  filter: saturate(1) brightness(1);
}

.lux-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.lux-reveal--text {
  transform: translate3d(0, 1.1rem, 0);
}

.lux-reveal--text.is-visible {
  transform: translate3d(0, 0, 0);
}

.gallery-3 > .tall:nth-child(1) .lux-reveal {
  --lux-delay: 0ms;
}

.gallery-3 > .tall:nth-child(2) .lux-reveal {
  --lux-delay: 0.14s;
}

.gallery-3 > .tall:nth-child(3) .lux-reveal {
  --lux-delay: 0.28s;
}

.story-col--parents-3 .parents-3__side--trai .lux-reveal {
  --lux-delay: 0ms;
}

.story-col--parents-3 .parents-3__center .lux-reveal:nth-of-type(1) {
  --lux-delay: 0.1s;
}

.story-col--parents-3 .parents-3__side--gai .lux-reveal {
  --lux-delay: 0.2s;
}

.invite-row .save-box .lux-reveal {
  --lux-delay: 0ms;
}

.invite-card .deco-line.lux-reveal {
  --lux-delay: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .lux-reveal,
  .lux-reveal--photo {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    will-change: auto;
  }
}

/* —— Opening: fullscreen ảnh + lớp phủ, mở = hé sáng & chữ tan —— */
body.opening-active {
  overflow: hidden;
}

@keyframes opening-card-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.opening-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background-color: #2a2523;
  background-image: url("assets/images/openning.jpg");
  background-size: cover;
  background-position: 35% 22%;
  background-repeat: no-repeat;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  touch-action: manipulation;
}

.opening-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(12, 10, 9, 0.48) 0%,
      rgba(12, 10, 9, 0.3) 42%,
      rgba(12, 10, 9, 0.62) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 1s cubic-bezier(0.33, 0, 0.2, 1);
}

.opening-overlay.is-open::before {
  opacity: 0;
}

.opening-overlay.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-card {
  position: relative;
  z-index: 1;
  width: min(94vw, 380px);
  text-align: center;
  animation: opening-card-enter 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  transition:
    opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.opening-overlay.is-open .opening-card {
  animation: none;
  opacity: 0;
  transform: translate3d(0, -2rem, 0) scale(1.05);
  pointer-events: none;
}

.opening-card__names {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.opening-card__tagline {
  margin: 0 0 1.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.opening-card__btn {
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--maroon);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.opening-card__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.opening-card__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .opening-overlay::before,
  .opening-card {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .opening-overlay.is-open::before {
    opacity: 0;
  }

  .opening-overlay.is-open .opening-card {
    opacity: 0;
    transform: none;
  }
}