/* ============================================================
   K8天生赢家 · 共享样式表 /assets/site.css
   暖杏纸张底 · 深墨绿命令栏 · 琥珀金点睛 · 砖红价格
   ============================================================ */

:root {
  --paper: #FBF3E6;
  --sand: #F1E3CB;
  --green-deep: #123A32;
  --green-mid: #1F5A4C;
  --teal: #2FBFA6;
  --amber: #C98A2B;
  --amber-soft: #E8B85C;
  --brick: #A8503F;
  --ink: #2B2A28;
  --muted: #6E6A61;
  --white: #FFFFFF;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --radius-organic: 28px 8px 28px 8px;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Courier New", monospace;

  --wrap: 1280px;
  --pad: clamp(18px, 4vw, 40px);
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--amber-soft); }

#main-content { scroll-margin-top: 96px; }
#main-content:focus { outline: none; }

/* ---------- 2. 中文排版基调 ---------- */
h1, h2, h3 {
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
}
p { text-wrap: pretty; }

/* ---------- 3. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.container--narrow { max-width: 800px; }

.section { padding-block: clamp(48px, 6vw, 88px); }
.section--sand { background-color: var(--sand); }
.section--green { background-color: var(--green-deep); color: #F4ECDD; }
.section--brick { background-color: var(--brick); color: #FFF6EE; }
.section--green .section-title,
.section--brick .section-title { color: #FFF8EA; }
.section--green .lede,
.section--brick .lede { color: rgba(251, 243, 230, 0.72); }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, var(--gutter));
}
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* ---------- 4. 通用文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--amber);
  flex: 0 0 auto;
}
.section--green .eyebrow,
.section--brick .eyebrow { color: rgba(251, 243, 230, 0.7); }

.section-title {
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--green-deep);
  text-wrap: balance;
  margin-top: 12px;
}

.lede {
  margin-top: 14px;
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.75;
  color: var(--muted);
}

.note-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--muted);
  align-self: start;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--amber { background-color: var(--amber-soft); color: #2B1C05; }
.btn--amber:hover { background-color: #F2CA7C; }

.btn--brick { background-color: var(--brick); color: #FFF6EE; }
.btn--brick:hover { background-color: #B95C49; }

.btn--green { background-color: var(--green-deep); color: var(--paper); }
.btn--green:hover { background-color: var(--green-mid); }

.btn--ghost {
  background-color: transparent;
  color: var(--green-deep);
  border-color: rgba(18, 58, 50, 0.28);
}
.btn--ghost:hover {
  background-color: rgba(232, 184, 92, 0.18);
  border-color: var(--amber);
}

.btn--sm { padding: 10px 16px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- 6. 标签 / 统计 / 卡片 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--sand);
  color: var(--green-deep);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tag--amber { background-color: var(--amber-soft); color: #3A2607; }
.tag--teal { background-color: rgba(47, 191, 166, 0.16); color: #17685A; }
.tag--brick { background-color: rgba(168, 80, 63, 0.14); color: #8C3F30; }
.tag--outline {
  background-color: transparent;
  border-color: rgba(18, 58, 50, 0.24);
  color: var(--green-deep);
}
.tag:hover { background-color: var(--amber-soft); }

.stat { display: grid; gap: 4px; }
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--green-deep);
}
.stat__label {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.section--green .stat__num,
.section--brick .stat__num { color: var(--amber-soft); }
.section--green .stat__label,
.section--brick .stat__label { color: rgba(251, 243, 230, 0.68); }

.card {
  background-color: var(--white);
  border: 1px solid rgba(18, 58, 50, 0.1);
  border-radius: var(--radius-organic);
  padding: clamp(18px, 2.4vw, 28px);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.card:hover,
.card:focus-within {
  transform: translateY(-2px);
  border-color: var(--amber);
  box-shadow: 0 16px 34px -24px rgba(18, 58, 50, 0.75);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-block: 18px 0;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.breadcrumb a { transition: color 0.18s var(--ease); }
.breadcrumb a:hover {
  color: var(--green-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumb__sep { color: rgba(110, 106, 97, 0.45); }

/* ---------- 8. 图片容器基础规则 ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-organic);
  background-color: var(--sand);
}
.figure > img,
.figure > picture > img,
.figure > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }

.figure__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 6px 13px;
  border-radius: 999px;
  background-color: rgba(251, 243, 230, 0.93);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ---------- 9. 跳转链接与阅读进度 ---------- */
.skip-link {
  position: absolute;
  left: var(--pad);
  top: -96px;
  z-index: 130;
  padding: 11px 20px;
  border-radius: 0 0 14px 14px;
  background-color: var(--amber-soft);
  color: #2B1C05;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0; }

.reading-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background-image: linear-gradient(90deg, var(--teal), var(--amber-soft));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 10. 头部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--green-deep);
  color: #F4ECDD;
  border-bottom: 1px solid rgba(232, 184, 92, 0.22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-width: 0;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px 4px 13px 4px;
  background-color: var(--amber-soft);
  color: var(--green-deep);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.brand__name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #FCF6E9;
  white-space: nowrap;
}
.brand__sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(251, 243, 230, 0.62);
  white-space: nowrap;
}

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 14px);
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 2px 13px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(251, 243, 230, 0.78);
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  background-color: var(--amber-soft);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}
.site-nav__link::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--teal);
  transform: scale(0);
  transition: transform 0.2s var(--ease);
}
.site-nav__link:hover { color: #FFF8EA; }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: #FFF8EA; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"]::before { transform: scale(1); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.header-tools__quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(232, 184, 92, 0.35);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(251, 243, 230, 0.72);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.header-tools__quick:hover {
  background-color: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--green-deep);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(232, 184, 92, 0.4);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.04);
  color: #FBF3E6;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: background-color 0.2s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform 0.2s var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background-color: var(--green-deep);
  color: #F0E8D9;
  padding-block: clamp(44px, 5.5vw, 78px) 26px;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(232, 184, 92, 0.2) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.55;
  pointer-events: none;
}
.site-footer > .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(112px, 0.7fr)) minmax(230px, 1.25fr);
  gap: clamp(22px, 3vw, 46px);
  padding-bottom: clamp(30px, 4vw, 44px);
  border-bottom: 1px solid rgba(232, 184, 92, 0.2);
}

.footer-brand__link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FCF6E9;
}
.footer-brand__link:hover { color: var(--amber-soft); }
.footer-claim {
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(240, 232, 217, 0.72);
}

.footer-col { min-width: 0; }
.footer-col__title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--amber-soft);
}
.footer-col__list { display: grid; gap: 9px; }
.footer-col__link {
  font-size: 14px;
  color: rgba(240, 232, 217, 0.78);
  transition: color 0.18s var(--ease);
}
.footer-col__link:hover {
  color: var(--amber-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.footer-contact__row { display: grid; gap: 1px; }
.footer-contact__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(240, 232, 217, 0.5);
}
.footer-contact__value {
  font-size: 14px;
  line-height: 1.6;
  color: #F4ECDD;
  overflow-wrap: anywhere;
}
.footer-contact__value--num {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--amber-soft);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  padding-top: 20px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(240, 232, 217, 0.55);
}
.footer-legal { font-family: var(--font-mono); }
.footer-copy { color: rgba(240, 232, 217, 0.62); }

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1180px) {
  .brand__sub { letter-spacing: 0.04em; }
  .site-nav__link { font-size: 13.5px; }
  .header-tools__quick { display: none; }
}

@media (max-width: 1024px) {
  html { scroll-padding-top: 84px; }
  #main-content { scroll-margin-top: 84px; }

  .site-header__inner {
    flex-wrap: wrap;
    gap: 0 12px;
    min-height: 64px;
    padding-block: 10px;
  }
  .brand { flex: 1 1 auto; order: 1; }
  .brand__name { font-size: 17.5px; }
  .brand__sub { font-size: 10.5px; letter-spacing: 0.04em; }
  .nav-toggle { display: inline-flex; order: 2; }

  .site-nav {
    order: 4;
    flex: 1 1 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-top: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(232, 184, 92, 0.22);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__link {
    padding: 13px 14px;
    font-size: 15.5px;
    border-radius: 10px;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link::before { display: none; }
  .site-nav__link[aria-current="page"] {
    background-color: rgba(232, 184, 92, 0.1);
    box-shadow: inset 3px 0 0 var(--amber-soft);
  }

  .header-tools {
    order: 5;
    flex: 1 1 100%;
    display: none;
    gap: 10px;
    padding: 12px 0 16px;
  }
  .site-nav[data-open="true"] ~ .header-tools { display: flex; }
  .header-tools__quick { display: inline-flex; flex: 0 0 auto; }
  .header-tools .btn { flex: 1 1 auto; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
  .footer-claim { max-width: 46ch; }
}

@media (max-width: 720px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .section { padding-block: clamp(40px, 9vw, 56px); }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-meta { justify-content: flex-start; }
  .note-vertical { display: none; }
}

@media (max-width: 420px) {
  .brand__sub { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 13. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .card:hover,
  .card:focus-within { transform: none; }
}
