/* =========================================================
   Chrysadore — lớp "nhiều ảnh, ít chữ" (v7)
   Mặc định là bản tĩnh; sau.js thêm html.dong khi được phép chuyển động.
   Mẫu chuyển động viết lại từ các demo trên 21st.dev:
   zoom parallax, hero parallax, parallax floating, scroll expansion,
   parallax scroll grid, image trail.
   ========================================================= */

/* ---------- 2. Xưởng: phóng to dần ---------- */
.zoom { position: relative; background: var(--ink); color: var(--paper); height: 100vh; height: 100svh; }
.dong .zoom { height: 300vh; }
.zoom-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.zoom-el { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; will-change: transform; pointer-events: none; }
.zoom-img { position: relative; width: 25vw; height: 25vh; overflow: hidden; }
.zoom-img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.18) saturate(.85); }
.z1 .zoom-img { top: -30vh; left: 5vw;    width: 35vw; height: 30vh; }
.z2 .zoom-img { top: -10vh; left: -25vw;  width: 20vw; height: 45vh; }
.z3 .zoom-img {             left: 27.5vw; width: 25vw; height: 25vh; }
.z4 .zoom-img { top: 27.5vh; left: 5vw;   width: 20vw; height: 25vh; }
.z5 .zoom-img { top: 27.5vh; left: -22.5vw; width: 30vw; height: 25vh; }
.z6 .zoom-img { top: 22.5vh; left: 25vw;  width: 15vw; height: 15vh; }
.zoom-stick::after { /* làm tối mép dưới để chữ đọc được */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 18, 15, .88) 0%, rgba(20, 18, 15, .25) 38%, transparent 60%);
}
.zoom-copy { position: absolute; z-index: 3; left: max(24px, calc((100vw - 1180px) / 2)); right: 24px; bottom: 7vh; }
.zoom-copy .eyebrow { color: #f2a6ae; }
.zoom-title { font-family: var(--f-display); font-weight: 340; font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: .95; letter-spacing: -.02em; }
.zoom-title em { color: var(--kraft); font-style: italic; }
.zoom-where { margin: 14px 0 0; font-size: 22px; color: #ddd3c1; }
.zoom-stats { display: flex; flex-wrap: wrap; gap: 14px 46px; margin: 26px 0 0; }
.zoom-stats div { border-top: 2px dashed rgba(244, 237, 224, .3); padding-top: 12px; }
.zoom-stats dt { font-family: var(--f-display); font-weight: 300; font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1; white-space: nowrap; }
.zoom-stats dd { margin: 6px 0 0; font-family: var(--f-hand); font-size: 18px; color: var(--kraft); }

/* ---------- 3. Mắt thấy tai nghe: ba hàng nghiêng ---------- */
.mosaic { padding: 130px 0 120px; overflow: hidden; }
.mosaic-head { margin-bottom: 60px; }
.mosaic-head .sec-title { max-width: 14ch; }
.mosaic-tilt { perspective: 1000px; }
.mosaic-tilt > * { transform-style: preserve-3d; }
.mo-row { display: flex; gap: 22px; width: max-content; margin: 0 0 22px; will-change: transform; }
.mo-row.r1 { margin-left: -4vw; }
.mo-row.r2 { margin-left: -22vw; }
.mo-row.r3 { margin-left: -10vw; }
.mo-card { margin: 0; flex: none; width: clamp(220px, 27vw, 430px); aspect-ratio: 3 / 2; overflow: hidden; border-radius: 3px; position: relative;
  box-shadow: 0 18px 40px -18px rgba(28, 26, 23, .55); }
.mo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .6s; filter: sepia(.15); }
.mo-card:hover img { transform: scale(1.06); filter: none; }
.mo-card.shoe { background: var(--sheet) var(--noise); width: clamp(170px, 18vw, 290px); aspect-ratio: 1; }
.mo-card.shoe img { object-fit: contain; mix-blend-mode: multiply; filter: none; padding: 6%; }
.r3 .mo-card { aspect-ratio: 4 / 5; width: clamp(160px, 17vw, 270px); }
.r3 .mo-card img { filter: sepia(.35) saturate(.7) contrast(1.05); }

/* ---------- 4. Vật liệu: ảnh trôi ---------- */
.float { overflow: hidden; }
.float-stage { position: relative; width: 100%; height: max(120vh, 820px); }
.fl {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); margin: 0;
  rotate: var(--r); will-change: transform;
  background: var(--sheet); padding: 7px 7px 9px; box-shadow: 0 14px 30px -12px rgba(28, 26, 23, .45);
}
.fl img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fl:not(.own) img { filter: sepia(.3) saturate(.75); }
.fl figcaption { font-size: 16px; line-height: 1.2; padding: 6px 2px 0; color: var(--ink); }
.fl.own { background: #fff; }
.float-core { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 84vw); text-align: center; pointer-events: none; }
.float-core .eyebrow { margin-bottom: 18px; }
.float-core .bn-stamp { display: inline-block; font-family: var(--f-hand); font-size: 18px; color: var(--olive-d); border: 2px solid var(--olive); padding: 2px 14px; border-radius: 4px; rotate: -4deg; }
.float-num { margin: 6px 0 0; font-family: var(--f-display); font-weight: 300; font-size: clamp(5rem, 15vw, 12.5rem); line-height: .9; letter-spacing: -.04em; color: var(--olive-d); white-space: nowrap; }
.float-num small { font-size: .45em; margin-left: .05em; }
.float-label { font-family: var(--f-display); font-style: italic; font-size: clamp(1.25rem, 2.2vw, 1.8rem); margin: 10px 0 8px; }
.float-note { font-size: 16px; color: var(--pencil); margin: 0; }

/* ---------- 6. Mở ra bộ sưu tập ---------- */
.expand { position: relative; background: var(--paper) var(--noise); height: 100vh; height: 100svh; }
.dong .expand { height: 260vh; }
.expand-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.expand-media { position: absolute; inset: 0; overflow: hidden; }
.expand-media img { width: 100%; height: 100%; object-fit: cover; }
.expand-media::after { content: ""; position: absolute; inset: 0; background: rgba(20, 18, 15, .28); }
.expand-title { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .3em; padding: 0 24px; text-align: center;
  font-family: var(--f-display); font-weight: 340; font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: 1; letter-spacing: -.02em; color: var(--paper); }
.expand-title em { color: var(--kraft); }
.dong .expand-media { clip-path: inset(27% 33% round 18px); }
.dong .expand-title { color: var(--paper); mix-blend-mode: difference; }
.dong .expand-media::after { opacity: 0; }

/* bộ sưu tập ngay sau: bớt khoảng trên vì không còn tiêu đề */
.trang-chu .collection { padding-top: 110px; }

/* ---------- 8. Những bàn tay ---------- */
.hands { padding: 140px 0 0; overflow: hidden; }
.hands .sec-head { margin-bottom: 56px; }
.hands-grid { width: min(1240px, 100% - 32px); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; height: 150vh; min-height: 980px; overflow: hidden; align-items: start;
  -webkit-mask: linear-gradient(to bottom, #000 82%, transparent); mask: linear-gradient(to bottom, #000 82%, transparent); }
.hg-col { display: grid; gap: 18px; will-change: transform; }
.hg-col.c2 { margin-top: -12vh; }
.hg-col figure { margin: 0; position: relative; overflow: hidden; border-radius: 3px; aspect-ratio: 4 / 5; background: var(--kraft-d); }
.hg-col img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.22) saturate(.85); transition: filter .5s, transform .8s; }
.hg-col figure:hover img { filter: none; transform: scale(1.04); }
.hg-col .who figcaption { position: absolute; left: 10px; right: 10px; bottom: 10px; font-size: 17px; line-height: 1.2; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .85); }

/* ---------- 9. Kể chuyện ---------- */
.tell { padding: 130px 0 140px; text-align: center; }
.tell-line { font-size: clamp(1.8rem, 4.4vw, 3.4rem); line-height: 1.25; margin: 0 auto 70px; max-width: 18ch; }
.tell-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 980px; margin: 0 auto; }
.tell-card { position: relative; display: block; text-decoration: none; background: var(--sheet); padding: 12px 12px 18px; rotate: var(--r);
  box-shadow: 0 18px 36px -16px rgba(28, 26, 23, .5); transition: rotate .5s var(--ease-pop), translate .5s var(--ease-pop), box-shadow .4s; }
.tell-card:hover, .tell-card:focus-visible { rotate: 0deg; translate: 0 -8px; box-shadow: 0 28px 46px -18px rgba(28, 26, 23, .55); }
.tell-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(.2); }
.tell-card .tc-no { display: block; margin-top: 12px; font-size: 17px; color: var(--rose); }
.tell-card b { display: block; font-family: var(--f-display); font-weight: 450; font-size: 1.45rem; line-height: 1.15; }
.tell-more { display: inline-block; margin-top: 64px; font-size: 22px; color: var(--rose); text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- 10. Trường học ---------- */
.trang-chu .school { min-height: 92vh; display: grid; align-items: center; overflow: hidden; padding: 150px 0; }
.trang-chu .school .wrap { padding-left: 0; z-index: 2; }
.trang-chu .school .sec-head { margin-bottom: 18px; }
.sc-flow { text-align: center; font-size: clamp(19px, 2.2vw, 25px); color: var(--olive-d); margin: 0 auto 54px; max-width: 30ch; }
.trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.trail img { position: absolute; left: 0; top: 0; width: 150px; height: auto; pointer-events: none; will-change: transform, opacity; filter: drop-shadow(0 10px 14px rgba(28, 26, 23, .3)); }
.sc-pol { position: absolute; z-index: 1; margin: 0; background: #fff; padding: 8px 8px 26px; box-shadow: 0 16px 30px -14px rgba(28, 26, 23, .5); }
.sc-pol img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(.3) saturate(.75); }
.sc-pol.p1 { top: 9%; left: 4%; width: clamp(150px, 15vw, 230px); rotate: -7deg; }
.sc-pol.p2 { top: 13%; right: 5%; width: clamp(160px, 17vw, 260px); rotate: 5deg; }
.sc-pol.p3 { bottom: 9%; right: 13%; width: clamp(130px, 12vw, 190px); rotate: -3deg; }

/* ---------- Chân trang ---------- */
.foot-credit { font-size: 13px; opacity: .55; margin: 30px 0 6px; }

/* ---------- Trang câu chuyện: đầu trang ---------- */
.ch-head { padding: 120px 0 90px; overflow: hidden; }
.ch-strip { position: relative; z-index: 1; display: flex; justify-content: center; gap: 14px; margin: 0 -40px 60px; rotate: -2deg; }
.ch-strip img { height: clamp(170px, 30vh, 320px); width: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; filter: sepia(.25) saturate(.8); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); }
.ch-strip img:nth-child(even) { translate: 0 22px; }
.ch-copy { z-index: 1; text-align: center; }
.ch-back { display: inline-block; font-size: 19px; color: var(--kraft); margin-bottom: 18px; text-underline-offset: 5px; }
.ch-title { font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1.1; margin-bottom: 18px; }
.ch-sub { font-size: 19px; color: #ddd3c1; max-width: 46ch; margin: 0 auto; }

/* ---------- Màn hình vừa ---------- */
@media (max-width: 900px) {
  .zoom-img { width: 40vw; height: 22vh; }
  .z1 .zoom-img { width: 50vw; height: 22vh; top: -30vh; left: 6vw; }
  .z2 .zoom-img { width: 30vw; height: 30vh; top: -6vh; left: -34vw; }
  .z3 .zoom-img { width: 30vw; height: 22vh; left: 37vw; }
  .z4 .zoom-img { width: 34vw; height: 18vh; top: 25vh; left: 8vw; }
  .z5 .zoom-img { width: 40vw; height: 18vh; top: 25vh; left: -30vw; }
  .z6 .zoom-img { width: 22vw; height: 12vh; top: 17vh; left: 36vw; }
  .zoom-stats { gap: 12px 26px; }
  .fl { width: calc(var(--w) * 1.9); }
  .tell-cards { gap: 22px; }
  .sc-pol.p3 { display: none; }
  .ch-strip img:nth-child(n+5) { display: none; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 640px) {
  .mosaic { padding: 100px 0 90px; }
  .mo-row { gap: 12px; margin-bottom: 12px; }
  .mo-card { width: 62vw; }
  .mo-card.shoe { width: 40vw; }
  .r3 .mo-card { width: 38vw; }
  .float-stage { height: 150vh; min-height: 900px; }
  .fl { width: calc(var(--w) * 2.5); padding: 4px 4px 6px; }
  .fl figcaption { font-size: 13px; }
  .fl:not(.own):nth-of-type(odd) { display: none; }
  .float-core { width: 88vw; background: radial-gradient(closest-side, rgba(240, 238, 228, .95), rgba(240, 238, 228, .7) 70%, transparent); padding: 30px 0; }
  .hands-grid { gap: 8px; height: 120vh; min-height: 720px; }
  .hg-col { gap: 8px; }
  .hg-col .who figcaption { font-size: 13px; left: 6px; bottom: 6px; }
  .tell-cards { grid-template-columns: 1fr; max-width: 300px; gap: 40px; }
  .sc-pol.p1 { top: 3%; left: -4%; width: 34vw; }
  .sc-pol.p2 { top: 5%; right: -5%; width: 36vw; }
  .trang-chu .school { padding: 210px 0 120px; }
  .ch-head { padding: 100px 0 70px; }
  .ch-strip { gap: 8px; }
  .ch-strip img:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tell-card, .mo-card img, .hg-col img { transition: none; }
}
