/* =========================================================
   GRADUATION INVITATION — IVORY & GOLD
   ========================================================= */

:root {
  /* surfaces sáng */
  --paper: #fffaf2;
  --paper-2: #faf1e4;
  --paper-3: #f3e7d6;
  --paper-4: #ecdcc6;

  /* khối tối dùng làm điểm nhấn (RSVP, footer, icon) */
  --dark: #261d2e;
  --dark-2: #372742;

  /* mực */
  --ink: #2b2029;
  --ink-soft: #574753;
  --muted: #7a6a76;
  --on-dark: #f7eee2;
  --on-dark-soft: rgba(247, 238, 226, 0.76);
  --on-dark-muted: rgba(247, 238, 226, 0.5);

  /* vàng đọc được trên nền sáng (dùng cho chữ) */
  --gold-ink: #8c6027;
  --gold-ink-hi: #b9883d;
  --gold-ink-lo: #5d3f13;

  /* vàng trang trí / dùng trên nền tối */
  --gold: #c8a05a;
  --gold-bright: #e8c88c;
  --gold-deep: #a2762f;

  --rose: #d9a99c;

  --line: rgba(162, 118, 47, 0.22);
  --line-strong: rgba(162, 118, 47, 0.46);

  /* Bộ chữ: cả bốn đều có bảng dấu tiếng Việt do chính nhà thiết kế vẽ,
     không phải dấu ghép tự động — chữ "ế", "ộ", "ữ" nhìn mới cân. */
  --display: "Playfair Display", Georgia, serif; /* tiêu đề, con số lớn */
  --serif: "Lora", Georgia, serif; /* thân bài */
  --sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --script: "Great Vibes", cursive;

  --radius: 4px;
  --radius-lg: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-1: 0 16px 40px rgba(94, 66, 40, 0.1);
  --shadow-2: 0 30px 76px rgba(74, 51, 32, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  /* Cormorant mặc định dùng chữ số kiểu cổ (số 1 thấp như chữ "ı") — ép về dạng
     lining cho dễ đọc, nhất là ở ngày tháng và đồng hồ đếm ngược. */
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

::selection {
  background: rgba(200, 160, 90, 0.32);
  color: var(--gold-ink-lo);
}

:focus-visible {
  outline: 2px solid var(--gold-ink);
  outline-offset: 4px;
}

/* ---------------------------------------------------------
   CHỮ VÀNG ÁNH KIM
   Dải màu cố tình dừng ở sắc đồng đậm: nếu đẩy tới vàng nhạt thì
   chữ sẽ chìm vào nền kem.
   --------------------------------------------------------- */

.gold-text {
  background: linear-gradient(
    100deg,
    var(--gold-ink-lo) 0%,
    var(--gold-ink) 14%,
    var(--gold-ink-hi) 28%,
    var(--gold-ink) 42%,
    var(--gold-ink-lo) 55%,
    var(--gold-ink-hi) 70%,
    var(--gold-ink) 84%,
    var(--gold-ink-lo) 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldSweep 9s linear infinite;
}

/* Trên nền tối thì ngược lại — dùng dải vàng sáng */
.on-dark .gold-text,
.rsvp-wrap .gold-text,
.site-footer .gold-text {
  background: linear-gradient(
    100deg,
    var(--gold-deep) 0%,
    var(--gold) 16%,
    #fbeccb 32%,
    var(--gold) 48%,
    var(--gold-deep) 60%,
    var(--gold-bright) 76%,
    var(--gold) 90%,
    var(--gold-deep) 100%
  );
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes goldSweep {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 280% 50%;
  }
}

/* ---------------------------------------------------------
   PRELOADER
   --------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity 600ms var(--ease);
}

.preloader.is-done {
  pointer-events: none;
  opacity: 0;
}

.preloader-aura {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 160, 90, 0.2), transparent 62%);
  animation: auraPulse 3.6s ease-in-out infinite;
}

.preloader-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.preloader-mark {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-ink);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 7px rgba(200, 160, 90, 0.09), 0 14px 40px rgba(140, 96, 39, 0.12);
  animation: markBreath 3s ease-in-out infinite;
}

.preloader-kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-indent: 0.42em;
}

.preloader-bar {
  width: min(260px, 62vw);
  height: 1px;
  background: rgba(162, 118, 47, 0.2);
  overflow: hidden;
}

.preloader-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-ink-lo), var(--gold-ink-hi), var(--gold-ink));
}

.preloader-count {
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.preloader-curtain {
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform-origin: top;
  transition: transform 900ms var(--ease-out);
}

.preloader.is-done .preloader-curtain {
  transform: scaleY(0);
  transform-origin: bottom;
}

@keyframes auraPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes markBreath {
  0%,
  100% {
    box-shadow: inset 0 0 0 7px rgba(200, 160, 90, 0.08), 0 14px 36px rgba(140, 96, 39, 0.1);
  }
  50% {
    box-shadow: inset 0 0 0 7px rgba(200, 160, 90, 0.16), 0 18px 54px rgba(140, 96, 39, 0.2);
  }
}

/* ---------------------------------------------------------
   KHÔNG KHÍ NỀN
   --------------------------------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Không dùng filter: blur() ở đây — radial-gradient đã đủ mềm, còn blur trên
   3 lớp cỡ nửa màn hình đang chạy animation thì rất nặng. */
.aurora span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
  will-change: transform;
}

.aurora span:nth-child(1) {
  top: -18vh;
  left: -10vw;
  width: 66vw;
  height: 64vh;
  background: radial-gradient(circle, rgba(233, 199, 143, 0.5), transparent 66%);
  animation: auroraDrift 26s ease-in-out infinite;
}

.aurora span:nth-child(2) {
  right: -14vw;
  top: 22vh;
  width: 56vw;
  height: 56vh;
  background: radial-gradient(circle, rgba(226, 176, 163, 0.42), transparent 64%);
  animation: auroraDrift 32s ease-in-out infinite reverse;
}

.aurora span:nth-child(3) {
  bottom: -22vh;
  left: 24vw;
  width: 60vw;
  height: 54vh;
  background: radial-gradient(circle, rgba(198, 187, 224, 0.36), transparent 66%);
  animation: auroraDrift 38s ease-in-out infinite;
  animation-delay: -8s;
}

/* Chỉ dịch chuyển, không scale: scale làm trình duyệt phải raster lại lớp
   gradient khổng lồ ở mỗi khung hình, còn translate thì chỉ composite. */
@keyframes auroraDrift {
  0%,
  100% {
    opacity: 0.7;
    transform: translate3d(0, 0, 0);
  }
  33% {
    opacity: 0.95;
    transform: translate3d(7vw, -5vh, 0);
  }
  66% {
    opacity: 0.6;
    transform: translate3d(-6vw, 6vh, 0);
  }
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -120px;
  z-index: 60;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  animation: grainShift 700ms steps(4) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-24px, 12px);
  }
  50% {
    transform: translate(18px, -20px);
  }
  75% {
    transform: translate(-14px, -12px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 46%, rgba(150, 108, 66, 0.07) 78%, rgba(122, 86, 50, 0.14) 100%);
}

.celebration-canvas {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

canvas[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   CON TRỎ TUỲ CHỈNH
   --------------------------------------------------------- */

.cursor {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  pointer-events: none;
}

body.has-cursor .cursor {
  display: block;
}

/* Ẩn con trỏ hệ thống, nhưng giữ lại I-beam trong ô nhập liệu */
body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor .gallery-item,
body.has-cursor .choice,
body.has-cursor .choice span {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--gold-ink);
  box-shadow: 0 0 10px rgba(140, 96, 39, 0.45);
  transition: opacity 200ms ease, width 240ms var(--ease), height 240ms var(--ease);
}

.cursor-ring {
  display: grid;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  place-items: center;
  border: 1px solid rgba(162, 118, 47, 0.6);
  background: rgba(200, 160, 90, 0);
  transition: width 320ms var(--ease), height 320ms var(--ease), margin 320ms var(--ease),
    background 320ms var(--ease), border-color 320ms var(--ease);
}

.cursor-ring em {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
  white-space: nowrap;
}

body.cursor-hover .cursor-ring {
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  border-color: transparent;
  background: var(--gold-ink);
}

body.cursor-hover .cursor-ring em {
  opacity: 1;
  transform: scale(1);
}

body.cursor-hover .cursor-dot {
  opacity: 0;
}

/* ---------------------------------------------------------
   THANH TIẾN ĐỘ CUỘN
   --------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(162, 118, 47, 0.1);
}

.scroll-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-ink-hi), var(--gold-ink));
}

/* ---------------------------------------------------------
   NÚT
   --------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 15px 30px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), color 320ms var(--ease);
}

.btn span {
  position: relative;
  z-index: 2;
}

.btn-sm {
  min-height: 42px;
  padding: 12px 22px;
  font-size: 0.72rem;
}

/* vàng đặc — sắc đồng đậm để chữ trắng vẫn đạt tương phản trên nền kem
   (dải vàng nhạt chỉ cho ~2:1, chữ sẽ nhoè hẳn ở nửa sáng của nút) */
.btn-gold {
  background: linear-gradient(135deg, #563a11, #77501e 50%, #8c6027);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(86, 58, 17, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-gold::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, #634214, #83591f 50%, #96682a);
  content: "";
  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.btn-gold::after {
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -40%;
  z-index: 2;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  content: "";
  transform: rotate(22deg) translateX(-180%);
  transition: transform 780ms var(--ease);
}

.btn-gold:hover {
  box-shadow: 0 18px 42px rgba(140, 96, 39, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transform: translateY(-2px);
}

.btn-gold:hover::before {
  opacity: 1;
}

.btn-gold:hover::after {
  transform: rotate(22deg) translateX(460%);
}

/* viền mảnh */
.btn-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  color: var(--gold-ink);
}

.btn-ghost::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(200, 160, 90, 0.22), rgba(200, 160, 90, 0.08));
  content: "";
  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.btn-ghost:hover {
  border-color: var(--gold-ink);
  color: var(--gold-ink-lo);
  box-shadow: 0 14px 32px rgba(94, 66, 40, 0.14);
  transform: translateY(-2px);
}

.btn-ghost:hover::before {
  opacity: 1;
}

/* viền mảnh đặt trên nền tối */
.rsvp-wrap .btn-ghost,
.site-footer .btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(200, 160, 90, 0.46);
  color: var(--gold-bright);
}

.btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.magnetic {
  will-change: transform;
}

/* ---------------------------------------------------------
   THIỆP MỜI (GATE)
   --------------------------------------------------------- */

.invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 250, 242, 0.9), rgba(243, 231, 214, 0.96) 68%),
    url("https://images.unsplash.com/photo-1518895949257-7621c3c786d7?auto=format&fit=crop&w=1600&q=82")
      center / cover;
  transition: opacity 900ms var(--ease), visibility 900ms var(--ease);
}

.invitation-gate::after {
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 242, 0.3);
  content: "";
  pointer-events: none;
}

.gate-frame {
  position: absolute;
  inset: 26px;
  z-index: 2;
  border: 1px solid rgba(162, 118, 47, 0.4);
  pointer-events: none;
}

.gate-frame::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  content: "";
}

.invitation-gate.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.invitation-gate.is-opening .gate-frame {
  animation: gateShockwave 1100ms var(--ease-out) both;
}

.envelope-scene {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: min(680px, 100%);
  min-height: 640px;
  perspective: 1600px;
}

.envelope {
  position: absolute;
  inset: auto 0 0;
  width: min(640px, 94vw);
  height: 330px;
  margin: 0 auto;
  filter: drop-shadow(0 30px 46px rgba(94, 66, 40, 0.26));
  transform: translateY(34px);
  transform-style: preserve-3d;
}

.envelope-back,
.envelope-front,
.envelope-flap,
.envelope-letter {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.envelope-back {
  background: linear-gradient(140deg, #f7eddd, #ead9c1),
    repeating-linear-gradient(45deg, rgba(162, 118, 47, 0.05) 0 1px, transparent 1px 12px);
  border: 1px solid rgba(162, 118, 47, 0.44);
}

/* Toạ độ theo % chiều cao phong bì nên đúng ở mọi kích thước màn hình.
   Mép chữ V của mặt trước đi từ 34% ở rìa xuống 76% ở giữa, nên tại vị trí
   cạnh tấm thiệp (~7% chiều ngang) mốc che đã là ~40% — phải đặt ở 44% thì
   tấm thiệp mới nấp trọn lúc phong bì còn đóng. */
.envelope-letter {
  inset: 44% 44px auto;
  height: 54%;
  display: grid;
  /* Chữ nằm ở nửa dưới tấm thiệp: khi nắp lật lên nó sẽ che mất phần trên. */
  padding-bottom: 24px;
  place-items: end center;
  border: 1px solid rgba(162, 118, 47, 0.3);
  /* Sát tông với ruột phong bì: khe chữ V luôn để lộ một phần tấm thiệp, nếu
     để trắng tinh thì sẽ thành mảng sáng chói giữa nền kem. */
  background: linear-gradient(160deg, #fbf4e8, #f4e9d6);
  box-shadow: 0 8px 22px rgba(94, 66, 40, 0.14);
  color: var(--gold-ink);
  font-family: var(--script);
  font-size: 2.5rem;
  transition: transform 1100ms var(--ease-out);
}

/* Khe chữ V của phong bì luôn để lộ một phần tấm thiệp, nên thay vì cố nhét
   dòng chữ xuống dưới mép (bất khả thi trên phong bì thấp ở mobile), chỉ cho
   chữ hiện lên đúng lúc thiệp trượt ra. */
.envelope-letter span {
  opacity: 0;
  transition: opacity 500ms var(--ease);
}

.invitation-gate.is-opening .envelope-letter span {
  opacity: 1;
  transition-delay: 700ms;
}

.envelope-front {
  clip-path: polygon(0 34%, 50% 76%, 100% 34%, 100% 100%, 0 100%);
  background: linear-gradient(155deg, #fdf6ea, #eddcc4);
  border: 1px solid rgba(162, 118, 47, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.envelope-flap {
  clip-path: polygon(0 0, 50% 62%, 100% 0);
  background: linear-gradient(180deg, #fffaf1, #f0e0c9);
  border: 1px solid rgba(162, 118, 47, 0.4);
  transform-origin: top center;
  transition: transform 1000ms var(--ease-out);
}

/* con dấu sáp */
.wax {
  position: absolute;
  top: 56%;
  left: 50%;
  z-index: 4;
  width: 76px;
  height: 76px;
  /* Bóng đổ đặt ở đây chứ không ở hai nửa dấu: box-shadow trên phần tử có
     clip-path sẽ bị cắt thành hình vuông, còn drop-shadow của phần tử cha thì
     bám theo đúng hình tròn đã cắt. */
  filter: drop-shadow(0 8px 14px rgba(94, 40, 40, 0.34));
  transform: translate(-50%, -50%);
}

.wax-half {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #d6564f, #8e2a2a 58%, #5c1a1c);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12);
  transition: transform 800ms var(--ease-out), opacity 800ms var(--ease);
}

.wax-left {
  clip-path: polygon(0 0, 52% 0, 46% 100%, 0 100%);
}

.wax-right {
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 46% 100%);
}

.wax-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(255, 226, 210, 0.78);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: opacity 320ms var(--ease), transform 420ms var(--ease);
}

.invitation-gate.is-opening .wax-mark {
  opacity: 0;
  transform: scale(1.4);
}

.invitation-gate.is-opening .wax-left {
  opacity: 0;
  transform: translate(-46px, 26px) rotate(-38deg);
}

.invitation-gate.is-opening .wax-right {
  opacity: 0;
  transform: translate(46px, 26px) rotate(38deg);
}

.invitation-gate.is-opening .envelope-flap {
  transform: rotateX(178deg);
  transition-delay: 260ms;
}

.invitation-gate.is-opening .envelope-letter {
  transform: translateY(-140px);
  transition-delay: 420ms;
}

.gate-card {
  position: relative;
  z-index: 5;
  width: min(520px, 100%);
  /* Đẩy thiệp lên để lộ phần dưới phong bì và con dấu sáp */
  margin-top: -110px;
  padding: clamp(34px, 7vw, 56px);
  border: 1px solid rgba(162, 118, 47, 0.32);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 253, 248, 0.97), rgba(250, 241, 228, 0.95));
  text-align: center;
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  animation: gateEnter 900ms var(--ease-out) both;
}

.gate-card::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(162, 118, 47, 0.2);
  content: "";
  pointer-events: none;
}

.invitation-gate.is-opening .gate-card {
  animation: gateLift 1000ms var(--ease-out) both;
}

.gate-mark {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid rgba(162, 118, 47, 0.5);
  border-radius: 50%;
  color: var(--gold-ink);
  font-size: 2.3rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 7px rgba(200, 160, 90, 0.08), 0 12px 30px rgba(140, 96, 39, 0.1);
}

.gate-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  text-indent: 0.36em;
}

.gate-card h2 {
  margin-bottom: 8px;
  font-family: var(--script);
  font-size: clamp(3.4rem, 9vw, 5.2rem);
  font-weight: 400;
  line-height: 0.95;
}

.gate-note {
  max-width: 330px;
  margin: 0 auto 26px;
  color: var(--ink-soft);
  font-size: 1.16rem;
  line-height: 1.6;
}

.gate-note b {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

@keyframes gateEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gateLift {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-22px) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateY(-46px) scale(0.96);
  }
}

@keyframes gateShockwave {
  0% {
    box-shadow: 0 0 0 0 rgba(162, 118, 47, 0.4);
  }
  100% {
    box-shadow: 0 0 0 60px rgba(162, 118, 47, 0);
  }
}

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid transparent;
  transition: padding 420ms var(--ease), background 420ms var(--ease), border-color 420ms var(--ease),
    backdrop-filter 420ms var(--ease), transform 520ms var(--ease);
}

.site-header.is-stuck {
  padding-block: 12px;
  border-bottom-color: var(--line);
  background: rgba(255, 250, 242, 0.82);
  backdrop-filter: blur(18px) saturate(1.1);
}

.site-header.is-up {
  transform: translateY(-110%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(162, 118, 47, 0.46);
  border-radius: 50%;
  color: var(--gold-ink);
  font-size: 1.5rem;
  font-weight: 600;
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), background 420ms var(--ease);
}

.brand:hover .brand-mark {
  background: rgba(200, 160, 90, 0.14);
  box-shadow: 0 10px 26px rgba(140, 96, 39, 0.18);
  transform: rotate(-8deg) scale(1.06);
}

.brand-text strong,
.brand-text small {
  display: block;
  font-family: var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-text strong {
  font-size: 0.74rem;
  font-weight: 600;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 34px);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding: 10px 2px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 320ms var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--gold-ink);
}

.nav-indicator {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-ink), transparent);
  opacity: 0;
  transition: transform 480ms var(--ease), width 480ms var(--ease), opacity 320ms var(--ease);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.nav-toggle i {
  display: block;
  width: 18px;
  height: 1px;
  margin: 4px auto;
  background: var(--gold-ink);
  transition: transform 320ms var(--ease), opacity 320ms var(--ease);
}

.nav-toggle[aria-expanded="true"] i:first-child {
  transform: translateY(2.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] i:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* ---------------------------------------------------------
   SMOOTH SCROLL WRAPPER
   --------------------------------------------------------- */

.smooth-wrapper {
  position: relative;
  z-index: 5;
}

body.has-smooth .smooth-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

body.has-smooth .smooth-content {
  will-change: transform;
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 90px clamp(24px, 6vw, 82px) 88px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: -12% 0 -12%;
  background: url("https://images.unsplash.com/photo-1523580846011-d3a5bc25702b?auto=format&fit=crop&w=1900&q=88")
    center / cover;
  filter: grayscale(0.3) contrast(0.95) brightness(1.16) saturate(0.86);
  will-change: transform;
  /* Scale tĩnh, không animate: đổi scale buộc trình duyệt raster lại ảnh nền
     1900px ở mỗi khung hình. Chuyển động đã do parallax lúc cuộn đảm nhiệm. */
  scale: 1.08;
}

/* Phủ lớp kem dày để ảnh lùi hẳn về sau, chữ mực đậm nổi lên trên */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(255, 250, 242, 0.94) 0%, rgba(255, 250, 242, 0.8) 44%, rgba(255, 250, 242, 0.5) 76%),
    linear-gradient(180deg, rgba(255, 250, 242, 0.92) 0%, rgba(255, 250, 242, 0.6) 34%, rgba(255, 250, 242, 0.96) 96%),
    radial-gradient(ellipse at 50% 46%, rgba(233, 199, 143, 0.26), transparent 62%);
}

.hero-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.hero-rings span {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(162, 118, 47, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hero-rings span:nth-child(1) {
  width: 42vmin;
  height: 42vmin;
  animation: ringPulse 7s ease-in-out infinite;
}

.hero-rings span:nth-child(2) {
  width: 62vmin;
  height: 62vmin;
  border-color: rgba(162, 118, 47, 0.14);
  animation: ringPulse 7s ease-in-out infinite 1.4s;
}

.hero-rings span:nth-child(3) {
  width: 86vmin;
  height: 86vmin;
  border-color: rgba(162, 118, 47, 0.09);
  animation: ringPulse 7s ease-in-out infinite 2.8s;
}

/* Chỉ đổi opacity: scale trên các vòng tròn cỡ 86vmin bắt trình duyệt raster lại
   cả lớp ở mỗi khung hình, trong khi opacity thì chỉ composite. */
@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.32;
  }
  50% {
    opacity: 1;
  }
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 9px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: 1.1;
}

.hero-script {
  margin: 0 0 -6px;
  color: var(--gold-ink);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
}

h1 {
  margin-bottom: 10px;
}

.h1-main {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  /* nowrap để 10 ký tự đã tách không bị ngắt giữa chừng thành "GRADUA / TION" */
  font-size: clamp(2.3rem, 7.6vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 0.94;
  text-indent: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.h1-script {
  display: block;
  margin-top: 0.16em;
  font-family: var(--script);
  font-size: clamp(3.1rem, 7.8vw, 6rem);
  font-weight: 400;
  line-height: 1.12;
}

.hero-subtitle {
  margin: 16px 0 14px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.44rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(300px, 74vw);
  margin: 0 auto 16px;
  color: var(--gold-ink);
}

.ornament i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-deep));
}

.ornament i:last-child {
  background: linear-gradient(90deg, var(--gold-deep), transparent);
}

.ornament b {
  font-size: 0.6rem;
  opacity: 0.82;
}

.hero-note {
  max-width: 470px;
  margin: 0 auto 18px;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  font-style: italic;
  line-height: 1.68;
}

/* ---------------------------------------------------------
   THẺ THÔNG TIN BUỔI LỄ Ở HERO
   Kiểu thiệp cưới cổ điển: ngày lớn ở giữa, hai gạch ngang chỉ chạy qua
   "Tháng"/"Năm" nên con số như cắt ngang đường kẻ.
   --------------------------------------------------------- */

.event-card {
  width: min(470px, 100%);
  margin: 0 auto 22px;
  padding: 20px 26px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  text-align: center;
}

.event-time {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
}

.event-date {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.event-date span {
  padding: 9px 0;
  border-block: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.event-date b {
  background: linear-gradient(180deg, var(--gold-ink-hi), var(--gold-ink) 52%, var(--gold-ink-lo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 3.9rem);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  line-height: 1;
}

.event-place {
  margin: 16px 0 0;
}

.event-place small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-style: italic;
}

.event-place strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.06rem, 2vw, 1.24rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.event-place span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.5;
}

.event-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--gold-ink);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-transform: uppercase;
  transition: color 320ms var(--ease);
}

.event-map svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.event-map:hover {
  color: var(--gold-ink-lo);
}

.event-map:hover svg {
  animation: pinNudge 620ms var(--ease-out);
}

@keyframes pinNudge {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-4px);
  }
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-quote {
  position: absolute;
  z-index: 3;
  right: clamp(24px, 6vw, 84px);
  bottom: clamp(110px, 12vw, 150px);
  color: var(--gold-ink);
  font-family: var(--sans);
  animation: quoteFloat 5.4s ease-in-out infinite;
}

.hero-quote span {
  display: block;
  height: 30px;
  color: var(--gold-deep);
  font-family: Georgia, serif;
  font-size: 3.6rem;
  line-height: 1;
}

.hero-quote p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.36;
}

@keyframes quoteFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 34px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: color 320ms var(--ease);
}

.scroll-cue:hover {
  color: var(--gold-ink);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 52px;
  background: rgba(162, 118, 47, 0.22);
  overflow: hidden;
}

.scroll-cue i::after {
  position: absolute;
  top: -60%;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(180deg, transparent, var(--gold-ink));
  content: "";
  animation: scrollTrail 2.2s ease-in-out infinite;
}

@keyframes scrollTrail {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(280%);
  }
}

/* ---------------------------------------------------------
   MARQUEE
   --------------------------------------------------------- */

.marquee {
  position: relative;
  z-index: 5;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
}

/* Làm mờ hai mép bằng lớp phủ gradient thay vì mask-image: mask buộc trình duyệt
   raster lại cả dải chữ đang chạy ở mỗi khung hình. */
.marquee::before,
.marquee::after {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(90px, 18vw, 280px);
  content: "";
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper-2), rgba(250, 241, 228, 0));
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--paper-2), rgba(250, 241, 228, 0));
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  will-change: transform;
  animation: marqueeSlide 34s linear infinite;
}

.marquee-track span {
  color: rgba(87, 71, 83, 0.62);
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-track b {
  color: var(--gold-deep);
  font-size: 0.6rem;
}

@keyframes marqueeSlide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------
   KHUNG SECTION
   --------------------------------------------------------- */

.section {
  position: relative;
  z-index: 5;
  padding: clamp(72px, 10vw, 128px) clamp(20px, 6vw, 92px);
}

.section-heading {
  margin-bottom: clamp(38px, 5vw, 62px);
  text-align: center;
}

.section-kicker {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   ĐẾM NGƯỢC
   --------------------------------------------------------- */

.countdown {
  text-align: center;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  max-width: 880px;
  margin: 0 auto;
}

.count-cell {
  position: relative;
  padding: clamp(20px, 3vw, 34px) 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(250, 241, 228, 0.8));
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color 420ms var(--ease), transform 420ms var(--ease), box-shadow 420ms var(--ease);
}

.count-cell::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200, 160, 90, 0.24), transparent 68%);
  content: "";
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.count-cell:hover {
  border-color: var(--line-strong);
  box-shadow: 0 22px 52px rgba(94, 66, 40, 0.16);
  transform: translateY(-5px);
}

.count-cell:hover::before {
  opacity: 1;
}

.count-cell b {
  position: relative;
  display: block;
  background: linear-gradient(180deg, var(--gold-ink-hi), var(--gold-ink) 52%, var(--gold-ink-lo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
}

.count-cell b.is-ticking {
  animation: digitTick 520ms var(--ease-out);
}

.count-cell span {
  position: relative;
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
}

@keyframes digitTick {
  0% {
    opacity: 0.3;
    filter: blur(5px);
    transform: translateY(-16%) scale(0.96);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.countdown-note {
  margin: 26px auto 0;
  color: var(--ink-soft);
  font-size: 1.06rem;
  font-style: italic;
}

.countdown-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ---------------------------------------------------------
   THÔNG TIN
   --------------------------------------------------------- */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
  max-width: 1140px;
  margin: 0 auto;
  perspective: 1200px;
}

.detail-card {
  position: relative;
  padding: 60px 30px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(250, 241, 228, 0.82));
  text-align: center;
  box-shadow: var(--shadow-1);
  transform-style: preserve-3d;
  transition: border-color 420ms var(--ease), box-shadow 420ms var(--ease), transform 320ms var(--ease);
}

.detail-card::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(200, 160, 90, 0.2), transparent 42%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms var(--ease);
}

.detail-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 28px 66px rgba(94, 66, 40, 0.18);
}

.detail-card:hover::before {
  opacity: 1;
}

.detail-icon {
  position: absolute;
  top: -27px;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(200, 160, 90, 0.55);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  color: var(--gold-bright);
  box-shadow: 0 10px 24px rgba(60, 40, 26, 0.28);
  transform: translateX(-50%) translateZ(40px);
  transition: color 420ms var(--ease), box-shadow 420ms var(--ease), transform 420ms var(--ease);
}

.detail-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-card:hover .detail-icon {
  color: #fbeccb;
  box-shadow: 0 14px 32px rgba(60, 40, 26, 0.34);
  transform: translateX(-50%) translateZ(60px) translateY(-3px);
}

.detail-card h3 {
  position: relative;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  transform: translateZ(24px);
}

.detail-card p,
.detail-card span {
  position: relative;
  display: block;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.55;
  transform: translateZ(16px);
}

.detail-card strong {
  position: relative;
  display: block;
  margin: 8px 0;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.4vw, 1.86rem);
  font-weight: 600;
  transform: translateZ(30px);
}

/* ---------------------------------------------------------
   ĐỊA ĐIỂM — bản đồ nhúng đặt cuối trang, ngay trước phần liên hệ
   --------------------------------------------------------- */

.map-card {
  max-width: 1080px;
  margin: 0 auto;
}

.map-frame {
  position: relative;
  height: clamp(240px, 34vw, 420px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Hạ bớt sắc độ để bản đồ hoà vào bảng màu kem–vàng của thiệp */
  filter: grayscale(0.24) contrast(0.96) saturate(0.86);
}

.map-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.6;
}

.map-card figcaption b {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------
   RSVP — khối tối làm điểm nhấn giữa trang sáng
   --------------------------------------------------------- */

.rsvp-wrap {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 66px);
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, rgba(38, 29, 46, 0.95), rgba(24, 18, 30, 0.97)),
    url("https://images.unsplash.com/photo-1518895949257-7621c3c786d7?auto=format&fit=crop&w=1100&q=80")
      left center / cover;
  color: var(--on-dark);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.rsvp-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 22%, rgba(232, 200, 140, 0.14) 46%, transparent 68%);
  content: "";
  pointer-events: none;
  transform: translateX(-100%);
  animation: panelSheen 9s ease-in-out infinite;
}

@keyframes panelSheen {
  0%,
  58% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(110%);
  }
}

/* Đặt ở góc dưới trái: góc trên phải là chỗ của ô "Họ và tên". */
.rsvp-seal {
  position: absolute;
  left: clamp(22px, 4vw, 54px);
  bottom: clamp(22px, 4vw, 44px);
  z-index: 2;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(200, 160, 90, 0.5);
  border-radius: 50%;
  color: rgba(232, 200, 140, 0.8);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  transform: rotate(-12deg);
  animation: sealSpin 24s linear infinite;
}

@keyframes sealSpin {
  from {
    transform: rotate(-12deg);
  }
  to {
    transform: rotate(348deg);
  }
}

.rsvp-copy,
.rsvp-form {
  position: relative;
  z-index: 3;
}

.rsvp-copy .script {
  margin-bottom: 2px;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
}

.rsvp-copy h2 {
  margin-bottom: 14px;
  color: var(--on-dark);
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rsvp-copy .ornament {
  width: min(220px, 60vw);
  margin-inline: 0;
  color: var(--gold);
}

.rsvp-copy .ornament i {
  background: linear-gradient(90deg, transparent, var(--gold));
}

.rsvp-copy .ornament i:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.rsvp-lead {
  max-width: 360px;
  margin: 0;
  color: var(--on-dark-soft);
  font-size: 1.08rem;
  line-height: 1.72;
}

.rsvp-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span,
.field legend {
  padding: 0;
  color: var(--on-dark-muted);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="tel"],
.rsvp-form textarea {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(247, 238, 226, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-dark);
  font: 400 0.98rem var(--sans);
  outline: none;
  resize: vertical;
  transition: border-color 320ms var(--ease), background 320ms var(--ease), box-shadow 320ms var(--ease);
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(247, 238, 226, 0.3);
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  border-color: rgba(232, 200, 140, 0.7);
  background: rgba(232, 200, 140, 0.08);
  box-shadow: 0 0 0 3px rgba(232, 200, 140, 0.12);
  outline: none;
}

.rsvp-form .is-invalid {
  border-color: rgba(240, 140, 140, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(240, 140, 140, 0.16) !important;
}

/* Bẫy spam — ẩn hẳn khỏi cả mắt người lẫn trình đọc màn hình */
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: grid;
  min-height: 52px;
  padding: 14px 16px;
  place-items: center;
  border: 1px solid rgba(247, 238, 226, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-dark-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  text-align: center;
  transition: border-color 320ms var(--ease), background 320ms var(--ease), color 320ms var(--ease),
    box-shadow 320ms var(--ease);
}

.choice:hover span {
  border-color: rgba(232, 200, 140, 0.46);
  color: var(--on-dark);
}

.choice input:checked + span {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(232, 200, 140, 0.26), rgba(232, 200, 140, 0.1));
  color: #fbeccb;
  box-shadow: 0 0 0 3px rgba(232, 200, 140, 0.12);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.rsvp-form button {
  justify-self: start;
  margin-top: 4px;
}

/* Nút vàng trên nền tối cần sáng hơn để nổi bật */
.rsvp-wrap .btn-gold {
  background: linear-gradient(135deg, #a2762f, #d0a457 46%, #efd39a);
  color: #2a1c07;
}

.rsvp-wrap .btn-gold::before {
  background: linear-gradient(135deg, #c8a05a, #e8c88c 50%, #fbeccb);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: 0.84rem;
}

.form-status.is-error {
  color: #f3a0a0;
}

/* ---------------------------------------------------------
   GALLERY
   --------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 150px;
  gap: clamp(10px, 1.4vw, 18px);
  max-width: 1180px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  margin: 0;
  border: 1px solid rgba(162, 118, 47, 0.2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: border-color 480ms var(--ease), box-shadow 480ms var(--ease), transform 480ms var(--ease);
}

.gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(2) {
  grid-column: span 4;
  grid-row: span 2;
}

.gallery-item:nth-child(3),
.gallery-item:nth-child(4) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item:nth-child(5) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.28) brightness(1.02);
  transform: scale(1.02);
  transition: filter 700ms var(--ease), transform 900ms var(--ease);
}

.gallery-item::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(40, 28, 20, 0.72));
  content: "";
  opacity: 0.55;
  transition: opacity 480ms var(--ease);
}

.gallery-item figcaption {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #fbeccb;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}

.gallery-item:hover {
  border-color: var(--line-strong);
  box-shadow: 0 26px 60px rgba(94, 66, 40, 0.22);
  transform: translateY(-6px);
}

.gallery-item:hover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.09);
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------
   LIGHTBOX — giữ nền trầm để ảnh nổi
   --------------------------------------------------------- */

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 56px);
  background: rgba(38, 29, 46, 0.9);
  backdrop-filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 380ms var(--ease);
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-stage {
  position: relative;
  margin: 0;
  max-width: min(1040px, 100%);
}

.image-lightbox img {
  width: 100%;
  max-height: 78vh;
  border: 1px solid rgba(232, 200, 140, 0.4);
  border-radius: var(--radius-lg);
  object-fit: contain;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.5);
  transform: translateY(22px) scale(0.95);
  transition: transform 520ms var(--ease-out), opacity 300ms var(--ease);
}

.image-lightbox.is-open img {
  transform: translateY(0) scale(1);
}

.image-lightbox.is-swapping img {
  opacity: 0;
  transform: translateY(0) scale(0.98);
}

.lightbox-stage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--on-dark-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lightbox-stage figcaption b {
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 2;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(232, 200, 140, 0.44);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-bright);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
  transition: background 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease),
    border-color 300ms var(--ease);
}

.lightbox-close {
  top: 24px;
  right: 24px;
}

.lightbox-prev {
  top: 50%;
  left: clamp(12px, 3vw, 34px);
  transform: translateY(-50%);
}

.lightbox-next {
  top: 50%;
  right: clamp(12px, 3vw, 34px);
  transform: translateY(-50%);
}

.lightbox-close:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--dark);
  transform: rotate(90deg);
}

.lightbox-prev:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--dark);
  transform: translateY(-50%) translateX(-4px);
}

.lightbox-next:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--dark);
  transform: translateY(-50%) translateX(4px);
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 5;
  margin-top: clamp(60px, 8vw, 110px);
  padding: clamp(46px, 6vw, 74px) clamp(24px, 6vw, 92px) 34px;
  background: linear-gradient(180deg, var(--dark-2), var(--dark));
  color: var(--on-dark);
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  width: 70vw;
  height: 280px;
  background: radial-gradient(ellipse, rgba(232, 200, 140, 0.2), transparent 66%);
  transform: translateX(-50%);
  pointer-events: none;
}

.footer-main {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.7fr;
  gap: 34px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-copy .script {
  margin: 0 0 4px;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.footer-copy strong {
  display: block;
  color: var(--on-dark-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-copy span {
  display: block;
  margin-top: 10px;
  color: var(--on-dark-muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Liên hệ dạng thẻ có icon: đọc lướt vẫn biết đâu là số máy, đâu là email —
   không cần in nguyên đường link ra cho khách tự đoán. */
address {
  display: grid;
  gap: 10px;
  padding: 0 34px;
  border-inline: 1px solid rgba(232, 200, 140, 0.18);
  font-family: var(--sans);
  font-style: normal;
}

address a {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px 10px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--on-dark-soft);
  transition: border-color 320ms var(--ease), background 320ms var(--ease), color 320ms var(--ease),
    transform 320ms var(--ease);
}

address a i {
  display: grid;
  flex: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(232, 200, 140, 0.32);
  border-radius: 50%;
  color: var(--gold-bright);
  transition: background 320ms var(--ease), color 320ms var(--ease), border-color 320ms var(--ease);
}

address a i svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

address a small {
  display: block;
  margin-bottom: 2px;
  color: var(--on-dark-muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

address a b {
  display: block;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  /* email dài hơn cột chứa nó trên máy nhỏ */
  overflow-wrap: anywhere;
}

address a:hover {
  border-color: rgba(232, 200, 140, 0.32);
  background: rgba(232, 200, 140, 0.07);
  color: var(--on-dark);
  transform: translateX(3px);
}

address a:hover i {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--dark);
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.social-links a {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(232, 200, 140, 0.44);
  border-radius: 50%;
  color: var(--gold-bright);
  transition: background 320ms var(--ease), color 320ms var(--ease), transform 320ms var(--ease),
    box-shadow 320ms var(--ease);
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Logo Facebook là hình đặc, không phải nét viền */
.social-links .icon-solid {
  fill: currentColor;
  stroke: none;
}

.social-links a:hover {
  background: var(--gold-bright);
  color: var(--dark);
  box-shadow: 0 0 26px rgba(232, 200, 140, 0.34);
  transform: translateY(-3px);
}

.footer-fine {
  position: relative;
  margin: clamp(34px, 5vw, 56px) 0 0;
  color: var(--on-dark-muted);
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   NÚT NHẠC NỀN
   --------------------------------------------------------- */

.music-toggle {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 140;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  color: var(--gold-ink);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: border-color 320ms var(--ease), box-shadow 320ms var(--ease), transform 320ms var(--ease),
    background 320ms var(--ease);
}

.music-toggle:hover {
  border-color: var(--gold-ink);
  box-shadow: 0 14px 32px rgba(94, 66, 40, 0.18);
  transform: translateY(-2px);
}

.music-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Đang phát: bốn vạch nhún theo nhịp. Tắt: biểu tượng loa gạch chéo. */
.music-bars {
  display: none;
  align-items: center;
  gap: 3px;
  height: 18px;
}

.music-bars i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform: scaleY(0.35);
  animation: musicBar 1100ms var(--ease) infinite;
}

.music-bars i:nth-child(2) {
  animation-delay: 180ms;
}

.music-bars i:nth-child(3) {
  animation-delay: 360ms;
}

.music-bars i:nth-child(4) {
  animation-delay: 540ms;
}

@keyframes musicBar {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

.music-toggle.is-playing {
  border-color: var(--gold-ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(247, 232, 205, 0.9));
}

.music-toggle.is-playing .music-bars {
  display: flex;
}

.music-toggle.is-playing .music-muted {
  display: none;
}

/* ---------------------------------------------------------
   REVEAL / SPLIT
   --------------------------------------------------------- */

.reveal-up {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.split-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.split-inner {
  display: inline-block;
  transform: translateY(112%) rotate(5deg);
  transition: transform 1000ms var(--ease-out);
}

.is-split-in .split-inner {
  transform: translateY(0) rotate(0);
}

[data-wipe] {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1300ms var(--ease-out);
}

[data-wipe].is-wiped {
  clip-path: inset(0 0 0 0);
}

/* tia sáng khi bấm */
.click-spark {
  position: fixed;
  z-index: 240;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.click-spark::before,
.click-spark::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(162, 118, 47, 0.85);
  border-radius: 50%;
  content: "";
  animation: clickSpark 720ms var(--ease-out) forwards;
}

.click-spark::after {
  animation-delay: 90ms;
}

@keyframes clickSpark {
  from {
    opacity: 0.9;
    transform: scale(0.4);
  }
  to {
    opacity: 0;
    transform: scale(6);
  }
}

/* Màn hình thấp (hoặc điện thoại): hero đã kín chỗ, chỉ báo "Scroll" sẽ đè lên
   nút bấm — bỏ đi, người xem vẫn tự cuộn. */
@media (max-height: 920px), (max-width: 620px) {
  .scroll-cue {
    display: none;
  }
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1040px) {
  .nav-links {
    gap: 18px;
    font-size: 0.66rem;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    order: 3;
  }

  .header-action {
    display: none;
  }

  .nav-links {
    position: fixed;
    inset: 0 0 auto;
    z-index: -1;
    flex-direction: column;
    gap: 4px;
    padding: 104px 24px 34px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 250, 242, 0.97);
    backdrop-filter: blur(22px);
    box-shadow: 0 24px 60px rgba(94, 66, 40, 0.16);
    font-size: 0.82rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 380ms var(--ease), transform 480ms var(--ease);
  }

  .nav-links a {
    padding: 14px 0;
  }

  .nav-indicator {
    display: none;
  }

  body.nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .detail-grid,
  .rsvp-wrap,
  .footer-main {
    grid-template-columns: 1fr;
  }

  /* Hết chỗ cho ba cột thì thẻ chuyển sang dạng hàng ngang — xếp dọc kiểu
     căn giữa khiến mỗi thẻ cao hơn 200px và đẩy cả trang dài ra. */
  .detail-grid {
    gap: 14px;
  }

  .detail-card {
    /* chừa chỗ bên trái cho vòng tròn icon: 26 lề + 54 icon + 16 khoảng cách */
    padding: 22px 26px 22px 96px;
    text-align: left;
  }

  .detail-icon {
    top: 50%;
    left: 26px;
    transform: translateY(-50%);
  }

  .detail-card:hover .detail-icon {
    transform: translateY(-50%);
  }

  .detail-card h3 {
    margin-bottom: 6px;
    transform: none;
  }

  /* p vẫn còn margin-bottom mặc định 1em — ở dạng hàng ngang nó thành khoảng hở thừa */
  .detail-card p,
  .detail-card span {
    margin: 0;
    transform: none;
  }

  .detail-card strong {
    margin: 4px 0;
    transform: none;
  }

  .rsvp-copy .ornament {
    margin-inline: auto;
  }

  .rsvp-copy {
    text-align: center;
  }

  .rsvp-lead {
    margin-inline: auto;
  }

  .rsvp-form button {
    justify-self: stretch;
  }

  address {
    padding: 22px 0;
    border-inline: 0;
    border-block: 1px solid rgba(232, 200, 140, 0.18);
  }

  /* dồn về lề trái khi footer xếp một cột */
  address a {
    margin-left: -10px;
  }

  .social-links {
    justify-content: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 130px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-item:nth-child(5) {
    grid-column: span 4;
  }
}

/* ---------------------------------------------------------
   ĐIỆN THOẠI — phần lớn khách mở thiệp trên máy nhỏ, nên ưu tiên
   để mỗi màn hình chứa được một ý trọn vẹn thay vì kéo dài mãi xuống.
   --------------------------------------------------------- */

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 1.24rem;
  }

  .btn {
    min-height: 46px;
    padding: 13px 24px;
    font-size: 0.78rem;
  }

  /* Nhịp dọc chung: mỗi khoảng trắng thừa đẩy thông tin quan trọng
     xuống thêm gần một màn hình cuộn. */
  .section {
    padding: 54px 18px;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .section-heading h2 {
    margin-bottom: 10px;
    font-size: clamp(1.9rem, 8vw, 2.4rem);
  }

  .ornament {
    margin-bottom: 14px;
  }

  .hero {
    padding: 92px 18px 84px;
  }

  .hero-script {
    font-size: 1.9rem;
  }

  .hero-note {
    max-width: 340px;
    margin-bottom: 18px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-subtitle {
    margin: 10px 0 8px;
    font-size: 1.02rem;
    letter-spacing: 0.2em;
    text-indent: 0.2em;
  }

  .hero-quote {
    display: none;
  }

  .event-card {
    width: min(340px, 100%);
    margin-bottom: 18px;
    padding: 18px 20px 16px;
  }

  .event-time {
    font-size: 0.7rem;
  }

  .event-date {
    gap: 12px;
  }

  .event-date span {
    padding: 7px 0;
    font-size: 0.62rem;
  }

  .event-date b {
    font-size: 3rem;
  }

  .event-place {
    margin-top: 13px;
  }

  .event-place span {
    font-size: 0.9rem;
  }

  .event-map {
    margin-top: 13px;
    padding-top: 12px;
    font-size: 0.66rem;
  }

  .hero-actions {
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .scroll-cue i {
    height: 34px;
  }

  .marquee {
    padding: 13px 0;
  }

  /* Bốn ô đếm ngược vẫn nằm trên một hàng — xếp 2x2 tốn thêm ~140px */
  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .count-cell {
    padding: 14px 4px;
  }

  .count-cell b {
    font-size: clamp(1.6rem, 8vw, 2.3rem);
  }

  .count-cell span {
    margin-top: 6px;
    font-size: 0.5rem;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .countdown-note {
    margin-top: 18px;
    font-size: 0.96rem;
  }

  .countdown-actions {
    gap: 10px;
    margin-top: 20px;
  }

  .countdown-actions .btn {
    flex: 1 1 140px;
  }

  /* Thẻ thông tin (dạng hàng ngang từ khổ 900px) siết thêm cho vừa màn hình nhỏ */
  .detail-grid {
    gap: 12px;
  }

  .detail-card {
    padding: 17px 16px 17px 80px;
  }

  .detail-icon {
    left: 16px;
    width: 48px;
    height: 48px;
  }

  .detail-icon svg {
    width: 21px;
    height: 21px;
  }

  .detail-card h3 {
    margin-bottom: 4px;
    font-size: 0.56rem;
  }

  .detail-card p,
  .detail-card span {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .detail-card strong {
    margin: 2px 0;
    font-size: 1.16rem;
    line-height: 1.3;
  }

  .map-frame {
    height: 230px;
  }

  .rsvp-wrap {
    gap: 22px;
    /* chừa lề để khối tối vẫn là một tấm thiệp, không dính sát mép màn hình */
    margin-inline: 18px;
    padding: 28px 20px;
  }

  .rsvp-copy .script {
    font-size: 2.2rem;
  }

  .rsvp-lead {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .rsvp-form {
    gap: 13px;
  }

  .rsvp-form input[type="text"],
  .rsvp-form input[type="tel"],
  .rsvp-form textarea {
    padding: 13px 15px;
  }

  .choice span {
    min-height: 46px;
    padding: 12px 14px;
    font-size: 0.78rem;
  }

  /* Màn hình cao ~667px không đủ chỗ cho khung 640px — thiệp sẽ bị cắt mất */
  .envelope-scene {
    min-height: 540px;
  }

  .envelope {
    width: min(360px, 92vw);
    height: 210px;
    transform: translateY(58px);
  }

  .envelope-letter {
    inset: 44% 30px auto;
    font-size: 2rem;
  }

  .invitation-gate.is-opening .envelope-letter {
    transform: translateY(-92px);
  }

  .wax {
    width: 58px;
    height: 58px;
  }

  .wax-mark {
    font-size: 1.5rem;
  }

  .gate-card {
    margin-top: -92px;
    padding: 32px 22px;
  }

  .gate-frame {
    inset: 14px;
  }

  .rsvp-seal {
    display: none;
  }

  /* Ảnh xếp thành lưới hai cột thay vì năm tấm full-width nối nhau:
     cả gallery gọn trong khoảng một màn hình rưỡi. */
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 104px;
    gap: 8px;
  }

  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4),
  .gallery-item:nth-child(5) {
    grid-column: span 1;
    grid-row: span 2;
  }

  .gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  /* Không có hover trên cảm ứng nên chú thích ảnh luôn hiện */
  .gallery-item figcaption {
    left: 12px;
    right: 12px;
    bottom: 11px;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    opacity: 1;
    transform: none;
  }

  .gallery-item::after {
    opacity: 0.78;
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }

  .site-footer {
    /* chừa chỗ cho nút nhạc nổi ở góc dưới phải */
    padding: 40px 18px 74px;
  }

  .footer-main {
    gap: 22px;
  }

  .footer-copy .script {
    font-size: 2.1rem;
  }

  address {
    gap: 6px;
    padding: 18px 0;
  }

  address a b {
    font-size: 0.88rem;
  }

  .social-links a {
    width: 44px;
    height: 44px;
  }

  .map-card figcaption {
    gap: 12px;
    margin-top: 14px;
  }

  .map-card figcaption b {
    font-size: 1.04rem;
  }

  .map-card figcaption .btn {
    width: 100%;
  }

  .footer-fine {
    margin-top: 24px;
    font-size: 0.6rem;
  }
}

/* ---------------------------------------------------------
   GIẢM CHUYỂN ĐỘNG
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-up {
    opacity: 1;
    transform: none;
  }

  .split-inner {
    transform: none;
  }

  [data-wipe] {
    clip-path: none;
  }

  .grain,
  .aurora {
    display: none;
  }
}
