/* Áo dài Hoàng Lan, homepage. Every section is as tall as its content: nothing pins.
   Order: tokens, base, surfaces (brocade grounds, glass), navigation, then one block per scene,
   then phone layout and reduced motion.
   Class switches set by the inline script in <head>:
     .js      JavaScript is running
     .motion  animations are on (JavaScript and no reduced-motion preference)
     .intro   the opening silk sweep is covering the screen
     .is-ready  the hero may show itself */

:root {
  --gold: #B48C2E;
  --gold-deep: #8A6612;
  --gold-light: #D9B45A;
  --ink: #211C15;
  --ink-soft: #4A4133;
  --ivory: #FBF8F1;
  --hair: rgba(33, 28, 21, .14);
  --hair-light: rgba(251, 248, 241, .16);

  /* one radius scale, two motion curves */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --pad: clamp(20px, 4vw, 56px);
  --vh: 100vh;
  /* brocade grounds: phoenix on ivory, song hỷ on gold and on ink, always at whisper strength */
  --tex-size: 1200px;
  --tex-ivory: url(../images/phuong-nga.jpg);
  --tex-gold: url(../images/song-hy-vang.jpg);
  --tex-ink: url(../images/song-hy-den.jpg);
}
@supports (height: 100svh) { :root { --vh: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory) var(--tex-ivory) 0 0 / var(--tex-size);
  color: var(--ink);
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; }
img { max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[data-theme="dark"] :focus-visible, .lightbox :focus-visible, .actionbar :focus-visible { outline-color: var(--ivory); }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 400; background: var(--ink); color: var(--ivory); padding: 12px 20px; border-radius: var(--r-pill); transition: top .2s; }
.skip:focus { top: 12px; }

/* Vietnamese stacks diacritics: headings never go below 1.14 line height */
h1, h2 { font-weight: 600; letter-spacing: -.035em; line-height: 1.14; }
h2, h3 { text-wrap: balance; }
h2 { font-size: clamp(32px, 4.6vw, 68px); }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 30px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .6s var(--ease), background-color .3s, color .3s, border-color .3s;
}
@media (hover: hover) { .btn:hover { transform: scale(1.035); } }
.btn:active { transform: scale(.98); }
.btn--ink { background: var(--ink) var(--tex-ink) 50% 50% / 600px; color: var(--ivory); }
.btn--gold { background: var(--gold) var(--tex-gold) 50% 50% / 600px; color: var(--ink); }
.btn--glass {
  background: rgba(251, 248, 241, .5); border-color: rgba(33, 28, 21, .16);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
}
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  display: inline-block; padding: 10px 0; font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 1px no-repeat;
  transition: background-size .5s var(--ease);
}
@media (hover: hover) { .link:hover { background-size: 0 1px; background-position: 100% calc(100% - 8px); } }

/* ---------- Reveal on entering the screen (time-based, once) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hidden brocade under the pointer (built by main.js inside [data-lume]) ----------
   A soft round window follows the pointer; inside it sits a second copy of the ground,
   registered exactly, with its contrast raised. Only transforms move. */
[data-lume] { position: relative; }
.lume { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lume__spot {
  position: absolute; left: 0; top: 0; width: 560px; height: 560px; margin: -280px 0 0 -280px; overflow: hidden; border-radius: 50%;
  -webkit-mask-image: radial-gradient(closest-side, #000 0, rgba(0, 0, 0, .55) 42%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0, rgba(0, 0, 0, .55) 42%, transparent 100%);
  opacity: 0; transition: opacity .9s var(--ease); will-change: transform;
}
.lume.is-on .lume__spot { opacity: 1; }
@media (hover: none) { .lume.is-on .lume__spot { opacity: .55; scale: .72; } }
.lume__tex { position: absolute; left: 0; top: 0; background-size: var(--tex-size); will-change: transform; }
.lume--ivory .lume__tex { background-image: var(--tex-ivory); filter: url(#lume-ivory); }
.lume--gold .lume__tex { background-image: var(--tex-gold); filter: url(#lume-gold); }
.lume--ink .lume__tex { background-image: var(--tex-ink); filter: url(#lume-ink); }
/* content sits above the light */
.types__in, .prices__in, .afar__col, .about__in, .journey > :not(.lume), .contact > .wrap { position: relative; z-index: 1; }
.lume { border-radius: inherit; }

/* ---------- Opening sweep ----------
   The cover exists only while the script-set class "intro" is present. The live silk canvas is
   lifted above everything and covers the screen from its first frame, then is drawn aside. */
html.intro::before, html.intro-fade::before {
  content: ""; position: fixed; inset: 0; z-index: 290; pointer-events: none;
  background: var(--gold) var(--tex-gold) 0 0 / var(--tex-size);
}
html.intro.intro-go::before { opacity: 0; transition: opacity .25s linear; }
html.intro-fade::before { animation: cover-out .4s ease both; }
@keyframes cover-out { to { opacity: 0; visibility: hidden; } }

/* ---------- 0. Navigation: a floating glass bar that condenses on scroll ---------- */
.nav { position: fixed; z-index: 50; inset: 0 0 auto 0; padding: 12px 12px 0; pointer-events: none; }
.nav__bar {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: 12px 28px;
  max-width: 1336px; height: 68px; margin-inline: auto; padding: 0 9px 0 30px; border-radius: var(--r-pill);
  background: rgba(251, 248, 241, .46);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 1px rgba(33, 28, 21, .05), 0 18px 44px -26px rgba(33, 28, 21, .32);
  transition: max-width .9s var(--ease), height .9s var(--ease), padding .9s var(--ease), background-color .5s, border-color .5s, color .5s, opacity .9s var(--ease), transform .9s var(--ease);
}
.nav.is-stuck .nav__bar { max-width: 1180px; height: 58px; padding-left: 26px; padding-right: 7px; background: rgba(251, 248, 241, .72); }
.nav.is-dark .nav__bar { background: rgba(33, 28, 21, .52); border-color: var(--hair-light); color: var(--ivory); box-shadow: 0 18px 44px -26px rgba(0, 0, 0, .6); }
.js:not(.is-ready) .nav__bar { opacity: 0; transform: translateY(-18px); }

/* The logo is taller than the bar on purpose: the orchid figure sits a little proud of the glass, top and bottom. */
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand__top { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.brand__logo { position: relative; display: block; width: 172px; height: 82px; flex: none; transition: width .9s var(--ease), height .9s var(--ease); }
.brand__img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .5s; }
.brand__img--light { opacity: 0; }
.nav.is-dark .brand__img { opacity: 0; }
.nav.is-dark .brand__img--light { opacity: 1; }
.nav.is-stuck .brand__logo { width: 150px; height: 72px; }
.nav__links { display: flex; align-items: center; gap: clamp(4px, 1vw, 12px); margin-left: auto; font-size: 15px; font-weight: 500; }
.nav__links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap; border-radius: var(--r-pill); text-decoration: none; transition: background-color .4s, color .4s; }
@media (hover: hover) { .nav__links a:hover { background: rgba(33, 28, 21, .07); } .nav.is-dark .nav__links a:hover { background: rgba(251, 248, 241, .1); } }
.nav__links a.is-current { background: rgba(33, 28, 21, .08); }
.nav.is-dark .nav__links a.is-current { background: rgba(251, 248, 241, .13); }
.nav__call { min-height: 48px; padding: 8px 22px; font-size: 15px; transition: min-height .9s var(--ease), transform .6s var(--ease); }
.nav.is-stuck .nav__call { min-height: 44px; }

/* The one stitched line on the page: scroll progress as a running stitch, led by a needle */
.thread { position: absolute; left: 34px; right: 34px; bottom: -1px; height: 2px; pointer-events: none; opacity: 0; transition: opacity .6s; }
.nav.is-stuck .thread { opacity: 1; }
.thread__line {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--gold-deep) 0 9px, transparent 9px 14px);
  clip-path: inset(0 calc((1 - var(--progress, 0)) * 100%) 0 0);
}
.thread__lead { position: absolute; inset: 0; transform: translate3d(calc(var(--progress, 0) * 100%), 0, 0); }
.thread__needle { position: absolute; top: -4px; left: -6px; }
.thread__needle path { fill: var(--ink); }
.thread__needle ellipse { fill: var(--ivory); }
.nav.is-dark .thread__line { background: repeating-linear-gradient(90deg, var(--gold-light) 0 9px, transparent 9px 14px); }
.nav.is-dark .thread__needle path { fill: var(--ivory); }
.nav.is-dark .thread__needle ellipse { fill: var(--ink); }

/* ---------- 1. Hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: var(--vh); padding: 128px 0 clamp(40px, 8vh, 84px); }
/* the canvas is 1.6 times the hero's height (EXT in silk.js): the cloth's tail trails behind the next scene while scrolling */
.hero__silk { position: absolute; inset: 0 0 auto 0; height: 160%; pointer-events: none; overflow: clip; }
.hero__silk canvas { display: block; width: 100%; height: 100%; }
.hero__silk.is-over { z-index: 300; }
/* still picture of the same silk: no JavaScript, no WebGL */
html:not(.js) .hero__silk, .hero__silk.is-still { height: 100%; background: url(../images/silk-still.webp) 100% 0 / auto 100% no-repeat; }
@media (max-width: 640px) { html:not(.js) .hero__silk, .hero__silk.is-still { background: url(../images/silk-still-m.webp) 50% 0 / 100% auto no-repeat; } }
html:not(.js) .nav__bar { background: rgba(251, 248, 241, .9); }
.hero__in { position: relative; z-index: 1; }
.hero__title { display: flex; flex-direction: column; align-items: flex-start; font-size: clamp(46px, 8.7vw, 138px); letter-spacing: -.045em; }
/* each line rises out of a mask; the padding keeps stacked diacritics and descenders inside it */
.line { display: block; overflow: hidden; padding: .2em .06em .2em; margin: -.2em -.06em -.2em; }
.line__in { display: block; will-change: transform; }
.hero__side { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 56px; margin-top: clamp(18px, 3.2vh, 40px); }
.hero__side p { flex: 0 1 31em; color: var(--ink-soft); font-weight: 500; }
.js .line__in { transform: translateY(125%); }
.js .hero__side { opacity: 0; transform: translateY(24px); }
.is-ready .line__in { transform: none; transition: transform 1.4s var(--ease); }
.is-ready .line:nth-child(2) .line__in { transition-delay: .12s; }
.is-ready .hero__side { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .45s, transform 1.2s var(--ease) .45s; }

/* ---------- 2. Embroidery photo: an ordinary section; the picture opens out once as it enters view ---------- */
.detail { position: relative; padding: clamp(24px, 4vw, 56px) var(--pad); }
.detail__frame { position: relative; overflow: hidden; border-radius: var(--r-l); max-width: 1248px; margin-inline: auto; background: #E9DDD3; }
.detail__frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; min-height: 320px; object-fit: cover; object-position: 60% 58%; }
.detail__frame::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(rgba(33, 28, 21, 0), rgba(33, 28, 21, .46)); pointer-events: none; }
.detail__caption {
  position: absolute; z-index: 1; left: clamp(16px, 4vw, 56px); bottom: clamp(16px, 6vh, 64px); max-width: calc(100% - 32px);
  padding: clamp(16px, 2vw, 28px) clamp(20px, 2.6vw, 38px); border-radius: var(--r-m);
  background: rgba(33, 28, 21, .4); border: 1px solid var(--hair-light); color: var(--ivory);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  font-size: clamp(21px, 2.9vw, 44px); font-weight: 600; line-height: 1.22; letter-spacing: -.025em;
}
.detail__caption span { display: block; }
/* Entrance (main.js adds .is-in once): the frame widens from a smaller rounded window, the picture settles
   from a closer crop, the caption card follows within half a second. main.js also drifts the picture a few
   percent inside the frame as the section passes (translate), which costs no scroll distance. */
.motion .detail__frame { clip-path: inset(12% 14% round 28px); transition: clip-path 1.4s var(--ease); }
.motion .detail__frame img { scale: 1.22; transition: scale 2.4s var(--ease); will-change: scale, translate; }
.motion .detail__caption { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease) .25s, transform 1s var(--ease) .25s; }
.motion .detail.is-in .detail__frame { clip-path: inset(0 round 28px); }
.motion .detail.is-in .detail__frame img { scale: 1.06; }
.motion .detail.is-in .detail__caption { opacity: 1; transform: none; }

/* ---------- 3. Types: seven rows, kept tight so the list stays about as tall as it was with five ---------- */
.types { padding-block: clamp(96px, 15vh, 190px) clamp(64px, 9vh, 104px); }
.types__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 64px; margin-bottom: clamp(32px, 5vh, 60px); }
.types__head h2 { max-width: 16em; }
.types__head p { max-width: 27em; color: var(--ink-soft); font-weight: 500; padding-bottom: .5em; }
.types__list { border-bottom: 1px solid var(--hair); }
.type { position: relative; display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); align-items: center; gap: 4px 48px; padding: clamp(13px, 1.9vh, 20px) 0; border-top: 1px solid var(--hair); }
.type h3 { font-size: clamp(27px, 3.3vw, 50px); font-weight: 600; line-height: 1.18; letter-spacing: -.035em; transition: color .5s, translate .9s var(--ease); }
.type p { max-width: 31em; font-size: 16px; line-height: 1.55; color: var(--ink-soft); font-weight: 500; transition: translate .9s var(--ease); }
.type h3 a { color: inherit; text-decoration: none; }
/* a line of gold brocade grows under the row in focus */
.type::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold) var(--tex-gold) 0 0 / var(--tex-size); transform: scaleX(var(--f, 0)); transform-origin: 0 50%; }
/* main.js sets --f (0..1) from how close the row is to the middle of the screen */
.motion .type h3 { opacity: calc(.5 + .5 * var(--f, 1)); transform: scale(calc(.93 + .07 * var(--f, 1))); transform-origin: 0 60%; will-change: transform, opacity; }
@media (hover: hover) {
  .type:hover h3 { color: var(--gold-deep); translate: 18px 0; }
  .type:hover p { translate: -10px 0; }
}

/* ---------- 3b. Price guide: a plain list on the ivory ground, name left, price right, hairlines ---------- */
.prices { padding-bottom: clamp(96px, 14vh, 160px); scroll-margin-top: 108px; }
.prices__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); align-items: start; gap: 16px clamp(32px, 5vw, 88px); }
.prices h2 { font-size: clamp(26px, 2.5vw, 38px); padding-top: .32em; }
.prices__list { margin: 0; border-bottom: 1px solid var(--hair); }
.price { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 32px; padding: 15px 0; border-top: 1px solid var(--hair); }
.price dt { font-size: clamp(17px, 1.45vw, 20px); font-weight: 500; line-height: 1.4; }
.price dd { margin: 0; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.4; color: var(--ink-soft); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price dd b { font-size: clamp(17px, 1.45vw, 20px); font-weight: 600; color: var(--ink); }
.prices__note { margin-top: 16px; text-wrap: pretty; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- 4. From measurements to the finished áo dài ---------- */
.craft { position: relative; background: var(--ink) var(--tex-ink) 0 0 / var(--tex-size); color: var(--ivory); --fig-h: clamp(440px, calc(100vh - 250px), 720px); }
.craft__stage { position: relative; overflow: clip; padding-block: clamp(96px, 13vh, 128px) clamp(56px, 8vh, 92px); background: var(--ink) var(--tex-ink) 0 0 / var(--tex-size); }
.craft__glow {
  position: absolute; left: 50%; top: 50%; width: min(120vh, 96vw); aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(217, 180, 90, .2), rgba(217, 180, 90, .06) 55%, rgba(217, 180, 90, 0));
  opacity: .7;
}
.craft__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 368px); align-items: center; gap: 32px clamp(28px, 4.4vw, 72px); }
.craft__copy h2 { font-size: clamp(30px, 3.5vw, 54px); }
.steps { position: relative; margin-top: clamp(24px, 4vh, 44px); padding-left: 28px; display: grid; gap: clamp(12px, 2vh, 22px); }
/* progress rail beside the steps */
.steps::before, .steps::after { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--hair-light); }
.steps::after { background: var(--gold-light); transform: scaleY(var(--rail, 1)); transform-origin: 50% 0; }
.step h3 { font-size: clamp(21px, 2vw, 28px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; transition: color .6s; }
.step.is-on h3 { color: var(--gold-light); }
.step p { margin-top: 4px; max-width: 24em; color: rgba(251, 248, 241, .8); }
.step__btn { display: block; width: 100%; min-height: 44px; padding: 4px 0; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; letter-spacing: inherit; color: inherit; }

.craft__figure { display: grid; place-items: center; min-width: 0; }
.fig__defs { position: absolute; }
.fig { position: relative; height: var(--fig-h); width: calc(var(--fig-h) / 2); transform-origin: 50% 27%; transition: opacity .22s linear; --silk: #E2B33F; --gam: #F4DC9A; --edge: #8F712A; --detail: #211C15; }
.fig svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fig__fill .f-pants { fill: #FFFDF8; stroke: #B9AE99; stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fig__fill .f-silk { fill: var(--silk); transition: fill .7s var(--ease-io); }
.fig__fill .f-fold { fill: url(#f-fold); }
.fig__fill .f-fold--light { fill: url(#f-fold-light); }
.fig__fill .f-gam { fill: var(--gam); opacity: var(--gam-o, .62); transition: fill .7s var(--ease-io), opacity .7s var(--ease-io); }
.fig__lines .draw { fill: none; stroke: var(--edge); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: stroke .7s; }
.fig__lines .f-pants-line { stroke: #B9AE99; }
.fig__lines .f-detail path { fill: none; stroke: var(--detail); stroke-width: 1.1; stroke-linecap: round; opacity: .55; vector-effect: non-scaling-stroke; transition: stroke .7s; }
.fig__lines .f-detail circle { fill: var(--detail); opacity: .7; transition: fill .7s; }
.fig__lines .f-fit { opacity: 0; }
.fig__lines .f-fit path { fill: none; stroke: var(--gold-light); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* measurement lines: drawn by main.js (stroke-dashoffset 1 to 0) */
.fig__lines .m { opacity: 0; transition: opacity .5s; }
.fig__lines .m > * { fill: none; stroke: var(--detail); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; transition: stroke .7s; }
.fig__lines .m--out > * { stroke: var(--gold-light); }
.fig__lines .m.is-done { opacity: .34; }
.fig__lines .m.is-on { opacity: 1; }

.fig__chips { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(10px, -50%) scale(.94); transform-origin: 0 50%;
  padding: 7px 14px; border-radius: var(--r-pill); white-space: nowrap; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--ivory);
  background: rgba(33, 28, 21, .42); border: 1px solid rgba(251, 248, 241, .22);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  scale: var(--unzoom, 1);      /* chips keep their size while the drawing is zoomed */
  opacity: 0; transition: opacity .45s var(--ease), transform .7s var(--ease);
}
.chip--left { transform: translate(calc(-100% - 10px), -50%) scale(.94); transform-origin: 100% 50%; }
.chip.is-on { opacity: 1; transform: translate(10px, -50%); }
.chip--left.is-on { transform: translate(calc(-100% - 10px), -50%); }

.craft__panel { display: grid; gap: 14px; min-width: 0; }
.slip, .dock {
  border-radius: var(--r-m); background: rgba(251, 248, 241, .055); border: 1px solid var(--hair-light);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.slip { padding: 18px 12px 14px; }
.slip__title { padding: 0 10px 8px; font-size: 15px; font-weight: 600; color: var(--gold-light); }
.measure {
  display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 44px; padding: 9px 10px;
  background: none; border: 0; border-radius: var(--r-s); cursor: pointer; text-align: left; font-size: 15.5px;
  transition: background-color .4s, color .4s;
}
.measure span { font-weight: 500; white-space: nowrap; }
.measure i { flex: 1; height: 1px; align-self: center; background: rgba(251, 248, 241, .2); transform-origin: 0 50%; transition: background-color .4s; }
.measure em { font-style: normal; font-size: 13.5px; color: rgba(251, 248, 241, .7); transition: color .4s; }
@media (hover: hover) { .measure:hover { background: rgba(251, 248, 241, .07); } }
.measure.is-done i { background: var(--gold-light); }
.measure.is-on { background: var(--gold) var(--tex-gold) 50% 50% / 600px; color: var(--ink); }
.measure.is-on i { background: rgba(33, 28, 21, .45); }
.measure.is-on em { color: var(--ink); }
.slip__note { min-height: 3.1em; padding: 8px 10px 0; font-size: 14px; line-height: 1.5; color: rgba(251, 248, 241, .8); }

.dock { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px 12px; }
.swatches { display: flex; flex-wrap: wrap; }
.swatch { position: relative; width: 36px; height: 44px; padding: 0; border: 0; background: none; border-radius: var(--r-pill); cursor: pointer; }
.swatch::before { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(251, 248, 241, .3); transition: transform .6s var(--ease); }
.swatch::after { content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%; border: 1.5px solid var(--ivory); opacity: 0; transform: scale(.7); transition: opacity .4s, transform .6s var(--ease); }
@media (hover: hover) { .swatch:hover::before { transform: scale(1.18); } }
.swatch[aria-pressed="true"]::after { opacity: 1; transform: none; }
.gam-toggle {
  min-height: 44px; padding: 8px 18px; border: 1px solid rgba(251, 248, 241, .34); border-radius: var(--r-pill); background: none; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .4s, color .4s, border-color .4s;
}
.gam-toggle[aria-pressed="true"] { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.swatches { flex: 1 1 100%; }
.dock__color { flex: 1 1 8em; font-size: 13.5px; line-height: 1.45; color: rgba(251, 248, 241, .8); }
.dock__color strong { color: var(--ivory); font-weight: 600; }

/* The four steps play by themselves when the drawing enters view (main.js). Step titles are buttons that play
   one step; .replay plays everything again; .is-swap is the short dip that covers a jump back in the sequence. */
.motion .fig { will-change: transform; }
.fig.is-swap { opacity: 0; }
.replay {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 10px 0 0 28px; padding: 0 2px;
  background: none; border: 0; cursor: pointer; font-size: 14.5px; font-weight: 600; color: rgba(251, 248, 241, .78); transition: color .4s;
}
.replay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: rotate .9s var(--ease); }
@media (hover: hover) { .replay:hover { color: var(--ivory); } .replay:hover svg { rotate: -180deg; } }

/* ---------- 5. Gallery: one sideways strip, eight categories ----------
   Markup (generated, see the comment in index.html): .gallery__group[data-gallery-cat] > h3 + ul > li.shot-wrap[data-photo-id] > a.shot > img.
   Without JavaScript each group is its own strip under its heading. With JavaScript the groups share one strip:
   .gallery[data-view] says which category shows ("all" = a few from each), the buttons switch it, and the strip is a
   native scroller (swipe, trackpad, keyboard) to which main.js adds two buttons, mouse drag and the progress line.
   --side lines everything up with the page's content column. */
.gallery { position: relative; padding-block: clamp(88px, 13vh, 150px); --side: max(var(--pad), calc(50vw - 680px + var(--pad))); --shot-h: clamp(320px, 54vh, 520px); }
.gallery [hidden] { display: none !important; }
.gallery__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding-inline: var(--side); margin-bottom: clamp(18px, 3vh, 30px); }
.gallery__hint { margin-top: 8px; color: var(--ink-soft); font-weight: 500; }
.gallery__nav { display: flex; gap: 10px; }
.gallery__btn {
  width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(251, 248, 241, .5); border: 1px solid rgba(33, 28, 21, .16); color: var(--ink);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  transition: background-color .3s, color .3s, opacity .4s, transform .6s var(--ease);
}
.gallery__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gallery__btn[aria-disabled="true"] { opacity: .32; cursor: default; }
@media (hover: hover) { .gallery__btn:not([aria-disabled="true"]):hover { background: var(--ink); color: var(--ivory); transform: scale(1.06); } }

/* category buttons: one row that scrolls sideways when it does not fit */
.gallery__tabs { display: flex; gap: 8px; padding: 4px var(--side); margin-bottom: clamp(16px, 2.6vh, 24px); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: var(--side); }
.gallery__tabs::-webkit-scrollbar { display: none; }
html:not(.js) .gallery__tabs { display: none; }
.gallery__tab {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
  background: rgba(251, 248, 241, .5); border: 1px solid rgba(33, 28, 21, .16); color: var(--ink); font-size: 15px; font-weight: 600;
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  transition: background-color .4s, color .4s, border-color .4s, transform .6s var(--ease);
}
@media (hover: hover) { .gallery__tab:hover { border-color: rgba(33, 28, 21, .5); } }
.gallery__tab:active { transform: scale(.97); }
.gallery__tab[aria-pressed="true"] { background: var(--ink) var(--tex-ink) 50% 50% / 600px; border-color: var(--ink); color: var(--ivory); }

/* photos */
.gallery__list { margin: 0; padding: 0; list-style: none; }
.shot-wrap { flex: none; scroll-snap-align: start; }
/* fixed height, width from the photo's own proportions (--ar); very wide photos are trimmed a little, phones cap the width */
.shot { position: relative; display: block; height: var(--shot-h); aspect-ratio: var(--ar, .75); max-width: min(86vw, calc(var(--shot-h) * 1.5)); border-radius: var(--r-l); overflow: hidden; background: #E9DDD3; cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
/* a little spare width so main.js can drift the photo inside its frame */
.motion .shot img { width: 110%; max-width: none; margin-left: -5%; will-change: translate; }
@media (hover: hover) { .shot:hover img { transform: scale(1.05); } }
.gallery__more {
  flex: none; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  width: min(72vw, 340px); height: var(--shot-h); padding: clamp(22px, 2.4vw, 34px); border-radius: var(--r-l);
  background: var(--gold) var(--tex-gold) 50% 50% / var(--tex-size); color: var(--ink); text-decoration: none;
  font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em;
}
.gallery__more svg { width: 44px; height: 44px; align-self: flex-end; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .8s var(--ease); }
@media (hover: hover) { .gallery__more:hover svg { transform: translate(6px, -6px); } }

/* a category with no photos left disappears, heading and button included (main.js does the same for the buttons generically) */
.gallery__group:not(:has([data-photo-id])) { display: none; }
.gallery:not(:has([data-gallery-cat="cuoi"] [data-photo-id])) [data-gallery-tab="cuoi"],
.gallery:not(:has([data-gallery-cat="giao-vien-dong-phuc"] [data-photo-id])) [data-gallery-tab="giao-vien-dong-phuc"],
.gallery:not(:has([data-gallery-cat="hoc-sinh"] [data-photo-id])) [data-gallery-tab="hoc-sinh"],
.gallery:not(:has([data-gallery-cat="gia-dinh"] [data-photo-id])) [data-gallery-tab="gia-dinh"],
.gallery:not(:has([data-gallery-cat="nam"] [data-photo-id])) [data-gallery-tab="nam"],
.gallery:not(:has([data-gallery-cat="thiet-ke"] [data-photo-id])) [data-gallery-tab="thiet-ke"],
.gallery:not(:has([data-gallery-cat="xa-que"] [data-photo-id])) [data-gallery-tab="xa-que"],
.gallery:not(:has([data-gallery-cat="tiem"] [data-photo-id])) [data-gallery-tab="tiem"],
.gallery:not(:has([data-photo-id])) .gallery__tabs,
.gallery:not(:has([data-photo-id])) .gallery__hint { display: none; }

/* Without JavaScript: every category is a small strip of its own under a heading. */
html:not(.js) .gallery { --shot-h: clamp(220px, 34vh, 300px); }
.gallery__title { padding-inline: var(--side); margin: 0 0 12px; font-size: clamp(21px, 2vw, 28px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
html:not(.js) .gallery__group { margin-bottom: clamp(28px, 4vh, 44px); }
html:not(.js) .gallery__list { display: flex; gap: clamp(10px, 1.4vw, 20px); padding-inline: var(--side); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 8px; }
html:not(.js) .gallery__more { height: auto; width: auto; margin-inline: var(--side); flex-direction: row; align-items: center; }

/* With JavaScript: one strip. Groups and lists dissolve into the track; the headings stay for screen readers only. */
/* overflow-y is hidden on purpose: the strip must never take a vertical swipe or wheel away from the page */
.js .gallery__view { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-block: 6px; margin-block: -6px; transition: opacity .2s linear, transform 1.1s var(--ease); }
.js .gallery__view::-webkit-scrollbar { display: none; }
.gallery__view:focus-visible { outline-offset: -2px; }
.js .gallery__view.is-swap { opacity: 0; }
/* touch screens snap photo by photo; with a mouse or trackpad the strip moves freely */
@media (hover: none) { .js .gallery__view { scroll-snap-type: x mandatory; scroll-padding-inline: var(--side); } }
@media (hover: hover) and (pointer: fine) { .gallery.is-live .gallery__view { cursor: grab; } }
.gallery__view.is-dragging { cursor: grabbing; user-select: none; }
.gallery__view.is-dragging .shot { cursor: grabbing; }
.js .gallery__track { display: flex; align-items: flex-start; gap: clamp(14px, 2vw, 32px); width: max-content; padding-inline: var(--side); }
.js .gallery__group, .js .gallery__list { display: contents; }
.js .gallery__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; margin: 0; }
.js .gallery__group.is-off { display: none; }
/* "Tất cả": every fourth photo of each category, so the first view is a cross-section and stays short */
.js .gallery[data-view="all"] .shot-wrap:not(:nth-child(4n+1)) { display: none; }
/* photos step in after a category change (main.js numbers them with --k) */
.motion .gallery__track.is-enter > *, .motion .gallery__track.is-enter .shot-wrap { animation: shot-in .8s var(--ease) both; animation-delay: calc(min(var(--k, 0), 9) * 45ms); }
@keyframes shot-in { from { opacity: 0; transform: translate3d(36px, 0, 0); } }

/* progress line: the gold piece shows which part of the strip is on screen */
.gallery__bar { display: none; position: relative; height: 2px; margin: clamp(22px, 3.6vh, 36px) var(--side) 0; border-radius: 2px; background: var(--hair); }
.gallery__bar span { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: var(--gold) var(--tex-gold); will-change: transform; }
.gallery.is-live .gallery__bar { display: block; }
.gallery.is-fit .gallery__bar, .gallery.is-fit .gallery__nav { display: none; }

/* ---------- 5b. For customers far away: a gold song hỷ panel, Vietnamese beside English ---------- */
.afar { padding-bottom: clamp(88px, 13vh, 150px); scroll-margin-top: 108px; }
.afar__panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--r-l); overflow: hidden;
  background: var(--gold) var(--tex-gold) 50% 50% / var(--tex-size); color: var(--ink);
}
.afar__col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: clamp(28px, 4vw, 60px); }
.afar__col + .afar__col { border-left: 1px solid rgba(33, 28, 21, .22); }
.afar__col h2, .afar__col h3 { font-size: clamp(28px, 3.2vw, 46px); font-weight: 600; line-height: 1.14; letter-spacing: -.035em; }
.afar__col p { max-width: 30em; font-weight: 500; }
.afar__col .afar__line { font-weight: 600; }
/* inline links with a 44px-tall touch area that does not push the lines apart */
.afar__line a { padding-block: 10px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; }
.afar__line span, .contact__addr span { white-space: nowrap; }
.afar__col .btns { margin-top: auto; padding-top: 10px; }
.afar .btn--glass { background: rgba(251, 248, 241, .34); border-color: rgba(33, 28, 21, .3); }

/* ---------- 6. About ---------- */
.about { position: relative; background: var(--ink) var(--tex-ink) 0 0 / var(--tex-size); color: var(--ivory); }
.about__stage { position: relative; overflow: clip; background: var(--ink) var(--tex-ink) 0 0 / var(--tex-size); display: flex; align-items: center; --pb: clamp(96px, 14vh, 150px); padding-block: clamp(96px, 14vh, 170px) var(--pb); }
/* the threads live in the band's lower margin, under the text, never through it */
.about__threads { position: absolute; inset: auto -4% 0 -4%; width: 108%; height: calc(var(--pb) * 1.45); pointer-events: none; }
.about__threads path { fill: none; stroke: var(--gold-light); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.about__threads path:nth-child(1) { opacity: .5; --n: 0; }
.about__threads path:nth-child(2) { opacity: .36; --n: 1; }
.about__threads path:nth-child(3) { opacity: .24; --n: 2; }
.about__threads path:nth-child(4) { opacity: .14; --n: 3; }
.about__in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr); align-items: start; gap: 20px clamp(32px, 5vw, 88px); }
.about__in h2 { font-size: clamp(26px, 2.5vw, 38px); color: var(--gold-light); padding-top: .25em; }
.about__text { font-size: clamp(20px, 2.3vw, 34px); font-weight: 500; line-height: 1.4; letter-spacing: -.02em; }
.about__text p + p { margin-top: .8em; }
/* the award: set apart quietly, smaller, in light gold above a hairline */
.about__award { position: relative; margin-top: clamp(24px, 4vh, 40px); padding-top: clamp(16px, 2.4vh, 22px); text-wrap: balance; font-size: clamp(16px, 1.3vw, 18.5px); font-weight: 500; line-height: 1.5; color: var(--gold-light); }
.about__award::before { content: ""; position: absolute; left: 0; top: 0; width: min(100%, 300px); height: 1px; background: var(--gold-light); opacity: .55; transform-origin: 0 50%; }
/* Timed, once, when the band enters view (main.js adds .is-in). The paragraph is readable from the start:
   its words only brighten in turn (each carries its index in --i), and the threads draw themselves. */
.motion .about__text .w { opacity: .56; transition: opacity .9s var(--ease) calc(var(--i) * 24ms + .1s); }
.motion .about__award::before { transform: scaleX(0); transition: transform 1.6s var(--ease-io) .9s; }
.motion .about.is-in .about__award::before { transform: none; }
.motion .about.is-in .about__text .w { opacity: 1; }
.motion .about__threads path { stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s var(--ease-io) calc(var(--n) * .2s + .15s); will-change: transform; }
.motion .about.is-in .about__threads path { stroke-dashoffset: 0; }

/* ---------- 6b. Hành trình: a sideways timeline, continuing the dark ground of "Về Hoàng Lan" ----------
   Generated markup (content/journal/tools/build_site.py): ol.journey__track > li.mile[data-entry-ref] > a > photo, year, line.
   A native sideways scroller like the gallery strip; main.js adds the two buttons, mouse drag and the progress line.
   A card, or the photo inside it, may be deleted before the page is served: the strip simply closes up. */
.journey { position: relative; padding: clamp(8px, 2vh, 24px) 0 clamp(72px, 11vh, 120px); background: var(--ink) var(--tex-ink) 0 0 / var(--tex-size); color: var(--ivory); --side: max(var(--pad), calc(50vw - 680px + var(--pad))); scroll-margin-top: 72px; }
.journey__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding-inline: var(--side); margin-bottom: clamp(18px, 3vh, 30px); }
.journey__head h2 { font-size: clamp(32px, 4.2vw, 60px); color: var(--gold-light); }
.journey .gallery__btn { background: rgba(251, 248, 241, .07); border-color: var(--hair-light); color: var(--ivory); }
@media (hover: hover) { .journey .gallery__btn:not([aria-disabled="true"]):hover { background: var(--ivory); color: var(--ink); } }
.journey__view { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding-block: 6px; margin-block: -6px; }
.journey__view::-webkit-scrollbar { display: none; }
.journey__view:focus-visible { outline-color: var(--ivory); outline-offset: -2px; }
@media (hover: none) { .journey__view { scroll-snap-type: x mandatory; scroll-padding-inline: var(--side); } }
@media (hover: hover) and (pointer: fine) { .journey.is-live .journey__view { cursor: grab; } }
.journey__view.is-dragging { cursor: grabbing; user-select: none; }
.journey__track { display: flex; align-items: stretch; gap: clamp(12px, 1.4vw, 20px); width: max-content; margin: 0; padding: 0 var(--side); list-style: none; }
.mile { flex: none; width: clamp(248px, 23vw, 304px); scroll-snap-align: start; }
/* glass card: the song hỷ ground shows through */
.mile__link {
  display: flex; flex-direction: column; height: 100%; padding: 10px 10px 20px; border-radius: var(--r-m); text-decoration: none;
  background: rgba(251, 248, 241, .055); border: 1px solid var(--hair-light);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  transition: background-color .5s, border-color .5s;
}
@media (hover: hover) { .mile__link:hover { background: rgba(251, 248, 241, .1); border-color: rgba(217, 180, 90, .5); } }
.journey__view.is-dragging .mile__link { cursor: grabbing; }
.mile__link:focus-visible { outline-color: var(--ivory); }
.mile__photo { display: block; aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: var(--r-s); overflow: hidden; background: #3A3023; }
.mile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.4s var(--ease); }
@media (hover: hover) { .mile__link:hover .mile__photo img { transform: scale(1.05); } }
.mile__year { padding-inline: 8px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; line-height: 1.2; letter-spacing: -.035em; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.mile__text { margin-top: 8px; padding-inline: 8px; font-size: 15.5px; line-height: 1.55; color: rgba(251, 248, 241, .86); }
/* a card without a photo opens with its year set lower, so the row of cards keeps one baseline for the text */
.mile__link > .mile__year:first-child { margin-top: auto; padding-top: 14px; }
.journey__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px clamp(24px, 4vw, 56px); padding-inline: var(--side); margin-top: clamp(22px, 3.6vh, 36px); }
.journey__bar { position: relative; flex: 1 1 200px; height: 2px; border-radius: 2px; background: var(--hair-light); }
.journey__bar span { position: absolute; left: 0; top: 0; height: 100%; width: 30%; border-radius: 2px; background: var(--gold) var(--tex-gold); will-change: transform; }
html:not(.js) .journey__bar, .journey.is-fit .journey__bar span, .journey.is-fit .gallery__nav { display: none; }
.journey:not(:has(.mile)) .journey__view { display: none; }
.motion .journey__track > .mile { opacity: 0; transform: translate3d(40px, 0, 0); transition: opacity .9s var(--ease) calc(min(var(--k, 0), 6) * 70ms), transform 1.1s var(--ease) calc(min(var(--k, 0), 6) * 70ms); }
.motion .journey.is-in .journey__track > .mile { opacity: 1; transform: none; }

/* ---------- 7. Contact ---------- */
.contact { position: relative; background: var(--gold) var(--tex-gold) 0 0 / var(--tex-size); padding-top: clamp(88px, 13vh, 160px); overflow: clip; }
.contact__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
.contact__map { grid-area: 1 / 5 / 2 / -1; height: clamp(460px, 72vh, 680px); border-radius: var(--r-l); overflow: hidden; background: #E9DDD3; box-shadow: 0 40px 80px -50px rgba(33, 28, 21, .6); will-change: transform; }
.contact__map iframe { display: block; width: 100%; height: 100%; border: 0; }
/* frosted card: the gold ground and the edge of the map show through it */
.contact__card {
  grid-area: 1 / 1 / 2 / 7; z-index: 1; align-self: end; margin-bottom: -56px; display: grid; gap: clamp(22px, 3vh, 34px); padding: clamp(26px, 3.4vw, 54px); border-radius: var(--r-l);
  background: rgba(251, 248, 241, .6); border: 1px solid rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: 0 40px 80px -50px rgba(33, 28, 21, .55);
  will-change: transform;
}
.contact__lead h2 { font-size: clamp(36px, 4.6vw, 72px); }
.contact__lead p { margin-top: 10px; max-width: 26em; font-weight: 500; }
.contact__lead .contact__hours { margin-top: 8px; font-weight: 700; }
.contact__links { display: flex; flex-wrap: wrap; gap: 0 26px; }
.contact__block { display: flex; flex-direction: column; align-items: flex-start; }
.contact__block h3 { font-size: 15px; font-weight: 600; color: #5C4508; }
.contact__phone { font-size: clamp(32px, 3.8vw, 56px); font-weight: 700; line-height: 1.2; letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.contact__addr { font-size: clamp(19px, 1.7vw, 24px); font-weight: 600; line-height: 1.4; letter-spacing: -.01em; }
/* closing signature: the logo in ink on the gold ground, then the fine print under a hairline */
.footer { margin-top: clamp(104px, 15vh, 160px); padding-bottom: 26px; font-size: 14.5px; font-weight: 500; }
.footer__logo { display: block; width: clamp(220px, 26vw, 340px); height: auto; margin: 0 0 clamp(18px, 3vh, 30px) -6px; }
.footer__line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; padding-top: 14px; border-top: 1px solid rgba(33, 28, 21, .3); }

/* ---------- Quick contact bar (phones) ---------- */
.actionbar { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(24, 20, 14, .82); color: var(--ivory); -webkit-backdrop-filter: blur(28px) saturate(1.3); backdrop-filter: blur(28px) saturate(1.3); }
.lightbox::backdrop { background: rgba(24, 20, 14, .5); }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; animation: lb-in .5s var(--ease); }
@keyframes lb-in { from { opacity: 0; } }
.lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100dvh; padding: 64px 8px 28px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: var(--r-m); }
.lightbox img.is-swap { animation: lb-img .6s var(--ease); }
@keyframes lb-img { from { opacity: 0; transform: scale(.975); } }
.lightbox figcaption { max-width: 44em; padding-inline: 12px; font-size: 15px; font-weight: 500; line-height: 1.5; text-align: center; text-wrap: balance; }
.lightbox__btn { width: 54px; height: 54px; margin: 0 clamp(4px, 2vw, 28px); border: 1px solid rgba(251, 248, 241, .26); border-radius: 50%; background: rgba(251, 248, 241, .08); cursor: pointer; display: grid; place-items: center; transition: background-color .3s, color .3s, transform .6s var(--ease); }
@media (hover: hover) { .lightbox__btn:hover { background: var(--ivory); color: var(--ink); transform: scale(1.06); } }
.lightbox__btn svg, .actionbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { position: absolute; top: 16px; right: 0; }
.lightbox [hidden] { display: none; }

/* "Giới thiệu" folds into "Hành trình" (the two sit together on the page) before the bar gets crowded */
@media (max-width: 1279px) { .nav__links .nav__opt2 { display: none; } }
@media (max-width: 1160px) { .nav__links .nav__opt, .brand__top { display: none; } }   /* then "Giá" and the words beside the logo */

/* ---------- Short desktop windows: tighten the measurement slip so the section stays about one screen ---------- */
@media (min-width: 901px) and (max-height: 780px) {
  .craft__stage { padding-block: 92px 40px; }
  .measure { min-height: 38px; padding-block: 6px; }
  .slip { padding-top: 14px; }
  .slip__note { min-height: 0; }
  .craft__copy h2 { font-size: clamp(28px, 3vw, 44px); }
  .steps { margin-top: 18px; gap: 8px; }
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
  .craft__grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 300px); gap: 24px 28px; }
  .nav__links a { padding: 0 10px; }
}
@media (max-width: 980px) {
  .brand__logo, .nav.is-stuck .brand__logo { width: 142px; height: 68px; }
  .nav__call { padding-inline: 16px; }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .brand__logo { width: 160px; height: 77px; }
  .nav.is-stuck .brand__logo { width: 146px; height: 70px; }
  .nav__call { margin-left: auto; }
  .type { grid-template-columns: minmax(0, 1fr); }
  .prices__in { grid-template-columns: minmax(0, 1fr); }
  .afar__panel { grid-template-columns: minmax(0, 1fr); }
  .afar__col + .afar__col { border-left: 0; border-top: 1px solid rgba(33, 28, 21, .22); }
  .about__in { grid-template-columns: minmax(0, 1fr); }
  .contact__in { grid-template-columns: minmax(0, 1fr); }
  .contact__card { grid-area: 1 / 1; margin: 0 clamp(0px, 3vw, 28px); }
  .contact__map { grid-area: 2 / 1; height: clamp(360px, 60vh, 520px); margin-top: -56px; }

  /* craft: the steps, then the drawing beside a column of seven measurements, colours underneath */
  .craft { --fig-h: clamp(340px, 50vw, 480px); }
  .craft__stage { padding-block: clamp(56px, 8vh, 88px) clamp(44px, 6vh, 72px); }
  .craft__grid { grid-template-columns: minmax(0, 1fr) 150px; grid-template-areas: "copy copy" "fig list" "dock dock"; gap: 20px 8px; align-items: center; }
  .craft__copy { grid-area: copy; }
  .craft__figure { grid-area: fig; }
  .craft__panel { display: contents; }
  .steps { gap: 12px; }
  .step p { font-size: 15px; line-height: 1.5; }
  /* seven rows share the height of the drawing, 44px each */
  .slip { grid-area: list; position: relative; z-index: 2; align-self: center; height: var(--fig-h); max-height: 308px; padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .slip__title, .slip__note, .dock__color { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .measures { display: grid; grid-auto-rows: minmax(0, 1fr); height: 100%; }
  .measure { align-items: center; min-height: 0; height: 100%; padding: 0 14px; font-size: 14px; border-radius: var(--r-pill); }
  .measure i, .measure em { display: none; }
  .measure.is-done span { color: var(--gold-light); }
  .chip { display: none; }
  .dock { grid-area: dock; position: relative; z-index: 2; flex-wrap: nowrap; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; background: rgba(33, 28, 21, .62); }
  .dock::-webkit-scrollbar { display: none; }
  .swatches { flex: none; flex-wrap: nowrap; }
  .swatch { width: 44px; flex: none; }
  .gam-toggle { padding: 8px 14px; font-size: 13px; }
  .gam-toggle span { display: none; }
  .gam-toggle::first-letter { text-transform: uppercase; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .contact { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }   /* room for the floating bar */
  .nav { padding: 8px 8px 0; }
  .nav__bar { height: 60px; padding: 0 6px 0 20px; }
  .nav.is-stuck .nav__bar { height: 54px; padding-left: 18px; padding-right: 5px; }
  .brand__logo { width: 138px; height: 66px; }
  .nav.is-stuck .brand__logo { width: 126px; height: 60px; }
  .nav__call { padding: 8px 16px; font-size: 14px; }
  .thread { left: 24px; right: 24px; }
  .hero { padding-bottom: 34px; }
  .hero__side { gap: 20px; }
  .btns { width: 100%; }
  .btns .btn { flex: 1 1 0; padding-inline: 16px; }
  .detail__frame img { aspect-ratio: 4 / 5; }
  .detail__caption { right: 16px; }
  .gallery { --shot-h: clamp(300px, 50vh, 420px); }
  .gallery__btn { width: 44px; height: 44px; }
  .gallery__tab { padding: 0 16px; font-size: 14.5px; }
  .about__stage { --pb: clamp(90px, 13vh, 130px); }
  .afar__col { gap: 10px; padding: 24px 24px 26px; }
  .afar__col p { font-size: 15.5px; line-height: 1.55; }
  .afar .btn { min-height: 50px; }
  .about__text { font-size: clamp(18.5px, 5vw, 23px); line-height: 1.46; }
  .type { padding: 14px 0; }
  .type p { font-size: 15.5px; }
  .price { flex-direction: column; align-items: flex-start; padding: 13px 0; }
  .price dd { text-align: left; white-space: normal; }
  .afar .btns .btn { flex: 1 1 100%; }
  .mile { width: min(74vw, 280px); }
  .journey__foot .btn { flex: 1 1 100%; }
  .journey__bar { flex-basis: 100%; }
  .contact__map { height: 400px; }
  .footer { margin-top: 56px; }
  .lightbox[open] { grid-template-columns: minmax(0, 1fr); }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 16px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox figure { padding-bottom: 92px; }

  /* floating glass bar: call, message, directions */
  .actionbar {
    position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 4px; padding: 5px; border-radius: var(--r-l);
    background: rgba(33, 28, 21, .66); border: 1px solid var(--hair-light); color: var(--ivory);
    -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
    transform: translateY(calc(100% + 24px)); transition: transform .9s var(--ease);
  }
  .actionbar.is-on, html:not(.js) .actionbar { transform: none; }
  .actionbar a { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; border-radius: 23px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .actionbar a:first-child { background: var(--gold) var(--tex-gold) 50% 50% / 600px; color: var(--ink); }
  .actionbar a:first-child:focus-visible { outline-color: var(--ivory); }
  .actionbar svg { width: 20px; height: 20px; }
}

@media (max-width: 380px) {
  .actionbar a { gap: 5px; font-size: 13px; }
  .actionbar svg { width: 18px; height: 18px; }
  .swatch { width: 40px; }
  .nav__call { padding-inline: 14px; }
}

/* ---------- Reduced motion: every scene shows its finished, readable state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .line__in, .js .hero__side, .js:not(.is-ready) .nav__bar { opacity: 1; transform: none; }
}
