/* ============================================================
   THẮNG & MAI - THIỆP CƯỚI ONLINE
   Phong cách: xanh pastel + kem + vàng champagne, khung vòm, kính mờ
   ============================================================ */

:root {
  --blue-deep: #2A475E;
  --blue: #5B8AA6;
  --blue-soft: #87B2CB;
  --blue-light: #C1DCED;
  --ice: #EBF4F8;
  --cream: #FBF8F3;
  --white: #FFFFFF;
  --gold: #C9A96E;
  --gold-text: #8C6D33;
  --ink: #1E2D38;
  --ink-soft: #546B7C;
  --line: #D6E6F0;
  --rose: #C44545;

  --shadow-soft: 0 12px 34px rgba(42, 71, 94, 0.09);
  --shadow-lift: 0 18px 44px rgba(42, 71, 94, 0.16);
  --radius: 22px;

  --font-script: 'Alex Brush', cursive;
  --font-serif: 'Cormorant Garamond', 'Playfair Display', serif;
  --font-text: 'Be Vietnam Pro', system-ui, sans-serif;

  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-text);
  font-weight: 300;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
button { font-family: inherit; }
[hidden] { display: none !important; }

main { overflow-x: clip; }
.container { width: 90%; max-width: 980px; margin: 0 auto; }
.container.narrow { max-width: 720px; }
.text-center { text-align: center; }

.section { padding: 90px 0; position: relative; }

/* ---------- Typography ---------- */
.script-sub {
  padding: 0 6px;
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--blue);
  line-height: 1.1;
}
.script-sub.light { color: var(--blue-light); }

.section-head { margin-bottom: 44px; }
.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.2;
  color: var(--blue-deep);
  letter-spacing: 0.5px;
}
.section-sub {
  margin-top: 12px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue-deep);
  color: #fff;
  border: 1px solid var(--blue-deep);
  padding: 13px 28px;
  border-radius: 40px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 8px 22px rgba(42, 71, 94, 0.22);
}
.btn:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--blue-deep); box-shadow: none; border-color: var(--blue-soft); }
.btn-ghost:hover { background: var(--ice); color: var(--blue-deep); }
.btn-small { padding: 9px 18px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---------- Ornament / glass ---------- */
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 34px 0; color: var(--gold);
}
.ornament span { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.ornament i { font-style: normal; font-size: 1.3rem; }

.glass-card {
  background: rgba(255, 255, 255, 0.68);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.from-left { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.is-revealed { opacity: 1; transform: none; }

/* Hero xuất hiện sau khi mở thiệp */
.reveal-on-open {
  opacity: 0;
  transition: opacity 2.2s ease calc(var(--d, 0s) + 0.3s);
}
body.invitation-open .reveal-on-open { opacity: 1; }

/* Cả trang hiện mờ dần phía sau hai cánh cổng đang mở */
main, .site-footer { transition: opacity 2.4s ease 0.2s; }
body:not(.invitation-open) main, body:not(.invitation-open) .site-footer { opacity: 0; }

/* ============================================================
   1. CỔNG CƯỚI: HIỆN NGAY KHI VÀO TRANG, HAI CÁNH TỰ MỞ RA
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 9999;
  perspective: 1800px;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}
.gate.is-open { pointer-events: none; }
.gate.is-done { opacity: 0; visibility: hidden; }

/* Ánh sáng sau cổng, sáng dần khi cổng mở */
.gate-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 244, 224, 0.28) 0%, rgba(235, 244, 248, 0.12) 45%, rgba(235, 244, 248, 0) 75%);
  opacity: 0;
  transition: opacity 1.6s ease 0.2s;
}
.gate.is-open .gate-glow { opacity: 1; }

.gate-door {
  --door-bg: linear-gradient(165deg, #3F6A89 0%, #2A475E 50%, #1B2F42 100%);
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: var(--door-bg);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.35);
  transition: transform 2.1s cubic-bezier(0.65, 0, 0.25, 1), filter 2.1s ease;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.gate-left { left: 0; transform-origin: left center; border-right: 1px solid rgba(201, 169, 110, 0.9); }
.gate-right { right: 0; transform-origin: right center; border-left: 1px solid rgba(201, 169, 110, 0.9); }
.gate.is-open .gate-left { transform: rotateY(-112deg); filter: brightness(0.82); }
.gate.is-open .gate-right { transform: rotateY(112deg); filter: brightness(0.82); }

/* Hai nửa vòm ghép lại thành một khung vòm lớn */
.gate-panel {
  position: absolute; top: 7vh; bottom: 7vh;
  border: 2px solid var(--gold);
  background:
    repeating-linear-gradient(45deg, rgba(201, 169, 110, 0.28) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgba(201, 169, 110, 0.28) 0 1px, transparent 1px 22px),
    rgba(255, 255, 255, 0.04);
}
.gate-left .gate-panel { left: 7vw; right: 0; border-right: none; border-radius: 999px 0 0 0; }
.gate-right .gate-panel { right: 7vw; left: 0; border-left: none; border-radius: 0 999px 0 0; }
.gate-inner { position: absolute; inset: 14px; border: 1px solid rgba(201, 169, 110, 0.85); }
.gate-left .gate-inner { border-right: none; border-radius: 999px 0 0 0; }
.gate-right .gate-inner { border-left: none; border-radius: 0 999px 0 0; }

.gate-knob {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F0DDB2, var(--gold) 60%, #A4864B);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.gate-left .gate-knob { right: 20px; }
.gate-right .gate-knob { left: 20px; }

/* Huy hiệu ở giữa, mờ đi khi cổng bắt đầu mở */
.gate-emblem {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 176px; height: 176px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff, #F3F8FB 70%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.55), 0 14px 40px rgba(42, 71, 94, 0.25);
  transition: opacity 0.7s ease, transform 0.9s ease;
  animation: emblemIn 0.9s var(--ease) both;
}
@keyframes emblemIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } }
.emblem-mono { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-serif); color: var(--blue-deep); line-height: 1; }
.emblem-mono b { font-size: 3.2rem; font-weight: 600; line-height: 1; }
.emblem-mono i { font-style: normal; font-size: 1.5rem; color: var(--rose); line-height: 1; }
.gate-guest { position: absolute; left: 0; right: 0; top: calc(50% + 120px); text-align: center; color: #fff; font-family: var(--font-serif); font-size: 1.2rem; padding: 0 20px; transition: opacity 0.7s ease; }
.gate-guest strong { font-size: 1.45rem; font-weight: 600; }
.gate.is-open .gate-guest { opacity: 0; }
.gate-hint { position: absolute; left: 0; right: 0; bottom: calc(11vh + env(safe-area-inset-bottom)); text-align: center; color: #fff; font-size: 0.82rem; letter-spacing: 3px; text-transform: uppercase; font-weight: 500; animation: hintFade 1.8s ease-in-out infinite; transition: opacity 0.5s ease; }
.gate.is-open .gate-hint { opacity: 0; animation: none; }
@keyframes hintFade { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.hint-heart { color: #E8A0A0; display: inline-block; margin-right: 6px; animation: beat 1.4s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
.gate.is-open .gate-emblem { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }

/* ============================================================
   CANVAS, NHẠC, MENU
   ============================================================ */
#petal-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 99; }

.music-toggle {
  position: fixed; bottom: 24px; right: 22px; z-index: 999;
  background: none; border: none; cursor: pointer;
}
.music-disc {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 8px 22px rgba(42, 71, 94, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.7);
  position: relative;
}
.music-disc.playing { animation: spin 4s linear infinite; }
.music-toggle:not(.is-on) .music-disc::after {
  content: ''; position: absolute; width: 60%; height: 2px; background: #fff;
  transform: rotate(-45deg); border-radius: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-nav {
  position: fixed; z-index: 990;
  display: flex; gap: 4px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: opacity 0.5s, transform 0.5s var(--ease);
}
.site-nav a {
  text-decoration: none; color: var(--blue-deep);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.8rem; font-weight: 500;
  transition: background 0.3s, color 0.3s;
}
.site-nav a i { font-style: normal; display: none; font-size: 1.15rem; line-height: 1; }
.site-nav a:hover { background: var(--ice); }
.site-nav a.is-active { background: var(--blue-deep); color: #fff; }

body:not(.invitation-open) .site-nav { opacity: 0; pointer-events: none; }

/* Desktop: thanh nổi phía trên */
@media (min-width: 769px) {
  .site-nav { top: 16px; left: 50%; transform: translateX(-50%); padding: 6px; border-radius: 40px; }
  .site-nav a { padding: 7px 18px; border-radius: 30px; }
}

/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 80px 20px 70px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(193, 220, 237, 0.75), transparent 60%),
    linear-gradient(180deg, var(--ice) 0%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}

.hero-kicker { font-size: 0.78rem; letter-spacing: 7px; color: var(--gold-text); font-weight: 500; margin-bottom: 26px; }

/* Khung vòm dùng chung */
.arch {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  border-radius: 999px 999px 18px 18px;
  background: var(--blue-light);
  box-shadow: var(--shadow-lift);
}
.arch-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }

.arch-wrap { position: relative; padding: 12px; }
.arch-wrap::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--gold);
  border-radius: 999px 999px 26px 26px;
  opacity: 0.8;
}
.arch-hero { width: min(70vw, 320px); aspect-ratio: 3 / 4.1; }
.arch-hero .arch-img { object-position: 55% 12%; height: 112%; will-change: transform; transition: none; }

.hero-names {
  margin-top: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-weight: 400;
}
@media (min-width: 640px) {
  .hero-names { flex-direction: row; align-items: baseline; gap: 18px; }
}
.hero-names .script { font-family: var(--font-script); font-size: clamp(3.2rem, 14vw, 4.8rem); color: var(--blue-deep); line-height: 1.1; }
.hero-names .amp { font-family: var(--font-serif); font-style: normal; font-size: 1.7rem; color: var(--rose); line-height: 1; }

.hero-date {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--font-serif); font-weight: 600; font-size: 1.45rem; letter-spacing: 3px; color: var(--blue-deep);
}
.date-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-sub { margin-top: 6px; font-size: 0.72rem; letter-spacing: 4px; color: var(--ink-soft); font-weight: 500; }

.scroll-cue {
  position: absolute; bottom: 24px; left: 50%; margin-left: -14px;
  width: 28px; height: 46px; border: 1.5px solid var(--blue-soft); border-radius: 20px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--blue); border-radius: 2px; animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 1; transform: translateY(0); } 80% { opacity: 0; transform: translateY(18px); } 100% { opacity: 0; } }

/* ============================================================
   3. LỜI MỜI
   ============================================================ */
.invite-section {
  background:
    radial-gradient(circle at 90% 10%, rgba(201, 169, 110, 0.12), transparent 45%),
    var(--cream);
}
.invite-card { padding: 54px 34px; }
.invite-card .script-sub { font-size: 2.8rem; }
.guest-line {
  font-family: var(--font-serif); font-size: 1.8rem; color: var(--blue-deep);
  margin: 10px 0 6px; line-height: 1.3;
}
.invite-text { color: var(--ink-soft); font-size: 0.95rem; margin-top: 12px; }
.invite-names {
  font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.45rem, 7vw, 2.7rem);
  color: var(--blue-deep); margin-top: 8px; line-height: 1.25; white-space: nowrap;
}
.invite-names span { color: var(--rose); font-weight: 400; padding: 0 4px; font-size: 0.8em; }

.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; font-size: clamp(0.78rem, 3.5vw, 0.95rem); text-align: center; align-items: start; }
.family-grid p:not(.family-label) { white-space: nowrap; line-height: 1.7; }
.family-label { font-size: 0.72rem; letter-spacing: 3px; color: var(--gold-text); font-weight: 600; margin-bottom: 4px; }

.quote {
  font-family: var(--font-serif); font-style: italic; font-size: 1.28rem; line-height: 1.7;
  color: var(--blue-deep); max-width: 560px; margin: 0 auto;
}

/* ============================================================
   4. CÔ DÂU & CHÚ RỂ
   ============================================================ */
.couple-section { background: linear-gradient(180deg, var(--cream), var(--ice)); }

.couple-row { display: flex; align-items: center; gap: 48px; margin: 20px 0; }
.couple-row.reverse { flex-direction: row-reverse; }
.couple-photo { flex: 0 0 250px; }
.arch-portrait { width: 250px; aspect-ratio: 3 / 4; border: 5px solid #fff; }
.arch-portrait:hover .arch-img { transform: scale(1.06); }
.arch-portrait .arch-img { object-position: 50% 18%; }

.couple-text { flex: 1; }
.role-title { font-size: 0.74rem; letter-spacing: 5px; color: var(--gold-text); font-weight: 600; text-transform: uppercase; }
.person-name { font-family: var(--font-script); font-weight: 400; font-size: clamp(2.7rem, 7vw, 3.4rem); line-height: 1.15; color: var(--blue-deep); margin: 4px 0 14px; }
.parents-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: 1px; color: var(--ink-soft); margin: -6px 0 14px; }
.letter strong { font-weight: 600; font-style: normal; color: var(--blue-deep); }
.letter {
  font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.85; font-style: italic; color: var(--ink-soft);
  padding-left: 20px; border-left: 2px solid var(--gold);
}

/* ============================================================
   5. SỰ KIỆN, LỊCH, ĐỊA ĐIỂM
   ============================================================ */
.events-section { background: var(--ice); }

.event-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.event-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 20px 28px; text-align: center; box-shadow: var(--shadow-soft);
  position: relative;
}
.event-card.featured { background: linear-gradient(170deg, var(--blue-deep), #3C6381); color: #fff; border-color: transparent; box-shadow: var(--shadow-lift); }
.event-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #fff; font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap;
}
.event-card h3 { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; margin-top: 6px; }
.event-day { font-family: var(--font-serif); font-size: 4.6rem; font-weight: 600; line-height: 1; margin-top: 6px; }
.event-month { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.8; margin-top: 4px; }
.event-time {
  display: inline-block; margin: 14px 0 4px; padding: 4px 20px; border-radius: 30px;
  background: var(--ice); color: var(--blue-deep); font-family: var(--font-serif); font-weight: 700; font-size: 1.5rem; letter-spacing: 2px;
}
.event-card.featured .event-time { background: rgba(255, 255, 255, 0.16); color: #fff; }
.event-lunar { font-size: 0.76rem; opacity: 0.75; margin-bottom: 16px; }
.event-card.featured .btn { background: #fff; color: var(--blue-deep); border-color: #fff; box-shadow: none; }
.event-card.featured .btn:hover { background: var(--blue-light); border-color: var(--blue-light); }

.calendar-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; max-width: 420px; margin: 0 auto 26px; box-shadow: var(--shadow-soft);
}
.cal-month { text-align: center; font-family: var(--font-script); font-weight: 400; font-size: 2.8rem; color: var(--blue-deep); line-height: 1; margin-bottom: 18px; }
.cal-month span { font-family: var(--font-serif); font-size: 1.2rem; letter-spacing: 3px; color: var(--ink-soft); margin-left: 6px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-head { font-size: 0.72rem; font-weight: 600; color: var(--gold-text); letter-spacing: 1px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cal-grid { row-gap: 4px; }
.cal-day { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; padding: 5px 0; position: relative; z-index: 0; }
.cal-day.wedding { color: #fff; font-weight: 700; }
.cal-day.wedding::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; background: var(--blue); z-index: -1; box-shadow: 0 4px 12px rgba(91, 138, 166, 0.45);
}
.cal-day.wedding.main::before { background: var(--rose); box-shadow: 0 4px 12px rgba(196, 69, 69, 0.4); }

.venue-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 24px; text-align: center; box-shadow: var(--shadow-soft);
}
.venue-label { font-size: 0.72rem; letter-spacing: 4px; text-transform: uppercase; color: var(--gold-text); font-weight: 600; }
.venue-name { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; color: var(--blue-deep); margin: 4px 0 8px; }
.venue-addr { font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 22px; }

/* ============================================================
   LỜI KẾT
   ============================================================ */
.closing-line { margin-top: 38px; text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); }

/* ============================================================
   7. ĐẾM NGƯỢC
   ============================================================ */
.countdown-section {
  padding: 70px 0;
  background:
    linear-gradient(160deg, rgba(42, 71, 94, 0.88), rgba(28, 49, 68, 0.9)),
    url('assets/images/countdown-bg.jpg') center 30% / cover;
  color: #fff;
}
.countdown-title { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.4rem, 4vw, 1.9rem); letter-spacing: 1px; margin-top: 4px; }
.countdown { display: flex; justify-content: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.cd-unit {
  min-width: 84px; padding: 16px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cd-unit .num { display: block; font-family: var(--font-serif); font-size: 2.6rem; font-weight: 600; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.cd-unit .txt { font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); font-weight: 500; }

/* ============================================================
   8. ALBUM (MASONRY)
   ============================================================ */
.album-section { background: #fff; }
.album-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); max-width: 560px; margin: 14px auto 0; }

.masonry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.m-item:nth-child(7), .m-item:nth-child(14) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
.m-item:nth-child(7) img, .m-item:nth-child(14) img { object-position: center 25%; }
.m-item {
  display: block; width: 100%; padding: 0; border: none; cursor: zoom-in; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: var(--ice);
  box-shadow: var(--shadow-soft); position: relative;
}
.m-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.m-item:hover img { transform: scale(1.06); }
.m-item::after { content: '＋'; position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--blue-deep); display: flex; align-items: center; justify-content: center; font-size: 1rem; opacity: 0; transition: opacity 0.3s; }
.m-item:hover::after, .m-item:focus-visible::after { opacity: 1; }
.m-item:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }

/* ============================================================
   9. RSVP & LƯU BÚT
   ============================================================ */
.rsvp-section { background: linear-gradient(180deg, var(--cream), var(--ice)); }
.rsvp-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 26px; align-items: start; }
.form-card, .guestbook-card { padding: 34px 28px; }
.card-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; color: var(--blue-deep); padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }

.form-group { margin-bottom: 16px; border: none; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
label, legend { display: block; font-size: 0.8rem; font-weight: 500; color: var(--blue-deep); margin-bottom: 6px; padding: 0; }

input[type="text"], input[type="tel"], select, textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 1rem; font-weight: 400; background: #fff; color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(91, 138, 166, 0.16); }
input.invalid { border-color: var(--rose); }

.radio-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card {
  display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 400; margin: 0;
  background: #fff; border: 1px solid var(--line); padding: 10px 12px; border-radius: 12px; cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.radio-card:hover { border-color: var(--blue); }
.radio-card:has(input:checked) { border-color: var(--blue-deep); background: var(--ice); }
.radio-card input { accent-color: var(--blue-deep); }

.form-error { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; background: #FDECEC; color: #A32D2D; border: 1px solid #F3C4C4; }
.success-box { padding: 22px; text-align: center; background: #EAF6EC; border: 1px solid #C6E4CB; color: #2B6B35; border-radius: 14px; font-size: 0.95rem; }

.wishes { display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.wishes-empty { color: var(--ink-soft); font-size: 0.9rem; font-style: italic; text-align: center; padding: 24px 8px; }
.wish-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; animation: wishIn 0.6s var(--ease); }
@keyframes wishIn { from { opacity: 0; transform: translateY(12px); } }
.wish-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 0.85rem; margin-bottom: 4px; }
.wish-meta strong { color: var(--blue-deep); font-weight: 600; }
.wish-meta span { font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; }
.wish-item p { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; line-height: 1.55; color: var(--ink); }

/* ============================================================
   10. FOOTER
   ============================================================ */
.site-footer { background: linear-gradient(180deg, var(--blue-deep), #15222B); color: #fff; padding: 70px 20px 90px; }
.footer-names { font-family: var(--font-script); font-size: clamp(2.8rem, 13vw, 3.8rem); color: var(--blue-light); line-height: 1.15; display: flex; flex-direction: column; align-items: center; }
.footer-names span { white-space: nowrap; }
.footer-names em { font-family: var(--font-serif); font-style: normal; font-size: 0.45em; color: #E8A0A0; line-height: 1; }
.footer-text { font-family: var(--font-serif); font-size: 1.2rem; color: #E3EEF5; max-width: 540px; margin: 8px auto 20px; line-height: 1.7; }
.footer-badge { display: inline-block; border: 1px solid rgba(201, 169, 110, 0.7); color: var(--gold); padding: 6px 22px; border-radius: 30px; font-size: 0.78rem; letter-spacing: 5px; font-weight: 500; margin-bottom: 26px; }
.footer-copy { font-size: 0.78rem; color: var(--blue-light); border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 10005; overscroll-behavior: contain; touch-action: pan-y; background: rgba(15, 26, 34, 0.94); display: flex; align-items: center; justify-content: center; }
.lb-figure { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 8px; animation: lbIn 0.35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(0.96); } }
.lb-figure figcaption { color: #CFE0EB; font-size: 0.8rem; letter-spacing: 2px; }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: none; cursor: pointer; border-radius: 50%; width: 46px; height: 46px; font-size: 1.8rem; line-height: 1; transition: background 0.3s; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
.lb-close { top: calc(18px + env(safe-area-inset-top)); right: 18px; }
.lb-nav { top: 50%; margin-top: -23px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 68px 0; }

  /* Menu mobile: thanh tab ở đáy màn hình */
  .site-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); top: auto;
    justify-content: space-around; padding: 6px; border-radius: 22px;
  }
  .site-nav a { flex: 1; flex-direction: column; gap: 1px; padding: 6px 2px; border-radius: 16px; font-size: 0.64rem; }
  .site-nav a i { display: block; }

  .scroll-cue { display: none; }
  .script-sub { font-size: 2.1rem; }
  .invite-card .script-sub { font-size: clamp(2rem, 9.5vw, 2.8rem); white-space: nowrap; padding: 0; }
  .invite-card { padding: 36px 14px; }
  .event-card { padding: 30px 18px 24px; }
  .calendar-card { padding: 26px 16px; }
  .btn, .btn-small { min-height: 44px; }
  .btn-small { padding: 10px 20px; }
  .m-item:hover img, .arch-portrait:hover .arch-img { transform: none; }
  body.is-typing .site-nav { opacity: 0; pointer-events: none; transform: translateY(20px); }
  .hero { padding-bottom: 110px; }

  .music-toggle { bottom: auto; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
  .music-disc { width: 38px; height: 38px; font-size: 1rem; opacity: 0.9; }

  .couple-row, .couple-row.reverse { flex-direction: column; gap: 24px; text-align: center; }
  .couple-photo { flex: none; }
  .arch-portrait { width: min(66vw, 250px); }
  .letter { border-left: none; padding-left: 0; }

  .event-cards { grid-template-columns: 1fr; gap: 28px; }
  .invite-card { padding: 40px 22px; }
  .rsvp-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .radio-stack { grid-template-columns: 1fr; }
  .masonry { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .m-item { border-radius: 12px; }
  .m-item:nth-child(7), .m-item:nth-child(14) { aspect-ratio: 3 / 2; }
  .cd-unit { min-width: 70px; padding: 12px 8px; }
  .cd-unit .num { font-size: 2rem; }
  .countdown { gap: 10px; }
  .site-footer { padding-bottom: 110px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  #petal-canvas { display: none; }
}
