/* ============================================================
   WEDDING INVITATION – Đình Hiếu & Phương Loan
   Style: Vietnamese Red & Kraft – Romantic Scrapbook
   v2.0 – Synchronized & Polished
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --red: #8b1a1a;
  --red-light: #b52b2b;
  --red-deep: #5a0f0f;
  --gold: #c9a84c;
  --gold-light: #e8d197;
  --cream: #f5ede0;
  --kraft: #d4b896;
  --kraft-dark: #b8956a;
  --text-dark: #2a1a0e;
  --text-mid: #5c3a1e;
  --white: #fff8f0;
  --font-script: 'Dancing Script', cursive;
  --font-serif: 'Cormorant Garamond', serif;
  --font-display: 'Playfair Display', serif;
  --font-chinese: 'Noto Serif SC', serif;
  --max-w: 480px;

  /* ── Timing system (nhất quán toàn site) ── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);   /* spring-out mềm */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);      /* chuẩn material */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* nảy nhẹ */

  --dur-fast:   0.25s;
  --dur-normal: 0.45s;
  --dur-slow:   0.7s;
  --dur-float:  6s;   /* tất cả float dùng chung */
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: #1a0a05;
  font-family: var(--font-serif);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ---------- Page wrapper ---------- */
.page-wrapper { max-width: var(--max-w); margin: 0 auto; }

/* ---------- Section base ---------- */
.section { position: relative; overflow: hidden; width: 100%; }

/* ---------- Photo placeholders ---------- */
.photo-placeholder {
  background: linear-gradient(135deg, var(--kraft) 0%, var(--kraft-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mid); font-size: 0.85rem;
  font-family: var(--font-serif); text-align: center;
  border: 2px dashed var(--kraft-dark); border-radius: 4px; gap: 0.5rem;
}

/* ============================================================
   MUSIC BUTTON
   ============================================================ */
#music-btn {
  position: fixed; top: 18px; left: 18px; z-index: 1000;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--gold);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform var(--dur-fast) var(--ease-spring),
              background var(--dur-fast) var(--ease-in-out);
  will-change: transform;
}
#music-btn:hover { transform: scale(1.12); background: var(--red-light); }
#music-btn:active { transform: scale(0.96); }

.music-icon {
  color: var(--gold-light); font-size: 1.3rem; line-height: 1;
  transition: transform var(--dur-normal) var(--ease-in-out);
  will-change: transform;
}
#music-btn.playing .music-icon {
  animation: spin-note 3s linear infinite;
}
@keyframes spin-note {
  to { transform: rotate(360deg); }
}

.music-waves { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.music-waves span {
  display: block; width: 3px; background: var(--gold-light);
  border-radius: 2px; height: 4px; opacity: 0.6;
  transition: opacity var(--dur-fast);
}
#music-btn.playing .music-waves span:nth-child(1) { animation: wave 0.9s 0.0s ease-in-out infinite alternate; }
#music-btn.playing .music-waves span:nth-child(2) { animation: wave 0.9s 0.3s ease-in-out infinite alternate; }
#music-btn.playing .music-waves span:nth-child(3) { animation: wave 0.9s 0.6s ease-in-out infinite alternate; }

@keyframes wave {
  from { height: 3px; opacity: 0.4; }
  to   { height: 10px; opacity: 1; }
}

/* ============================================================
   SECTION 1 – HERO
   ============================================================ */
.hero-section {
  background: var(--red-deep);
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px 40px;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero_bg_pattern { width: 100%; height: 100%; object-fit: cover; opacity: 0.15; }

/* ── Sakura decor (dùng chung 1 animation, chỉ khác transform) ── */
.hero-sakura_decor_right,
.hero-sakura_decor_left { position: absolute; z-index: 2; pointer-events: none; }
.hero-sakura_decor_right { top: 0; right: 0; }
.hero-sakura_decor_left  { bottom: 0; left: 0; }

.hero-sakura_decor_right img,
.hero-sakura_decor_left  img {
  width: 260px; height: auto; opacity: 0.8;
  filter: blur(0.3px);
  animation: floatY var(--dur-float) ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.hero-sakura_decor_left img { transform: scaleX(-1); }

/* ── Torn paper top ── */
.hero-torn-top {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 60px; object-fit: cover;
  z-index: 3; pointer-events: none;
  animation: revealDown 1.4s var(--ease-out) both,
             floatY var(--dur-float) ease-in-out 1.4s infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
@keyframes revealDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Shared float (thay thế sakuraFloat + tornFloat) ── */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── Hero content ── */
.hero-content { text-align: center; z-index: 3; padding-top: 40px; }

.we-are{
  font-family: var(--font-script);
  color: var(--gold-light);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  letter-spacing: 2px;
  margin-bottom: 28px;

  display: inline-block;

  opacity: 0;

  animation: fadeSlideUp 1s var(--ease-out) 0.3s both;
}

@keyframes fadeSlideUp{

  from{
    opacity:0;
    transform: translateX(-100px) translateY(40px) rotate(-45deg);
  }

  to{
    opacity:1;
    transform: translateX(-100px) translateY(0) rotate(-45deg);
  }

}

.couple-name {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; flex-wrap: nowrap; margin-top: 25px;
}
.name-groom, .name-bride {
  font-family: var(--font-script); font-weight: 700;
  color: var(--white); font-size: clamp(2.2rem, 8vw, 3rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4); line-height: 1.1;
}
.ampersand { font-size: 1.8rem; color: #d4af37; font-family: serif; }

.chinese-decor {
  font-family: var(--font-chinese); color: var(--gold);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 4px; margin-top: 10px; opacity: 0.85;
}

/* ── Hero photo ── */
.hero-photo {
  position: relative; z-index: 3;
  width: 100%; max-width: 360px; margin: 20px auto;
  display: flex; justify-content: center;
  animation: photoReveal 1.2s var(--ease-out) 0.15s both;
  will-change: transform, opacity;
}
@keyframes photoReveal {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-photo-inner {
  width: 100%; aspect-ratio: 3/4; overflow: hidden;
  border-radius: 16px; background: #fff; padding: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 4px 10px rgba(0,0,0,0.2);
  will-change: transform;
}
.hero-photo-inner img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
  transition: transform 1s var(--ease-out);
  will-change: transform;
}
.hero-photo-inner:hover img { transform: scale(1.05); }

/* ── Double Happiness ── */
.double-happiness {
  font-family: var(--font-chinese);
  font-size: clamp(3rem, 12vw, 4.5rem);
  color: var(--gold);
  text-shadow: 0 0 30px rgba(201,168,76,0.5);
  z-index: 3; margin: 10px 0;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(201,168,76,0.35), 0 0 40px rgba(201,168,76,0.15); }
  50%       { text-shadow: 0 0 50px rgba(201,168,76,0.85), 0 0 90px rgba(201,168,76,0.35); }
}

/* ── Invitation text ── */
.invitation-text {
  z-index: 3; text-align: center; color: var(--cream);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.9; padding: 0 16px; max-width: 380px;
}
.invitation-text p { margin-bottom: 8px; }

.divider { color: var(--gold); font-size: 1.1rem; letter-spacing: 6px; margin: 12px 0; }

.quote-text {
  font-style: italic; font-size: 1.2em;
  background: linear-gradient(90deg, #b8963a 0%, #e6c76b 25%, #fff3b0 50%, #e6c76b 75%, #b8963a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none; /* text-shadow không áp dụng với clip text */
}

/* ============================================================
   SECTION 2 – ABOUT US
   ============================================================ */
.about-section {
  background:
    linear-gradient(rgba(251,245,238,0.88), rgba(251,245,238,0.96)),
    url("asset/Background/bgredwhite.png") center/cover no-repeat;
  padding: 80px 24px 60px;
  position: relative; z-index: 10;
  margin-top: -40px;
  box-shadow: 0 -15px 30px rgba(0,0,0,0.15);
}

.about-label {
  display: flex; align-items: baseline; gap: 15px;
  margin-bottom: 10px; justify-content: center;
  background: radial-gradient(ellipse 60% 50% at center, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
  padding: 30px 10px;
}
.about-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 10vw, 4rem); font-weight: 700;
  color: #8b1a1a; letter-spacing: -1px; line-height: 1;
  text-shadow: 0 4px 15px rgba(255,255,255,1), 0 2px 8px rgba(139,26,26,0.15);
}
.us-text {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.6rem, 8vw, 3.5rem);
  background: linear-gradient(135deg, #b8963a 0%, #f3df9f 50%, #b8963a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* ── Person card ── */
.person-card {
  margin-bottom: 40px; position: relative;
  display: flex; flex-direction: column; flex-wrap: wrap; align-items: center;
}
.person-name {
  width: 100%; order: 1;
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.5rem, 8vw, 3rem);
  color: #8b1a1a; text-align: center; margin-bottom: 30px;
  text-shadow: 2px 2px 0px rgba(255,255,255,0.8);
  position: relative; z-index: 3;
}
.person-name em {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 0.45em; color: #b8956a; display: block;
  letter-spacing: 2px; margin-top: 5px;
}
.person-photo-wrap {
  width: 260px; max-width: 80%; margin: 0 auto;
  position: relative; z-index: 1; order: 2;
}
.person-photo-wrap::before {
  content: '';
  position: absolute; top: -15px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 100px; height: 28px;
  background: rgba(226,203,170,0.85);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px); z-index: 5;
}
.person-photo {
  width: 100%; max-width: 260px; aspect-ratio: 3/4;
  border-radius: 4px; overflow: hidden; background: #fff;
  border: 8px solid #fff; border-bottom: 35px solid #fff;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15), 0 5px 15px rgba(0,0,0,0.1);
  transform: rotate(-3deg);
  transition: transform var(--dur-normal) var(--ease-out);
  margin: auto;
}
.bride-card .person-photo { transform: rotate(3deg); }
.person-photo:hover { transform: scale(1.02) rotate(0deg); }
.person-photo img { width: 100%; height: 100%; object-fit: contain; }

.person-info {
  background: linear-gradient(145deg, #8b1a1a, #5a0f0f);
  color: #f5ede0; padding: 25px; border-radius: 12px;
  font-size: 0.95rem; line-height: 1.8;
  margin-top: -30px; margin-left: 15px; margin-right: 15px;
  position: relative; z-index: 2; order: 3;
  box-shadow: 0 15px 30px rgba(139,26,26,0.3);
  text-align: center;
}
.person-info::before {
  content: '';
  position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px dashed rgba(232,209,151,0.3); border-radius: 8px; pointer-events: none;
}
.person-info h3 {
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
  letter-spacing: 3px; color: #e8d197; margin-bottom: 8px; text-transform: uppercase;
}
.person-info strong { color: #fff; font-weight: 600; }
.address { font-size: 0.85rem; opacity: 0.8; margin-top: 8px; font-style: italic; }

/* ── Desktop layout ── */
@media(min-width: 768px) {
  .person-card { flex-direction: row; align-items: center; justify-content: center; margin-bottom: 120px; }
  .person-name  { margin-bottom: 50px; font-size: 3.5rem; }
  .person-photo-wrap { width: 300px; margin: 0; }
  .person-info  { width: 380px; margin-top: 0; padding: 35px 40px; }
  .groom-card .person-photo-wrap { order: 2; }
  .groom-card .person-info { order: 3; margin-left: -50px; text-align: left; }
  .bride-card .person-info { order: 2; margin-right: -50px; text-align: right; }
  .bride-card .person-photo-wrap { order: 3; }
}

/* ── Love story ── */
.love-story {
  margin-top: 20px; padding: 45px 30px 35px; border-radius: 16px;
  background: #fffdf9; box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  border: 1px solid #eaddcf; font-style: italic; text-align: center;
  line-height: 2.2; color: #5c3a1e; position: relative;
}
.love-story::before {
  content: '♥'; position: absolute; top: -20px; left: 50%;
  transform: translateX(-50%); font-size: 2rem; color: #c9a84c;
  background: #fffdf9; width: 40px; height: 40px; line-height: 40px;
  border-radius: 50%; border: 1px solid #eaddcf;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.love-story p { position: relative; z-index: 2; }
.love-story p + p { margin-top: 16px; }

/* ============================================================
   SECTION 3 – SCHEDULE
   ============================================================ */
.schedule-section { background: var(--cream); padding: 60px 24px 50px; }

.couple-photo-2 { position: relative; margin: 0 auto 50px; max-width: 360px; text-align: center; }
.couple-photo-2::before {
  content: '▪ ▪ ▪ ▪ ▪ ▪ ▪ ▪'; display: block;
  color: var(--text-dark); font-size: 0.5rem; letter-spacing: 6px;
  text-align: center; margin-bottom: 8px; opacity: 0.4;
}

.schedule-photo {
  width: 100%; aspect-ratio: 4/5;
  border-radius: 200px 200px 18px 18px; overflow: hidden;
  background: #fff; padding: 6px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25), 0 8px 20px rgba(0,0,0,0.15);
  transition: transform var(--dur-normal) var(--ease-out);
}
.schedule-photo:hover { transform: scale(1.03); }
.schedule-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  border-radius: 190px 190px 12px 12px;
}

.we-got-married-text {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  font-family: 'Dancing Script', cursive; font-size: clamp(1.5rem, 5vw, 2rem);
  color: #8b1a1a; background: rgba(255,255,255,0.8); padding: 6px 16px;
  border-radius: 20px; box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.schedule-block  { margin-top: 50px; }
.schedule-title  { font-family: var(--font-display); font-size: clamp(1.1rem, 4vw, 1.4rem); color: var(--red); text-align: center; letter-spacing: 3px; margin: 24px 0 12px; }
.schedule-card   { background: rgba(212,184,150,0.3); border: 1px solid var(--kraft-dark); border-radius: 10px; padding: 20px; text-align: center; font-size: 0.95rem; color: var(--text-mid); line-height: 2; }
.date-big        { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2rem); color: var(--red); font-weight: 700; letter-spacing: 3px; }

/* ── Map ── */
.map-container {
  margin-top: 36px; border-radius: 16px; overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 45px rgba(0,0,0,0.18), 0 6px 15px rgba(0,0,0,0.08);
  transition: transform var(--dur-normal) var(--ease-out);
}
.map-container:hover { transform: translateY(-4px); }
.map-photo { width: 100%; height: 240px; object-fit: cover; }

/* ── Calendar ── */
.calendar-wrap { margin-top: 40px; display: flex; justify-content: center; }
.calendar {
  max-width: 380px; width: 100%;
  background: linear-gradient(145deg, #fffaf4, #f3e6d3);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.18), 0 8px 20px rgba(0,0,0,0.08);
}
.cal-header {
  background: linear-gradient(135deg, var(--red), #a31e1e);
  color: var(--gold-light); text-align: center; padding: 14px;
  font-family: var(--font-display); font-size: 1.1rem;
  letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 14px; }
.cal-day-name { text-align: center; font-size: .75rem; color: var(--red); font-weight: 700; letter-spacing: 1px; }
.cal-day {
  text-align: center; padding: 8px 0; font-size: .9rem;
  color: var(--text-mid); border-radius: 8px; position: relative;
  transition: transform var(--dur-fast) var(--ease-spring),
              background var(--dur-fast) var(--ease-in-out);
}
.cal-day:hover { transform: translateY(-2px); background: rgba(139,26,26,0.08); }
.cal-day.empty { opacity: 0; pointer-events: none; }
.cal-day.special {
  background: linear-gradient(135deg, #8b1a1a, #b22424);
  color: white !important; font-weight: 700; border-radius: 50%;
  width: 32px; height: 32px; margin: auto;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(139,26,26,0.45), inset 0 0 6px rgba(255,255,255,0.4);
  animation: glowPulse 3s ease-in-out infinite;
}
.cal-day.special::after {
  content: attr(data-tooltip); position: absolute;
  bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #2d2d2d; color: white; padding: 6px 10px;
  border-radius: 6px; font-size: .7rem; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-in-out),
              transform var(--dur-fast) var(--ease-out);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}
.cal-day.special:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Countdown (duy nhất 1 block) ── */
.countdown-wrap { margin-top: 40px; text-align: center; }
.countdown {
  display: flex; justify-content: center; gap: 18px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.count-unit {
  width: 70px; height: 90px;
  background: linear-gradient(145deg, #fffaf2, #f3e6d2);
  border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15), inset 0 0 6px rgba(255,255,255,0.6);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.count-unit:hover { transform: translateY(-4px) scale(1.04); }
.count-unit span {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  color: var(--red); line-height: 1;
}
.count-unit label {
  font-size: .75rem; margin-top: 4px;
  color: var(--text-mid); letter-spacing: 1px; text-transform: uppercase;
}
.count-unit span.tick { animation: countTick 0.4s var(--ease-spring); }
@keyframes countTick {
  0%   { transform: scale(1.35); color: var(--gold); }
  100% { transform: scale(1); }
}
.countdown-caption {
  max-width: 380px; margin: 0 auto;
  font-size: .9rem; line-height: 1.8; color: var(--text-mid); font-style: italic;
  padding: 14px 20px;
  background: linear-gradient(135deg, #fffaf3, #f1e4cf);
  border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ============================================================
   SECTION 4 – RSVP & GALLERY
   ============================================================ */
.rsvp-section {
  background:
    linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.75)),
    url("asset/Background/BeigeandOrangeWatercolorAutumnBackgroundPoster.png");
  background-size: cover; background-position: center; background-repeat: no-repeat;
  padding: 60px 24px 80px; position: relative;
}
.chinese-phrase {
  font-family: var(--font-chinese); font-size: clamp(1.8rem, 7vw, 2.6rem);
  color: var(--red); text-align: center; line-height: 1.6;
  margin-bottom: 24px; letter-spacing: 4px;
}
.thanks-text { text-align: center; color: var(--text-mid); font-style: italic; line-height: 2; font-size: 0.95rem; margin-bottom: 32px; }

/* ── Photo strip ── */
.wedding-photos { margin-bottom: 40px; }
.photo-strip    { display: flex; gap: 12px; }
.strip-photo {
  flex: 1; aspect-ratio: 3/4;
  transform: rotate(-1.5deg);
  box-shadow: 3px 3px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out);
}
.strip-photo:hover { transform: rotate(0deg) scale(1.04); box-shadow: 6px 8px 24px rgba(0,0,0,0.22); }
.strip-photo img  { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.strip-photo:nth-child(2) { transform: rotate(1.5deg) translateY(8px); }
.strip-photo:nth-child(2):hover { transform: rotate(0deg) translateY(0) scale(1.04); }

/* ── RSVP Form ── */
.rsvp-form-wrap { background: var(--white); border-radius: 16px; padding: 28px 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.1); margin-bottom: 40px; }
.rsvp-title { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-dark); text-align: center; margin-bottom: 20px; }
.rsvp-form-wrap label { display: block; font-size: 0.9rem; color: var(--text-mid); margin-bottom: 6px; margin-top: 16px; font-weight: 600; }
.rsvp-form-wrap input[type="text"] {
  width: 100%; padding: 12px 16px; border: 1px solid var(--kraft-dark);
  border-radius: 8px; font-family: var(--font-serif); font-size: 0.95rem;
  background: var(--cream); color: var(--text-dark); outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.rsvp-form-wrap input[type="text"]:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(139,26,26,0.12); }
.radio-group { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.radio-label { display: flex !important; align-items: center !important; gap: 10px; cursor: pointer; font-weight: 400 !important; margin-top: 0 !important; font-size: 0.95rem; color: var(--text-dark); }
.radio-label input[type="radio"] { accent-color: var(--red); width: 16px; height: 16px; }
.submit-btn {
  width: 100%; margin-top: 24px; padding: 14px;
  background: var(--red); color: var(--white); border: none;
  border-radius: 8px; font-family: var(--font-display); font-size: 1rem;
  letter-spacing: 1px; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-in-out),
              transform var(--dur-fast) var(--ease-spring),
              box-shadow var(--dur-fast);
  box-shadow: 0 4px 12px rgba(139,26,26,0.3);
}
.submit-btn:hover  { background: var(--red-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,26,26,0.35); }
.submit-btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(139,26,26,0.25); }
.rsvp-success { text-align: center; color: var(--red); font-size: 1rem; padding: 16px; font-style: italic; }

/* ── Gift section ── */
.gift-section {
  text-align: center; margin-bottom: 50px; padding: 28px 22px;
  background: linear-gradient(145deg, #fff9f2, #f3e6d2);
  border-radius: 16px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.12), inset 0 0 0 1px rgba(0,0,0,0.05);
}
.gift-section h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-dark); margin-bottom: 18px; letter-spacing: 2px; }
.gift-chinese {
  font-family: var(--font-chinese); font-size: 3rem; color: var(--red);
  background: linear-gradient(135deg, #fff5dc, #f3e1b3);
  display: inline-block; padding: 14px 28px; border-radius: 14px;
  border: 2px solid var(--gold); margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15), inset 0 0 10px rgba(255,255,255,0.6);
  animation: glowPulse 3s ease-in-out infinite; /* reuse same keyframe */
}
.gift-qr { max-width: 200px; margin: 0 auto; }
.qr-photo {
  width: 100%; aspect-ratio: 1; background: white; padding: 10px;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2), 0 6px 12px rgba(0,0,0,0.1);
  transition: transform var(--dur-normal) var(--ease-spring);
}
.qr-photo:hover { transform: scale(1.05); }
.qr-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ── Gallery ── */
.gallery-section { margin-bottom: 40px; }
.gallery-main { position: relative; height: 420px; width: 100%; margin: auto; overflow: hidden; border-radius: 12px; }

.gallery-main-photo,
.gallery-main-photo_alt {
  position: absolute; z-index: 1; inset: 0;
  width: 100%; height: 440px; object-fit: cover;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  transition: transform 0.8s var(--ease-in-out), opacity 0.6s var(--ease-in-out);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Trạng thái mặc định: ẩn sang phải */
.gallery-main-photo   { transform: translateX(0);    z-index: 2; }
.gallery-main-photo_alt { transform: translateX(100%); z-index: 1; }

/* Ảnh đang hiển thị */
.gallery-main-photo.active,
.gallery-main-photo_alt.active { transform: translateX(0); z-index: 2; opacity: 1; }

/* Ảnh tiếp theo đang vào */
.gallery-main-photo.next,
.gallery-main-photo_alt.next   { transform: translateX(100%); z-index: 3; opacity: 1; }

/* BỎ scale(1.3) quá lớn – thay bằng scale nhẹ khi active */
.gallery-main-photo.active:hover,
.gallery-main-photo_alt.active:hover { transform: scale(1.03); }

.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4); color: white; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.4rem;
  cursor: pointer; z-index: 4;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.gallery-nav:hover { background: rgba(139,26,26,0.75); transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.gallery-thumbs::-webkit-scrollbar { height: 3px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--kraft-dark); border-radius: 2px; }

.gallery-thumb {
  width: 50px; height: 50px; object-fit: cover; border-radius: 6px;
  cursor: pointer; opacity: .65;
  transition: opacity var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
  will-change: transform, opacity;
}
.gallery-thumb:hover  { opacity: 1; transform: scale(1.1); }
.gallery-thumb.active { border: 2px solid #d4af37; opacity: 1; }

/* ── Footer ── */
.footer-section   { text-align: center; padding: 24px 0 40px; }
.footer-greeting  { font-family: var(--font-display); font-size: clamp(1.2rem, 4vw, 1.6rem); color: var(--text-dark); margin-bottom: 16px; }
.footer-happiness { font-family: var(--font-chinese); font-size: 4rem; color: var(--red); animation: glowPulse 3s ease-in-out infinite; margin-bottom: 12px; }
.footer-names     { font-family: var(--font-script); font-size: 1.8rem; color: var(--text-mid); margin-bottom: 8px; }
.footer-date      { font-family: var(--font-display); font-size: 1.1rem; color: var(--kraft-dark); letter-spacing: 3px; }

/* ============================================================
   WISHES PANEL
   ============================================================ */
.wishes-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: linear-gradient(to top, rgba(90,15,15,0.97) 0%, rgba(90,15,15,0.85) 70%, transparent 100%);
  padding: 8px 12px 12px; max-width: var(--max-w); margin: 0 auto;
}
.wishes-feed { max-height: 90px; overflow-y: auto; margin-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--red) transparent; }
.wishes-feed::-webkit-scrollbar { width: 3px; }
.wishes-feed::-webkit-scrollbar-thumb { background: var(--red); }
.wish-item {
  color: var(--cream); font-size: 0.8rem; padding: 4px 8px;
  background: rgba(255,255,255,0.08); border-radius: 4px; margin-bottom: 4px;
  animation: slideIn var(--dur-fast) var(--ease-out);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wish-item strong { color: var(--gold-light); }
.wish-form { display: flex; gap: 8px; }
.wish-form input {
  flex: 1; padding: 8px 12px; border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.4); background: rgba(255,255,255,0.1);
  color: var(--white); font-family: var(--font-serif); font-size: 0.85rem; outline: none;
  transition: border-color var(--dur-fast);
}
.wish-form input::placeholder { color: rgba(255,248,240,0.5); }
.wish-form input:focus { border-color: var(--gold); }
.wish-form button {
  padding: 8px 14px; border-radius: 20px; border: none;
  background: var(--red); cursor: pointer; font-size: 1rem;
  transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.wish-form button:hover  { background: var(--red-light); transform: scale(1.08); }
.wish-form button:active { transform: scale(0.96); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.10s; }
.reveal.delay-2 { transition-delay: 0.22s; }
.reveal.delay-3 { transition-delay: 0.38s; }
.reveal.delay-4 { transition-delay: 0.55s; }

/* ============================================================
   RESPONSIVE – Desktop centering
   ============================================================ */
@media (min-width: 520px) {
  body { background: #0e0505; }
  .hero-section, .about-section, .schedule-section, .rsvp-section {
    max-width: var(--max-w); margin: 0 auto; box-shadow: 0 0 80px rgba(0,0,0,0.5);
  }
  .wishes-panel { left: 50%; right: auto; transform: translateX(-50%); width: var(--max-w); }
  #music-btn { left: calc(50% - 260px); }
}

/* ============================================================
   PETAL PARTICLES
   ============================================================ */
.petal {
  position: fixed; top: -30px; z-index: 9999;
  pointer-events: none; user-select: none;
  animation: petalFall 10s linear forwards;
  filter: blur(0.5px);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
@keyframes petalFall {
  0%   { transform: translate3d(0,      0,    0) rotate(0deg);   opacity: 1; }
  25%  { transform: translate3d(calc(var(--wind) * 0.3),  25vh, 0) rotate(90deg);  }
  50%  { transform: translate3d(calc(var(--wind) * -0.3), 50vh, 0) rotate(180deg); }
  75%  { transform: translate3d(calc(var(--wind) * 0.4),  75vh, 0) rotate(270deg); }
  100% { transform: translate3d(var(--wind), 120vh, 0) rotate(360deg); opacity: 0; }
}

/* ============================================================
   RIPPLE EFFECT ON CLICK
   ============================================================ */
.ripple-overlay {
  position: fixed; border-radius: 50%;
  background: rgba(201,168,76,0.22);
  transform: scale(0);
  animation: rippleOut 0.6s var(--ease-out) forwards;
  pointer-events: none; z-index: 9999;
  will-change: transform, opacity;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}