:root {
  --paper: #efe5cf; --ink: #231a15; --soft: #443429; --son: #7a1420; --line: rgba(35,26,21,.25); --wood: #4a2412;
  --script: "Charm", cursive; --serif: "Noto Serif", Georgia, serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55 .9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .17 0'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper) var(--grain); color: var(--ink); font: 300 16px/1.75 var(--serif); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h2 { font: 400 clamp(2.5rem, 5vw, 4.4rem)/1.12 var(--script); color: var(--son); }
h3 { font: 400 1.75rem/1.2 var(--script); }
a { color: var(--son); }
:focus-visible { outline: 2px solid var(--son); outline-offset: 3px; }
ol, ul { list-style: none; margin: 0; padding: 0; }
.kicker { margin: 0 0 12px; font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--son); }

.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--paper) var(--grain); animation: unroll 1.5s cubic-bezier(.7,0,.2,1) both; }
@keyframes unroll { from { clip-path: inset(0 47%); } to { clip-path: inset(0 0); } }
.range { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.track { position: relative; display: flex; align-items: stretch; height: 100%; width: max-content; will-change: transform; }
.sheet { position: relative; height: 100%; padding: 64px 0 70px; display: flex; flex: none; }

.roller { position: absolute; top: 0; bottom: 0; width: 30px; z-index: 5; background: linear-gradient(90deg, #2c1309, #8a4f28 42%, #b9804d 52%, #5b2d14 74%, #2a1208); box-shadow: 0 0 22px rgba(40,15,5,.55); }
.roller.left { left: 0; } .roller.right { right: 0; }
.roller::before, .roller::after { content: ""; position: absolute; left: 0; right: 0; height: 34px; background: linear-gradient(90deg, #3d0810, #a32331 50%, #3d0810); }
.roller::before { top: 0; } .roller::after { bottom: 0; }

.ink { opacity: 0; filter: blur(9px); translate: 0 8px; transition: opacity 1.2s ease, filter 1.2s ease, translate 1.2s ease; }
.ink.in { opacity: 1; filter: none; translate: 0 0; }

.cover { width: 100vw; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 50px 76px; }
.seal-big { width: min(38vh, 340px); }
.word { width: min(30vh, 280px); }
.cover h1 { font: 400 clamp(2rem, 4.8vh, 3.4rem)/1.2 var(--script); color: var(--ink); }
.hint { margin: 6px 0 0; font-size: .9rem; color: var(--soft); animation: nudge 2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(10px); } }

.story { width: max(1180px, 100vw); align-items: center; gap: clamp(36px, 5vw, 86px); padding-left: 90px; padding-right: 60px; }
.vertical { writing-mode: vertical-rl; font-size: clamp(4.4rem, 13vh, 8rem); line-height: 1; }
.stanza { width: 450px; flex: none; }
.big { font: 400 clamp(1.5rem, 3.1vh, 1.95rem)/1.4 var(--serif); margin: 0 0 16px; }
.stanza p:last-child { color: var(--soft); margin: 0; }
.wash { margin: 0; flex: none; height: min(66vh, 560px); aspect-ratio: .86; -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }
.wash img { width: 100%; height: 100%; object-fit: cover; }

.process { gap: 36px; padding-left: 60px; padding-right: 60px; align-items: center; }
.head { width: 310px; flex: none; }
.process ol { display: flex; gap: 22px; height: 100%; align-items: center; }
.process li { width: 230px; padding-left: 18px; border-left: 1px solid var(--line); }
.process li:nth-child(odd) { translate: 0 -8vh; }
.process li:nth-child(even) { translate: 0 8vh; }
.process li span { font: 400 3rem/1 var(--script); color: var(--son); }
.process li p, .brew li p { margin: 6px 0 0; font-size: .92rem; line-height: 1.65; color: var(--soft); }
.process li.ink { opacity: 0; } .process li.ink.in { opacity: 1; }

.goods { gap: 44px; padding-left: 70px; padding-right: 60px; align-items: center; }
.goods .head { width: 270px; }
.note { margin: 12px 0 0; font-size: .84rem; color: var(--soft); }
.goods ul { display: flex; gap: 30px; align-items: center; }
.goods li { width: 262px; flex: none; }
.goods li:nth-child(even) { margin-top: 5vh; }
.goods li:nth-child(odd) { margin-bottom: 5vh; }
.goods img { width: min(100%, 27vh); aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: 12px; box-shadow: 0 0 0 1px var(--son), 0 0 0 7px var(--paper), 0 0 0 8px var(--line); }
.grade { margin: 0; font-size: .74rem; font-weight: 500; color: #55701f; }
.goods h3 { color: var(--son); font-size: 2rem; }
.desc { margin: 2px 0 6px; font-size: .86rem; line-height: 1.55; color: var(--soft); }
.price { margin: 0; }
.price strong { font-weight: 500; font-size: 1.12rem; }
.price span { font-size: .78rem; color: var(--soft); }
.goods li a { display: inline-block; padding: 8px 0; font-size: .86rem; font-weight: 500; text-underline-offset: 4px; }

.brew { gap: 46px; padding-left: 70px; padding-right: 60px; align-items: center; }
.brew .head { width: 340px; }
.brew ol { display: flex; gap: 26px; }
.brew li { width: 210px; }
.brew li b { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 12px; border-radius: 50%; border: 1px solid var(--son); color: var(--son); font: 400 1.5rem var(--script); }

.end { width: 100vw; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding-inline: 60px; }
.end dl { width: min(720px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin: 10px 0; }
.end dl div { padding: 10px 0; border-top: 1px solid var(--line); }
dt { font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--son); }
dd { margin: 0; } dd em { color: var(--soft); }
.credits { font-size: .78rem; color: var(--soft); max-width: 720px; }
.credits summary { cursor: pointer; padding: 8px; }
.credits[open] { position: absolute; bottom: 62px; background: var(--paper); padding: 8px 20px; border: 1px solid var(--line); text-align: left; z-index: 2; }

.dots { position: fixed; z-index: 8; left: 50%; bottom: 16px; translate: -50% 0; display: flex; gap: clamp(10px, 2vw, 26px); padding: 4px 18px; background: rgba(239,229,207,.88); border: 1px solid var(--line); }
.dots a { padding: 7px 2px; color: var(--soft); font-size: .78rem; text-decoration: none; white-space: nowrap; }
.dots a:hover, .dots a[data-on] { color: var(--son); box-shadow: 0 1px 0 var(--son); }

/* Dien thoai va che do giam chuyen dong: doc binh thuong, khong ghim ngang */
.vertical-mode .pin { height: auto; }
.vertical-mode .stage { position: relative; height: auto; animation: none; overflow: hidden; }
.vertical-mode .track { display: block; width: auto; height: auto; transform: none !important; }
.vertical-mode .range { display: none; }
.vertical-mode .roller { display: none; }
.vertical-mode .dots { display: none; }
.vertical-mode .sheet { display: block; width: auto; height: auto; padding: 56px 20px; }
.vertical-mode .cover { min-height: 100svh; display: flex; }
.vertical-mode .end { display: flex; padding-bottom: 48px; }
.vertical-mode .seal-big { width: 56vw; max-width: 300px; }
.vertical-mode .word { width: 48vw; max-width: 260px; }
.vertical-mode .vertical { writing-mode: horizontal-tb; font-size: clamp(3.4rem, 17vw, 5rem); margin-bottom: 16px; }
.vertical-mode .stanza, .vertical-mode .head { width: auto; margin-bottom: 26px; }
.vertical-mode .wash { height: auto; margin-top: 24px; }
.vertical-mode .process ol, .vertical-mode .goods ul, .vertical-mode .brew ol { display: grid; gap: 24px; height: auto; }
.vertical-mode .process li { width: auto; translate: 0 8px; }
.vertical-mode .process li.in { translate: 0 0; }
.vertical-mode .goods li, .vertical-mode .brew li { width: auto; margin: 0; }
.vertical-mode .goods img { width: 100%; max-width: 320px; margin-inline: auto; }
.vertical-mode .end dl { grid-template-columns: 1fr; }
.vertical-mode .credits[open] { position: static; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .ink { opacity: 1; filter: none; translate: 0 0; }
}
