/* ==========================================================================
   Sanyuan Herbs — site-wide skin layer over syh.css (P001 redesign palette)
   Source of truth: structure/page-visualizations/sanyuan-herbs-p001-homepage-redesign.html
   Load order: syh.css (structure) → syh-skin.css (this, tokens + component skin)
               → p1-redesign.css (front page only, .herbal-page scope).
   Same-specificity overrides win by later load order — no !important needed.
   Header/footer markup, menus and links are NOT touched, only re-skinned.
   ========================================================================== */

/* ---------- 1. Token remap (.syh-site scope) ---------- */
body { background: #fbf8f1; }

.syh-site {
  /* mugwort green scale → P001 redesign green scale */
  --syh-green-900: #203128;
  --syh-green-800: #273c32;
  --syh-green-700: #304839;
  --syh-green-600: #3f5c49;
  --syh-green-500: #58725d;
  --syh-green-400: #718a73;
  --syh-green-300: #a3b4a2;
  --syh-green-200: #d2ddd0;
  --syh-green-100: #e7ede4;
  --syh-green-50:  #eef2eb;

  /* deep forest base → green-980 */
  --syh-forest: #17251d;
  --syh-forest-deep: #17251d;

  /* cinnabar seal accents → clay family */
  --syh-cinnabar: #a56448;
  --syh-cinnabar-dark: #8f5238;
  --syh-amber: #9b8158;

  /* paper & ink → P001 paper system */
  --syh-paper: #f5f0e5;
  --syh-cream: #fbf8f1;
  --syh-ink: #202a24;
  --syh-muted: #59645c;
  --syh-line: rgba(32, 49, 40, .15);
  --syh-line-strong: rgba(32, 49, 40, .28);

  /* radii → 12 / 18 / 28 / 38 */
  --syh-radius-sm: 12px;
  --syh-radius: 18px;
  --syh-radius-lg: 28px;
  --syh-radius-xl: 38px;

  /* type → Georgia serif + system sans (no webfonts) */
  --syh-font-serif: Georgia, 'Times New Roman', serif;
  --syh-font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  background:
    radial-gradient(circle at 10% 3%, rgba(112, 138, 114, .13), transparent 30rem),
    radial-gradient(circle at 90% 22%, rgba(165, 100, 72, .07), transparent 25rem),
    linear-gradient(180deg, #fbf8f1, #f5f0e5 70%, #efe8dc);
}

/* Kill the rice-paper grain overlay */
.syh-site::before { content: none; }

/* ---------- 2. Type ---------- */
.syh-site h1, .syh-site h2, .syh-site h3, .syh-site h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -.03em;
}
.syh-site h1 { line-height: 1.05; }
.syh-site h2 { line-height: 1.06; }
.syh-site a { text-underline-offset: 4px; }

/* ---------- 3. Buttons → 999px pills ---------- */
.syh-site .syh-btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--syh-font-sans);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-transform: none;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), background-color .25s cubic-bezier(.2, .7, .2, 1), color .25s cubic-bezier(.2, .7, .2, 1), border-color .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s cubic-bezier(.2, .7, .2, 1);
}
.syh-site .syh-btn:hover { transform: translateY(-2px); }
.syh-site .syh-btn--primary {
  background: #273c32;
  border-color: #273c32;
  color: #fff;
}
.syh-site .syh-btn--primary:hover {
  background: #203128;
  border-color: #203128;
  color: #fff;
}
.syh-site .syh-btn--ghost {
  border-color: rgba(32, 49, 40, .28);
  background: rgba(255, 255, 255, .32);
  color: #203128;
}
.syh-site .syh-btn--ghost:hover {
  background: rgba(255, 255, 255, .6);
  color: #17251d;
}
.syh-site .syh-btn--light {
  background: #f7f4eb;
  border-color: #f7f4eb;
  color: #203128;
}
.syh-site .syh-btn--light:hover {
  background: #fff;
  border-color: #fff;
  color: #17251d;
}

/* ---------- 4. Brand seal → blob ink mark (CSS-only, "三" glyph hidden) ---------- */
.syh-site .syh-brand-seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 54% 46% 62% 38% / 43% 56% 44% 57%;
  background: none;
  color: inherit;
  font-size: 0;
  line-height: 0;
  transform: rotate(-16deg);
}
.syh-site .syh-brand-seal::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 4px;
  width: 1px;
  height: 25px;
  background: currentColor;
  opacity: .8;
  transform: rotate(16deg);
}
.syh-site .syh-brand-name strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.03em;
  color: inherit;
}
/* "Chinese Herbal Wellness" sub-label — visually hidden (prototype has none) */
.syh-site .syh-brand-name span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. Header (inner pages default: sticky glass) ---------- */
.syh-site .syh-header {
  background: rgba(251, 248, 241, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(39, 60, 50, .10);
  box-shadow: 0 8px 30px rgba(30, 47, 38, .05);
}
.syh-site .syh-header .syh-wrap { min-height: 76px; }
.syh-site .syh-nav ul.syh-nav-list a.syh-nav-link {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #203128;
}
.syh-site .syh-nav ul.syh-nav-list a.syh-nav-link:hover {
  background: rgba(32, 49, 40, .07);
  color: #a56448;
}
.syh-site .syh-nav ul.syh-nav-list a.syh-nav-link[aria-current="page"] {
  background: #273c32;
  color: #fff;
}
.syh-site .syh-nav-toggle {
  color: #203128;
  border-color: rgba(32, 49, 40, .28);
  border-radius: 999px;
}
.syh-site .syh-nav-toggle:hover { background: rgba(32, 49, 40, .07); }

/* Icon buttons → circular ghost buttons (same 3 links, unchanged) */
.syh-site .syh-icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(32, 49, 40, .28);
  border-radius: 50%;
  color: #203128;
}
.syh-site .syh-icon-btn:hover {
  background: rgba(32, 49, 40, .07);
  color: #17251d;
}
.syh-site .syh-icon-btn i, .syh-site .syh-icon-btn svg { width: 1.15rem; height: 1.15rem; }

/* ---------- 6. Footer → solid green-980, no gradients or ring ornament ---------- */
.syh-site .syh-footer { background: #17251d; }
.syh-site .syh-footer::after { content: none; }
.syh-site .syh-footer-col h3,
.syh-site .syh-footer .syh-footer-assess strong {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #d9e3da;
}
.syh-site .syh-footer-seal {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 54% 46% 62% 38% / 43% 56% 44% 57%;
  font-size: 0;
  line-height: 0;
  transform: rotate(-16deg);
}
.syh-site .syh-footer-seal::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 4px;
  width: 1px;
  height: 25px;
  background: currentColor;
  opacity: .8;
  transform: rotate(16deg);
}
.syh-site .syh-footer-brand strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -.03em;
}

/* ---------- 7. Homepage header — two states over the hero ---------- */
/* Top state: absolute, transparent, white ink under the utility strip.
   --syh-util-h is measured by p1-redesign.js (fallback = utility min-height). */
body.syh-home .syh-site .syh-header {
  --syh-h-fg: #fff;
  --syh-h-line: rgba(255, 255, 255, .5);
  --syh-h-hover-bg: rgba(255, 255, 255, .14);
  position: absolute;
  top: var(--syh-util-h, 2.55rem);
  left: 0;
  right: 0;
  z-index: 90;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: var(--syh-h-fg);
}
body.syh-home .syh-site .syh-header .syh-brand-name strong { color: var(--syh-h-fg); }
body.syh-home .syh-site .syh-header .syh-nav ul.syh-nav-list a.syh-nav-link {
  color: var(--syh-h-fg);
  opacity: .88;
}
body.syh-home .syh-site .syh-header .syh-nav ul.syh-nav-list a.syh-nav-link:hover {
  background: var(--syh-h-hover-bg);
  color: var(--syh-h-fg);
  opacity: 1;
}
body.syh-home .syh-site .syh-header .syh-nav ul.syh-nav-list a.syh-nav-link[aria-current="page"] {
  background: var(--syh-h-hover-bg);
  color: var(--syh-h-fg);
}
body.syh-home .syh-site .syh-header .syh-nav ul.syh-nav-list a.syh-nav-link .syh-chev { opacity: .7; }
body.syh-home .syh-site .syh-header .syh-icon-btn {
  border-color: var(--syh-h-line);
  color: var(--syh-h-fg);
}
body.syh-home .syh-site .syh-header .syh-icon-btn:hover {
  background: var(--syh-h-hover-bg);
  color: var(--syh-h-fg);
}
body.syh-home .syh-site .syh-header .syh-nav-toggle {
  border-color: var(--syh-h-line);
  color: var(--syh-h-fg);
}
body.syh-home .syh-site .syh-header .syh-nav-toggle:hover {
  background: var(--syh-h-hover-bg);
  color: var(--syh-h-fg);
}

/* Scrolled state: fixed glass, ink text */
body.syh-home .syh-site .syh-header.is-scrolled {
  --syh-h-fg: #203128;
  --syh-h-line: rgba(32, 49, 40, .28);
  --syh-h-hover-bg: rgba(32, 49, 40, .07);
  position: fixed;
  top: 0;
  background: rgba(251, 248, 241, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(39, 60, 50, .10);
  box-shadow: 0 8px 30px rgba(30, 47, 38, .05);
  color: var(--syh-h-fg);
}
body.admin-bar.syh-home .syh-site .syh-header.is-scrolled { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar.syh-home .syh-site .syh-header.is-scrolled { top: 46px; }
}

/* Mobile nav panel on home keeps ink-on-cream (panel bg is cream in both states) */
@media (max-width: 1100px) {
  body.syh-home .syh-site .syh-header .syh-nav a.syh-nav-link,
  body.syh-home .syh-site .syh-header .syh-nav .syh-nav-caret,
  body.syh-home .syh-site .syh-header .syh-nav ul li a { color: #203128; }
  body.syh-home .syh-site .syh-header.nav-open .syh-nav a.syh-nav-link[aria-current="page"] {
    background: #273c32;
    color: #fff;
  }
}

/* ---------- 9. v6 navigation & footer structure (SEO/GEO architecture v6, 2026-08-29) ---------- */

/* Utility bar right links (header.php v6: Wholesale + Track/Account) */
.syh-site .syh-utility-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

/* Footer grid: brand + 6 nav columns (v6 sheet 8 — Shop/Learn/Trust/Support/For Business/Policies).
   Same specificity as syh.css rule 1599, wins by later load order; media fallbacks below
   must also live here (skin loads after syh.css, so syh.css media rules alone won't apply). */
.syh-site .syh-footer-grid {
  grid-template-columns: 1.15fr repeat(6, minmax(0, .72fr));
}
@media (max-width: 1100px) {
  .syh-site .syh-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .syh-site .syh-footer-grid { grid-template-columns: 1fr; }
}
