/* Maiya Xiaolv visual system: Ink Navy, Brass Gold & Archival Paper. */
:root {
  --navy-deep:#080e1a;
  --navy:#0d1626;
  --navy-mid:#14223b;
  --navy-elevated:#1a2b4a;
  --navy-line:#243554;
  --navy-text:#eef2f8;
  --navy-muted:#a3b0c6;

  --paper:#f6f3ec;
  --white:#ffffff;
  --surface:#ede8dc;
  --surface-strong:#e1d9c8;
  --line:#dfd8c8;
  --line-strong:#c6bca6;
  --soft:#f2eee5;

  --ink:#121b2d;
  --muted:#525d72;
  --action:#0f1b33;
  --action-hover:#1d3158;

  --gold:#c9a24a;
  --gold-hover:#d8b35e;
  --gold-soft:#e8d39f;
  --gold-dark:#87651c;
  --gold-tint:#f9f3e3;
  --gold-border:#e0cb97;
  --accent:#87651c;

  --seal:#b3392b;
  --seal-bg:#fdf1ef;
  --seal-border:#e6b8b2;

  --radius-sm:6px;
  --radius-md:10px;
  --radius-lg:14px;
  --shadow-sm:0 4px 16px rgba(11,19,34,.06);
  --shadow-md:0 18px 48px rgba(11,19,34,.10);
  --shadow-lg:0 32px 84px rgba(8,14,26,.28);

  --serif:"Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC","Iowan Old Style",Georgia,serif;
  --sans:"PingFang SC","HarmonyOS Sans SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,BlinkMacSystemFont,sans-serif;

  color:var(--ink);
  background:var(--paper);
  font-family:var(--sans);
  font-synthesis:none;
}

* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:96px; }
body { margin:0; font-size:16px; line-height:1.75; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; background:var(--paper); color:var(--ink); }
a { color:inherit; text-decoration:none; }
button,input,select { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
button { color:inherit; cursor:pointer; }
button:disabled { cursor:default; opacity:.6; }
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--gold); outline-offset:4px; }
h1,h2,h3,p,figure,ul,ol { margin:0; }
img,svg { display:block; max-width:100%; }
img { height:auto; }
[hidden] { display:none!important; }
::selection { color:var(--ink); background:var(--gold-soft); }

.container { width:min(1280px,calc(100% - 96px)); margin-inline:auto; }
.section { padding-block:96px; }

.eyebrow {
  display:inline-flex; align-items:center; gap:10px;
  color:var(--gold-dark); font-size:12px; font-weight:650;
  letter-spacing:.14em; text-transform:uppercase;
}
.eyebrow::before { content:""; width:20px; height:1px; background:var(--gold); flex-shrink:0; }

.section-heading { max-width:720px; margin-bottom:36px; }
.section-heading h2,.section-heading h1 {
  margin-top:16px; font-family:var(--serif);
  font-size:clamp(30px,3vw,42px); font-weight:700;
  line-height:1.34; letter-spacing:-.02em; text-wrap:balance; color:var(--ink);
}
.section-heading>p:not(.eyebrow) { margin-top:18px; color:var(--muted); max-width:580px; font-size:15px; line-height:1.9; }

/* Editorial numbered chapter header */
.chapter-head {
  display:grid; grid-template-columns:88px minmax(0,1.08fr) minmax(0,.92fr);
  gap:24px 44px; align-items:end; margin-bottom:44px;
}
.chapter-num {
  font-family:var(--serif); font-size:clamp(48px,4.6vw,68px); font-weight:700;
  line-height:.95; color:var(--gold); font-variant-numeric:tabular-nums;
  letter-spacing:-.03em; user-select:none;
}
.chapter-head h2 {
  margin-top:14px; font-family:var(--serif);
  font-size:clamp(28px,2.9vw,40px); font-weight:700;
  line-height:1.32; letter-spacing:-.02em; text-wrap:balance;
}
.chapter-head>p {
  font-size:15px; line-height:1.9; color:var(--muted);
  max-width:480px; padding-bottom:4px;
}

/* Buttons & links */
.button,.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:46px; max-width:100%; padding:11px 22px;
  border:1px solid transparent; border-radius:var(--radius-sm);
  font-size:14px; font-weight:600; line-height:1.45; text-align:center;
  transition:background .2s,color .2s,border-color .2s,transform .18s,box-shadow .2s;
}
.button svg,.btn svg { width:16px; height:16px; flex-shrink:0; transition:transform .2s; }
.button:hover svg,.btn:hover svg { transform:translateX(2px); }

.button-primary,.btn-download {
  color:#fff; background:var(--action); border-color:var(--action);
  box-shadow:0 6px 18px rgba(15,27,51,.16);
}
.button-primary:hover,.btn-download:hover {
  background:var(--action-hover); border-color:var(--action-hover);
  box-shadow:0 10px 24px rgba(15,27,51,.22);
}

.button-gold {
  color:var(--navy-deep); background:var(--gold); border-color:var(--gold);
  box-shadow:0 10px 28px rgba(201,162,74,.24);
}
.button-gold:hover {
  background:var(--gold-hover); border-color:var(--gold-hover);
  box-shadow:0 14px 32px rgba(201,162,74,.32);
}

.button-secondary,.btn-download-alt {
  color:var(--ink); border-color:var(--line-strong); background:var(--white);
}
.button-secondary:hover,.btn-download-alt:hover {
  border-color:var(--action); background:var(--paper);
}

.button-ghost {
  color:var(--navy-text); border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.04);
}
.button-ghost:hover {
  border-color:rgba(232,211,159,.55); background:rgba(255,255,255,.09); color:#fff;
}

.text-link {
  display:inline-flex; align-items:center; gap:8px; min-height:44px;
  color:var(--ink); font-size:14px; font-weight:600;
  transition:color .2s;
}
.text-link:hover { color:var(--gold-dark); }
.text-link svg { width:16px; height:16px; flex-shrink:0; transition:transform .2s; }
.text-link:hover svg { transform:translateX(3px); }

.sr-only,.skip-link:not(:focus) { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link:focus { position:fixed; z-index:100; top:10px; left:10px; padding:10px 20px; background:var(--white); color:var(--ink); border-radius:4px; box-shadow:var(--shadow-md); }

/* Signature Ink Navy Masthead across all pages */
.site-header {
  position:sticky; top:0; z-index:40; min-height:78px;
  border-bottom:1px solid rgba(201,162,74,.20);
  background:rgba(11,19,34,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  color:var(--navy-text);
}
.header-inner { min-height:77px; display:flex; align-items:center; justify-content:space-between; gap:28px; }
.brand { display:inline-flex; align-items:center; gap:12px; flex-shrink:0; }
.brand img {
  width:36px; height:36px; border-radius:50%; background:#fff; padding:1px;
  box-shadow:0 0 0 1.5px rgba(201,162,74,.48);
}
.brand strong { display:block; font-size:17px; line-height:1.25; font-weight:650; letter-spacing:.05em; color:#fff; }
.brand small { display:block; margin-top:3px; font-size:9px; line-height:1.2; color:var(--gold-soft); letter-spacing:.22em; font-weight:600; }

.site-nav { display:flex; align-items:center; justify-content:center; gap:36px; margin-left:auto; }
.site-nav>a {
  position:relative; display:flex; align-items:center; min-height:44px;
  color:var(--navy-muted); font-size:14px; font-weight:500; transition:color .2s;
}
.site-nav>a:hover,.site-nav>a[aria-current=page] { color:#fff; }
.site-nav>a[aria-current=page]::after {
  content:""; position:absolute; left:0; right:0; bottom:6px;
  height:2px; background:var(--gold); border-radius:2px;
}

.header-actions { display:flex; align-items:center; gap:16px; }
.language-link {
  display:flex; align-items:center; justify-content:center;
  min-width:44px; min-height:44px; color:var(--navy-muted); font-size:12px; font-weight:550;
  letter-spacing:.06em; transition:color .2s;
}
.language-link:hover { color:#fff; }
.site-header .header-actions .button-primary {
  min-height:42px; padding:8px 18px; font-size:13px; border-radius:999px;
  color:var(--navy-deep); background:var(--gold); border-color:var(--gold);
  box-shadow:0 6px 20px rgba(201,162,74,.22);
}
.site-header .header-actions .button-primary:hover {
  background:var(--gold-hover); border-color:var(--gold-hover);
}
.mobile-toggle {
  display:none; width:44px; height:44px; flex-shrink:0;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.18);
  border-radius:var(--radius-sm); place-items:center; color:#fff;
}
.mobile-toggle svg { width:20px; height:20px; }

.media-zoom { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:5px 8px; border:0; background:none; color:var(--ink); font-size:12px; }
.media-zoom svg { width:15px; height:15px; }

/* Deep Ink Navy Footer */
.site-footer {
  padding:56px 0 32px; color:var(--navy-text);
  background:var(--navy-deep); border-top:1px solid rgba(201,162,74,.22);
}
.footer-top { display:flex; align-items:flex-start; justify-content:space-between; gap:36px; }
.footer-brand .brand small { color:var(--gold-soft); }
.footer-brand p { font-size:13px; color:var(--navy-muted); margin-top:16px; }
.footer-links { display:flex; gap:6px 26px; align-items:center; flex-wrap:wrap; font-size:13px; color:#cbd4e3; }
.footer-links a,.footer-links button { min-height:44px; display:flex; align-items:center; transition:color .2s; }
.footer-links button { border:0; padding:0; background:transparent; }
.footer-links a:hover,.footer-links button:hover { color:var(--gold-soft); }
.footer-bottom {
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 20px;
  border-top:1px solid var(--navy-line); margin-top:32px; padding-top:22px;
  color:var(--navy-muted); font-size:12px;
}
.footer-bottom a:hover { color:#fff; }

/* Native Dialogs */
dialog {
  color:var(--ink); background:var(--white);
  border:1px solid var(--line); border-radius:var(--radius-md);
  padding:0; max-width:calc(100vw - 32px); box-shadow:var(--shadow-lg);
}
dialog::backdrop { background:rgba(8,14,26,.72); backdrop-filter:blur(5px); }
.dialog-top {
  display:flex; justify-content:space-between; align-items:center; gap:18px;
  padding:14px 20px; background:var(--navy); color:var(--navy-text);
  border-bottom:1px solid rgba(201,162,74,.25); font-size:13px; font-weight:600;
}
.dialog-top button {
  width:40px; height:40px; flex-shrink:0;
  border:1px solid rgba(255,255,255,.22); border-radius:var(--radius-sm);
  background:rgba(255,255,255,.06); color:#fff; display:grid; place-items:center;
  transition:background .2s,border-color .2s;
}
.dialog-top button:hover { background:rgba(255,255,255,.14); border-color:var(--gold); }
.dialog-top button svg { width:17px; height:17px; }
.product-lightbox { width:min(1400px,calc(100vw - 32px)); }
.product-lightbox img { width:100%; max-height:calc(100dvh - 100px); object-fit:contain; background:#fff; }
.about-dialog { width:560px; }
.about-copy { padding:32px; }
.about-copy h2 { font-family:var(--serif); font-size:28px; line-height:1.45; margin-bottom:20px; color:var(--ink); }
.about-copy p+p { margin-top:16px; }
.about-copy p { color:var(--muted); font-size:14px; line-height:1.95; }
.about-copy .text-link { margin-top:18px; color:var(--gold-dark); }

[data-reveal].reveal-ready { transition:opacity .65s ease,transform .65s cubic-bezier(.2,.65,.3,1); }
[data-reveal].reveal-ready:not(.is-revealed):not(:focus-within) { opacity:0; transform:translateY(18px); }

@media(min-width:1800px) {
  .container { width:min(1380px,calc(100% - 144px)); }
}
@media(max-width:1100px) {
  .container { width:calc(100% - 64px); }
  .header-inner { gap:20px; }
  .site-nav { gap:24px; }
  .header-actions { gap:12px; }
  .section { padding-block:78px; }
  .chapter-head { grid-template-columns:68px minmax(0,1fr) minmax(0,.9fr); gap:20px 28px; margin-bottom:36px; }
  .chapter-num { font-size:48px; }
}
@media(max-width:860px) {
  .chapter-head { grid-template-columns:1fr; gap:14px; align-items:start; }
  .chapter-num { font-size:40px; }
  .chapter-head>p { max-width:600px; }
  .site-nav { gap:18px; }
  .site-nav>a { font-size:13px; }
}
@media(min-width:701px) and (max-width:1000px) {
  .mobile-toggle { display:grid; }
  .site-nav { display:none; }
  .menu-open .site-nav {
    display:flex; position:absolute; left:0; right:0; top:100%;
    padding:16px 32px; gap:6px; flex-direction:column; align-items:stretch;
    background:var(--navy); border-bottom:1px solid rgba(201,162,74,.25);
    box-shadow:0 24px 48px rgba(8,14,26,.45);
  }
  .menu-open .site-nav>a[aria-current=page]::after { display:none; }
  .menu-open .site-nav>a[aria-current=page] { color:var(--gold-soft); }
}
@media(max-width:700px) {
  html { scroll-padding-top:82px; }
  .container { width:calc(100% - 40px); }
  .section { padding-block:58px; }
  .site-header { min-height:66px; }
  .header-inner { min-height:65px; gap:10px; }
  .header-actions { margin-left:auto; gap:8px; }
  .site-header .header-actions .button-primary { min-height:42px; padding:8px 13px; font-size:12px; }
  .mobile-toggle { display:grid; }
  .site-nav { display:none; }
  .menu-open .site-nav {
    display:flex; position:absolute; left:0; right:0; top:100%;
    padding:16px 20px; gap:6px; align-items:stretch; flex-direction:column;
    background:var(--navy); border-bottom:1px solid rgba(201,162,74,.25);
    box-shadow:0 24px 48px rgba(8,14,26,.5);
  }
  .site-nav>a { min-height:44px; font-size:14px; }
  .menu-open .site-nav>a[aria-current=page]::after { display:none; }
  .menu-open .site-nav>a[aria-current=page] { color:var(--gold-soft); }
  .eyebrow { font-size:11px; }
  .section-heading { margin-bottom:28px; }
  .section-heading h2,.section-heading h1 { font-size:29px; }
  .section-heading>p:not(.eyebrow) { font-size:14px; }
  .chapter-head { gap:10px; margin-bottom:28px; }
  .chapter-num { font-size:34px; }
  .chapter-head h2 { font-size:27px; }
  .chapter-head>p { font-size:14px; }
  .footer-top { flex-direction:column; gap:24px; }
  .footer-links { gap:4px 20px; }
  .footer-bottom { flex-direction:column; }
  .about-copy { padding:24px; }
  .about-copy h2 { font-size:24px; }
}
@media(max-width:450px) {
  .header-inner { gap:6px; }
  .header-actions { gap:6px; }
  .site-header .header-actions .button-primary { padding-inline:11px; }
  .header-actions .button svg { display:none; }
  .site-header .brand small { display:none; }
  .site-header .brand { gap:8px; }
  .site-header .brand strong { font-size:15px; }
  .site-header .brand img { width:32px; height:32px; }
}
@media(max-width:360px) {
  .site-header .container { width:calc(100% - 24px); }
  .site-header .header-actions .button-primary { padding-inline:9px; font-size:11px; }
  .site-header .brand strong { font-size:13px; }
  .site-header .brand img { width:28px; height:28px; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  [data-reveal].reveal-ready { opacity:1!important; transform:none!important; }
}
