/* ==========================================================================
   Beauty Faith — shared stylesheet (editorial noir)
   Loaded by every page.  Page-specific rules stay in each page's <style>.
   ========================================================================== */

/* fonts load from a <link> in each page's <head> (P1-14), not @import */

:root {
  --bg:      #0a090b;
  --bg2:     #141216;
  --bg3:     #1c191e;
  --ink:     #f2ece4;
  --muted:   #8f877b;
  --line:    rgba(242, 236, 228, .13);
  --line2:   rgba(242, 236, 228, .07);
  --accent:  #c8a36a;
  --accent2: #e2c48e;
  --ok:      #7fae82;
  --serif:   "Cormorant Garamond", "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
             "Microsoft YaHei", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
  --hd:      72px;
  --ease:    cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

::selection { background: var(--accent); color: #0b0a0c; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2b272d; border: 3px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3c373f; }

/* ------------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: 28px;               /* F1: inline only, so each page's main padding-top survives */
}
@media (max-width: 560px) { .wrap { padding-inline: 18px; } }

/* author display rules (e.g. .cols{display:grid}) must not defeat the hidden attribute */
[hidden] { display: none !important; }

.serif { font-family: var(--serif); }

.eyebrow {
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ----------------------------------------------------------- bilingual ui */

.lang-zh { display: none !important; }
body[data-lang="zh"] .lang-en { display: none !important; }
body[data-lang="zh"] .lang-zh { display: revert !important; }
body[data-lang="zh"] { font-size: 15px; letter-spacing: .01em; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b0a0c;
  padding: 14px 30px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-block;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 14px 30px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(200, 163, 106, .05); }

/* ---------------------------------------------------------------- header */

.site-hd {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--hd);
  display: flex;
  align-items: center;
  background: rgba(10, 9, 11, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line2);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.site-hd.scrolled { background: rgba(10, 9, 11, .95); border-bottom-color: var(--line); }

.site-hd nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; min-height: 44px; } /* F31 */
.logo-mark { width: 30px; height: 30px; display: block; object-fit: contain; }
.wm {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: .06em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wm small {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .38em;
  color: var(--muted);
  text-transform: uppercase;
}

.navlinks { display: flex; gap: 34px; }
.navlinks a {
  position: relative;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color .3s var(--ease);
}
.navlinks a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .35s var(--ease);
}
.navlinks a:hover, .navlinks a.on { color: var(--ink); }
.navlinks a:hover::after, .navlinks a.on::after { width: 100%; }

.navtools { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.lang, .cartbtn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .16em;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.lang:hover, .cartbtn:hover { border-color: var(--accent); color: var(--accent); }
.cartbtn .n { color: var(--accent); }

@media (max-width: 900px) {
  :root { --hd: 62px; }
  .navlinks { gap: 18px; }
  .navlinks a { font-size: 10.5px; letter-spacing: .12em; }
  .wm { font-size: 17px; }
  .wm small { display: none; }
}
@media (max-width: 640px) {
  /* the nav wraps onto a second row here — site.js measures the real height
     and overrides --hd, this value is the no-JS fallback */
  :root { --hd: 114px; }
  .site-hd nav { gap: 10px; }
  .navlinks { order: 3; width: 100%; }
  .site-hd { height: auto; padding: 10px 0 0; }
  .site-hd nav { flex-wrap: wrap; }
  .navlinks {
    justify-content: space-between;
    border-top: 1px solid var(--line2);
    margin-top: 10px;
    padding: 0;                          /* F6: was 10px 0 */
  }
  .navlinks a { padding: 14px 0; }       /* F7: 45px tall */
  .lang, .cartbtn { min-height: 44px; }  /* F7 */
}
/* F6: logo mark stays; header back to 2 rows */
@media (max-width: 359px) { .wm { display: none; } }
/* F29: tap height on tablets (641-900) */
@media (min-width: 641px) and (max-width: 900px) {
  .navlinks a { padding: 14px 0; }
  .lang, .cartbtn { min-height: 44px; }  /* deviation: Odin §6.5 wants 44px here too; F7 only covered <=640 */
}

/* ---------------------------------------------------------------- footer */

.site-ft {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
  padding: 64px 0 34px;
}
.ft-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.2fr;
  gap: 36px;
  padding-bottom: 46px;
}
@media (max-width: 1100px) { .ft-cols { grid-template-columns: 1fr 1fr 1fr; gap: 32px; } }
@media (max-width: 760px) { .ft-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ft-cols { grid-template-columns: 1fr; } }

.ft-links {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding-bottom: 20px; font-size: 12px;
}
.ft-links a { color: var(--muted); transition: color .3s var(--ease); }
.ft-links a:hover { color: var(--accent); }

.ft-cols h4 {
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.ft-cols a, .ft-cols p { display: block; color: var(--ink); font-size: 13.5px; margin: 0 0 10px; }
.ft-cols a { color: var(--muted); transition: color .3s var(--ease); }
.ft-cols a:hover { color: var(--accent); }
.ft-mark { font-family: var(--serif); font-size: 26px; margin-bottom: 12px; }
.ft-cols .ft-note { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 34ch; } /* F23 */

.site-ft .copy {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .06em;
}

/* ------------------------------------------------------------ model cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.card {
  position: relative;
  display: block;
  background: var(--bg2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.card:hover { border-color: rgba(200, 163, 106, .45); }
.card .ph { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg3); }
.card .ph img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  display: block;
  transition: transform .9s var(--ease), opacity .6s var(--ease);
}
.card:hover .ph img { transform: scale(1.055); }
.card .flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(10, 9, 11, .82);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 9px; letter-spacing: .24em; text-transform: uppercase;
  padding: 5px 10px;
}
.card .body { padding: 16px 16px 18px; }
.card .arch { font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.card .nm { font-family: var(--serif); font-size: 26px; line-height: 1.1; margin: 5px 0 8px; }
.card .meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; } /* F15 */
.card .pr { color: var(--ink); font-family: var(--serif); font-size: 18px; white-space: nowrap; }
.card .was { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-right: 6px; }

/* ------------------------------------------------------------- utilities */

.sec { padding-block: 86px; }                 /* F2 */
main > .sec:last-child { padding-bottom: 0; }  /* F17 */
.sec-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.sec-hd h2 { font-family: var(--serif); font-size: clamp(28px, 4.4vw, 50px); line-height: 1.05; }
.sec-hd .lead { color: var(--muted); max-width: 46ch; font-size: 14px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- age gate */

.agegate {
  position: fixed; inset: 0; z-index: 999;
  background: #060507;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  text-align: center;
}
.agegate .box { max-width: 480px; }
.agegate .mk { width: 44px; margin: 0 auto 26px; display: block; }
.agegate h2 { font-family: var(--serif); font-size: clamp(30px, 6vw, 46px); line-height: 1.1; margin-bottom: 16px; }
.agegate p { color: var(--muted); font-size: 13.5px; line-height: 1.75; margin: 0 0 28px; }
.agegate .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.agegate .fine { font-size: 11px; color: var(--muted); margin-top: 26px; }

/* ----------------------------------------------------------- mini cart */

.bfcart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
  width: min(420px, 100%);
  background: var(--bg2);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.bfcart.open { transform: none; }
.bfcart-veil {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(6, 5, 7, .7);
  opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease);
}
.bfcart-veil.open { opacity: 1; pointer-events: auto; }
.bfcart header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.bfcart header h3 { font-family: var(--serif); font-size: 22px; }
.bfcart header button { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; width: 44px; height: 44px; margin-right: -12px; } /* F13 */
.bfcart .items { flex: 1; overflow-y: auto; padding: 8px 24px; }
.bfcart .it { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line2); }
.bfcart .it img { width: 62px; height: 78px; object-fit: cover; background: var(--bg3); flex: 0 0 auto; }
.bfcart .it .t { font-size: 12.5px; line-height: 1.5; }
.bfcart .it .p { font-family: var(--serif); font-size: 16px; margin-top: 5px; }
.bfcart .it .x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; min-width: 44px; margin-right: -12px; } /* F13 */
.bfcart .empty { color: var(--muted); font-size: 13px; padding: 40px 0; text-align: center; }
.bfcart footer { padding: 20px 24px calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); } /* F22 */
.bfcart .sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.bfcart .sum .v { font-family: var(--serif); font-size: 26px; }
.bfcart footer .btn { width: 100%; text-align: center; }
.bfcart .hint { color: var(--muted); font-size: 11px; margin-top: 12px; line-height: 1.6; }

/* ----------------------------------------------------- policy documents */

.doc { max-width: 76ch; padding-bottom: 20px; }
.doc h1 { font-family: var(--serif); font-size: clamp(32px, 6vw, 60px); line-height: 1.02; margin: 12px 0 14px; }
.doc .strap { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.doc .eff {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 26px;
}
.doc h2 { font-family: var(--serif); font-size: clamp(20px, 3vw, 27px); margin: 42px 0 12px; }
.doc p { color: var(--muted); font-size: 14.5px; line-height: 1.85; margin: 0 0 14px; }
.doc p strong { color: var(--ink); font-weight: 500; }
.doc a { color: var(--accent); }
.doc a:hover { text-decoration: underline; }
.doc ul { list-style: none; padding: 0; margin: 0 0 18px; }
.doc li {
  position: relative; padding-left: 20px; margin-bottom: 8px;
  color: var(--muted); font-size: 14.5px; line-height: 1.8;
}
.doc li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.doc .aside {
  border-left: 1px solid var(--accent); padding: 4px 0 4px 18px;
  margin: 26px 0 0; color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6;
}
.doc .zhnote {
  border: 1px solid var(--line); background: var(--bg2);
  padding: 16px 18px; font-size: 13px; color: var(--muted); line-height: 1.8; margin: 26px 0 0;
}
.doc .more { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc .more a { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.doc .more a:hover { color: var(--accent); text-decoration: none; }

/* ------------------------------------------------------------ toast */

.bftoast {
  position: fixed; left: 50%; bottom: 28px; z-index: 300;
  transform: translate(-50%, 20px);
  background: var(--bg3);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: .04em;
  padding: 13px 22px;
  white-space: nowrap;                 /* F21 */
  max-width: calc(100vw - 36px);       /* F21 */
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.bftoast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------- Odin F16 / F26 / F27 (phones) */

@media (max-width: 640px) {
  .ft-cols a { padding: 11px 0; margin: 0; min-height: 44px; }   /* F16: 44px rows (13.5px x1.6 + 22 = 43.6, so min-height) */
  .ft-links { gap: 0 22px; }
  .ft-links a { padding: 13px 0; }             /* F16: 45px rows */
  .doc .more a { padding: 12px 0; min-height: 44px; }  /* F26 (+min-height: 12px text x1.6 + 24 = 43.2) */
}
@media (max-width: 560px) {                    /* F27 */
  .sec { padding-block: 64px; }
  .site-ft { margin-top: 64px; }
}

/* ------------------------------------------------ contact details (canon §1) */

.ft-social { display: flex; flex-wrap: wrap; gap: 0 18px; }
.ft-cols .ft-social a { display: inline-block; }
.ft-sub { color: var(--muted); font-size: 12px; }
.site-ft .copy .addr { color: var(--muted); }

/* ------------------------------------------ trust bar (SOP-07.2), existing tokens */

.trust {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-top: 20px; padding: 14px 0;
  border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2);
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.trust .ti { display: inline-flex; align-items: center; gap: 9px; }
.trust .ti::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
