/* David Huynh Wedding House — tối giản, sang (tinh thần trang Pixieset của anh David) */
:root {
  --w-bg: #ffffff;
  --w-panel: #f2f2f2;
  --w-ink: #2d2d2d;
  --w-text: #373737;
  --w-muted: #8c8c8c;
  --w-line: #e3e3e3;
  --w-pad: clamp(16px, 4.7vw, 68px);
  --w-font: "Questrial", "Helvetica Neue", Arial, sans-serif;
}

body {
  background: var(--w-bg);
  color: var(--w-text);
  font-family: var(--w-font);
  font-size: 15px;
  line-height: 2;
}
a { text-decoration: none; }
img { width: 100%; }

.w-eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--w-ink);
}
.w-body { font-size: 15px; line-height: 2; color: var(--w-text); }

/* ============ Menu ============ */
.w-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px var(--w-pad) 0;
  color: #fff;
}
.w-nav-link {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  transition: opacity 0.3s;
}
.w-nav-link:last-child { justify-self: end; }
.w-nav-link:hover { opacity: 0.7; }
.w-nav-logo img { width: 120px; height: 120px; object-fit: contain; }
/* Menu trên nền trắng (trang album): logo trắng → đảo màu */
.w-nav--solid { position: relative; color: var(--w-ink); }
.w-nav--solid .w-nav-logo img { filter: invert(1) brightness(0.2); }

/* ============ Hero trình chiếu ============ */
.w-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  background: #222 url("/seed/wedding/hero-1.jpg") center / cover no-repeat;
}
.w-hero::after {
  /* lớp tối nhẹ phía trên để chữ menu dễ đọc */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 200px;
  background: linear-gradient(rgba(0, 0, 0, 0.35), transparent);
  pointer-events: none;
}
.w-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.6s ease, transform 7s linear;
}
.w-hero-slide.is-active { opacity: 1; transform: scale(1); }
.w-hero-slide:first-of-type { opacity: 1; } /* trước khi JS chạy */
.w-hero.is-ready .w-hero-slide:first-of-type:not(.is-active) { opacity: 0; }

/* Chế độ sửa: bày các ảnh hero cạnh nhau để thay từng ảnh */
.is-edit .w-hero { display: flex; height: 70vh; }
.is-edit .w-hero::after { display: none; }
.is-edit .w-hero-slide { position: relative; flex: 1; opacity: 1 !important; transform: none; border-right: 2px solid #fff; }

/* ============ Bài báo: chữ | ảnh ============ */
.w-press {
  display: grid;
  grid-template-columns: 40fr 60fr;
  min-height: 810px;
  color: var(--w-ink);
}
.w-press-text {
  background: var(--w-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px var(--w-pad);
  gap: 22px;
}
.w-press-title {
  font-weight: 400;
  font-size: clamp(26px, 2.65vw, 38px);
  line-height: 1.5;
  letter-spacing: -0.02em;
  max-width: 440px;
  color: var(--w-ink);
}
.w-arrow { font-size: 22px; line-height: 1; transition: transform 0.4s ease; }
.w-press:hover .w-arrow { transform: translateX(8px); }
.w-press-img { overflow: hidden; }
.w-press-img img { height: 100%; object-fit: cover; transition: transform 1.4s ease; }
.w-press:hover .w-press-img img { transform: scale(1.03); }

/* ============ Giới thiệu ============ */
.w-intro {
  display: grid;
  grid-template-columns: minmax(0, 425px) minmax(0, 535px);
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 8vw, 124px);
  padding: 120px var(--w-pad);
}
.w-intro-img img { aspect-ratio: 2 / 3; object-fit: cover; }
.w-intro-hello { font-size: 15px; }
.w-intro-role { margin-top: 6px; font-size: 16px; letter-spacing: 0.19em; }
.w-intro-title {
  font-weight: 400;
  font-size: clamp(22px, 1.95vw, 28px);
  line-height: 1.5;
  color: var(--w-ink);
  margin: 26px 0 22px;
}

/* ============ Tiêu đề khối ============ */
.w-section-title {
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  text-align: center;
  color: var(--w-ink);
  padding: 0 var(--w-pad);
}
.w-big-title {
  font-weight: 400;
  font-size: clamp(34px, 3.75vw, 54px);
  line-height: 1.3;
  color: var(--w-ink);
  padding: 0 var(--w-pad);
}

/* ============ PHOTOGRAPHY ============ */
.w-photo { padding: 40px 0 100px; }
.w-photo .w-section-title { margin-bottom: 60px; }
.w-full img { max-height: 110vh; object-fit: cover; }
.w-quote {
  max-width: 860px;
  margin: 70px auto;
  padding: 0 var(--w-pad);
  text-align: center;
  font-size: 15px;
  line-height: 2;
}
.w-quote footer { margin-top: 30px; color: var(--w-ink); }

/* Lưới ảnh kiểu masonry (cột) */
.w-mosaic {
  columns: 3;
  column-gap: 18px;
  padding: 0 var(--w-pad);
}
.w-mosaic-item {
  break-inside: avoid;
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--w-panel);
  cursor: zoom-in;
}
.w-mosaic-item img { transition: transform 1.2s ease, opacity 0.4s; }
@media (hover: hover) { .w-mosaic-item:hover img { transform: scale(1.03); } }

/* ============ VIDEO ============ */
.w-video-sec { padding: 60px 0 40px; }
.w-video-sec .w-section-title { margin-bottom: 50px; }
.w-videos {
  display: grid;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--w-pad);
}
.w-video { margin: 0; }
.w-video-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}
.w-video-link img { position: absolute; inset: 0; height: 100%; object-fit: cover; transition: transform 1.2s ease, opacity 0.4s; }
.w-video-link iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.w-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  transition: transform 0.4s ease, background 0.4s;
}
.w-play::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 25px;
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}
@media (hover: hover) {
  .w-video-link:hover img { transform: scale(1.03); }
  .w-video-link:hover .w-play { transform: scale(1.08); background: rgba(0, 0, 0, 0.35); }
}
.w-video figcaption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: var(--w-muted);
}
.w-video figcaption:empty { display: none; }
.w-videos--bts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; max-width: none; }

/* ============ BỘ SƯU TẬP ============ */
.w-collections { padding: 90px 0 60px; }
.w-collections .w-big-title { margin-bottom: 40px; }
.w-albums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.w-album { display: block; color: var(--w-ink); padding-bottom: 36px; }
.w-album-cover { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--w-panel); }
.w-album-cover img { height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.5s; }
.w-album-title {
  font-weight: 400;
  font-size: clamp(19px, 1.67vw, 24px);
  line-height: 1.5;
  padding: 24px var(--w-pad) 0;
  max-width: 420px;
  box-sizing: content-box;
}
@media (hover: hover) {
  .w-album:hover .w-album-cover img { transform: scale(1.05); opacity: 0.92; }
}

/* ============ HẬU TRƯỜNG ============ */
.w-bts { padding: 40px 0 100px; }
.w-bts-title {
  font-weight: 400;
  font-size: clamp(20px, 1.95vw, 28px);
  line-height: 1.5;
  color: var(--w-ink);
  padding: 0 var(--w-pad);
}
.w-bts-quote { padding: 12px var(--w-pad) 50px; max-width: 1100px; }

/* ============ LIÊN HỆ ============ */
.w-contact {
  background: var(--w-panel);
  padding: 100px var(--w-pad);
  text-align: center;
}
.w-contact-lead { margin: 18px auto 44px; color: var(--w-text); }
.w-contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px clamp(28px, 4vw, 64px);
  max-width: 1200px;
  margin: 0 auto;
}
.w-contact-list dt {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--w-muted);
}
.w-contact-list > div { min-width: 150px; max-width: 100%; }
.w-contact-list dd { margin: 6px 0 0; color: var(--w-ink); overflow-wrap: anywhere; line-height: 1.6; }
.w-contact-list a { display: inline-block; min-height: 44px; padding-top: 2px; border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.w-contact-list a:hover { border-color: currentColor; }

/* ============ Footer ============ */
.w-footer { padding: 40px var(--w-pad) 30px; color: var(--w-ink); }
.w-social { display: flex; justify-content: center; gap: 6px; margin-bottom: 36px; }
.w-social a { width: 48px; height: 48px; display: grid; place-items: center; transition: opacity 0.3s; }
.w-social a:hover { opacity: 0.6; }
.w-social svg { width: 22px; height: 22px; fill: currentColor; }
.w-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.w-footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.w-footer-nav a { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; min-height: 44px; display: inline-flex; align-items: center; }
.w-copy { font-size: 12px; }

/* ============ Hiện dần khi cuộn ============ */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; }
  .w-hero-slide { transition: opacity 0.01ms; transform: none !important; }
}

/* ============ Trang album ============ */
.a-cover {
  position: relative;
  height: 78vh;
  height: 78svh;
  min-height: 380px;
  background: #222 center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.a-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5));
}
.a-cover-text { position: relative; padding: 0 var(--w-pad) 64px; max-width: 900px; }
.a-title { font-weight: 400; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.4; }
.a-meta { margin-top: 10px; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.9; }
.a-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px var(--w-pad);
}
.a-back {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--w-ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.a-back:hover { opacity: 0.6; }
.a-count { font-size: 12px; letter-spacing: 0.16em; color: var(--w-muted); text-transform: uppercase; }
.a-grid { columns: 3 300px; column-gap: 14px; padding: 0 var(--w-pad) 80px; }
.a-grid .w-mosaic-item { margin-bottom: 14px; }
.a-empty { text-align: center; padding: 100px var(--w-pad) 140px; min-height: 50vh; }
.a-empty-title { font-weight: 400; font-size: clamp(24px, 2.6vw, 34px); color: var(--w-ink); margin-bottom: 14px; }
.a-empty p { max-width: 520px; margin: 0 auto 24px; }
.a-empty a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 26px; border: 1px solid var(--w-ink); color: var(--w-ink); letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; }
.a-empty a:hover { background: var(--w-ink); color: #fff; }

/* ============ Lightbox ============ */
.lb {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb-img {
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 110px);
  max-height: calc(100svh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  transition: opacity 0.25s;
}
.lb-btn {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 0;
  background: transparent;
  color: var(--w-ink);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0.75;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 10px; right: 12px; font-size: 34px; }
.lb-prev { left: 12px; top: 50%; margin-top: -28px; }
.lb-next { right: 12px; top: 50%; margin-top: -28px; }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: 0.2em; color: var(--w-muted); }
body.lb-lock { overflow: hidden; }

/* ============ Máy tính bảng ============ */
@media (max-width: 1024px) {
  .w-press { min-height: 620px; }
  .w-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============ Điện thoại ============ */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .w-nav { padding-top: 4px; }
  .w-nav-logo img { width: 84px; height: 84px; }
  .w-nav-link { font-size: 11px; letter-spacing: 0.16em; }
  .w-press { grid-template-columns: 1fr; min-height: 0; }
  .w-press-text { padding: 64px 24px; }
  .w-press-img img { aspect-ratio: 4 / 5; }
  .w-intro { grid-template-columns: 1fr; padding: 72px 24px; gap: 36px; }
  .w-intro-img { max-width: 420px; margin: 0 auto; }
  .w-photo .w-section-title { margin-bottom: 36px; }
  .w-quote { margin: 48px auto; padding: 0 24px; }
  .w-mosaic { columns: 2; column-gap: 8px; padding: 0 8px; }
  .w-mosaic-item { margin-bottom: 8px; }
  .w-videos { gap: 28px; padding: 0 16px; }
  .w-videos--bts { grid-template-columns: 1fr; }
  .w-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .w-play::after { left: 24px; top: 19px; border-width: 11px 0 11px 17px; }
  .w-albums { grid-template-columns: 1fr; }
  .w-album-title { padding: 18px 24px 0; }
  .w-collections { padding-top: 64px; }
  .w-contact { padding: 72px 24px; }
  .w-contact-list { flex-direction: column; gap: 22px; }
  .w-footer-row { flex-direction: column; text-align: center; }
  .w-footer-nav { justify-content: center; gap: 18px; }
  .a-cover { height: 62svh; }
  .a-cover-text { padding-bottom: 40px; }
  .a-grid { columns: 2; column-gap: 6px; padding: 0 6px 60px; }
  .a-grid .w-mosaic-item { margin-bottom: 6px; }
  .lb-img { max-width: 100vw; max-height: calc(100svh - 130px); }
  .lb-prev, .lb-next { top: auto; bottom: 6px; margin: 0; }
  .lb-count { bottom: 24px; }
}

.lb-btn:focus:not(:focus-visible) { outline: none; }
