/* ============================================================
   GRADUATION INVITATION – PREMIUM REDESIGN
   Inspired by elegant Vietnamese graduation invitation style
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  --ink: #1a1a2e;
  --wine: #6b1d2a;
  --wine-deep: #4a1018;
  --gold: #c9a96e;
  --gold-light: #e8d5a8;
  --paper: #faf8f4;
  --paper-warm: #f5f0e8;
  --cream: #fffdf7;
  --mist: #eef0ec;
  --shadow-color: rgba(20, 20, 46, 0.12);

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #e4e4e7;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Mobile Frame Wrapper */
main {
  max-width: 480px;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.12);
  overflow-x: hidden;
}

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

/* ---------- Grain Overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--wine));
  z-index: 99;
  transition: width 0.1s linear;
}

/* ---------- Music Toggle – Premium Vinyl Style ---------- */
.music-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(201, 169, 110, 0.3);
  border-radius: 50%;
  background: rgba(26, 26, 46, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--gold-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s var(--ease-spring), border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: visible;
}
.music-toggle:hover {
  transform: scale(1.12);
  border-color: var(--gold);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(201, 169, 110, 0.2);
}
.music-toggle:active { transform: scale(0.92); }

/* Playing state */
.music-toggle.playing {
  border-color: var(--gold);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(201, 169, 110, 0.25);
}

/* Vinyl disc (spins when playing) */
.music-vinyl {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(201, 169, 110, 0.06) 0deg,
    rgba(201, 169, 110, 0.02) 90deg,
    rgba(201, 169, 110, 0.08) 180deg,
    rgba(201, 169, 110, 0.02) 270deg,
    rgba(201, 169, 110, 0.06) 360deg
  );
  transition: opacity 0.4s ease;
  opacity: 0;
}
.music-toggle.playing .music-vinyl {
  opacity: 1;
  animation: vinylSpin 3s linear infinite;
}
.vinyl-groove {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 110, 0.12);
}
.vinyl-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.music-toggle.playing .vinyl-center {
  opacity: 0.6;
}

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

/* Music note icon */
.music-icon-note {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.music-toggle.playing .music-icon-note {
  transform: scale(0.85);
  opacity: 0.9;
}

/* Equalizer bars (below button) */
.music-bars {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2.5px;
  align-items: flex-end;
  height: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.music-toggle.playing .music-bars {
  opacity: 1;
}
.music-bars span {
  display: block;
  width: 3px;
  background: var(--gold);
  border-radius: 1.5px;
  height: 3px;
}
.music-toggle.playing .music-bars span {
  animation: eqBar 0.8s ease-in-out infinite alternate;
}
.music-bars span:nth-child(1) { animation-delay: 0s; }
.music-bars span:nth-child(2) { animation-delay: 0.15s; }
.music-bars span:nth-child(3) { animation-delay: 0.3s; }
.music-bars span:nth-child(4) { animation-delay: 0.45s; }

@keyframes eqBar {
  0%   { height: 3px; }
  50%  { height: 12px; }
  100% { height: 5px; }
}

/* Pulse ring (when playing) */
.music-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  opacity: 0;
  pointer-events: none;
}
.music-toggle.playing .music-pulse {
  animation: pulseRing 2.5s ease-out infinite;
}
@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ============================================================
   HERO SECTION – SAMPLE MATCHED (LIGHT SILK THEME)
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper-warm) 100%);
  padding: 40px 20px 0px;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 20px 20px clamp(40px, 10vw, 80px);
  max-width: 600px;
  margin: 0 auto;
}

/* Hero Badge / Header */
.hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}
.badge-logo {
  max-width: 160px;
  height: auto;
  margin-bottom: 4px;
  margin-top: -20px;
}
.badge-sub {
  color: #1b243a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Hero Title – Sample Matched */
.hero-title {
  margin: 0 0 28px;
  line-height: 1;
}
.title-main {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(25px, 6vw, 68px);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #1b243a;
  text-transform: uppercase;
}
.title-sub-script {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(30px, 11.5vw, 92px);
  font-weight: 400;
  color: #1b243a;
  margin-top: -5px;
  margin-left: 20px;
}

/* Hero Photo Card – Rounded with Overlaid White Signature */
.hero-photo-card {
  position: relative;
  width: min(400px, 88vw);
  aspect-ratio: 3 / 4;
  margin: 0 auto 28px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow:
    0 20px 48px rgba(27, 36, 58, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08);
}
.hero-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 1. Thay đổi vị trí X và Y của ảnh */
  object-position: 50% 100%; 
  
  /* 2. Thêm độ zoom (phóng to) cho ảnh */
  transform: scale(1.0);
}
.hero-photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 36, 58, 0.7) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.photo-signature {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.photo-signature .name-script {
  font-family: var(--font-script);
  font-size: clamp(36px, 10vw, 68px);
  color: #ffffff;
  font-weight: 400;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Hero Tagline */
.hero-tagline {
  margin: 0;
  color: #4a546e;
  font-family: var(--font-serif);
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* Sash – Continuous Swaying Animation (Hanging from Top Edge) */
.sash-wrap {
  position: absolute;
  top: 0;
  left: clamp(10px, 3.5vw, 48px);
  z-index: 10;
  width: clamp(110px, vw, 170px);
  transform-origin: 50% 0;
  animation: sashPendulum 3.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
  filter: drop-shadow(4px 14px 22px rgba(27, 36, 58, 0.32));
}
.sash {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes sashPendulum {
  0%   { transform: rotate(-1.5deg); }
  100% { transform: rotate(1.5deg); }
}

/* Floating Particles */
.particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}
.particle:nth-child(1) { left: 15%; top: 20%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 75%; top: 40%; animation-delay: 1.5s; animation-duration: 9s; width: 3px; height: 3px; }
.particle:nth-child(3) { left: 45%; top: 70%; animation-delay: 3s; animation-duration: 6s; width: 5px; height: 5px; }
.particle:nth-child(4) { left: 85%; top: 15%; animation-delay: 2s; animation-duration: 10s; }
.particle:nth-child(5) { left: 25%; top: 85%; animation-delay: 4s; animation-duration: 8s; width: 3px; height: 3px; }
.particle:nth-child(6) { left: 60%; top: 60%; animation-delay: 5s; animation-duration: 7s; }

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
  10% { opacity: 0.8; transform: translateY(-10px) scale(1); }
  50% { opacity: 0.4; transform: translateY(-60px) scale(0.8); }
  90% { opacity: 0; transform: translateY(-120px) scale(0.2); }
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-arrow {
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   INVITATION SECTION
   ============================================================ */
.invitation {
  position: relative;
  padding: 80px 24px;
  background: var(--paper-warm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.invitation-paper {
  position: relative;
  width: min(480px, 100%);
  padding: 56px 36px 48px;
  background: var(--cream);
  border-radius: 4px;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    0 20px 60px rgba(0,0,0,0.08);
  text-align: center;
}

/* Decorative corners */
.paper-corner {
  position: absolute;
  width: 40px;
  height: 40px;
}
.paper-corner.top-left {
  top: 16px;
  left: 16px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}
.paper-corner.top-right {
  top: 16px;
  right: 16px;
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}

.invite-label {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: #888;
}

.invite-name {
  margin: 0 0 24px;
}
.invite-name .name-script {
  font-size: clamp(40px, 9vw, 56px);
  color: var(--ink);
  font-family: 'Libertinus Math', 'Great Vibes', cursive;
}

.invite-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 32px;
  padding: 0 20px;
}
.invite-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.invite-divider i {
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  animation: sparkle 3s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* Date/Time */
.invite-datetime {
  margin-bottom: 32px;
}
.invite-time {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #555;
}
.invite-date-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.date-month,
.date-year {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #666;
}
.date-day {
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
  padding: 0 20px;
}

/* Contact */
.invite-contact {
  margin-bottom: 32px;
}
.contact-label {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: #888;
}
.contact-number {
  margin: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.contact-number a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.contact-number a:hover {
  text-decoration: underline;
  color: var(--wine);
}

/* Venue */
.invite-venue {
  margin-bottom: 32px;
}
.venue-label {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: #888;
}
.venue-name {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.3;
  color: var(--ink);
}
.venue-address {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14px;
  color: #777;
}

/* Map Container */
.map-wrapper {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}
.map-wrapper iframe {
  display: block;
}

/* Map Link */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 28px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid #ddd;
  border-radius: 100px;
  transition: all 0.3s ease;
}
.map-link svg {
  color: var(--wine);
}
.map-link:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.map-link:hover svg {
  color: var(--gold-light);
}

/* Invitation Photo */
.invitation-photo {
  width: min(480px, 100%);
  height: 320px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.invitation-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
}
.invitation-photo:hover img {
  transform: scale(1.05);
}

/* ============================================================
   FILM STRIP SECTION
   ============================================================ */
.film-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px;
  background: #1a1a2e;
}

.film-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.film-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.4) brightness(0.5) blur(2px);
}
.film-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(26, 26, 46, 0.6) 0%,
    rgba(26, 26, 46, 0.75) 50%,
    rgba(26, 26, 46, 0.6) 100%
  );
}

.film-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 48px;
}
.film-title {
  margin: 0;
}
.film-title .title-script {
  font-family: var(--font-script);
  font-size: clamp(56px, 15vw, 100px);
  color: #fff;
  display: block;
  padding-right: clamp(10px, 3vw, 20px);
}
.film-title .title-sub {
  font-family: var(--font-script);
  font-size: clamp(24px, 6vw, 40px);
  color: var(--gold-light);
  display: block;
  margin-top: -4px;
}
.film-desc {
  max-width: 600px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
}

/* Film Strip Marquee */
.film-marquee-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.film-strip-horizontal {
  background: #2a2a40;
  border-radius: 4px;
  padding: 16px 8px;
  position: relative;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.08),
    0 8px 32px rgba(0,0,0,0.3);
}

.film-strip-horizontal::before,
.film-strip-horizontal::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.15) 0px, rgba(255,255,255,0.15) 12px, transparent 12px, transparent 20px);
}
.film-strip-horizontal::before { top: 4px; }
.film-strip-horizontal::after { bottom: 4px; }

.film-marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: scrollMarquee 20s linear infinite;
}

.film-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 6px)); }
}

.film-frame {
  width: clamp(160px, 40vw, 260px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
}
.film-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}
.film-frame:hover img {
  transform: scale(1.08);
}

/* Torn paper effects */
.torn-paper-top,
.torn-paper-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 3;
  background-size: 100% 100%;
}
.torn-paper-top {
  top: -1px;
  background: var(--paper-warm);
  clip-path: polygon(
    0 0, 100% 0, 100% 30%,
    95% 55%, 90% 35%, 85% 60%, 80% 40%,
    75% 70%, 70% 45%, 65% 65%, 60% 50%,
    55% 75%, 50% 55%, 45% 70%, 40% 48%,
    35% 68%, 30% 42%, 25% 62%, 20% 38%,
    15% 58%, 10% 35%, 5% 55%, 0 40%
  );
}
.torn-paper-bottom {
  bottom: -1px;
  background: var(--paper-warm);
  clip-path: polygon(
    0 100%, 100% 100%, 100% 50%,
    95% 30%, 90% 55%, 85% 25%, 80% 50%,
    75% 20%, 70% 45%, 65% 25%, 60% 40%,
    55% 15%, 50% 35%, 45% 20%, 40% 42%,
    35% 22%, 30% 48%, 25% 28%, 20% 52%,
    15% 32%, 10% 55%, 5% 35%, 0 50%
  );
}

/* ============================================================
   LETTER SECTION
   ============================================================ */
.letter-section {
  padding: 80px 24px 100px;
  background: var(--paper);
  display: flex;
  justify-content: center;
}

.letter-paper {
  width: min(600px, 100%);
  padding: 48px 36px;
  background: var(--cream);
  border-radius: 4px;
  box-shadow:
    0 1px 4px rgba(0,0,0,0.04),
    0 12px 40px rgba(0,0,0,0.06);
  position: relative;
}
.letter-paper::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 24px;
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 2px;
  pointer-events: none;
}

.letter-epigraph {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--font-script);
  font-size: 20px;
  color: var(--wine);
}
.letter-epigraph em {
  font-style: normal;
}

.letter-body {
  padding: 0 12px;
}
.letter-body p {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.9;
  color: #444;
  text-align: justify;
  text-indent: 2em;
}
.letter-body p:last-child {
  margin-bottom: 0;
}

.letter-signature {
  margin: 36px 0 0;
  text-align: right;
  padding-right: 24px;
}
.letter-signature .name-script {
  font-size: 42px;
  color: var(--ink);
}

/* ============================================================
   COLLAGE SECTION
   ============================================================ */
.collage-section {
  padding: 0 12px 12px;
  background: var(--paper);
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
}

.collage-item {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}
.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
}
.collage-item:hover img {
  transform: scale(1.06);
}
.collage-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.15));
  pointer-events: none;
}

.collage-large {
  grid-column: span 2;
  grid-row: span 2;
}
.collage-tall {
  grid-row: span 2;
}
.collage-wide {
  grid-column: span 2;
}

/* ============================================================
   CLOSING SECTION – SPLIT LAYOUT (PLAIN LEFT, GALLERY RIGHT)
   ============================================================ */
/* ============================================================
   CLOSING SECTION – BALANCED 2-COLUMN SPLIT & GALLERY
   ============================================================ */
.closing-split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 32px;
  padding: 100px clamp(24px, 6vw, 100px);
  top: -25px;
  background: var(--paper-warm);
  overflow: hidden;
}

.closing-left {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.closing-text-card {
  padding: 40px 32px;
  background: rgba(27, 36, 58, 0.03);
  border: 1px solid rgba(27, 36, 58, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(27, 36, 58, 0.06);
}

.closing-left-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.closing-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.closing-eyebrow {
  margin: 0 0 18px;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.closing-title {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: clamp(56px, 7.5vw, 84px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.closing-desc {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.85;
  color: rgba(27, 36, 58, 0.85);
}

.closing-signature {
  margin: 0 0 32px;
}
.closing-signature .name-script {
  font-size: 48px;
  color: var(--gold-dark);
}

.closing-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 1px solid rgba(27, 36, 58, 0.35);
  border-radius: 100px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.closing-button:hover {
  background: rgba(27, 36, 58, 0.05);
  border-color: rgba(27, 36, 58, 0.6);
}
.closing-button svg {
  transition: transform 0.3s ease;
}
.closing-button:hover svg {
  transform: translateX(4px);
}

/* Right Side Photo Gallery Grid */
.closing-right {
  position: relative;
  z-index: 2;
}

.closing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.closing-card {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 10px 32px rgba(27, 36, 58, 0.15);
  border: 1px solid rgba(27, 36, 58, 0.08);
  background: var(--paper-warm);
}

/* Portrait Card: 3/4 aspect ratio */
.closing-card.card-portrait {
  grid-column: span 1;
  aspect-ratio: 3 / 4;
}

/* Landscape Card: spans 2 columns, 16/9 aspect ratio */
.closing-card.card-landscape {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.closing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.7s var(--ease-out-expo);
}
.closing-card:hover img {
  transform: scale(1.06);
}

/* ============================================================
   REVEAL ANIMATIONS – Premium Scroll-to-Load
   ============================================================ */

/* Fade Up */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo),
    filter 0.9s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Scale In */
.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo),
    filter 0.8s var(--ease-out-expo);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Slide Up */
.reveal-slide {
  opacity: 0;
  transform: translateY(60px);
  filter: blur(4px);
  transition:
    opacity 1.1s var(--ease-out-expo),
    transform 1.1s var(--ease-out-expo),
    filter 1s var(--ease-out-expo);
}
.reveal-slide.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Slide Left */
.reveal-slide-left {
  opacity: 0;
  transform: translateX(-70px) rotate(-2deg);
  filter: blur(6px);
  transition:
    opacity 1s var(--ease-out-expo),
    transform 1s var(--ease-out-expo),
    filter 0.9s var(--ease-out-expo);
}
.reveal-slide-left.visible {
  opacity: 1;
  transform: translateX(0) rotate(0);
  filter: blur(0);
}

/* Slide Right */
.reveal-slide-right {
  opacity: 0;
  transform: translateX(70px) rotate(2deg);
  filter: blur(6px);
  transition:
    opacity 1s var(--ease-out-expo),
    transform 1s var(--ease-out-expo),
    filter 0.9s var(--ease-out-expo);
}
.reveal-slide-right.visible {
  opacity: 1;
  transform: translateX(0) rotate(0);
  filter: blur(0);
}

/* Fade In (text-only, subtle) */
.reveal-fade {
  opacity: 0;
  filter: blur(4px);
  transition:
    opacity 1.2s var(--ease-out-expo),
    filter 1s var(--ease-out-expo);
}
.reveal-fade.visible {
  opacity: 1;
  filter: blur(0);
}

/* Rotate In */
.reveal-rotate {
  opacity: 0;
  transform: translateY(30px) rotate(-5deg);
  filter: blur(4px);
  transition:
    opacity 0.9s var(--ease-out-expo),
    transform 1s var(--ease-spring),
    filter 0.8s var(--ease-out-expo);
}
.reveal-rotate.visible {
  opacity: 1;
  transform: translateY(0) rotate(0);
  filter: blur(0);
}

/* Clip Reveal (bottom to top) */
.reveal-clip {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1s var(--ease-out-expo);
}
.reveal-clip.visible {
  clip-path: inset(0 0 0 0);
}

/* ============================================================
   RESPONSIVE – DESKTOP
   ============================================================ */
@media (min-width: 9999px) {
  .hero-content {
    padding: 100px 48px 20px;
  }
  .hero-photo-frame {
    width: 320px;
  }

  .invitation {
    padding: 100px 48px;
    flex-direction: row;
    justify-content: center;
    gap: 48px;
  }
  .invitation-paper {
    padding: 64px 48px 56px;
  }
  .invitation-photo {
    height: 540px;
    width: 380px;
  }

  .film-content {
    height: 520px;
  }
  .film-strip {
    width: 240px;
  }

  .letter-paper {
    padding: 64px 56px;
  }

  .collage-grid {
    grid-auto-rows: 280px;
    gap: 12px;
  }
}

@media (min-width: 9999px) {
  .invitation {
    padding: 120px 80px;
    gap: 64px;
  }

  .collage-grid {
    grid-auto-rows: 320px;
    gap: 14px;
  }
}

/* ============================================================
   RESPONSIVE – MOBILE FINE-TUNING
   ============================================================ */
@media (max-width: 9999px) {
  .sash-wrap {
    width: clamp(50px, 24vw, 100px);
    left: 20px;
    top: -175px;
  }
  
  .hero-content {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
  .hero-badge,
  .hero-title {
    padding-left: clamp(80px, 22vw, 140px);
    padding-right: 20px;
  }
  .title-main {
    font-size: clamp(25px, 6vw, 42px);
    letter-spacing: 0.1em;
    margin-left: 0px;
  }
  .title-sub-script {
    font-size: clamp(30px, 8.5vw, 64px);
    margin-top: -8px;
    margin-left: 15px;
  }
  .hero-photo-card {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-tagline {
    margin-left: 0;
    padding: 0 20px;
  }

  .invitation {
    padding: 60px 16px;
    gap: 32px;
  }
  .invitation-paper {
    padding: 44px 24px 40px;
  }
  .invitation-photo {
    height: 240px;
  }
  .date-day {
    font-size: 48px;
    padding: 0 16px;
  }

  /* Removed old film strip mobile overrides */

  .letter-paper {
    padding: 36px 24px;
  }
  .letter-body p {
    font-size: 15px;
    line-height: 1.85;
  }

  .collage-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 6px;
  }
  .collage-large {
    grid-column: span 2;
    grid-row: span 1;
  }
  .collage-tall {
    grid-row: span 1;
  }
  .collage-wide {
    grid-column: span 2;
  }

  /* Closing section mobile optimization – Split layout */
  .closing-split {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 60px 20px;
  }
  .closing-left {
    max-width: 100%;
    text-align: center;
    gap: 20px;
  }
  .closing-text-card {
    padding: 36px 24px;
    text-align: center;
  }
  .closing-eyebrow {
    font-size: 11px;
    margin-bottom: 14px;
    letter-spacing: 0.3em;
  }
  .closing-title {
    font-size: clamp(42px, 11vw, 60px);
    line-height: 1.1;
    margin-bottom: 16px;
  }
  .closing-desc {
    font-size: clamp(17px, 4.8vw, 20px);
    line-height: 1.75;
    margin-bottom: 0;
    color: rgba(27, 36, 58, 0.85);
  }
  .closing-signature {
    margin-bottom: 24px;
  }
  .closing-signature .name-script {
    font-size: 38px;
  }
  .closing-button {
    padding: 12px 24px;
    font-size: 10px;
  }
  .closing-left-gallery,
  .closing-gallery-grid {
    gap: 8px;
  }
  .closing-pair-grid {
    gap: 8px;
  }
  .closing-card.card-portrait {
    aspect-ratio: 3 / 4;
  }
  .closing-card.card-landscape {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 480px) {
  .music-toggle {
    right: calc(50% - 240px + 28px);
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* NOTE: sash animation intentionally kept running */
  .hero-bg-image img { animation: none; }
  .particle { animation: none; }
  .music-bars span { animation: none; }
  .invite-divider i { animation: none; }
  .scroll-arrow { animation: none; }
  .reveal, .reveal-scale, .reveal-slide,
  .reveal-slide-left, .reveal-slide-right,
  .reveal-fade, .reveal-rotate, .reveal-clip {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
    transition: none;
  }
}

/* ============================================================
   IMAGE MODAL (LIGHTBOX)
   ============================================================ */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000; /* Ensure it's above everything */
  padding: 40px 20px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 25, 0.95);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden; /* Prevent body scroll */
}

.image-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.image-modal .modal-content {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-modal.show .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.2s ease, transform 0.2s ease;
  font-family: var(--font-sans);
}

.modal-close:hover {
  color: var(--gold);
  transform: scale(1.1);
}

/* Cursor indication for clickable images */
.hero-photo-card img,
.film-frame img,
.closing-card img,
.invitation-photo img {
  cursor: zoom-in;
}
