/* NHẪN VÀNG · HỒNG PHẤN · CÁNH HOA (bản 14) — thiệp cưới online. Từ bản 12 (hồng phấn sáng #FBE3E1 · đào · hoa cà · chữ mận #4A1A2B · vàng đậm #B98A3E), thêm:
   nền ánh ngọc trai (bốn vệt sáng trôi chậm), quầng sáng đi theo con trỏ, cánh hoa 3D rơi (main.js), dải thiệp xoay 3D có ánh bóng,
   thanh dưới bằng kính mờ nổi lên, nút vàng có tia sáng quét, thẻ viền ánh cầu vồng. */
:root {
  --char: #FBE3E1;
  --char2: #F7D3D5;
  --gold: #B98A3E;
  --gold2: #8A5A1E;
  --ivory: #4A1A2B;
  --smoke: #8A5A66;
  --soft: rgba(74, 26, 43, .84);
  --line: rgba(184, 137, 58, .45);
  --line2: rgba(120, 50, 70, .16);
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Prata", "Cormorant Garamond", Georgia, "Times New Roman", serif;   /* "Thiệp Cưới" */
  --script: "Allura", "Snell Roundhand", "Apple Chancery", cursive;   /* "Online" viết tay */
  --caps: "Cormorant SC", "Cormorant Garamond", Georgia, serif;   /* dòng nhỏ "Wedding Riverside" */
  --pad: 22px;
  --hdr: 64px;
  --bar: calc(86px + env(safe-area-inset-bottom, 0px));   /* thanh nổi: cao 62 + cách đáy 12 + chừa 12 */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pw: clamp(112px, calc((100vh - 456px) * .4627), min(240px, 52vw));
}
@supports (height: 100svh) { :root { --pw: clamp(112px, calc((100svh - 456px) * .4627), min(240px, 52vw)); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--char); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--char); color: var(--ivory);
  font: 400 16px/1.6 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(216, 179, 106, .38); color: #fff; }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 3px; }

/* ---------- nền + canvas ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(85% 46% at 50% 4%, rgba(255, 255, 255, .85), rgba(255, 240, 240, .35) 55%, transparent 78%),   /* ánh sáng trắng phía trên, sau logo và nhẫn */
    linear-gradient(180deg, #FFF3EF 0%, #FBE0DF 52%, #F3CBD1 100%);
}
/* ánh ngọc trai: bốn vệt sáng lớn (hồng dâu, đào, hoa cà, vàng sâm panh) trôi rất chậm; lớp ngoài di theo con trỏ/cuộn, lớp trong tự trôi */
.bg__in { position: absolute; inset: -9%; will-change: transform; }
.blob { position: absolute; display: block; border-radius: 50%; will-change: transform; }
.b1 { left: -8%; top: -4%; width: 78%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(255, 150, 186, .62), rgba(255, 150, 186, 0)); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { right: -14%; top: 22%; width: 74%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(255, 196, 160, .66), rgba(255, 196, 160, 0)); animation: drift2 31s ease-in-out infinite alternate; }
.b3 { left: -12%; bottom: -14%; width: 84%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(214, 178, 255, .58), rgba(214, 178, 255, 0)); animation: drift3 29s ease-in-out infinite alternate; }
.b4 { right: 4%; bottom: -8%; width: 58%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(255, 226, 168, .62), rgba(255, 226, 168, 0)); animation: drift4 23s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(14%, 10%, 0) scale(1.14); } }
@keyframes drift2 { from { transform: translate3d(0, 0, 0) scale(1.08); } to { transform: translate3d(-16%, 8%, 0) scale(.94); } }
@keyframes drift3 { from { transform: translate3d(0, 0, 0) scale(.96); } to { transform: translate3d(18%, -12%, 0) scale(1.12); } }
@keyframes drift4 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-14%, -14%, 0) scale(1.18); } }
/* quầng sáng nhỏ đi theo con trỏ (chỉ máy tính; JS thêm .on khi con trỏ chuột di chuyển) */
.glow {
  position: fixed; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; z-index: 0; pointer-events: none;
  border-radius: 50%; opacity: 0; will-change: transform, opacity; transition: opacity .8s ease;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .6), rgba(255, 214, 228, .22) 55%, rgba(255, 214, 228, 0));
}
.glow.on { opacity: 1; }
/* quầng sáng đi theo nhẫn: ánh trắng hồng và những vòng gợn mảnh màu vàng đậm quanh nhẫn */
.halo {
  position: fixed; left: 0; top: 0; width: 640px; height: 640px; z-index: 0; pointer-events: none;
  margin: -320px 0 0 -320px; border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .78), rgba(255, 224, 230, .28) 55%, rgba(255, 224, 230, 0) 100%);
}
.halo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 53px, rgba(184, 137, 58, .3) 54px 55px);
  -webkit-mask-image: radial-gradient(closest-side, transparent 24%, #000 52%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 24%, #000 52%, transparent 100%);
}
#gl {
  position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; display: block;
  pointer-events: none; opacity: 0; transition: opacity 1.1s ease;
}
html.gl-ready #gl { opacity: 1; }
html.no-webgl #gl, html.no-webgl .halo, html.no-webgl .glow { display: none; }
main { position: relative; z-index: 1; }

/* kéo để xoay nhẫn: vuốt ngang xoay nhẫn, vuốt dọc vẫn cuộn trang (JS: main.js, phần "kéo / vuốt / chạm") */
html.reel-on:not(.no-webgl) main { touch-action: pan-y pinch-zoom; }
html.ring-hover main { cursor: grab; }
html.is-grab, html.is-grab * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.ring-hint {
  position: fixed; left: 0; top: 0; z-index: 2; display: none; pointer-events: none; opacity: 0; will-change: transform, opacity;
  white-space: nowrap; padding: 8px 14px 8px 12px; border-radius: 999px;
  font: 500 12px/1 var(--sans); letter-spacing: .08em; color: var(--gold2);
  background: rgba(251, 227, 225, .58); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .6s ease;
}
html.gl-ready:not(.no-webgl) .ring-hint { display: block; }
.ring-hint.on { opacity: 1; }
.ring-hint > svg, .ring-hint > span { display: inline-block; vertical-align: middle; }
.ring-hint > svg { margin-right: 7px; }
@media (prefers-reduced-motion: no-preference) {
  .ring-hint.on > svg { animation: hint-spin 3.2s ease-in-out infinite; }
  @keyframes hint-spin { 0%, 55% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
}

/* ---------- đầu trang: logo nhỏ + nút ---------- */
.top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50; height: var(--hdr);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad);
  border-bottom: 1px solid transparent; transition: background-color .4s, border-color .4s;
}
.top.is-solid {
  background: rgba(251, 227, 225, .82); border-bottom-color: var(--line2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
/* logo góc trái nằm trên viên thuốc trắng có viền vàng và bóng mận (cùng ngôn ngữ với đĩa logo ở hero) nên nổi hẳn khỏi nền hồng, cả lúc đầu trang lẫn khi thanh đầu trang đã đặc */
.brand {
  display: flex; align-items: center; min-height: 48px; padding: 5px 15px; border-radius: 999px; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, #fff, #FFF6F6);
  box-shadow: 0 0 0 1px rgba(184, 137, 58, .7), 0 0 0 4px rgba(255, 255, 255, .6), 0 10px 22px -10px rgba(120, 30, 70, .6);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.brand:hover { transform: scale(1.04); }
.brand:active { transform: scale(.98); }
.brand img { height: 36px; width: auto; }
.top__cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--gold); border-radius: 999px; white-space: nowrap;
  font: 500 13px/1 var(--sans); letter-spacing: .06em; color: var(--gold2); text-decoration: none;
  background: rgba(255, 255, 255, .55);
  transition: background-color .3s, color .3s, transform .25s var(--ease);
}
.top__cta:hover { background: var(--gold); color: #fff; }
.top__cta:active { transform: scale(.97); }

/* ---------- nút ---------- */
/* Nút chính: vàng "mạ" nhiều lớp (sáng ở trên, sẫm ở đáy), khung chỉ trắng mảnh bên trong, tia sáng quét thỉnh thoảng.
   Nút phụ: kính mờ viền vàng mảnh, chữ mận; rê chuột thì sáng lên. Chữ in hoa giãn chữ ở máy tính. */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font: 600 13px/1 var(--sans); letter-spacing: .04em;
  text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--ease), box-shadow .35s, background-color .3s, border-color .3s, color .3s;
}
.btn::before { content: ""; position: absolute; inset: 3px; border-radius: inherit; border: 1px solid rgba(255, 255, 255, .55); pointer-events: none; }
.btn__i { flex: none; transition: transform .35s var(--ease); }
.btn:hover .btn__i { transform: translateX(3px); }
.btn--gold {
  color: #3A2209; border-color: rgba(140, 95, 30, .55); text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 70%) -160% 0 / 55% 100% no-repeat, linear-gradient(180deg, #F7E4B2 0%, #E4C174 46%, #C99C49 100%);
  box-shadow: 0 16px 30px -14px rgba(150, 100, 30, .75), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 0 rgba(120, 80, 20, .26);
}
.btn--line {
  color: var(--ivory); border-color: rgba(184, 137, 58, .75); background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px -16px rgba(120, 40, 70, .5), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.btn--line::before { border-color: rgba(184, 137, 58, .3); }
.btn--line .btn__i { color: var(--gold2); }
/* tia sáng quét qua nút vàng, vài giây một lần: một lớp nền sáng chạy ngang trong chính nút (không dùng phần tử phụ) */
@media (prefers-reduced-motion: no-preference) {
  .btn--gold, .bar__main { animation: sweep 5s ease-in-out 2.4s infinite; }
  @keyframes sweep { 0% { background-position: -160% 0, 0 0; } 36%, 100% { background-position: 260% 0, 0 0; } }
  .hero__title em { animation: sheen 7s ease-in-out 1.8s infinite; }
  @keyframes sheen { 0% { background-position: -120% 0, 0 0; } 40%, 100% { background-position: 220% 0, 0 0; } }
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -14px rgba(190, 130, 40, .85), inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -2px 0 rgba(120, 80, 20, .26); }
.btn--gold:active { transform: translateY(0) scale(.98); }
.btn--line:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .92); border-color: var(--gold2); box-shadow: 0 18px 34px -16px rgba(120, 40, 70, .55), inset 0 1px 0 #fff; }
.btn--line:active { transform: translateY(0) scale(.98); }
.btn--lg { min-height: 56px; font-size: 13.5px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--pad); }

/* hiện dần: mặc định hiện; JS thêm .rv-on mới ẩn trước khi cuộn tới */
@media (prefers-reduced-motion: no-preference) {
  .rv-on .rv { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
  .rv-on .rv.in { opacity: 1; transform: none; }
}

/* ---------- 1. HERO ---------- */
.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; }
.hero__wrap { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); }
.hero__in { display: flex; flex-direction: column; align-items: center; text-align: center; will-change: opacity; }
/* đĩa trắng làm sân khấu cho logo: vàng đậm + xanh lá trên trắng rõ hơn trên hồng; viền vàng mảnh + bóng mận cho nổi khỏi nền */
.hero__logo, .end__logo {
  display: block; aspect-ratio: 1 / 1; height: auto; border-radius: 50%; overflow: hidden; background: radial-gradient(closest-side, #fff 78%, #FFF5F4 100%);
  box-shadow: 0 0 0 1px rgba(184, 137, 58, .6), 0 0 0 5px rgba(255, 255, 255, .55), 0 18px 34px -14px rgba(120, 30, 70, .5);
}
/* ô tròn (span) lo nền trắng, bo góc và cắt hình; ảnh logo bên trong chỉ là ảnh trong suốt, không tự bo góc hay có nền */
.logo-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero__logo { width: 162px; padding: 11px; margin: 0 0 12px; }
/* Tiêu đề: dòng nhỏ "Wedding Riverside" (chữ hoa nhỏ giãn rộng, hai bên có đường vàng) → "Thiệp Cưới" (Prata, mận) + "Online" (Allura viết tay, ánh hồng–vàng).
   Nhỏ hơn hẳn bản 12 (cỡ chữ ~1/2) nhưng nổi hơn nhờ tương phản kiểu chữ, màu và quầng sáng trắng phía sau. */
.hero__brand {
  margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 12px;
  font: 600 11px/1 var(--caps); letter-spacing: .44em; text-transform: uppercase; color: var(--gold2); white-space: nowrap;
}
.hero__brand::before, .hero__brand::after { content: ""; width: 30px; height: 1px; background: linear-gradient(90deg, rgba(185, 138, 62, 0), var(--gold)); }
.hero__brand::after { transform: scaleX(-1); }
.hero__title { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: .22em; white-space: nowrap; line-height: 1; }
.hero__title .t-a { font: 400 clamp(25px, 7.2vw, 31px)/1 var(--display); letter-spacing: .005em; color: #4A1A2B; text-shadow: 0 2px 16px rgba(255, 255, 255, .85); }
.hero__title em {
  font: 400 clamp(46px, 12.4vw, 58px)/1 var(--script); font-style: normal; color: #B03A6E;
  padding: 0 .12em .12em .02em; filter: drop-shadow(0 2px 10px rgba(255, 255, 255, .8));
}
/* "Online" ánh kim: nền hồng sẫm → hồng → vàng, cắt theo chữ, một vệt sáng chạy ngang qua (không cắt được theo chữ thì giữ màu hồng cánh sen) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__title em {
    color: transparent; -webkit-text-stroke: .5px #B03A6E;   /* viền mảnh làm nét chữ viết tay đậm hơn */
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 35%, rgba(255, 247, 214, .95) 50%, rgba(255, 255, 255, 0) 65%) -120% 0 / 45% 100% no-repeat, linear-gradient(100deg, #A02D64 0%, #C24A7C 46%, #B5802F 100%);
    -webkit-background-clip: text; background-clip: text;
  }
}
.hero__lead { margin: 12px 0 22px; max-width: 22rem; font-size: 17px; line-height: 1.5; color: var(--soft); text-wrap: balance; }
/* hai nút cạnh nhau (chính rộng hơn một chút); màn rất hẹp thì xếp dọc */
.hero__cta, .end__cta { display: grid; grid-template-columns: 1.08fr 1fr; gap: 10px; width: 100%; max-width: 360px; }
.hero__cta .btn, .end__cta .btn { width: 100%; padding-inline: 12px; }
@media (max-width: 359px) { .hero__cta, .end__cta { grid-template-columns: 1fr; } }
.hero__cue { display: none; }
/* màn thấp (iPhone SE, 320 px, điện thoại nằm ngang): vẫn giữ logo (mục đích của bản này); nhường chỗ bằng cách bỏ dòng phụ */
@media (max-height: 700px) and (max-width: 599px) {
  .hero__logo { width: clamp(88px, 16vh, 112px); padding: 7px; margin-bottom: 4px; }
  .hero__brand { display: none; }
  .hero__title .t-a { font-size: clamp(22px, 6.4vw, 27px); }
  .hero__title em { font-size: clamp(38px, 10.6vw, 47px); }
  .hero__lead { display: none; }
  .hero__cta { margin-top: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__in > * { animation: rise 1.1s var(--ease) both; animation-delay: calc(.15s + var(--i, 0) * .09s); }
  .hero__in > :nth-child(2) { --i: 1; } .hero__in > :nth-child(3) { --i: 2; } .hero__in > :nth-child(4) { --i: 3; } .hero__in > :nth-child(5) { --i: 4; }
  @keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
  }

/* ảnh dự phòng: hiện khi chưa có 3D hoặc không có WebGL */
.hero__fb {
  position: absolute; left: 50%; top: calc(var(--hdr) + 14px); margin: 0;
  width: min(58vw, 270px); height: calc(50vh - var(--hdr) - 30px); height: calc(50svh - var(--hdr) - 30px);
  transform: translateX(-50%); overflow: hidden; border-radius: 999px 999px 14px 14px;
  border: 1px solid var(--line); background: var(--char2);
  transition: opacity 1s ease, visibility 1s;
}
.hero__fb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251, 227, 225, 0) 55%, rgba(251, 227, 225, .5)); }
.hero__fb img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 58%; }
/* Ảnh dự phòng chỉ dành cho máy không có WebGL (hoặc tắt JavaScript). Còn lại ẩn hẳn ngay từ đầu: không hiện ảnh nhẫn trong hộp trước khi nhẫn 3D tải xong,
   nhẫn 3D hiện thẳng ra (lớn dần và xoay vào chỗ). display:none cũng làm ảnh (có loading="lazy") không bị tải khi không cần. */
.hero__fb { display: none; }
html.no-webgl .hero__fb { display: block; }
@media (scripting: none) { .hero__fb { display: block; } }

/* ---------- 2. DẢI MÀN HÌNH THIỆP ---------- */
.reel__pin { display: flex; flex-direction: column; padding-top: var(--hdr); padding-bottom: calc(var(--bar) + 10px); }
.reel__zone { display: none; }
.reel__main { flex: none; }
.reel__view { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.reel__view::-webkit-scrollbar { display: none; }
.reel__track { display: flex; gap: 20px; width: max-content; padding: 26px var(--pad) 30px; }
.reel__track li { flex: none; width: var(--pw); scroll-snap-align: center; }
.reel__all {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; min-height: 46px; margin: 4px auto 0; padding: 0 6px;
  font: 500 13px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--gold2);
  border-bottom: 1px solid var(--line); transition: color .3s, border-color .3s;
}
.reel__all:hover { color: var(--ivory); border-color: var(--gold); }
/* chế độ ghim: JS thêm html.reel-on (không có WebGL thì bỏ, dải tự vuốt ngang) */
html.reel-on:not(.no-webgl) .reel__pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
html.reel-on:not(.no-webgl) .reel__zone { display: block; flex: 1 1 auto; min-height: 110px; }
html.reel-on:not(.no-webgl) .reel__view { overflow: hidden; scroll-snap-type: none; }
html.reel-on:not(.no-webgl) .reel__track { will-change: transform; }
html.no-webgl .reel { padding: 36px 0 8px; }
html.no-webgl .ring-slot { display: none; }
html.no-webgl .reel__pin { padding-bottom: 8px; }
html.no-webgl .info { padding-top: 20px; }
html.no-webgl .end { padding-top: 44px; }
@media (max-height: 600px) and (max-width: 999px) { .reel__all { min-height: 36px; margin-top: 0; } .reel__track { padding-top: 20px; padding-bottom: 18px; } }

/* khung điện thoại vẽ bằng CSS, viền vàng */
.phone {
  position: relative; display: block; aspect-ratio: 390 / 844; padding: 7px; border-radius: calc(var(--pw) * .15);
  background: linear-gradient(150deg, #5f3d4d, #1f0f18 38%, #3c2431 100%);
  box-shadow: 0 0 0 1.5px rgba(216, 179, 106, .85), 0 0 0 4px rgba(251, 227, 225, .85), 0 30px 46px -20px rgba(120, 30, 60, .5), inset 0 0 0 1px rgba(255, 236, 190, .2);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease), box-shadow .6s var(--ease); -webkit-tap-highlight-color: transparent;
}
.phone.is-tilt { transition: transform .12s linear, box-shadow .6s var(--ease); }
/* dải thiệp xoay 3D: JS đặt transform/độ mờ cho từng <li> theo khoảng cách tới giữa khung và biến --g (-1…1) cho vệt sáng quét */
html.reel-on:not(.no-webgl) .reel__track li { will-change: transform, opacity; }
/* vệt sáng bóng kính quét ngang màn hình theo vị trí của thiệp; thêm đốm sáng theo con trỏ khi rê chuột */
.phone__screen { position: relative; }
.phone__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(circle at var(--gx, 50%) var(--gy, 18%), rgba(255, 255, 255, var(--ga, 0)), rgba(255, 255, 255, 0) 55%),
    linear-gradient(105deg, rgba(255, 255, 255, 0) calc(38% + var(--g, 0) * 34%), rgba(255, 255, 255, .34) calc(50% + var(--g, 0) * 34%), rgba(255, 255, 255, 0) calc(62% + var(--g, 0) * 34%));
}
.phone.is-tilt .phone__screen::after { --ga: .32; }
.phone::before {
  content: ""; position: absolute; z-index: 2; top: 13px; left: 50%; width: 24%; height: 9px; transform: translateX(-50%);
  border-radius: 99px; background: #150b10; box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .08);
}
.phone__screen { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .15 - 6px); background: #2a1a22; }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone:hover { transform: perspective(900px) translateY(-8px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 0 0 1.5px var(--gold2), 0 0 0 4px rgba(251, 227, 225, .85), 0 44px 70px -22px rgba(216, 179, 106, .4), inset 0 0 0 1px rgba(255, 236, 190, .3); }
.phone:active { transform: perspective(900px) scale(.98); }

/* ---------- 3 + 4. BA BIỂU TƯỢNG · BA BƯỚC ---------- */
.info { position: relative; z-index: 1; padding: clamp(30px, 8vw, 56px) 0 clamp(28px, 8vw, 60px); }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.why li, .steps li { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* thẻ kính mờ, viền ánh cầu vồng hồng – tím – vàng (hai lớp nền: ruột thẻ + dải màu chỉ lộ ra ở viền) */
.why li {
  gap: 14px; padding: 22px 8px 20px; border: 1.5px solid transparent; border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 246, 248, .66)) padding-box,
    linear-gradient(135deg, #FFB8D0, #E6C7FF 45%, #FFE0A6) border-box;
  box-shadow: 0 16px 34px -20px rgba(150, 50, 100, .5), 0 2px 0 rgba(255, 255, 255, .7) inset;
}
.ico {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--gold2);
  border: 1px solid transparent;
  background:
    radial-gradient(closest-side, #fff, rgba(255, 244, 246, .9)) padding-box,
    conic-gradient(from 210deg, #E8B866, #FFB8D0, #E6C7FF, #FFE0A6, #E8B866) border-box;
  box-shadow: 0 8px 18px -10px rgba(150, 90, 40, .55);
}
.ico svg { width: 30px; height: 30px; }
.cap { font: 400 16px/1.3 var(--sans); color: var(--ivory); text-wrap: balance; }

.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: clamp(40px, 10vw, 64px); }
.steps::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: .55; }
.steps li { position: relative; gap: 12px; }
.steps__n {
  position: relative; z-index: 1; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%;
  border: 1px solid var(--gold); background: var(--char); font: italic 400 22px/1 var(--serif); color: var(--gold2);
}
.steps__i { width: 30px; height: 30px; color: var(--gold); }

/* ---------- 5. CUỐI TRANG ---------- */
.end { position: relative; z-index: 1; padding: 0 0 clamp(52px, 12vw, 84px); }
.end__in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ring-slot { width: 100%; height: clamp(210px, 58vw, 260px); }
.end__logo { width: min(54vw, 208px); padding: 12px; margin: 4px 0 24px; }

/* ---------- thanh dính (điện thoại) ---------- */
/* thanh nổi bằng kính mờ, bo tròn, cách mép màn hình (không còn dải phủ cả chiều ngang) */
.bar {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; justify-content: center; gap: 8px;
  padding: 7px; border-radius: 999px; max-width: 460px; margin-inline: auto;
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 18px 40px -16px rgba(150, 40, 90, .5), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .5s var(--ease), opacity .4s;
}
.bar.is-hidden { transform: translateY(140%); opacity: 0; }
.bar a {
  flex: 1 1 auto; max-width: 420px; min-height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 999px;
  font: 600 13px/1 var(--sans); letter-spacing: .04em; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--ease);
}
.bar a:active { transform: scale(.97); }
.bar__main { color: #1a1409; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 70%) -160% 0 / 55% 100% no-repeat, linear-gradient(180deg, #EFD296, #D8B36A 58%, #C49A4C); box-shadow: 0 10px 26px -10px rgba(216, 179, 106, .7), inset 0 1px 0 rgba(255, 255, 255, .5); }
.bar__alt { flex: 0 0 41%; color: var(--ivory); border: 1px solid rgba(184, 137, 58, .75); background: rgba(255, 255, 255, .92); }

/* ---------- máy tính, hoặc điện thoại nằm ngang (cùng bố cục hai cột) ---------- */
@media (min-width: 1000px), (min-width: 600px) and (max-height: 560px) and (orientation: landscape) {
  :root { --pad: 44px; --hdr: 76px; --bar: 0px; --pw: clamp(96px, calc((100vh - 290px) * .4627), 290px); }
  @supports (height: 100svh) { :root { --pw: clamp(96px, calc((100svh - 290px) * .4627), 290px); } }
  .bar { display: none; }
  .brand { min-height: 56px; padding: 6px 18px; }
  .brand img { height: 44px; }
  .top__cta { min-height: 48px; padding: 0 26px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }

  .hero { align-items: center; }
  .hero__wrap { padding-bottom: 0; }
  .hero__in { align-items: flex-start; text-align: left; max-width: 38rem; }
  .hero__logo { width: clamp(118px, 24vh, 214px); padding: 10px; margin-bottom: 20px; }
  .hero__brand { justify-content: flex-start; margin-bottom: 14px; font-size: 12px; }
  .hero__brand::before { display: none; }
  .hero__brand::after { flex: 0 0 64px; transform: none; background: linear-gradient(90deg, var(--gold), rgba(185, 138, 62, 0)); }
  .hero__title { justify-content: flex-start; }
  .hero__title .t-a { font-size: clamp(30px, min(2.7vw, 5.4vh), 50px); }
  .hero__title em { font-size: clamp(56px, min(5.2vw, 10.2vh), 92px); }
  .hero__lead { margin: clamp(10px, 2.2vh, 20px) 0 clamp(18px, 3.8vh, 34px); max-width: none; font-size: clamp(16px, 2.2vh, 20px); }
  .hero__cta, .end__cta { display: flex; gap: 14px; max-width: none; width: auto; }
  .hero__cta .btn, .end__cta .btn { width: auto; padding: 0 30px; min-height: 56px; font-size: 12.5px; letter-spacing: .15em; text-transform: uppercase; }
  .hero__cue { display: block; position: absolute; right: var(--pad); bottom: 38px; width: 1px; height: 72px; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: cue 2.6s var(--ease) infinite; }
  @keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
  .hero__fb { left: auto; right: calc(var(--pad) + 6vw); top: 50%; width: min(32vw, 470px); height: min(70vh, 640px); transform: translateY(-50%); }

  .reel__pin { flex-direction: row; align-items: center; padding: 0; }
  html.reel-on:not(.no-webgl) .reel__zone { flex: 0 0 clamp(260px, 36vw, 640px); min-height: 0; align-self: stretch; }
  .reel__main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
  .reel__view { width: 100%; padding: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 100%); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 100%); }
  .reel__track { gap: clamp(22px, 3vw, 44px); padding: clamp(20px, 3.6vh, 36px) 56px clamp(22px, 4vh, 40px) 40px; }
  html.reel-on:not(.no-webgl) .reel__view { overflow: hidden; }
  .reel__all { margin-top: 10px; align-self: flex-start; margin-left: 40px; }

  .why { gap: 22px; max-width: 920px; margin-inline: auto; }
  .why li { padding: 34px 14px 30px; gap: 18px; border-radius: 26px; }
  .ico { width: 78px; height: 78px; }
  .ico svg { width: 36px; height: 36px; }
  .cap { font-size: 18px; }
  .steps { gap: 22px; max-width: 920px; margin-inline: auto; margin-top: 76px; }
  .steps::before { top: 26px; }
  .steps__n { width: 54px; height: 54px; font-size: 26px; }
  .steps__i { width: 34px; height: 34px; }

  .ring-slot { height: clamp(170px, 38vh, 300px); }
  .end__logo { width: clamp(110px, 24vh, 200px); margin-bottom: 28px; }
  .end__cta { justify-content: center; }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --hdr: 58px; }
  .brand { min-height: 44px; padding: 4px 13px; }
  .brand img { height: 32px; }
  .top__cta { min-height: 44px; }
  .ring-slot { height: 28vh; min-height: 100px; }
  .end__logo { width: 20vh; min-width: 70px; margin: 0 0 10px; }
  .btn--lg { min-height: 50px; }
  .end { padding-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .btn, #gl, .bar, .top, .phone { transition-duration: .01ms; }
  .hero__cue { animation: none; }
}

/* điện thoại nằm ngang (thấp): logo nhỏ hơn bản máy tính để vừa hai cột */
@media (min-width: 600px) and (max-height: 560px) and (orientation: landscape) {
  .hero__logo { width: clamp(72px, 21vh, 100px); padding: 6px; margin-bottom: 8px; }
  .hero__title .t-a { font-size: clamp(22px, 5vh, 30px); }
  .hero__title em { font-size: clamp(40px, 9.6vh, 54px); }
  .hero__brand { margin-bottom: 8px; }
  .hero__lead { margin: 8px 0 14px; }
}

/* màn dọc cực thấp (ví dụ 568×320 nằm ngang nhưng hẹp hơn 600): không đủ chỗ cho logo lớn, chỉ còn logo nhỏ ở đầu trang */
@media (max-height: 420px) and (max-width: 599px) { .hero__logo { display: none; } }

/* hộp thoại "Liên hệ cộng tác": shared/contact.css (dùng chung với kho mẫu /thiep/) */

/* chú thích ba bước dài hơn: chữ nhỏ hơn một chút ở điện thoại để vẫn gọn trong ba cột */
.steps .cap { font-size: 14px; line-height: 1.35; }
@media (min-width: 900px) { .steps .cap { font-size: 18px; } }
