/* ==========================================================================
   Template: Classic — tông kem & hồng đất
   Muốn đổi màu cho cả thiệp: chỉ cần sửa các biến trong :root
   ========================================================================== */
:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --ink: #3b3129;
  --muted: #8a7b6d;
  --accent: #b07d62;
  --accent-soft: #ead9cc;
  --line: #e8ddd2;

  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-script: "Dancing Script", cursive;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(59, 49, 41, 0.08);
  --max: 560px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- Chung ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px;
  text-align: center;
}
.section + .section { border-top: 1px solid var(--line); }
.section__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.6rem, 6vw, 2rem);
  margin: 0 0 28px;
  position: relative;
}
.section__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 14px auto 0;
  background: var(--accent);
}
.section__lead { color: var(--muted); margin: -12px 0 28px; }
.script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 10vw, 3rem);
  color: var(--accent);
  margin: 0 0 12px;
  line-height: 1.2;
}
.eyebrow {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 16px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: 500 0.95rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--light { background: rgba(255, 255, 255, 0.15); border-color: #fff; backdrop-filter: blur(4px); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--sm { padding: 6px 16px; font-size: 0.85rem; }

/* ---------- 1. Bìa ---------- */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.cover__bg {
  position: absolute;
  inset: 0;
  background: #6b5446 center / cover no-repeat;
  transform: scale(1.05);
  animation: slowZoom 18s ease-out forwards;
}
.cover__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 22, 16, 0.25) 0%, rgba(30, 22, 16, 0.55) 100%);
}
.cover__content { position: relative; padding: 24px; animation: fadeUp 1.2s ease both; }
.cover__names {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(2.8rem, 13vw, 4.6rem);
  line-height: 1.1;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cover__amp { font-size: 0.6em; opacity: 0.85; }
.cover__event {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  margin: -6px 0 18px;
}
.cover__event:empty { display: none; }
.cover__date {
  font-family: var(--font-heading);
  letter-spacing: 0.15em;
  font-size: 1.05rem;
  margin: 0 0 24px;
}
.cover__guest { margin: 0 0 28px; font-size: 0.95rem; }
.cover__guest strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 4px;
}

/* ---------- 2. Lời ngỏ ---------- */
.intro__quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- 3. Cô dâu & Chú rể ---------- */
.couple { display: grid; gap: 40px; }
.person__photo {
  width: 200px;
  height: 260px;
  object-fit: cover;
  margin: 0 auto 18px;
  border-radius: 999px 999px var(--radius) var(--radius);
  box-shadow: var(--shadow);
  background: var(--accent-soft);
}
.person__role {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.person__name {
  font-family: var(--font-script);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px;
  line-height: 1.3;
}
.person__parents { margin: 0 0 10px; font-weight: 400; line-height: 1.6; }
.person__parents span { display: block; }
.person__bio { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 540px) { .couple { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---------- 4. Đếm ngược ---------- */
.countdown__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown__unit {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 4px;
  box-shadow: var(--shadow);
}
.countdown__unit span {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 8vw, 2.2rem);
  color: var(--accent);
  line-height: 1.2;
}
.countdown__unit small { color: var(--muted); font-size: 0.8rem; }
.countdown__done { font-family: var(--font-heading); font-size: 1.2rem; }

/* ---------- 5. Sự kiện ---------- */
.event__invite {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.event {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 22px;
  box-shadow: var(--shadow);
}
.event__time { font-size: 2.4rem; font-family: var(--font-heading); color: var(--accent); margin: 0; line-height: 1.2; }
.event__date { margin: 0 0 12px; color: var(--muted); }
.event__place { font-weight: 500; margin: 0; }
.event__address { margin: 0 0 18px; color: var(--muted); font-size: 0.95rem; }
.event__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 6. Album ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  background: var(--accent-soft);
  transition: transform 0.3s;
}
.gallery img:hover { transform: scale(1.02); }
.gallery img.is-wide { grid-column: span 2; aspect-ratio: 4 / 3; }

/* ---------- 6b. Video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 15, 10, 0.92);
  display: grid;
  place-items: center;
  padding: 20px;
}
.lightbox img { max-height: 90vh; border-radius: 8px; }
.lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
}

/* ---------- 7. RSVP ---------- */
.rsvp p { margin: 0 0 24px; }

/* ---------- 8. Mừng cưới ---------- */
.gifts { display: grid; gap: 18px; }
.gift {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.gift__side { font-family: var(--font-heading); font-size: 1.2rem; margin: 0 0 12px; }
.gift__qr { width: 180px; height: 180px; object-fit: contain; margin: 0 auto 14px; }
.gift__bank { margin: 0; color: var(--muted); }
.gift__account { font-size: 1.3rem; font-weight: 600; letter-spacing: 0.05em; margin: 2px 0; }
.gift__holder { margin: 0 0 14px; text-transform: uppercase; font-size: 0.9rem; }
@media (min-width: 540px) { .gifts { grid-template-columns: 1fr 1fr; } }

/* ---------- 9. Cảm ơn ---------- */
.thanks {
  text-align: center;
  padding: 72px 20px 96px;
  background: var(--ink);
  color: #f3ebe3;
}
.thanks .script { color: var(--accent-soft); }
.thanks__names { font-family: var(--font-heading); font-size: 1.4rem; margin: 0; }
.thanks__date { color: #bfae9f; letter-spacing: 0.15em; margin: 6px 0 0; }

/* ---------- Nút nhạc & thông báo ---------- */
.music-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.music-btn.is-playing { animation: spin 4s linear infinite; }
.music-btn__off, .music-btn.is-playing .music-btn__on { display: block; }
.music-btn__on, .music-btn.is-playing .music-btn__off { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  z-index: 60;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.load-error { max-width: var(--max); margin: 40px auto; padding: 20px; text-align: center; color: var(--muted); }

/* ---------- Hiệu ứng ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slowZoom { to { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
