:root {
  /* Emerald palette — richer, warmer */
  --green-dark:  #112722;
  --green-deep:  #091714;
  --green-soft:  #1a4137;
  --green-mid:   #2d5a4e;

  /* Invite overlay palette */
  --invite-bg: linear-gradient(180deg, #cdd9c0 0%, #b9c8a8 50%, #c5d4b8 100%);
  --invite-bg-soft: linear-gradient(180deg, rgba(205, 217, 192, 0.85) 0%, rgba(177, 194, 166, 0.9) 45%, rgba(197, 212, 184, 0.98) 100%);
  --invite-panel: linear-gradient(160deg, rgba(245, 246, 236, 0.95) 0%, rgba(222, 229, 205, 0.96) 100%);

  /* Ivory — warm, not cold */
  --cream:        #f5f0e8;
  --cream-strong: #faf8f3;
  --cream-deep:   #ede5d8;

  /* Champagne gold — amber-warm 2026 */
  --gold:         #9f6c34;
  --gold-soft:    #c99660;
  --gold-pale:    #efd2ac;
  --gold-line:    rgba(159, 108, 52, 0.36);

  /* Text */
  --text-dark:  #13201c;
  --text-warm:  #2f403a;
  --text-muted: #52615c;
  --text-light: #fffdf8;

  /* Borders */
  --border-soft:  rgba(184, 137, 74, 0.22);
  --border-light: rgba(255, 248, 241, 0.18);

  /* Shadows — softer, more diffused */
  --shadow-soft: 0 8px 40px rgba(13, 31, 28, 0.10);
  --shadow-card: 0 4px 24px rgba(13, 31, 28, 0.12);
  --shadow-lift: 0 16px 48px rgba(13, 31, 28, 0.16);

  /* Typography */
  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body:  "DM Sans", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --page-max:     1180px;
  --page-narrow:  960px;
  --page-padding: clamp(1.25rem, 5vw, 3rem);
  --section-space: clamp(4rem, 9vw, 6.5rem);
  --card-radius:  1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--invite-bg);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.wedding-app {
  overflow-x: hidden;
}

.section {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.section-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - (var(--page-padding) * 2)), var(--page-max));
  margin: 0 auto;
  padding-block: var(--section-space);
}

.section-shell--narrow {
  width: min(calc(100% - (var(--page-padding) * 2)), var(--page-narrow));
}

.section-heading {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.section-heading h2,
.hero-content h1,
.thanks-media h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
}

/* Editorial kicker: — TEXT — */
.section-kicker {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.section-kicker::before,
.section-kicker::after {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.section-kicker--muted {
  color: var(--text-muted);
}

.section-heading--light h2,
.section-heading--light .section-kicker {
  color: var(--text-light);
  text-shadow: 0 2px 12px rgba(9, 23, 20, 0.18);
}

.section-heading--accent h2 {
  color: #ffffff;
  font-style: italic;
}

#rsvpTitle {
  color: #ffffff !important;
}

.hero-section {
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, rgba(205, 217, 192, 0.72) 0%, rgba(177, 194, 166, 0.7) 45%, rgba(197, 212, 184, 0.9) 100%), var(--hero-image, none);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-light);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(7, 47, 44, 0.08) 0%,
      rgba(7, 47, 44, 0.12) 35%,
      rgba(7, 47, 44, 0.55) 68%,
      rgba(7, 47, 44, 0.88) 100%
    );
  pointer-events: none;
}

.hero-shell {
  min-height: 100svh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.25rem, 1.2vw, 0.75rem);
  justify-content: flex-start;
  padding: 0 0 clamp(4rem, 11vw, 7.5rem);
}

.hero-shell__header {
  position: absolute;
  top: clamp(0.25rem, 1.2vh, 0.9rem);
  left: 50%;
  width: min(100%, 22rem);
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-shell__header dotlottie-wc {
  width: min(13rem, 34vw) !important;
  height: min(13rem, 34vw) !important;
  filter: drop-shadow(0 12px 28px rgba(7, 20, 18, 0.18));
}

.section-header-animation {
  position: absolute;
  top: clamp(0.35rem, 1.6vh, 0.9rem);
  left: 50%;
  width: min(100%, 12rem);
  display: grid;
  place-items: center;
  margin: 0;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.section-header-animation dotlottie-wc {
  width: min(7.25rem, 18vw) !important;
  height: min(7.25rem, 18vw) !important;
  filter: drop-shadow(0 8px 18px rgba(12, 29, 25, 0.1));
}

.story-shell > :not(.section-header-animation),
.events-section .section-shell > :not(.section-header-animation),
.rsvp-section .section-shell > :not(.section-header-animation),
.thanks-section .section-shell > :not(.section-header-animation) {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: min(100%, 36rem);
  margin-top: auto;
  margin-inline: auto;
  padding: clamp(1.75rem, 4.5vw, 2.5rem) clamp(1.5rem, 4vw, 2.25rem);
  border-radius: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(
    160deg,
    rgba(6, 28, 26, 0.12) 0%,
    rgba(6, 28, 26, 0.0) 100%
  );
  border: 1px solid rgba(255, 248, 241, 0.1);
  text-align: center;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 34px rgba(9, 23, 20, 0.14);
}

.hero-eyebrow {
  margin: 0;
  font-size: clamp(0.7rem, 1.8vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-pale);
  opacity: 0.9;
}

.hero-content h1 {
  margin: 0.6rem 0 0.85rem;
  font-size: clamp(2.8rem, 9vw, 5.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 18px rgba(7, 20, 18, 0.2);
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.hero-name {
  white-space: nowrap;
}

.hero-heart {
  color: var(--gold-soft);
  font-size: 0.5em;
  line-height: 1;
  opacity: 0.85;
}

.hero-dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(6, 28, 26, 0.22);
  border: 1px solid rgba(255, 248, 241, 0.1);
  backdrop-filter: blur(6px);
}

.hero-date-block {
  display: grid;
  gap: 0.25rem;
  text-align: center;
}

.hero-date-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, 0.84);
}

.hero-date-primary {
  font-family: var(--font-title);
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--text-light);
}

.hero-date-lunar {
  font-size: 0.68rem;
  color: rgba(255, 253, 248, 0.9);
  font-style: italic;
  line-height: 1.4;
}

.hero-dates-divider {
  width: 1px;
  height: 2.8rem;
  background: rgba(255, 255, 255, 0.28);
  margin-inline: 0.25rem;
}

.scroll-down,
.next-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: fit-content;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.scroll-down {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  width: 3.2rem;
  height: 3.2rem;
  padding: 0;
  border: 1px solid rgba(255, 248, 241, 0.28);
  background: rgba(255, 248, 241, 0.08);
  color: var(--text-light);
}

.scroll-down:hover,
.scroll-down:focus-visible,
.next-link:hover,
.next-link:focus-visible,
.btn:hover,
.btn:focus-visible,
.event-card__link:hover,
.event-card__link:focus-visible {
  transform: translateY(-1px);
}

.arrow {
  font-size: 1rem;
  line-height: 1;
}

.story-section {
  min-height: auto;
  background: linear-gradient(180deg, #9eaf92 0%, #7c8e71 28%, #4d6958 64%, #234338 100%);
  color: var(--text-light);
}

.story-shell {
  min-height: calc(100svh - (var(--section-space) * 2));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.8rem;
  padding-top: clamp(1.25rem, 4vh, 2.25rem);
  padding-bottom: clamp(1rem, 3.5vh, 1.75rem);
}

.story-copy {
  max-width: min(48rem, 100%);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
  color: var(--text-light);
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 3px 14px rgba(9, 23, 20, 0.18);
}

.story-gallery-stage,
.story-actions {
  width: 100%;
  margin-inline: auto;
}

.story-gallery-stage {
  position: relative;
  margin-top: 0;
  padding-inline: clamp(1.75rem, 5vw, 4.8rem);
}

.story-gallery {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: clamp(0.58rem, 1.2vw, 0.8rem);
  border: 1px solid rgba(255, 248, 241, 0.06);
  border-radius: calc(var(--card-radius) + 0.2rem);
  background: rgba(255, 248, 241, 0.03);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(6, 28, 26, 0.1);
}

.story-gallery__nav {
  position: absolute;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 241, 0.16);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.1);
  box-shadow: 0 12px 30px rgba(8, 32, 30, 0.12);
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
  z-index: 2;
  transform: translateY(-50%);
}

.story-gallery__nav:hover:not(:disabled),
.story-gallery__nav:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 34px rgba(8, 32, 30, 0.18);
}

.story-gallery__nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.story-gallery__nav--prev {
  left: 0;
}

.story-gallery__nav--next {
  right: 0;
}

.story-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 1rem;
  border: 1px solid rgba(255, 248, 241, 0.2);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.1);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.story-gallery__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.65rem;
}

.story-gallery__viewport {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  will-change: scroll-position;
}

.story-gallery__viewport::-webkit-scrollbar {
  display: none;
}

.story-gallery__track {
  --story-gap: clamp(0.9rem, 2vw, 1rem);
  --story-columns: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--story-gap) * (var(--story-columns) - 1))) / var(--story-columns));
  gap: var(--story-gap);
  transform: translateZ(0);
}

.story-slide {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 0.14rem;
  border: 1px solid rgba(255, 248, 241, 0.02);
  border-radius: var(--card-radius);
  background: rgba(255, 248, 241, 0.01);
  box-shadow: 0 6px 14px rgba(5, 26, 24, 0.045);
  aspect-ratio: 4 / 5;
  scroll-snap-align: start;
  contain: layout paint;
}

.story-slide__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: calc(var(--card-radius) - 0.14rem);
  background: transparent;
  cursor: zoom-in;
}

.story-slide__image {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--card-radius) - 0.25rem);
  object-fit: cover;
  object-position: center;
  opacity: 0.97;
  display: block;
  will-change: transform;
  transform: translateZ(0);
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding-inline: 0;
  margin-top: -0.05rem;
}

.story-more-link:hover,
.story-more-link:focus-visible,
.story-scroll-down:hover,
.story-scroll-down:focus-visible,
.story-gallery__nav:hover:not(:disabled),
.story-gallery__nav:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.story-scroll-down {
  margin-top: 0;
}

.story-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.story-lightbox[hidden] {
  display: none;
}

.story-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(4, 18, 17, 0.82);
  backdrop-filter: blur(10px);
}

.story-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 72rem);
  max-height: min(88svh, 56rem);
  padding: clamp(0.5rem, 1.5vw, 0.9rem);
  border: 1px solid rgba(255, 248, 241, 0.08);
  border-radius: calc(var(--card-radius) + 0.2rem);
  background: rgba(14, 37, 35, 0.56);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.story-lightbox__nav,
.story-lightbox__close {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 248, 241, 0.18);
  border-radius: 50%;
  background: rgba(255, 248, 241, 0.08);
  color: var(--text-light);
  cursor: pointer;
}

.story-lightbox__nav {
  top: 50%;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
  font-size: 1rem;
  line-height: 1;
}

.story-lightbox__nav--prev {
  left: 1rem;
}

.story-lightbox__nav--next {
  right: 1rem;
}

.story-lightbox__close {
  top: 0.85rem;
  right: 0.85rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.35rem;
  line-height: 1;
}

.story-lightbox__image {
  display: block;
  width: 100%;
  max-height: calc(min(88svh, 56rem) - 1.8rem);
  border-radius: calc(var(--card-radius) - 0.15rem);
  object-fit: contain;
  background: rgba(6, 24, 23, 0.34);
}

.story-lightbox__nav:hover,
.story-lightbox__nav:focus-visible {
  transform: translateY(calc(-50% - 1px));
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  padding: 1.25rem 1.2rem 1.1rem;
  border: 1px solid rgba(88, 117, 91, 0.18);
  border-radius: calc(var(--card-radius) + 0.5rem);
  background: var(--invite-panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: #fffdf7;
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: rgba(183, 154, 93, 0.1);
}

.story-lightbox__close:hover,
.story-lightbox__close:focus-visible {
  transform: translateY(-1px);
}

.story-gallery__nav:hover:not(:disabled),
.story-gallery__nav:focus-visible:not(:disabled) {
  transform: translateY(calc(-50% - 1px));
}

.next-link {
  margin: clamp(1.75rem, 4vw, 2.5rem) auto 0;
  padding: 0.9rem 1.35rem;
  border: 1px solid rgba(13, 75, 70, 0.16);
  background: rgba(255, 255, 255, 0.6);
  color: var(--green-dark);
  font-weight: 700;
}

.next-link::after {
  content: "→";
}

.next-link--light {
  padding: 0.6rem 1rem;
  border-color: var(--border-light);
  background: rgba(255, 248, 241, 0.12);
  color: var(--text-light);
  font-size: 0.85rem;
}

.events-section,
.rsvp-section {
  background: linear-gradient(180deg, #b6c7ad 0%, #8c9f80 42%, #48624a 100%);
  color: var(--text-light);
  min-height: 0;
}

.events-section {
  min-height: 0;
}

.events-section .section-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thanks-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.rsvp-section .section-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding-bottom: 0;
}

.rsvp-section .story-actions {
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  width: min(100%, 50rem);
  margin-inline: auto;
}

.event-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  padding: 1.5rem 1.3rem 1.25rem;
  border-radius: var(--card-radius);
  background: linear-gradient(160deg, rgba(247, 243, 235, 0.98) 0%, rgba(233, 226, 214, 0.98) 100%);
  color: var(--text-dark);
  box-shadow: 0 6px 28px rgba(13, 31, 28, 0.12), 0 1px 4px rgba(13, 31, 28, 0.05);
  border: 1px solid rgba(88, 117, 91, 0.16);
}

.event-card__label {
  margin: 0 0 0.1rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--green-dark);
  text-align: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(183, 154, 93, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.event-card__icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Mini-timeline bên trong card */
.event-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1.1rem;
}

.event-timeline::before {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), rgba(183, 154, 93, 0.15));
}

.event-timeline__item {
  position: relative;
  display: grid;
  gap: 0.12rem;
}

.event-timeline__dot {
  position: absolute;
  left: -1.27rem;
  top: 0.42rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(183, 154, 93, 0.22);
}

.event-timeline__time {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--green-dark);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.event-timeline__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.35;
}

.event-timeline__date {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-warm);
  line-height: 1.4;
}

.event-timeline__lunar {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text-warm);
  font-style: italic;
  line-height: 1.4;
}

.event-card__maps {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(183, 154, 93, 0.25);
}

.event-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(183, 154, 93, 0.35);
  background: rgba(183, 154, 93, 0.07);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background 180ms ease;
}

.event-card__link:hover,
.event-card__link:focus-visible {
  background: rgba(183, 154, 93, 0.16);
}

.event-venue {
  width: min(100%, 50rem);
  margin-inline: auto;
  margin-top: 0.75rem;
}

.event-venue__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: var(--card-radius);
  border: 1px solid rgba(184, 137, 74, 0.28);
  background: linear-gradient(135deg, rgba(184, 137, 74, 0.1) 0%, rgba(184, 137, 74, 0.04) 100%);
  color: var(--text-light);
  text-decoration: none;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 2px 12px rgba(184, 137, 74, 0.1);
}

.event-venue__link:hover,
.event-venue__link:focus-visible {
  background: linear-gradient(135deg, rgba(184, 137, 74, 0.18) 0%, rgba(184, 137, 74, 0.08) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(184, 137, 74, 0.16);
}

.event-venue__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.event-venue__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.event-venue__text strong {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
}

.event-venue__text span {
  font-size: 0.78rem;
  color: rgba(255, 253, 248, 0.92);
}

.form-card,
.thanks-media {
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rsvp-intro {
  display: grid;
  gap: 1rem;
  text-align: center;
  width: min(100%, 34rem);
}

#rsvpSubtitle {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 253, 248, 0.9);
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.countdown__item {
  padding: 1.1rem 0.75rem 0.9rem;
  border: 1px solid rgba(255, 248, 241, 0.14);
  border-radius: 1.25rem;
  background: rgba(255, 248, 241, 0.06);
  text-align: center;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.countdown__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 248, 241, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.countdown__item strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff7e8;
}

.countdown__item span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 253, 248, 0.82);
}

.rsvp-actions {
  display: flex;
  justify-content: center;
}

.rsvp-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 2rem;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(184, 137, 74, 0.18) 0%, rgba(184, 137, 74, 0.08) 100%);
  color: var(--gold-pale);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 4px 18px rgba(184, 137, 74, 0.15);
}

.rsvp-actions a::after {
  content: "→";
  font-size: 1em;
  opacity: 0.8;
  transition: transform 200ms ease;
}

.rsvp-actions a:hover,
.rsvp-actions a:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(184, 137, 74, 0.26) 0%, rgba(184, 137, 74, 0.14) 100%);
  box-shadow: 0 8px 28px rgba(184, 137, 74, 0.22);
}

.rsvp-actions a:hover::after {
  transform: translateX(3px);
}

.form-title {
  margin: 0 0 1rem;
  padding-right: 1.5rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--green-dark);
  letter-spacing: 0.01em;
}

#rsvpForm {
  display: grid;
  gap: 0.65rem;
}

#rsvpForm .form-field {
  display: grid;
  gap: 0.3rem;
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

#rsvpForm fieldset {
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  padding: 0.45rem 0.65rem 0.55rem;
  margin: 0;
  min-width: 0;
}

#rsvpForm fieldset legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-warm);
  text-transform: uppercase;
  padding-inline: 0.2rem;
}

#rsvpForm fieldset label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.3rem;
  color: var(--text-dark);
  white-space: nowrap;
}

#rsvpForm fieldset label input[type="radio"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(184, 137, 74, 0.2);
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 253, 247, 0.9);
  color: var(--text-dark);
  font-size: 0.9rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 137, 74, 0.12);
}

textarea {
  min-height: 4rem;
  resize: none;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.btn {
  flex: 1 1 11rem;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.btn.secondary {
  border-color: var(--border-soft);
  background: transparent;
  color: var(--text-dark);
}

.btn.primary {
  background: linear-gradient(135deg, #c9a055 0%, #a87335 100%);
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(168, 115, 53, 0.28);
}

.btn.primary:not(:disabled):hover {
  background: linear-gradient(135deg, #d4ab60 0%, #b07d40 100%);
  box-shadow: 0 6px 22px rgba(168, 115, 53, 0.36);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* File input */
.file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-field {
  position: relative;
  cursor: pointer;
}

.file-field__btn {
  display: block;
  padding: 0.6rem 0.85rem;
  border: 1px dashed var(--border-soft);
  border-radius: 0.75rem;
  background: #fffdf7;
  color: var(--text-warm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.file-field:hover .file-field__btn {
  border-color: var(--gold);
  background: rgba(183, 154, 93, 0.06);
}

.file-field__name {
  font-size: 0.75rem;
  color: var(--text-warm);
  font-weight: 600;
  min-height: 1rem;
  padding-left: 0.2rem;
}

/* Celebration overlay */
@keyframes particleFly {
  0%   { transform: translateY(100vh) scale(0.5); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-20vh) scale(1.1) rotate(30deg); opacity: 0; }
}

.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.celebration-overlay--hide {
  opacity: 0;
}

.celebration-msg {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  color: var(--green-dark);
  background: rgba(255, 250, 242, 0.92);
  padding: 1.25rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  line-height: 1.6;
}

.celebration-msg span {
  font-size: 0.9em;
  color: var(--text-muted);
}

.celebration-particle {
  position: fixed;
  bottom: -2rem;
  animation: particleFly linear forwards;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.form-field {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.form-field__label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-field__required {
  color: #c0392b;
  margin-left: 0.1rem;
}

.form-field__error {
  font-size: 0.82rem;
  color: #c0392b;
  font-weight: 600;
  min-height: 1.1rem;
}

.thanks-section {
  background: linear-gradient(180deg, #d6ddc7 0%, #bbc8b3 40%, #69816d 75%, #24443a 100%);
  min-height: 0;
}

.thanks-copy .section-heading {
  text-align: left;
}

.thanks-copy .section-heading h2 {
  color: var(--green-dark);
}

.thanks-copy .section-kicker {
  justify-content: flex-start;
  color: var(--gold);
}

.thanks-copy .section-kicker::before {
  display: none;
}

.thanks-messages {
  display: grid;
  gap: 1rem;
}

.thanks-messages p {
  margin: 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(88, 117, 91, 0.2);
  border-radius: calc(var(--card-radius) - 0.2rem);
  background: rgba(235, 241, 224, 0.94);
  color: var(--text-warm);
  box-shadow: 0 4px 20px rgba(13, 31, 28, 0.08);
  line-height: 1.8;
  font-size: 0.96rem;
}

.thanks-media {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 1.6rem);
  background: linear-gradient(160deg, rgba(18, 82, 76, 0.94) 0%, rgba(7, 47, 44, 0.99) 100%);
  border: 1px solid rgba(255, 248, 241, 0.08);
  border-radius: var(--card-radius);
  color: var(--text-light);
  box-shadow: var(--shadow-lift);
}

.thanks-image {
  min-height: clamp(16rem, 34vw, 22rem);
  border-radius: calc(var(--card-radius) - 0.2rem);
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(0, 0, 0, 0.14) 100%),
    var(--media-image, none);
  background-color: rgba(255, 248, 241, 0.1);
  background-position: center top;
  background-size: cover;
  overflow: hidden;
}

.hashtag {
  margin: 0;
  color: #fff7eb;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.thanks-media h3 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff8ee;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   WEDDING INVITATION INTRO CARD (sage green vintage style)
   ══════════════════════════════════════════════════════════════ */

body.intro-active {
  overflow: hidden;
}
body.intro-active .wedding-app {
  visibility: hidden;
}
/* Audio element không bao giờ hiển thị, không chiếm space */
#bgMusic {
  display: none !important;
}
body.intro-active .music-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.85);
}
body.intro-active .hero-name .char,
body.intro-active .hero-heart,
body.intro-active .hero-section {
  animation-play-state: paused;
}
body.intro-active .petal {
  animation-play-state: paused;
}
/* Pause tất cả reveal animations + section heading shimmer khi intro showing
   → khi intro dismiss, animations bắt đầu fresh */
body.intro-active .reveal.is-visible,
body.intro-active .reveal-up.is-visible,
body.intro-active .reveal-fade.is-visible,
body.intro-active .reveal-zoom.is-visible,
body.intro-active .reveal-left.is-visible,
body.intro-active .reveal-right.is-visible,
body.intro-active .stagger.is-visible > *,
body.intro-active .section-heading.is-visible h2 {
  animation-play-state: paused !important;
}

@keyframes introBgFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes introCardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes hintFlow {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(4px); opacity: 0.9; }
}

@keyframes introCardOut {
  to { opacity: 0; transform: translateY(-32px) scale(0.97); }
}

@keyframes introBgOut {
  to { opacity: 0; }
}

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

.invite-intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100svh;
  height: 100dvh;
  gap: clamp(0.12rem, 0.8vh, 0.5rem);
  padding: clamp(0.18rem, 0.9vh, 0.55rem) clamp(0.9rem, 4vw, 1.5rem) clamp(0.3rem, 1.1vh, 0.7rem);
  background:
    linear-gradient(180deg, #cdd9c0 0%, #b9c8a8 50%, #c5d4b8 100%);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  animation: introBgFade 0.6s ease forwards;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.invite-intro__header,
.invite-intro__footer {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 100%;
  pointer-events: none;
  animation: introCardIn 0.9s 0.05s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.invite-intro__header dotlottie-wc,
.invite-intro__footer dotlottie-wc {
  width: min(6.6rem, 19vw, 10svh) !important;
  height: min(6.6rem, 19vw, 10svh) !important;
  filter: drop-shadow(0 12px 24px rgba(45, 74, 58, 0.1));
}

.invite-intro__footer {
  margin-top: clamp(0.05rem, 0.35vh, 0.2rem);
}

.invite-intro--opening {
  animation: introBgOut 0.8s 0.8s cubic-bezier(0.4, 0, 0.6, 1) forwards;
  pointer-events: none;
}

.invite-loading {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7, 47, 44, 0.08) 0%,
      rgba(7, 47, 44, 0.12) 35%,
      rgba(7, 47, 44, 0.55) 68%,
      rgba(7, 47, 44, 0.88) 100%
    ),
    linear-gradient(180deg, rgba(205, 217, 192, 0.72) 0%, rgba(177, 194, 166, 0.7) 45%, rgba(197, 212, 184, 0.9) 100%),
    var(--hero-image, none);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.invite-loading--visible {
  opacity: 1;
  visibility: visible;
}

.invite-intro__card {
  display: grid;
  gap: clamp(0.65rem, 1.7vh, 1rem);
  width: 100%;
  max-width: 23rem;
  padding: clamp(0.85rem, 2.4vh, 1.5rem) clamp(1rem, 4vw, 1.55rem);
  margin: 0 auto;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-body);
  color: #2d4a3a;
  outline: none;
  animation: introCardIn 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 200ms ease, opacity 200ms ease;
}

.invite-intro--opening .invite-intro__card {
  animation: introCardOut 0.7s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.invite-loading__inner {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: rgba(8, 30, 28, 0.22);
  border: 1px solid rgba(255, 248, 241, 0.16);
  border-radius: 2rem;
  box-shadow: 0 24px 60px rgba(9, 23, 20, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

.invite-loading__inner dotlottie-wc {
  width: min(11rem, 36vw) !important;
  height: min(11rem, 36vw) !important;
}

.invite-loading--visible .invite-loading__inner {
  transform: scale(1);
  opacity: 1;
}

/* ── Crest ─────────────────────────────────────────── */
.intro-crest {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  margin-bottom: 0.25rem;
}

.intro-filigree {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro-monogram-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
  z-index: 1;
}

.intro-monogram {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.3rem, 1.4vw, 0.55rem);
  font-family: var(--font-title);
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(45, 74, 58, 0.25);
}

.intro-monogram__letter {
  font-size: clamp(2.6rem, 10vw, 3.6rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.intro-monogram__amp {
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-style: italic;
  font-weight: 300;
  opacity: 0.72;
  transform: translateY(-0.08em);
}

.intro-monogram__rule {
  display: block;
  width: clamp(2.6rem, 10vw, 3.6rem);
  height: 1px;
  margin: 0.85rem auto 0.55rem;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 25%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 100%
  );
}

.intro-date {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  font-size: clamp(0.62rem, 1.95vw, 0.72rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  color: #fff;
  opacity: 0.92;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.intro-date__num {
  letter-spacing: 0.18em;
}

.intro-date__sep {
  font-size: 1.2em;
  line-height: 0;
  opacity: 0.55;
  letter-spacing: 0;
}

/* ── Names ─────────────────────────────────────────── */
.intro-names {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.28rem, 4vw, 1.72rem);
  font-style: italic;
  font-weight: 400;
  color: #2d4a3a;
  letter-spacing: 0.01em;
}

/* ── Greeting ─────────────────────────────────────────── */
.intro-greeting {
  display: grid;
  gap: 0.24rem;
  margin-top: 0.12rem;
}

.intro-greeting__label {
  margin: 0;
  font-family: "Italianno", var(--font-title);
  font-size: clamp(1.55rem, 4.6vw, 2rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.01em;
  color: #284437;
  text-wrap: balance;
}

.intro-greeting__line {
  display: block;
  height: 1px;
  width: 84%;
  margin: 0 auto;
  background: repeating-linear-gradient(
    90deg,
    rgba(45, 74, 58, 0.55) 0 4px,
    transparent 4px 8px
  );
}

/* ── Click hint with envelope icon (bigger & elegant) ─── */
.intro-hint {
  display: grid;
  place-items: center;
  gap: 0.42rem;
  color: #2d4a3a;
  margin-top: 0.3rem;
  animation: hintFlow 2.4s ease-in-out infinite;
}

.intro-hint__envelope-wrap {
  display: grid;
  place-items: center;
  width: 100%;
}

.intro-hint__envelope-wrap dotlottie-wc {
  width: min(13rem, 44vw, 22svh) !important;
  height: min(13rem, 44vw, 22svh) !important;
  filter: drop-shadow(0 14px 32px rgba(45, 74, 58, 0.18));
}

.intro-hint__label {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  opacity: 0.88;
}

/* ── Thanks ─────────────────────────────────────────── */
.intro-thanks {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.08rem;
}

.intro-thanks__title {
  margin: 0;
  font-family: "Italianno", var(--font-title);
  font-size: clamp(1.72rem, 5vw, 2.25rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: #284437;
  text-wrap: balance;
}

.intro-thanks__body {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
  color: #2d4a3a;
  opacity: 0.94;
  font-style: italic;
  padding-inline: 0.25rem;
  max-width: 34ch;
  margin-inline: auto;
  text-wrap: pretty;
}

body.intro-pending .invite-intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.intro-pending .invite-loading {
  opacity: 1;
  visibility: visible;
}

body.intro-pending .invite-loading__inner,
.invite-loading--visible .invite-loading__inner {
  transform: scale(1);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .invite-intro,
  .invite-intro__header,
  .invite-intro__footer,
  .invite-intro__card,
  .intro-hint {
    animation: none !important;
  }
}

@media (max-width: 767px), (max-height: 820px) {
  .invite-intro {
    gap: 0.08rem;
    padding-top: 0.1rem;
    padding-bottom: 0.35rem;
  }

  .invite-intro__header dotlottie-wc,
  .invite-intro__footer dotlottie-wc {
    width: min(5.1rem, 16vw, 7svh) !important;
    height: min(5.1rem, 16vw, 7svh) !important;
  }

  .invite-intro__card {
    max-width: 21rem;
    gap: 0.5rem;
    padding-top: 0.72rem;
    padding-bottom: 0.82rem;
  }

  .intro-hint__envelope-wrap dotlottie-wc {
    width: min(11rem, 42vw, 17svh) !important;
    height: min(11rem, 42vw, 17svh) !important;
  }
}

@media (max-width: 767px) {
  .invite-intro {
    gap: 0.15rem;
    padding-top: 0.15rem;
    padding-bottom: 0.6rem;
  }

  .invite-intro__header dotlottie-wc,
  .invite-intro__footer dotlottie-wc {
    width: min(8.5rem, 30vw) !important;
    height: min(8.5rem, 30vw) !important;
  }

  .invite-intro__card {
    padding-top: clamp(1.5rem, 5vw, 2rem);
    padding-bottom: clamp(1.5rem, 5vw, 2rem);
  }

  .invite-intro__footer {
    margin-top: 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   INLINE RSVP FORM (replacing modal)
   ══════════════════════════════════════════════════════════════ */

.rsvp-form-wrapper {
  width: min(100%, 28rem);
  margin-inline: auto;
}

.rsvp-form {
  padding: clamp(1.4rem, 4vw, 1.8rem) clamp(1.2rem, 3.5vw, 1.6rem);
  border-radius: calc(var(--card-radius) + 0.25rem);
  border: 1px solid rgba(184, 137, 74, 0.22);
  background: linear-gradient(160deg, #fffef9 0%, #fdf6eb 100%);
  box-shadow:
    0 18px 50px -12px rgba(13, 31, 28, 0.28),
    0 4px 12px -4px rgba(13, 31, 28, 0.12);
}

.rsvp-form .form-title {
  text-align: center;
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS — wedding 2026 trending
   ══════════════════════════════════════════════════════════════ */

/* Fade-in + slide-up khi scroll vào view */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes revealZoom {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes revealRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Petal / heart rơi nhẹ */
@keyframes floatDown {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(110vh) translateX(var(--drift, 30px)) rotate(360deg); opacity: 0; }
}

/* Heart pulse giữa hero */
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.18); }
  30%      { transform: scale(0.96); }
  45%      { transform: scale(1.10); }
  60%      { transform: scale(1); }
}

/* Letter reveal */
@keyframes letterFadeIn {
  from { opacity: 0; transform: translateY(20px) rotate(-8deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* Sparkle shimmer cho heading */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Hero parallax slow zoom */
@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* Initial state for elements awaiting reveal */
.reveal,
.reveal-up,
.reveal-fade,
.reveal-zoom,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal.is-visible      { animation: revealUp   1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-up.is-visible   { animation: revealUp   1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-fade.is-visible { animation: revealFade 1.2s ease forwards; }
.reveal-zoom.is-visible { animation: revealZoom 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-left.is-visible { animation: revealLeft 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-right.is-visible{ animation: revealRight 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* Stagger delays cho children */
.stagger > *           { opacity: 0; }
.stagger.is-visible > * { animation: revealUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.stagger.is-visible > *:nth-child(1) { animation-delay: 0.05s; }
.stagger.is-visible > *:nth-child(2) { animation-delay: 0.18s; }
.stagger.is-visible > *:nth-child(3) { animation-delay: 0.31s; }
.stagger.is-visible > *:nth-child(4) { animation-delay: 0.44s; }
.stagger.is-visible > *:nth-child(5) { animation-delay: 0.57s; }
.stagger.is-visible > *:nth-child(6) { animation-delay: 0.7s; }

/* Hero name letter animation */
.hero-name {
  display: inline-flex;
}

.hero-name .char {
  display: inline-block;
  opacity: 0;
  animation: letterFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Hero heart pulse */
.hero-heart {
  display: inline-block;
  animation: heartBeat 2s ease-in-out infinite;
  animation-delay: 2.4s;
}

/* Hero image slow parallax zoom */
.hero-section {
  background-size: cover;
  animation: slowZoom 18s ease-out forwards;
}

/* Falling petals layer */
.petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.petal {
  position: absolute;
  top: -5vh;
  font-size: 1.1rem;
  animation: floatDown linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  opacity: 0.7;
  user-select: none;
}

/* Section heading shimmer effect on visible */
.section-heading.is-visible h2 {
  background: linear-gradient(
    90deg,
    currentColor 0%,
    currentColor 40%,
    var(--gold-pale) 50%,
    currentColor 60%,
    currentColor 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3.5s ease-in-out 0.6s 1 forwards;
}
.section-heading--accent.is-visible h2 {
  background: linear-gradient(
    90deg,
    var(--gold-soft) 0%,
    var(--gold-soft) 40%,
    #fff 50%,
    var(--gold-soft) 60%,
    var(--gold-soft) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Story slide hover lift */
.story-slide {
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.story-slide__image {
  transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1), opacity 400ms ease;
}
.story-slide:hover .story-slide__image {
  transform: scale(1.05);
}

/* Event card hover lift */
.event-card {
  transition:
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 400ms ease;
}
.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(13, 31, 28, 0.18), 0 2px 6px rgba(13, 31, 28, 0.08);
}

/* Countdown numbers tick effect */
.countdown__item strong {
  display: block;
  transition: transform 300ms ease;
}
.countdown__item.tick strong {
  animation: heartBeat 0.6s ease-out;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .reveal-fade, .reveal-zoom, .reveal-left, .reveal-right,
  .stagger > *,
  .hero-name .char {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .hero-section { animation: none; }
  .petals { display: none; }
}

/* ── Music toggle ─────────────────────────────────────────── */
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 137, 74, 0.45); }
  50%       { box-shadow: 0 0 0 8px rgba(184, 137, 74, 0); }
}

@keyframes musicSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes musicBounce {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.18); }
  40%      { transform: scale(0.96); }
  60%      { transform: scale(1.10); }
  80%      { transform: scale(1.02); }
}

@keyframes musicAttention {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 0 rgba(184, 137, 74, 0.7); }
  50%      { box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 14px rgba(184, 137, 74, 0); }
}

.music-toggle {
  position: fixed;
  bottom: clamp(1.25rem, 4vw, 1.75rem);
  right: clamp(1.25rem, 4vw, 1.75rem);
  z-index: 50;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(184, 137, 74, 0.5);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(22, 48, 40, 0.92) 0%, rgba(13, 31, 28, 0.96) 100%);
  color: var(--gold-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    visibility 280ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(184, 137, 74, 0.45);
}

.music-toggle--playing {
  animation: musicPulse 2.4s ease-in-out infinite;
}

.music-toggle--needs-attention {
  animation: musicAttention 2s ease-in-out infinite;
  border-color: var(--gold-soft);
}

.music-toggle--bounce {
  animation: musicBounce 0.9s ease-in-out, musicAttention 2s ease-in-out infinite;
}

.music-toggle:hover {
  transform: scale(1.08);
  border-color: var(--gold-soft);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35), 0 0 16px rgba(184, 137, 74, 0.2);
}

.music-toggle:active {
  transform: scale(0.95);
}

.music-toggle__icon {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 250ms ease, transform 250ms ease;
}

.music-toggle__icon svg {
  width: 100%;
  height: 100%;
}

/* Playing state: show ON icon, hide OFF icon */
.music-toggle[data-playing="true"] .music-toggle__icon--on {
  opacity: 1;
  transform: scale(1);
}
.music-toggle[data-playing="true"] .music-toggle__icon--off {
  opacity: 0;
  transform: scale(0.7);
}

/* Muted / stopped state: hide ON icon, show OFF icon */
.music-toggle[data-playing="false"] .music-toggle__icon--on {
  opacity: 0;
  transform: scale(0.7);
}
.music-toggle[data-playing="false"] .music-toggle__icon--off {
  opacity: 1;
  transform: scale(1);
}

/* Rotating note icon when playing */
.music-toggle[data-playing="true"] .music-toggle__icon--on {
  animation: musicSpin 8s linear infinite;
}

.music-toggle__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(184, 137, 74, 0.15);
  opacity: 0;
  transform: scale(0);
  transition: opacity 400ms ease, transform 400ms ease;
  pointer-events: none;
}

.music-toggle:active .music-toggle__ripple {
  opacity: 1;
  transform: scale(1.8);
  transition: none;
}

@media (max-width: 479px) {
  .form-actions > * {
    flex-basis: 100%;
  }
}

@media (min-width: 768px) {
  .section-shell {
    padding-block: clamp(5rem, 9vw, 7rem);
  }

  .story-shell {
    min-height: calc(100svh - (var(--section-space) * 2));
    padding-top: clamp(1rem, 2.6vw, 1.75rem);
    padding-bottom: clamp(0.85rem, 2.2vw, 1.4rem);
  }

  .hero-content {
    width: min(100%, 40rem);
  }

  .hero-title {
    flex-direction: row;
    gap: 0.6rem;
  }

  .story-gallery-stage,
  .story-actions {
    width: 100%;
  }

  .story-gallery-stage {
    padding-inline: clamp(2.35rem, 5vw, 4rem);
  }

  .story-gallery__track {
    --story-columns: 2;
  }

  .thanks-messages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hero-content {
    width: min(100%, 48rem);
    padding: 2.2rem 2.5rem;
  }

  .hero-content h1 {
    font-size: clamp(4rem, 7vw, 6rem);
  }

  .story-gallery-stage,
  .story-actions {
    width: 100%;
  }

  .story-shell {
    min-height: calc(100svh - (var(--section-space) * 2));
    gap: 0.65rem;
    padding-top: clamp(0.85rem, 1.8vw, 1.35rem);
    padding-bottom: clamp(0.75rem, 1.6vw, 1.15rem);
  }

  .story-gallery-stage {
    padding-inline: clamp(3rem, 5vw, 4.8rem);
  }

  .story-gallery__track {
    --story-columns: 3;
  }

  .thanks-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
    gap: 2.5rem;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .section-shell {
    width: min(calc(100% - 6rem), var(--page-max));
  }

  .hero-shell {
    padding-block: clamp(5rem, 9vw, 8rem);
  }
}

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

  .scroll-down,
  .next-link,
  .btn,
  .event-card__link {
    transition: none;
  }
}
