/* =========================================================
   LX HXBT — Atelier 2026 design layer
   Loaded after main.css; retunes the house style to a
   quiet-luxury editorial register:
   · Fraunces display serif / Inter text / Noto Serif SC hanzi
   · bone paper, warm ink, bronze — tone on tone
   · WebGL silk hero + ink silk finale
   · hairline geometry, oversized type, real photography
   ========================================================= */

/* ---------- 1 · Tokens ---------- */
:root {
  --paper:       #F2EDE2;
  --paper-soft:  #EAE3D4;
  --pearl:       #F8F4EB;
  --ink:         #171310;
  --ink-soft:    #241F1A;
  --graphite:    #4D463E;
  --smoke:       rgba(23, 19, 16, 0.56);
  --whisper:     rgba(23, 19, 16, 0.10);
  --hairline:    rgba(23, 19, 16, 0.16);
  --gold:        #A8854F;
  --gold-bright: #C8A56B;
  --champagne:   #D8C29A;
  --vermilion:   #993128;

  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --display-xl: clamp(3.2rem, 9.2vw, 8.2rem);
  --display-lg: clamp(2.5rem, 5.4vw, 4.8rem);
  --display-md: clamp(1.9rem, 3.4vw, 2.9rem);

  --header-h: 76px;
}

html { background: var(--paper); }
body { font-feature-settings: "ss01" on; }

/* grain — the tactile film over everything */
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 2147483000;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: lx-grain 9s steps(6) infinite;
}
@keyframes lx-grain {
  0%, 100% { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 1.4%); }
  40%  { transform: translate(1.6%, -1%); }
  60%  { transform: translate(-1%, -1.8%); }
  80%  { transform: translate(1.2%, 1%); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* ---------- 2 · Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  letter-spacing: -0.022em;
  line-height: 0.98;
}
.italic, em.italic {
  font-style: italic;
  font-weight: 340;
  letter-spacing: -0.012em;
}
.stroke {
  -webkit-text-stroke: 1px var(--ink);
  -webkit-text-fill-color: transparent;
}
.eyebrow {
  font-size: 10.5px;
  font-weight: 540;
  letter-spacing: 0.34em;
  color: var(--smoke);
}
.eyebrow::before { width: 34px; background: var(--gold); opacity: 0.8; }

.section-title { font-size: var(--display-lg); }

/* Chinese display set in Song-style serif, upright */
.lang-zh h1, .lang-zh h2, .lang-zh h3, .lang-zh h4, .lang-zh h5,
.lang-zh .hero-display, .lang-zh .site-footer .wordmark {
  font-family: var(--hanzi);
  font-weight: 500;
  font-variation-settings: normal;
  letter-spacing: 0.02em;
}
.section-sub { font-size: 15px; color: var(--smoke); max-width: 42ch; }

::selection { background: var(--gold); color: var(--pearl); }

/* ---------- 3 · Header ---------- */
.site-header { height: var(--header-h); }
.site-header .nav { height: var(--header-h); }
.site-header.scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--hairline);
  box-shadow: none;
}
.nav-links a {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 520;
}
.brand { gap: 12px; }
.brand-mark {
  font-size: 19px;
  border: 1px solid var(--hairline);
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

/* ---------- 4 · Buttons ---------- */
.btn {
  border-radius: 0;
  overflow: visible;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 19px 34px;
  transition: background 0.5s var(--ease-silk), color 0.5s var(--ease-silk),
              border-color 0.5s var(--ease-silk), transform 0.4s var(--ease-silk);
}
/* retire the legacy pill-fill machinery (ink/vermilion sliding pseudos) */
.btn::before, .btn::after { display: none; }
.btn.ghost:hover { color: var(--ink); background: transparent; }
.btn .arrow { transition: transform 0.45s var(--ease-silk); }
.btn:hover .arrow { transform: translateX(7px); }
.btn.primary {
  background: var(--ink);
  color: var(--pearl);
  border: 1px solid var(--ink);
}
.btn.primary:hover { background: var(--gold); border-color: var(--gold); color: var(--pearl); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink);
}
.btn.ghost:hover { border-color: var(--ink); }

/* ---------- 5 · Loader ---------- */
.loader { background: var(--paper); }
.loader-mark {
  font-size: 64px;
  color: var(--ink);
  border: 1px solid var(--hairline);
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;             /* flex box no longer follows text-align centering */
}
.loader-line { background: var(--gold); }
.loader-text {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* ---------- 6 · Silk hero (home) ---------- */
.hero-silk {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: calc(var(--header-h) + 4vh) 0 0;
}
.hero-silk .silk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.silk-canvas.silk-fallback,
.no-webgl .silk-canvas {
  background:
    radial-gradient(120% 90% at 78% 18%, #FBF7EC 0%, transparent 52%),
    radial-gradient(90% 80% at 18% 78%, #CDB287 0%, transparent 56%),
    linear-gradient(155deg, #EFE7D5 12%, #DCC9A2 48%, #F2EDE2 88%);
}
.hero-silk::after {                    /* soft veil so ink type always reads */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(242,237,226,0.30) 0%, rgba(242,237,226,0) 26%),
    radial-gradient(95% 62% at 30% 86%, rgba(242,237,226,0.42) 0%, rgba(242,237,226,0) 64%);
}
.hero-silk .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vh, 64px);
  padding-bottom: clamp(28px, 5.5vh, 72px);
}
.hero-silk .hero-top { max-width: 1100px; }
.hero-silk .eyebrow { margin-bottom: 36px; }
.hero-display {
  font-size: var(--display-xl);
  line-height: 0.94;
  margin: 0;
  color: var(--ink);
}
.hero-display .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-display .line > span {
  display: inline-block;
  transform: translateY(112%) rotate(1.2deg);
  transition: transform 1.25s var(--ease-silk);
}
.is-revealed .hero-display .line > span { transform: none; }
.is-revealed .hero-display .line:nth-child(2) > span { transition-delay: 0.10s; }
.is-revealed .hero-display .line:nth-child(3) > span { transition-delay: 0.20s; }
.hero-display .indent { padding-left: clamp(40px, 9vw, 150px); }

.hero-silk .hero-base {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: clamp(22px, 3.4vh, 38px);
}
.hero-silk .hero-lede {
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--graphite);
  margin: 0 0 26px;
}
.hero-silk .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-silk .hero-stats {
  display: flex;
  gap: clamp(28px, 4vw, 64px);
  margin: 0;
}
.hero-silk .hero-stat .num {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 360;
  line-height: 1;
  color: var(--ink);
}
.hero-silk .hero-stat .num::after { content: ""; }
.hero-silk .hero-stat .label {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-top: 10px;
}
.hero-silk .scroll-cue {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--smoke);
  z-index: 2;
}
.hero-silk .scroll-cue::after {
  content: "";
  width: 1px;
  height: 64px;
  background: var(--ink);
  opacity: 0.35;
  animation: lx-cue 2.4s var(--ease-silk) infinite;
  transform-origin: top;
}
@keyframes lx-cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- 7 · Marquee ---------- */
.marquee {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--pearl);
}
.marquee .marquee-track em {
  font-size: clamp(15px, 1.6vw, 21px);
  letter-spacing: 0.16em;
}
.marquee .star { color: var(--gold); }

/* ---------- 8 · Editorial image frames ---------- */
.frame-img {
  position: relative;
  overflow: hidden;
  background: var(--paper-soft);
}
.frame-img > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease-silk);
  will-change: transform;
}
.frame-img[data-clip] {
  clip-path: inset(12% 6% 12% 6%);
  transition: clip-path 1.3s var(--ease-silk);
}
.frame-img[data-clip].in { clip-path: inset(0 0 0 0); }
.frame-img[data-clip].in > img { transform: scale(1.0); }
a:hover .frame-img:not([data-px]) > img,
.frame-img:not([data-px]):hover > img { transform: scale(1.045); }
.frame-img[data-px] > img { transition: none; will-change: transform; }

/* ---------- 9 · Story (home) ---------- */
.story .story-image {
  aspect-ratio: 3 / 4;
}
.story-image.frame-img::before,
.story-image.frame-img::after { display: none; }   /* retire the old gradient art */
.story .story-image .caption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pearl);
  opacity: 0.92;
  text-shadow: 0 1px 14px rgba(13, 11, 9, 0.55);
}
.story h2 { font-size: var(--display-lg); }

/* ---------- 10 · Collections (home) ---------- */
.collection-card {
  border-radius: 0;
  border: none;
  background: var(--ink);
}
.collection-card .collection-bg { display: none; }
.collection-card .card-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.collection-card .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.5s var(--ease-silk), opacity 0.6s;
}
.collection-card:hover .card-photo img { transform: scale(1.0); }
.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(184deg, rgba(13,11,9,0) 38%, rgba(13,11,9,0.62) 86%);
  z-index: 1;
  transition: opacity 0.6s;
}
.collection-card .content {
  z-index: 2;
  color: var(--pearl);
}
.collection-card .content .index {
  color: rgba(248, 244, 235, 0.72);
  font-size: 10px;
  letter-spacing: 0.3em;
}
.collection-card .content h3 { color: var(--pearl); font-size: clamp(26px, 2.6vw, 40px); }
.collection-card .content p { color: rgba(248, 244, 235, 0.78); }
.collection-card .content .cta {
  color: var(--pearl);
  border-bottom: 1px solid rgba(248,244,235,0.42);
  padding-bottom: 5px;
  transition: border-color 0.4s;
}
.collection-card:hover .content .cta { border-color: var(--pearl); }

/* ---------- 11 · Edit rail (home) ---------- */
.edit-rail-section { padding: clamp(80px, 12vh, 150px) 0; }
.edit-rail-section .section-head { margin-bottom: clamp(36px, 6vh, 64px); }
.edit-rail {
  display: flex;
  gap: clamp(18px, 2vw, 30px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 26px;
  margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: none;
}
.edit-rail::-webkit-scrollbar { display: none; }
.edit-rail .piece {
  flex: 0 0 clamp(230px, 23vw, 320px);
  scroll-snap-align: start;
}
.edit-rail .piece .frame-img { aspect-ratio: 3 / 4.1; }
.edit-rail .piece .p-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}
.edit-rail .piece h4 {
  font-size: 17px;
  font-weight: 420;
  letter-spacing: -0.01em;
  margin: 0;
}
.edit-rail .piece .price {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--smoke);
  white-space: nowrap;
}
.edit-rail .piece .p-tag {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-top: 6px;
}
.rail-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--smoke);
}
.rail-foot .rail-line {
  flex: 1;
  height: 1px;
  background: var(--hairline);
  margin: 0 22px;
}

/* ---------- 12 · Process ---------- */
.process .step {
  border-top: 1px solid var(--hairline);
  padding-top: 26px;
}
.process .step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--gold);
}
.process .step h4 { font-size: 21px; font-weight: 420; }

/* ---------- 13 · Testimonial ---------- */
.testimonial blockquote {
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  font-weight: 360;
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.testimonial cite {
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---------- 14 · Ink silk finale (CTA) ---------- */
.cta-block {
  position: relative;
  background: #0D0B09;
  overflow: hidden;
}
.cta-block .silk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}
.cta-block .silk-canvas.silk-fallback {
  background:
    radial-gradient(110% 90% at 76% 24%, rgba(200,165,107,0.20) 0%, transparent 58%),
    linear-gradient(150deg, #14110D 18%, #221B12 52%, #0D0B09 88%);
}
.cta-block .container { position: relative; z-index: 2; }
.cta-block h2 { color: var(--pearl); font-size: var(--display-lg); }
.cta-block .italic { color: var(--champagne); }
.cta-block p { color: rgba(248, 244, 235, 0.62); }
.cta-block .btn.primary {
  background: var(--pearl);
  border-color: var(--pearl);
  color: var(--ink);
}
.cta-block .btn.primary:hover {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--ink);
}

/* ---------- 15 · Page hero (inner pages) ---------- */
.page-hero h1 {
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.96;
}
.page-hero {
  border-bottom: 1px solid var(--hairline);
}

/* ---------- 16 · Product cards (listing pages) ---------- */
.product .product-img {
  border-radius: 0;
  border: none;
}
.product .product-img.has-image::before { transition: transform 1.4s var(--ease-silk); }
.product:hover .product-img.has-image::before { transform: scale(1.05); }
.product .product-img .badge {
  border-radius: 0;
  background: color-mix(in srgb, var(--pearl) 88%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  border: none;
}
.product .product-info h4 { font-weight: 420; }
.product .price { color: var(--smoke); }

/* ---------- 17 · Footer ---------- */
.site-footer {
  background: var(--pearl);
  border-top: 1px solid var(--hairline);
  overflow: hidden;
}
.site-footer .footer-grid { position: relative; z-index: 2; }
.site-footer .wordmark {
  font-family: var(--serif);
  font-weight: 360;
  font-variation-settings: "opsz" 144;
  font-size: clamp(64px, 13.5vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.075;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  margin: clamp(20px, 4vh, 48px) 0 -0.16em;
}
.site-footer .wordmark .italic { font-style: italic; }

/* ---------- 18 · AI concierge ---------- */
.ai-launcher {
  border-radius: 0;
  background: var(--ink);
  color: var(--pearl);
  border: 1px solid var(--ink);
}
.ai-launcher:hover { background: var(--gold); border-color: var(--gold); }
.ai-panel {
  border-radius: 0;
  border: 1px solid var(--hairline);
  background: var(--pearl);
  box-shadow: 0 30px 80px rgba(23, 19, 16, 0.18);
}
.ai-avatar { border-radius: 0; background: var(--ink); color: var(--pearl); }
.ai-chip { border-radius: 0; }

/* ---------- 19 · Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- 20 · Responsive ---------- */
@media (max-width: 900px) {
  .hero-silk { min-height: 96svh; }
  .hero-silk .scroll-cue { display: none; }
  .hero-silk .hero-base { gap: 30px; }
  .hero-silk .hero-stats { width: 100%; justify-content: space-between; padding-right: 70px; }
  .hero-silk .container { padding-bottom: 40px; }
  .site-footer .wordmark { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-display .line > span { transform: none !important; transition: none !important; }
  .frame-img[data-clip] { clip-path: none; transition: none; }
  .frame-img > img { transform: none; transition: none; }
}


/* ===== Keyboard focus (a11y) =====
   Several controls remove the UA outline (outline:0) with no replacement;
   give keyboard users a visible gold ring without affecting mouse focus. */
.ai-launcher:focus-visible,
.ai-input textarea:focus-visible,
.ai-input button:focus-visible,
.ai-close:focus-visible,
.bag-launcher:focus-visible,
.lang-switch button:focus-visible,
.lang-switch-mobile button:focus-visible {
  outline: 2px solid var(--gold, #B89967);
  outline-offset: 2px;
}
