/* ============================================
   Wedding Invitation - styles.css
   Clone of cinelove.me/template/pc/thiep-cuoi-44
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --color-bg: #dfe3ee;
  --color-container: #faf8f5;
  --color-white: #ffffff;
  --color-text: #333333;
  --color-accent: #bca38c;
  --color-accent-light: #d4c4b0;
  --color-envelope: #c4b5a2;
  --color-envelope-flap: #b8a994;
  --color-envelope-inner: #e8ddd0;
  --color-wax-seal: #8b5e3c;
  --color-filmstrip: #000000;
  --color-sweet-bg: #d5dae8;
  --color-btn: #bca38c;
  --color-divider: #ccc;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', serif;
  --font-decorative: 'Cormorant Garamond', serif;
  --font-cursive: 'Dancing Script', cursive;
  --font-display: 'Josefin Sans', sans-serif;
  --font-body: 'Quicksand', sans-serif;

  --container-width: 450px;
  --transition-duration: 1.3s;
  --transition-easing: ease-out;
}

/* ============================================
   Cinematic Loading Intro
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Background removed — viewport door panels provide the visual blocking */
  background: none;
  overflow: hidden;
  /* Shared perspective for 3D door rotation */
  perspective: 1200px;
}

/* Opening: let clicks pass through to the revealed content */
.loading-overlay.opening {
  pointer-events: none;
}

.loading-overlay.done {
  display: none;
}

/* Full-viewport door panels — the actual visual blockers */
.viewport-door {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 2.2s cubic-bezier(0.25, 0, 0.15, 1);
}

.viewport-door-left {
  left: 0;
  transform-origin: left center;
  background: radial-gradient(ellipse at center, #4a3c32 0%, #2c2420 60%, #1a1410 100%);
  background-size: 200% 100%;
  background-position: left center;
}

.viewport-door-right {
  right: 0;
  transform-origin: right center;
  background: radial-gradient(ellipse at center, #4a3c32 0%, #2c2420 60%, #1a1410 100%);
  background-size: 200% 100%;
  background-position: right center;
}

.loading-overlay.opening .viewport-door-left {
  transform: rotateY(-100deg);
}

.loading-overlay.opening .viewport-door-right {
  transform: rotateY(100deg);
}

/* Ambient particles */
.loading-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.loading-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(212, 196, 176, 0.6), transparent);
  border-radius: 50%;
  animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {

  0%,
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: translateY(-200px) scale(1);
  }
}

/* Stage composition — above viewport doors and particles */
.loading-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Header text above doors */
.loading-header {
  margin-bottom: 24px;
}

.loading-ornament {
  font-size: 14px;
  color: var(--color-accent-light);
  margin-bottom: 12px;
  letter-spacing: 8px;
  opacity: 0;
  animation: loadFadeIn 1s ease 0.3s forwards;
}

.loading-subtitle {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(212, 196, 176, 0.6);
  margin-bottom: 6px;
  opacity: 0;
  animation: loadFadeIn 1s ease 0.6s forwards;
}

.loading-names {
  font-family: var(--font-script);
  font-size: 34px;
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: 12px;
  opacity: 0;
  animation: loadFadeIn 1s ease 0.9s forwards;
  text-shadow: 0 0 40px rgba(188, 163, 140, 0.3);
}

.loading-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  animation: loadFadeIn 1s ease 1.1s forwards;
}

.loading-divider-line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(188, 163, 140, 0.5), transparent);
}

.loading-divider-dot {
  color: var(--color-accent);
  font-size: 12px;
}

/* Door frame */
.door-frame {
  position: relative;
  width: 220px;
  height: 280px;
  margin-bottom: 20px;
  opacity: 0;
  animation: loadFadeIn 1.2s ease 1.3s forwards;
}

/* 3D Door scene */
.door-scene {
  width: 100%;
  height: 100%;
  perspective: 800px;
  display: flex;
  border: 2px solid rgba(188, 163, 140, 0.3);
  border-radius: 8px 8px 2px 2px;
  overflow: hidden;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(188, 163, 140, 0.08),
    inset 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Individual door */
.door {
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 2s cubic-bezier(0.25, 0, 0.15, 1);
  will-change: transform;
}

.door-left {
  transform-origin: left center;
}

.door-right {
  transform-origin: right center;
}

.door-panel {
  width: 100%;
  height: 100%;
  background: linear-gradient(175deg,
      #5a4a3e 0%,
      #4a3c32 20%,
      #3d322a 50%,
      #4a3c32 80%,
      #5a4a3e 100%);
  position: relative;
  backface-visibility: hidden;
}

/* Wood grain texture */
.door-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg,
      transparent,
      transparent 30px,
      rgba(255, 255, 255, 0.015) 30px,
      rgba(255, 255, 255, 0.015) 31px),
    repeating-linear-gradient(90deg,
      transparent,
      transparent 60px,
      rgba(255, 255, 255, 0.01) 60px,
      rgba(255, 255, 255, 0.01) 61px);
}

/* Door inner panel decoration */
.door-panel::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 12px;
  right: 12px;
  bottom: 20px;
  border: 1px solid rgba(188, 163, 140, 0.15);
  border-radius: 4px;
}

/* Door handles */
.door-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 40px;
  background: linear-gradient(180deg, #d4b896, #8b6f55, #d4b896);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(188, 163, 140, 0.4);
}

.door-left .door-handle {
  right: 10px;
}

.door-right .door-handle {
  left: 10px;
}

/* Doors opening (hinge-style rotateY) */
.loading-overlay.opening .loading-particles {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.loading-overlay.opening .door-left {
  transform: rotateY(-110deg);
}

.loading-overlay.opening .door-right {
  transform: rotateY(110deg);
}

/* Invite text over doors */
.loading-invite {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  font-family: var(--font-decorative);
  font-size: 20px;
  font-style: italic;
  color: rgba(212, 196, 176, 0.85);
  z-index: 5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: loadFadeIn 1s ease 1.6s forwards;
}

/* Progress bar */
.loading-progress-wrap {
  width: 140px;
  height: 2px;
  background: rgba(188, 163, 140, 0.12);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: loadFadeIn 0.5s ease 1.8s forwards;
}

.loading-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent));
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* Opening: fade out entire stage so viewport doors handle the reveal */
.loading-overlay.opening .loading-stage {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@keyframes loadFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@keyframes cameraForward {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  60% {
    transform: scale(1.15);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow: hidden;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---- Page Background ---- */
.page-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  z-index: -1;
}

/* ---- Main Container ---- */
.main-container {
  position: relative;
  width: var(--container-width);
  height: 100vh;
  max-height: 100vh;
  background-color: var(--color-container);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 2px;
}

.scroll-container {
  width: 100%;
  height: 100%;
  overflow-y: hidden;
  /* LOCKED by default — no scroll until envelope opens */
  overflow-x: hidden;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(188, 163, 140, 0.4) transparent;
}

/* Unlocked after envelope is first opened */
.scroll-container.scroll-unlocked {
  overflow-y: auto;
}

.scroll-container::-webkit-scrollbar {
  width: 4px;
}

.scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(188, 163, 140, 0.4);
  border-radius: 2px;
}

/* ---- Section Base ---- */
.section {
  width: 100%;
  position: relative;
}

.section-content {
  padding: 40px 30px;
  text-align: center;
}

/* ---- Scroll Reveal Animations ---- */
[data-transition-key] {
  opacity: 0;
  transition: opacity var(--transition-duration) var(--transition-easing),
    transform var(--transition-duration) var(--transition-easing);
}

[data-transition-key="slide-up"] {
  transform: translateY(50px);
}

[data-transition-key="slide-left"] {
  transform: translateX(50px);
}

[data-transition-key="slide-right"] {
  transform: translateX(-50px);
}

[data-transition-key].revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* ============================================
   Section 1: Cover / Envelope
   ============================================ */
.section-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 5px;
  background-color: var(--color-container);
  position: relative;
  overflow: visible;
}

.cover-top-text {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 5px 5px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text);
}

.music-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: transform 0.3s ease;
}

.music-toggle.playing {
  animation: musicSpin 2s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

.cover-title {
  font-family: var(--font-script);
  font-size: 42px;
  font-weight: 400;
  color: var(--color-text);
  margin: 5px 0 2px;
  text-align: center;
  line-height: 1.2;
}

/* Floral decorations */
.floral-left {
  position: absolute;
  left: -10px;
  top: 80px;
  width: 120px;
  opacity: 0.9;
  pointer-events: none;
}

.floral-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.floral-right {
  position: absolute;
  right: -10px;
  bottom: 30px;
  width: 110px;
  opacity: 0.8;
  pointer-events: none;
}

.floral-img-right {
  transform: scaleX(-1);
}

/* ---- Scroll Indicator ---- */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease, height 0.4s ease;
  pointer-events: none;
}

.scroll-indicator.visible {
  height: auto;
  overflow: visible;
  padding: 10px 0 5px;
  opacity: 1;
}

.scroll-indicator.hidden {
  opacity: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, height 0.3s ease 0.4s, padding 0.3s ease 0.4s;
}

.mouse-icon {
  margin-bottom: 8px;
}

.mouse-body {
  width: 24px;
  height: 38px;
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-top: 7px;
  animation: mouseScroll 1.8s ease-in-out infinite;
}

@keyframes mouseScroll {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  50% {
    opacity: 0.4;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-text {
  font-family: var(--font-decorative);
  font-size: 13px;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.scroll-arrows {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.6;
}

.scroll-arrow {
  display: block;
  color: var(--color-accent);
  font-size: 18px;
  transform: rotate(90deg);
  animation: arrowBounce 1.8s ease-in-out infinite;
}

.scroll-arrow:nth-child(2) {
  animation-delay: 0.2s;
  opacity: 0.5;
}

@keyframes arrowBounce {

  0%,
  100% {
    transform: rotate(90deg) translateX(0);
  }

  50% {
    transform: rotate(90deg) translateX(4px);
  }
}

/* ---- Envelope ---- */

/* Floating idle animation - CineLove signature */
@keyframes envelopeFloat {

  0%,
  100% {
    transform: translateY(0) translateZ(0);
  }

  50% {
    transform: translateY(-14px) translateZ(0);
  }
}

@keyframes shadowFloat {

  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.25;
  }

  50% {
    transform: translateX(-50%) scaleX(0.8);
    opacity: 0.15;
  }
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px auto 5px;
  cursor: pointer;
  position: relative;
  width: 220px;
  animation: envelopeFloat 3s ease-in-out infinite;
  will-change: transform;
}

/* Floating shadow beneath envelope */
.envelope-shadow {
  width: 180px;
  height: 14px;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(6px);
  border-radius: 50%;
  margin: 6px auto 0;
  animation: shadowFloat 3s ease-in-out infinite;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

/* Guest Avatar — replaces letter photo when guest has avatar */
.letter-photo.has-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f5f0, #efe9e0);
}

.letter-photo.has-avatar .letter-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(188, 163, 140, 0.35);
}


.envelope {
  width: 220px;
  height: 145px;
  position: relative;
  perspective: 800px;
  transform-style: preserve-3d;
  background-color: #c5bcab;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Flap: triangle using border trick - matches CineLove exactly */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 78px 110px 0 110px;
  border-color: #c5bcab transparent transparent transparent;
  transform-origin: center top;
  /* Close easing: snappy return */
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.8, 0.4),
    z-index 0s 0.45s;
  z-index: 5;
  will-change: transform;
  backface-visibility: hidden;
  transform: rotateX(0deg) translateZ(0);
}

.envelope.open .envelope-flap {
  /* Open easing: cinematic decelerate with slight overshoot */
  transition: transform 1.3s cubic-bezier(0.33, 0, 0.15, 1),
    z-index 0s 0.65s;
  transform: rotateX(180deg) translateZ(0);
  z-index: 1;
}

/* Pocket: front face of the envelope (hides letter when closed) */
.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #c5bcab;
  z-index: 3;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  border-radius: 0 0 4px 4px;
  pointer-events: none;
}

/* Letter card inside */
.letter-photo {
  position: absolute;
  top: 8px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 16px);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  z-index: 2;
  overflow: hidden;
  /* Close: letter returns quickly with no delay */
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.8, 0.4);
  will-change: transform;
  transform: translateY(0) translateZ(0);
}

.envelope.open .letter-photo {
  /* Open: letter rises with delay, cinematic decelerate */
  transition: transform 1.1s cubic-bezier(0.33, 0, 0.15, 1) 0.55s;
  transform: translateY(-35px) translateZ(0);
}

.letter-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* Wax seal - uses texture image from CineLove */
.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(0);
  width: 32px;
  height: 32px;
  background: url('images/wax-seal.webp') center/contain no-repeat;
  z-index: 10;
  /* Close: seal fades back in quickly */
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

/* Fallback gradient if image doesn't load */
.wax-seal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #a0704a 0%, #8b5e3c 60%, #6d3f22 100%);
  border-radius: 50%;
  z-index: -1;
}

.envelope.open .wax-seal {
  /* Open: seal fades quickly as flap lifts */
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
  opacity: 0;
}

.touch-text {
  font-family: var(--font-decorative);
  font-size: 15px;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: 10px;
  letter-spacing: 1px;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide touch-text and shadow when envelope is opened (via wrapper class) */
.envelope-wrapper.opened .touch-text {
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  opacity: 0;
}

.envelope-wrapper.opened .envelope-shadow {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
  opacity: 0;
}

/* Stop floating when opened — use paused to avoid snap */
.envelope-wrapper.opened {
  animation-play-state: paused;
}

/* ============================================
   Section 2: Invitation Details
   ============================================ */
.section-invitation {
  background-color: var(--color-container);
  padding-bottom: 10px;
}

.section-invitation .section-content {
  padding: 15px 30px;
}

.invitation-heading {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 5px;
  color: var(--color-text);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.invitation-details {
  margin-bottom: 12px;
}

.invitation-text {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 2;
  color: var(--color-text);
}

.datetime-display {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.time-text,
.day-text,
.date-text {
  font-family: var(--font-decorative);
  font-size: 24px;
  font-weight: 300;
  color: var(--color-accent);
  letter-spacing: 2px;
}

.separator {
  font-family: var(--font-decorative);
  font-size: 20px;
  color: var(--color-accent-light);
}

.lunar-date {
  font-family: var(--font-decorative);
  font-size: 13px;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 25px;
}

/* Ornamental divider */
.ornamental-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.divider-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent-light), transparent);
}

.divider-dots {
  color: var(--color-accent-light);
  font-size: 14px;
}

.venue-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 8px;
}

.venue-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 5px;
  color: var(--color-accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.venue-address {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 20px;
}

.btn-directions {
  display: inline-block;
  padding: 10px 40px;
  background-color: var(--color-btn);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  border-radius: 25px;
  letter-spacing: 1px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-directions:hover {
  background-color: #a8907a;
  transform: scale(1.02);
}

/* ============================================
   Section 3: Love Letter
   ============================================ */
.section-love-letter {
  background-color: var(--color-white);
  padding: 40px 30px;
}

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

.love-letter-text p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  line-height: 2;
  color: var(--color-text);
  margin-bottom: 2px;
}

/* ============================================
   Section 4 & 7 & 10: Text Banner + Photo
   ============================================ */
.text-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: var(--color-white);
}

.text-banner span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-text);
}

.photo-with-quote {
  position: relative;
  width: 100%;
}

.full-photo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.photo-quote {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  padding: 0 20px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.photo-quote-vi {
  text-align: center;
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  color: var(--color-text);
  padding: 5px 20px 0;
  line-height: 1.8;
}

.photo-full {
  width: 100%;
}

/* ============================================
   Section 5: Thank Friends
   ============================================ */
.section-thank-friends {
  background-color: var(--color-white);
}

.thank-text p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 2;
  color: var(--color-text);
  text-align: center;
}

/* ============================================
   Section 6: My Lover / Couple
   ============================================ */
.section-couple {
  background-color: var(--color-white);
}

.heart-divider-small {
  color: var(--color-accent);
  font-size: 14px;
  margin-bottom: 15px;
}

.couple-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 200;
  letter-spacing: 8px;
  color: var(--color-accent);
  margin-bottom: 25px;
  text-transform: uppercase;
}

.couple-photos {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.couple-photo-item {
  text-align: center;
  flex: 1;
  max-width: 170px;
}

.couple-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
}

.name-divider {
  color: var(--color-accent-light);
  font-size: 20px;
  margin: 10px 0 5px;
  font-weight: 200;
}

.couple-name {
  font-family: var(--font-cursive);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
}

.couple-poem {
  margin-bottom: 20px;
}

.poem-vi {
  font-family: var(--font-decorative);
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

.couple-poem-en p {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  color: #666;
}

/* ============================================
   Section 8: Large Photo with vertical text
   ============================================ */
.section-my-love-photo {
  background-color: var(--color-white);
  padding: 30px 20px;
}

.love-photo-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.vertical-text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  writing-mode: vertical-lr;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.vertical-text-top {
  transform: rotate(180deg);
}

.love-large-photo {
  flex: 1;
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 2px;
}

/* ============================================
   Section 9: I LOVE YOU
   ============================================ */
.section-i-love-you {
  background-color: var(--color-white);
}

.iloveyou-heading {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 200;
  letter-spacing: 8px;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.iloveyou-poem p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  line-height: 2;
  color: var(--color-text);
}

/* ============================================
   Section 11: Filmstrip Gallery
   ============================================ */
.section-filmstrip {
  background-color: var(--color-filmstrip);
  padding: 0;
  overflow: hidden;
}

.filmstrip-container {
  position: relative;
  background-color: var(--color-filmstrip);
  padding: 15px 0;
}

.film-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.film-edge-left {
  left: 0;
}

.film-edge-right {
  right: 0;
}

.film-text-vertical {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-family: 'Courier New', monospace;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.film-numbers {
  display: flex;
  flex-direction: column;
  gap: 80px;
  margin-top: 20px;
}

.film-numbers span {
  font-family: 'Courier New', monospace;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.4);
  writing-mode: vertical-lr;
}

.filmstrip-photos {
  padding: 0 35px;
}

.filmstrip-frame {
  position: relative;
  margin-bottom: 12px;
  overflow: hidden;
}

.filmstrip-frame:last-child {
  margin-bottom: 0;
}

.filmstrip-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.filmstrip-caption {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  padding: 0 15px;
}

/* Sprocket holes */
.sprocket-holes {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  z-index: 1;
}

.sprocket-left {
  left: 15px;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 12px,
      rgba(255, 255, 255, 0.08) 12px,
      rgba(255, 255, 255, 0.08) 16px);
}

.sprocket-right {
  right: 15px;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 12px,
      rgba(255, 255, 255, 0.08) 12px,
      rgba(255, 255, 255, 0.08) 16px);
}

/* Film grain overlay */
.filmstrip-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 3;
}

/* ============================================
   Section 12: Countdown
   ============================================ */
.section-countdown {
  background-color: var(--color-white);
  padding: 30px 20px;
}

.countdown-wrapper {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.countdown-item {
  text-align: center;
  min-width: 60px;
}

.countdown-number {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 5px;
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   Section 13: Save The Date
   ============================================ */
.section-save-date {
  background-color: var(--color-white);
}

.heart-icon {
  color: var(--color-accent);
  font-size: 16px;
  margin-bottom: 15px;
}

.save-date-heading {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 200;
  letter-spacing: 6px;
  color: var(--color-accent);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.save-date-poem p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  line-height: 2;
  color: var(--color-text);
}

/* ============================================
   Section 14: Calendar
   ============================================ */
.section-calendar {
  background-color: var(--color-white);
  padding: 10px 20px 30px;
}

.calendar-wrapper {
  overflow: hidden;
  border-radius: 4px;
}

.calendar-photo-bg {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  overflow: hidden;
}

.calendar-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calendar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  padding: 15px 20px 20px;
}

.calendar-grid {
  color: var(--color-white);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.calendar-header span {
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-body span {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  padding: 4px 0;
  line-height: 1.4;
}

.calendar-highlight {
  position: relative;
  color: var(--color-white);
  font-weight: 600 !important;
}

.calendar-highlight::after {
  content: '♥';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: #e74c3c;
}

.calendar-date-info {
  padding: 15px;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
}

.calendar-date-main {
  font-family: var(--font-decorative);
  font-size: 16px;
  font-style: italic;
  color: var(--color-white);
  margin-bottom: 3px;
}

.calendar-date-lunar {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Section 15: Final Quote
   ============================================ */
.section-quote-final {
  background-color: var(--color-white);
}

.final-quote p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  line-height: 2;
  color: var(--color-text);
  text-align: center;
}

/* ============================================
   Section 16: Sweet Wedding Invitation
   ============================================ */
.section-sweet-wedding {
  background-color: var(--color-sweet-bg);
  padding-bottom: 0;
}

.sweet-wedding-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.sweet-wedding-banner span {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-white);
}

.sweet-wedding-photo {
  width: 100%;
}

.sweet-wedding-quote {
  padding: 25px 30px;
  background-color: var(--color-white);
}

.sweet-wedding-quote p {
  font-family: var(--font-decorative);
  font-size: 13px;
  font-style: italic;
  line-height: 1.8;
  color: var(--color-text);
  text-align: center;
}

/* ============================================
   Section 17: Gift Box
   ============================================ */
.section-gift {
  background-color: var(--color-white);
}

.gift-box-icon {
  margin-bottom: 10px;
}

.gift-text {
  font-family: var(--font-decorative);
  font-size: 16px;
  font-style: italic;
  color: var(--color-accent);
}

.gift-box-icon:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* Gift Modal */
.gift-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s 0.4s;
}

.gift-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s 0s;
}

.gift-modal {
  background: var(--color-white);
  border-radius: 16px;
  padding: 30px 24px;
  width: 90%;
  max-width: 380px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.33, 0, 0.15, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.gift-modal-overlay.active .gift-modal {
  transform: translateY(0) scale(1);
}

.gift-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.gift-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.gift-modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.gift-modal-subtitle {
  font-family: var(--font-decorative);
  font-size: 13px;
  font-style: italic;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 24px;
}

.gift-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gift-card {
  background: linear-gradient(135deg, #fdf6f0 0%, #f5ebe0 100%);
  border: 1px solid rgba(180, 150, 120, 0.2);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.gift-card-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.gift-card-name {
  font-family: var(--font-script);
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 10px;
}

.gift-thankyou-message {
  text-align: center;
  margin-bottom: 24px;
}

.gift-thankyou-message p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  color: #666;
  line-height: 1.8;
  margin-bottom: 8px;
}

.gift-card-phone {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  padding: 8px 20px;
  border: 1px solid rgba(180, 150, 120, 0.3);
  border-radius: 24px;
  transition: background 0.2s, color 0.2s;
}

.gift-card-phone:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ============================================
   Section 18: RSVP
   ============================================ */
.section-rsvp {
  background-color: var(--color-container);
  padding: 30px 25px;
}

.rsvp-card {
  background-color: var(--color-white);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.rsvp-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
  text-align: center;
}

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

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
  border-color: var(--color-accent);
}

.form-group input[type="text"]::placeholder {
  color: #bbb;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  margin-top: 1px;
  transition: border-color 0.3s ease;
}

.radio-label input[type="radio"]:checked {
  border-color: #4a90d9;
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #4a90d9;
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text);
  outline: none;
  background-color: var(--color-white);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.form-group select:focus {
  border-color: var(--color-accent);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: var(--color-btn);
  color: var(--color-white);
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit:hover {
  background-color: #a8907a;
  transform: scale(1.01);
}

/* Textarea for wishes */
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text);
  outline: none;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.3s ease;
}

.form-group textarea:focus {
  border-color: var(--color-accent);
}

.form-group textarea::placeholder {
  color: #bbb;
}

/* Submit button layout with icon */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit svg {
  flex-shrink: 0;
}

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

/* Success message after RSVP submission */
.form-success {
  display: none;
  text-align: center;
  padding: 30px 20px;
  animation: successFadeIn 0.5s ease;
}

.form-success.show {
  display: block;
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: var(--color-white);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 15px rgba(188, 163, 140, 0.3);
}

.form-success h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.form-success p {
  font-family: var(--font-decorative);
  font-size: 14px;
  font-style: italic;
  color: #666;
  line-height: 1.6;
}

.form-success .success-sub {
  margin-top: 12px;
  color: var(--color-accent);
  font-size: 13px;
}

/* ============================================
   Section 19: Footer / Thank You
   ============================================ */
.section-footer {
  background-color: var(--color-white);
  padding: 30px 20px 50px;
}

.couple-illustration {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
}

.couple-illustration svg {
  opacity: 0.6;
}

.thank-you-text {
  font-family: var(--font-script);
  font-size: 46px;
  font-weight: 400;
  color: var(--color-accent-light);
  text-align: center;
}

/* ============================================
   Floating Hearts
   ============================================ */
.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -20px;
  font-size: 14px;
  color: #e8a0a0;
  opacity: 0;
  animation: floatHeart 4s ease-in forwards;
}

@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5) rotate(0deg);
  }

  10% {
    opacity: 0.8;
  }

  50% {
    opacity: 0.6;
    transform: translateY(-40vh) scale(1) rotate(15deg);
  }

  100% {
    opacity: 0;
    transform: translateY(-90vh) scale(0.8) rotate(-10deg);
  }
}

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

/* Mobile - Full width */
@media (max-width: 480px) {
  body {
    align-items: flex-start;
  }

  .main-container {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .cover-title {
    font-size: 36px;
  }

  .envelope {
    width: 220px;
    height: 145px;
  }

  .couple-img {
    height: 170px;
  }

  .filmstrip-img {
    height: 180px;
  }

  .love-large-photo {
    height: 380px;
  }

  .countdown-number {
    font-size: 30px;
  }

  .datetime-display {
    gap: 5px;
  }

  .time-text,
  .day-text,
  .date-text {
    font-size: 20px;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .main-container {
    width: 450px;
  }
}

/* Desktop */
@media (min-width: 769px) {
  .main-container {
    width: 450px;
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .main-container {
    width: 450px;
  }
}

/* ============================================
   Utility / Helpers
   ============================================ */

/* Hidden state for cover content after envelope opens */
.section-cover.opened .touch-text {
  display: none;
}

/* Smooth image load */
img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img.loaded {
  opacity: 1;
}